/* styles.css */

/* =========================
   THEME TOKENS
   ========================= */
:root {
  --red: #e50914;
  --black: #221f1f;
  --green: #09e540;
  --blue: #123da5;
  --pink: #f706bf;
  --purple: #cc14b1;

  --bg0: #151416;
  --bg1: #1b1a1d;

  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.09);
  --stroke: rgba(255, 255, 255, 0.16);

  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.72);

  --r-lg: 44px;
  --r-md: 32px;
  --r-sm: 24px;

  --shadow-deep:
    0 18px 40px rgba(0, 0, 0, 0.55), 0 2px 0 rgba(255, 255, 255, 0.06) inset;

  --shadow-soft:
    0 14px 32px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.08) inset;

  --shadow-inset:
    inset 10px 10px 24px rgba(0, 0, 0, 0.35),
    inset -10px -10px 24px rgba(255, 255, 255, 0.06);

  --glow-red: 0 0 34px rgba(229, 9, 20, 0.35);
  --glow-green: 0 0 34px rgba(9, 229, 64, 0.28);
  --glow-blue: 0 0 34px rgba(18, 61, 165, 0.3);
  --glow-pink: 0 0 34px rgba(247, 6, 191, 0.26);
}

/* =========================
   BASE
   ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 10% 10%,
      rgba(229, 9, 20, 0.25),
      transparent 60%),
    radial-gradient(900px 600px at 90% 15%,
      rgba(9, 229, 64, 0.18),
      transparent 55%),
    radial-gradient(900px 650px at 12% 95%,
      rgba(18, 61, 165, 0.22),
      transparent 55%),
    radial-gradient(1000px 700px at 92% 92%,
      rgba(247, 6, 191, 0.16),
      transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

.container {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 0 0;
}

/* Floating glow orbs (background accents) */
.glass-accent {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(42px);
  opacity: 0.85;
  transform: translateZ(0);
}

.glass-accent-1 {
  top: 6%;
  left: 3%;
  background: radial-gradient(circle,
      rgba(229, 9, 20, 0.26) 0%,
      transparent 70%);
}

.glass-accent-2 {
  bottom: 12%;
  right: 6%;
  background: radial-gradient(circle,
      rgba(9, 229, 64, 0.2) 0%,
      transparent 70%);
}

.glass-accent-3 {
  top: 58%;
  left: 10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle,
      rgba(18, 61, 165, 0.22) 0%,
      transparent 70%);
}

.glass-accent-4 {
  top: 18%;
  right: 12%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle,
      rgba(247, 6, 191, 0.16) 0%,
      transparent 70%);
}

/* =========================
   3D / GLASS CARD PRIMITIVE
   ========================= */
.card {
  position: relative;
  border-radius: var(--r-lg);
  background: linear-gradient(145deg,
      rgba(255, 255, 255, 0.1),
      rgba(255, 255, 255, 0.04));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-deep);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform: translateZ(0);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg,
      rgba(229, 9, 20, 0.45),
      rgba(9, 229, 64, 0.35),
      rgba(18, 61, 165, 0.35),
      rgba(247, 6, 191, 0.32));
  opacity: 0.16;
  filter: blur(18px);
  z-index: 0;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 160px at 50% 0%,
      rgba(255, 255, 255, 0.14),
      transparent 60%),
    radial-gradient(600px 120px at 30% 100%,
      rgba(255, 255, 255, 0.06),
      transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.card>* {
  position: relative;
  z-index: 1;
}

.lift {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
  will-change: transform;
}

.lift:hover {
  transform: translateY(-6px);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.58),
    0 1px 0 rgba(255, 255, 255, 0.09) inset;
  border-color: rgba(255, 255, 255, 0.22);
}

/* =========================
   HERO
   ========================= */
.hero {
  margin: 22px 24px 26px;
  padding: 34px 24px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.96);
  text-shadow:
    3px 3px 0 rgba(18, 61, 165, 0.85),
    0 0 22px rgba(9, 229, 64, 0.25),
    0 0 26px rgba(229, 9, 20, 0.2);
  margin-bottom: 0.5rem;
}

.brand-name {
  font-size: 0.8rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--green);
  text-shadow: 0 0 10px rgba(9, 229, 64, 0.4);
  margin-bottom: 5px;
  font-weight: 800;
}

.hero .sub {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.95rem;
}

/* =========================
   LAYOUT
   ========================= */
.content-grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 2rem;
  padding: 0 24px 24px;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
}

@media (max-width: 968px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    margin: 18px 14px 18px;
  }

  .content-grid {
    padding: 0 14px 14px;
  }
}

/* =========================
   ADS (PNG PLACEHOLDER)
   ========================= */
.ad-horizontal {
  margin: 0 24px 22px;
}

@media (max-width: 968px) {
  .ad-horizontal {
    margin: 0 14px 14px;
  }
}

.ad-space {
  padding: 16px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: linear-gradient(145deg,
      rgba(255, 255, 255, 0.1),
      rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  position: relative;
}

.ad-space.ad-horizontal {
  min-height: 150px;
}

.ad-space::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 120px at 20% 0%,
      rgba(229, 9, 20, 0.18),
      transparent 60%),
    radial-gradient(600px 120px at 80% 100%,
      rgba(247, 6, 191, 0.14),
      transparent 60%);
  pointer-events: none;
}

.ad-space-left {
  min-height: 600px;
  position: sticky;
  top: 24px;
}

.ad-space img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--r-md) - 10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(18, 61, 165, 0.2),
    0 0 18px rgba(229, 9, 20, 0.18);
  transform: translateZ(0);
}

.ad-horizontal img {
  object-fit: contain;
}

/* =========================
   CALCULATOR
   ========================= */
.calc-container {
  border-radius: var(--r-lg);
  min-height: 75vh;
  overflow: hidden;
  background: linear-gradient(145deg,
      rgba(255, 255, 255, 0.1),
      rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow-deep);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
}

.calc-container::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg,
      rgba(9, 229, 64, 0.55),
      rgba(18, 61, 165, 0.45),
      rgba(247, 6, 191, 0.35),
      rgba(229, 9, 20, 0.35));
  opacity: 0.14;
  filter: blur(18px);
  pointer-events: none;
}

.calc-header {
  position: relative;
  padding: 16px 22px;
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.96);
  background:
    linear-gradient(135deg, rgba(9, 229, 64, 0.26), rgba(18, 61, 165, 0.18)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.calc-header .badge {
  display: inline-block;
  margin-left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-inset);
  color: rgba(255, 255, 255, 0.86);
}

/* Vertical stretch: canvas fills this body's height */
.calc-body {
  padding: 22px;
  position: relative;
  height: calc(75vh - 64px);
  /* approx: container height minus header */
}

#calculatorCanvas {
  width: 100%;
  height: 100%;
  display: block;

  border-radius: var(--r-sm);
  background: linear-gradient(145deg,
      rgba(255, 255, 255, 0.05),
      rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.18);

  box-shadow:
    inset 0 0 28px rgba(0, 0, 0, 0.45),
    0 18px 40px rgba(0, 0, 0, 0.5),
    var(--glow-green),
    var(--glow-red);
}

/* =========================
   FOOTER
   ========================= */
footer {
  max-width: 1400px;
  margin: 26px auto 0;
  padding: 26px 24px 34px;
}

footer .footer-card {
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 28px 20px;
  text-align: center;
  background: linear-gradient(145deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 -18px 42px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

footer p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(9, 229, 64, 0.14);
}

/* Mobile: keep your 75vw calc container + vertical stretch */
@media (max-width: 968px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .calc-container {
    width: 75vw;
    max-width: 75vw;
    margin: 0 auto;
    justify-self: center;
  }

  .ad-horizontal {
    max-width: 75vw;
    margin-left: auto;
    margin-right: auto;
  }

  .calc-body {
    height: calc(75vh - 64px);
  }

  #calculatorCanvas {
    width: 100%;
    height: 100%;
  }

  .mobile-hide {
    display: none;
  }
}

/* =========================
   BUTTONS
   ========================= */
.btn-coffee {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
  padding: 8px 20px;
  /* Brown Gradient */
  background: linear-gradient(135deg, #8B5A2B 0%, #5C3A1E 100%);
  color: #fff;
  /* White text */
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  box-shadow: 0 4px 15px rgba(92, 58, 30, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-coffee:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(92, 58, 30, 0.6);
  color: #fff;
}

.btn-coffee:active {
  transform: translateY(0) scale(0.98);
}

.emoji-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  font-size: 14px;
  color: #000;
  /* reset emoji color context if needed */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}