@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@400;500;700;800&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg: #fff8ef;
  --paper: #fffdf8;
  --paper-tint: #fff1dc;
  --ink: #1f1c27;
  --muted: #635c6f;
  --line: #1f1c2718;
  --accent: #ff6b42;
  --accent-soft: #ffe0d5;
  --accent-strong: #d94b25;
  --sky: #54baf5;
  --mint: #86da8a;
  --lemon: #ffd85e;
  --pink: #ff94c2;
  --shadow: 0 14px 40px rgba(43, 30, 24, 0.08);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 216, 94, 0.35), transparent 24rem),
    radial-gradient(circle at top right, rgba(84, 186, 245, 0.22), transparent 22rem),
    var(--bg);
  font-family: "Inter", sans-serif;
  line-height: 1.5;
}

body.theme-netflix {
  --accent: #ef5b43;
  --accent-soft: #ffe0d8;
  --accent-strong: #ca351c;
}

body.theme-disney {
  --accent: #3e83ff;
  --accent-soft: #dfeaff;
  --accent-strong: #1859d8;
}

body.theme-hulu {
  --accent: #21b454;
  --accent-soft: #d8f7e3;
  --accent-strong: #0c8c3a;
}

body.theme-max {
  --accent: #ff5cc8;
  --accent-soft: #ffe1f4;
  --accent-strong: #da2ea0;
}

body.theme-prime {
  --accent: #00a4c7;
  --accent-soft: #d8f6ff;
  --accent-strong: #007f9a;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

button,
input {
  font: inherit;
}

.site-ribbon {
  height: 14px;
  background: linear-gradient(90deg, #ff6b42 0 20%, #ffd85e 20% 40%, #54baf5 40% 60%, #86da8a 60% 80%, #ff94c2 80% 100%);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1100px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 0;
}

.brand {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 1rem;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-frame {
  width: min(1100px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.hero-card,
.card,
.ad-slot,
.stat-card,
.result-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card,
.card,
.result-panel,
.stat-card {
  background: var(--paper);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto 1.5rem 0 auto;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, white) 0%, transparent 70%);
  pointer-events: none;
}

.hero-card-compact {
  max-width: 42rem;
}

.page-intro {
  max-width: 42rem;
  margin-bottom: 1.25rem;
}

.eyebrow,
.section-label,
.result-label,
.ad-label,
.stat-label {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.96;
}

h1 {
  margin-top: 0.6rem;
  font-size: clamp(2.7rem, 9vw, 5.8rem);
  max-width: 12ch;
}

h2 {
  margin-top: 0.55rem;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
}

.lede,
.featured-card p,
.card p,
.field-help,
.result-copy,
.ad-copy {
  color: var(--muted);
}

.lede {
  max-width: 42rem;
  margin-top: 1rem;
  font-size: 1.06rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.78rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
}

.button-primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.button-secondary {
  background: var(--paper);
}

.home-grid,
.calculator-layout {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.featured-card,
.card {
  padding: 1.2rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

.link-list,
.coming-list {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.link-list a {
  font-weight: 600;
}

.coming-list li {
  padding: 0.8rem 0.9rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent-soft) 35%, white);
}

.ad-slot {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 45%, white), #fff),
    var(--paper);
  min-height: 132px;
  padding: 1rem;
}

.ad-slot-rail {
  min-height: 260px;
}

.ad-copy {
  margin-top: 0.65rem;
  max-width: 18rem;
}

.calculator-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 62%, white) 0%, #fff 100%);
  border-color: color-mix(in srgb, var(--accent-strong) 26%, white);
  box-shadow:
    0 24px 56px rgba(43, 30, 24, 0.12),
    0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 1rem;
}

.calculator-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 10px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 42%, var(--lemon)), color-mix(in srgb, var(--accent) 35%, var(--sky)));
  z-index: -1;
}

.calculator-card::after {
  content: "";
  position: absolute;
  width: 18rem;
  height: 18rem;
  right: -6rem;
  top: -7rem;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, white) 0%, transparent 70%);
  z-index: -1;
}

.calculator-layout > .stack .card,
.calculator-layout > .stack .ad-slot {
  background: color-mix(in srgb, var(--paper) 86%, white);
  box-shadow: 0 10px 26px rgba(43, 30, 24, 0.06);
}

.service-strip {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
  margin-top: 0.4rem;
}

.service-pill {
  flex: 0 0 auto;
  padding: 0.68rem 0.92rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.service-pill[data-service="netflix"] {
  background: #fff1ec;
}

.service-pill[data-service="disney-plus"] {
  background: #edf3ff;
}

.service-pill[data-service="hulu"] {
  background: #edfff1;
}

.service-pill[data-service="max"] {
  background: #fff0fa;
}

.service-pill[data-service="amazon-prime-video"] {
  background: #ebfaff;
}

.service-pill.is-active {
  border-color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px var(--accent-strong);
}

.calculator-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.selected-services {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.selected-service-row {
  display: grid;
  gap: 0.5rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.selected-service-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.selected-service-name {
  margin: 0;
  font-weight: 700;
}

.selected-service-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.field-label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 700;
}

.price-input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 1.2rem;
  font-weight: 700;
}

.price-input-compact {
  max-width: 11rem;
}

.field-help {
  margin: 0.65rem 0 0;
  font-size: 0.95rem;
}

.field-help-strong {
  color: var(--ink);
  font-weight: 600;
}

.result-panel {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, white), #fff 78%);
  border-color: color-mix(in srgb, var(--accent-strong) 18%, white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  padding: 1rem;
}

.result-total {
  margin: 0.45rem 0 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.result-subtotal {
  margin: 0.35rem 0 0;
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
}

.result-copy {
  margin: 0.65rem 0 0;
  max-width: 28rem;
}

.stat-grid {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.9);
  padding: 0.95rem;
}

.stat-value {
  margin: 0.45rem 0 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.ad-slot-mobile {
  margin-top: 1rem;
}

.info-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

@media (min-width: 760px) {
  .site-header,
  .site-frame {
    width: min(1180px, calc(100% - 2.25rem));
  }

  .site-frame {
    padding-bottom: 4.5rem;
  }

  .home-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.82fr);
  }

  .calculator-layout {
    grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.82fr);
    align-items: start;
  }

  .calculator-grid {
    grid-template-columns: minmax(250px, 0.9fr) minmax(0, 1.1fr);
    align-items: stretch;
  }

  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calculator-layout > .stack {
    padding-top: 1.4rem;
  }
}

@media (min-width: 980px) {
  .hero-card,
  .card,
  .calculator-card,
  .ad-slot {
    padding: 1.35rem;
  }

  .ad-slot-mobile {
    display: none;
  }

  .ad-slot-rail {
    display: block;
  }
}

@media (max-width: 979px) {
  .ad-slot-rail {
    display: none;
  }

  .ad-slot-rail {
    min-height: 170px;
  }
}

@media (max-width: 759px) {
  .service-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }

  .service-pill:last-child {
    grid-column: 1 / -1;
  }

  .calculator-grid > .result-panel {
    order: -1;
  }

  .site-frame {
    padding-bottom: 2.8rem;
  }

  h1 {
    max-width: 10ch;
  }

  .site-nav {
    gap: 0.65rem;
  }

  .site-nav a {
    font-size: 0.96rem;
  }
}
