/* Palette sampled from the client's own packaging and listing graphics.
   One ground, one ink, one accent; purple fields. One motif: the orange disc
   that holds the "C" in the product's name on the box. */
:root {
  --ground: #FFFFFF;
  --tint: #F5E8FB;
  --tint-2: #E3CDE9;
  --tint-3: #D2B4DE;
  --purple: #650B95;
  --deep: #3A0F5E;
  --ink: #27093F;
  --muted: #5E4A70;
  --orange: #F7941D;
  --error: #A32D2D;
  --white: #FFFFFF;

  --display: "Archivo", system-ui, sans-serif;
  --sans: "Instrument Sans", system-ui, sans-serif;

  /* Five type steps */
  --t-display: clamp(44px, 13.6vw, 128px);
  --t-h2: clamp(28px, 3.6vw, 48px);
  --t-statement: clamp(19px, 1.8vw, 24px);
  --t-body: 17px;
  --t-small: 14px;

  --r: 28px;
  --margin: clamp(16px, 2.2vw, 32px);
  --gap-section: clamp(56px, 6vw, 96px);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 16px; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--t-body)/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.02em;
}
h1 { font-size: var(--t-display); line-height: 0.9; }
h1 span { display: block; white-space: nowrap; }
h2 { font-size: var(--t-h2); line-height: 1; }
h3 { font-size: 20px; line-height: 1.15; letter-spacing: -0.01em; }

p { margin: 0; }

.wrap { max-width: 1440px; margin-inline: auto; padding-inline: var(--margin); }

.on-deep { color: var(--white); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.on-deep :focus-visible { outline-color: var(--white); }

.price {
  font: 800 44px/1 var(--display);
  font-stretch: 125%;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.statement { max-width: 30em; font-size: var(--t-statement); line-height: 1.4; text-wrap: pretty; }

.nowrap { white-space: nowrap; }
.circle { border-radius: 50%; aspect-ratio: 1 / 1; object-fit: cover; }

/* Buttons: one shape, fully round, like the disc */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 0 36px;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: var(--ink);
  font: 500 var(--t-body)/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.15s var(--ease);
}
.btn-small { min-height: 48px; padding: 0 24px; }
.btn-deep { background: var(--ink); color: var(--white); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--ink); color: var(--white); transform: translateY(-2px); }
  .on-deep .btn:hover, .btn-deep:hover { background: var(--white); color: var(--ink); }
}

/* Nav */
.nav { position: relative; z-index: 2; background: var(--deep); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 10px; }
.logo {
  color: var(--white);
  font: 800 18px/1.2 var(--display);
  font-stretch: 125%;
  letter-spacing: -0.01em;
  text-decoration: none;
}
/* 48px touch targets for the text links */
.logo, .nav-links a, .footer-row a { display: inline-flex; align-items: center; min-height: 48px; }
.nav-links { display: none; gap: 32px; }
.nav-links a { color: var(--white); text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
}

/* 1. Hero */
.hero { position: relative; overflow: hidden; background: var(--deep); }
.hero-inner { position: relative; z-index: 1; padding-block: 24px 0; }
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hero-sub { max-width: 30em; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; }
.hero-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.hero-price { font-size: var(--t-body); line-height: 1.4; }
.hero-price .price { display: block; margin-bottom: 6px; color: var(--orange); }
.hero-note { color: var(--tint-2); font-size: var(--t-small); }

/* The disc and the box: phone layout */
.disc {
  --d: min(124vw, 600px);
  position: absolute;
  left: calc(50% + min(24vw, 100px) - var(--d) / 2);
  bottom: calc(var(--d) * -0.275);
  width: var(--d);
  height: var(--d);
  border-radius: 50%;
  background: var(--orange);
}
.hero-box {
  position: relative;
  z-index: 1;
  width: min(62vw, 380px);
  margin: 40px auto -24px;
  rotate: -6deg;
}
.hero-box img { width: 100%; }

/* 2. Product */
.product { padding-block: var(--gap-section); }
.panel {
  display: grid;
  gap: 32px;
  padding: clamp(24px, 4vw, 56px);
  border-radius: var(--r);
  background: var(--deep);
}
.panel-text { display: grid; gap: 20px; align-content: center; }
.panel-pic { width: min(100%, 380px); margin-inline: auto; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0 0; }
.facts div { padding: 24px clamp(20px, 2.4vw, 32px); border-radius: var(--r); background: var(--tint-2); }
.facts dt { font: 800 clamp(24px, 6.6vw, 44px)/1 var(--display); font-stretch: 125%; white-space: nowrap; }
.facts dd { margin: 12px 0 0; }
.label-tile {
  display: grid;
  gap: 32px;
  margin-top: 8px;
  padding: clamp(24px, 4vw, 56px);
  border-radius: var(--r);
  background: var(--tint);
}
.label-pic { width: 100%; max-width: 420px; border-radius: var(--r); }
.label { margin: 20px 0 0; }
.label dt { font: 800 15px/1.3 var(--display); font-stretch: 125%; margin-bottom: 4px; }
.label dd { max-width: 36em; margin: 0 0 18px; }
.label dd:last-child { margin-bottom: 0; }

/* 3. Bundle picker: tiles that step up */
.bundles-section { padding-block: var(--gap-section); background: var(--tint); }
.bundles-head { display: grid; gap: 24px; margin-bottom: 32px; }
.perday { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.perday legend { float: left; margin-right: 8px; padding: 0; font-weight: 500; }
.perday label { position: relative; cursor: pointer; }
.perday input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.perday span {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--white);
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s;
}
.perday input:checked + span { background: var(--ink); color: var(--white); }
.perday input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }

.bundles { display: grid; gap: 8px; }
.bundle {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}
.bundle-a { background: var(--white); }
.bundle-b { background: var(--tint-2); }
.bundle-c { background: var(--purple); color: var(--white); }
.bundle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bundle:has(input:checked) { outline: 5px solid var(--orange); outline-offset: -5px; }
.bundle:has(input:focus-visible) { outline: 5px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .bundle:hover { transform: translateY(-4px); }
}
.bundle-check {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 32px;
  height: 32px;
  border: 2px solid currentColor;
  border-radius: 50%;
  transition: background-color 0.15s, border-color 0.15s;
}
.bundle-check::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 3px;
  width: 9px;
  height: 16px;
  border: solid var(--ink);
  border-width: 0 3px 3px 0;
  rotate: 45deg;
  opacity: 0;
}
.bundle:has(input:checked) .bundle-check { border-color: var(--orange); background: var(--orange); }
.bundle:has(input:checked) .bundle-check::after { opacity: 1; }
.bundle-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 28px; }
.bundle-qty { font-size: 20px; font-weight: 500; }
.bundle .price { margin-bottom: 10px; }
.bundle-line { position: relative; padding-left: 20px; }
.bundle-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
}
.bundle-best { font-weight: 500; }

.order-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
  padding: 24px 28px;
  border-radius: var(--r);
  background: var(--deep);
}
.order-bar-text { display: flex; flex-direction: column; gap: 8px; }
.order-bar output { font-variant-numeric: tabular-nums; }
.member-note { margin-top: 16px; font-weight: 500; }
.pay-line { margin-top: 12px; color: var(--muted); font-size: var(--t-small); }

/* 4. Membership */
.member { padding-block: var(--gap-section); background: var(--deep); }
.member-inner { display: grid; gap: 40px; }
.member h2 { margin-bottom: 20px; }
.member-check {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  margin-top: 28px;
  padding: 0 28px 0 20px;
  border-radius: 999px;
  background: var(--purple);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.member-check:has(input:checked) { background: var(--orange); color: var(--ink); }
.member-check + .member-check { margin: 8px 0 0; }
.member-check-quiet { background: none; border: 2px solid var(--purple); }
.member-check input { flex: none; width: 26px; height: 26px; margin: 0; accent-color: var(--ink); }
.member-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(18px, 1.8vw, 24px);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.member-table th, .member-table td { padding: 18px 0; border-bottom: 1px solid var(--purple); font-weight: 400; }
.member-table th:first-child { text-align: left; }
.member-table thead th { font-size: var(--t-small); font-weight: 500; }
.member-table td:last-child, .member-table thead th:last-child { color: var(--orange); font-weight: 500; }

/* 5. Testimonies */
.reviews { padding-block: var(--gap-section); }
.reviews-inner { display: grid; gap: 32px; }
.doctor { margin-bottom: 8px; }
.doctor-video { width: min(100%, 420px); height: auto; margin-inline: auto; border-radius: var(--r); background: var(--ink); }
.doctor-note { color: var(--tint-2); font-size: var(--t-small); }
.reviews-inner { margin-top: 40px; }
.steps-title { margin: 40px 0 16px; }
.steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: center; padding: 20px 24px; border-radius: var(--r); background: var(--tint); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--orange); font: 800 18px/1 var(--display); }
.reviews-body { display: grid; gap: 16px; justify-items: start; }
.reviews-body > :not(.btn) { justify-self: stretch; }
.review-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.review-list li { padding: 28px; border-radius: var(--r); background: var(--tint); }
.review-tag { justify-self: start; display: inline-block; margin-bottom: 12px; padding: 4px 12px; border-radius: 999px; background: var(--orange); font-size: var(--t-small); font-weight: 500; }
.review-by { margin-top: 12px; color: var(--muted); font-size: var(--t-small); font-weight: 500; }
.placeholder-tile { padding: clamp(32px, 6vw, 72px) 28px; border-radius: var(--r); background: var(--tint); color: var(--muted); }

/* 6 and 8. Buy now */
.buy-tile { display: grid; border-radius: var(--r); background: var(--orange); overflow: hidden; }
.buy-tile-text { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; padding: clamp(28px, 4vw, 56px); }
.buy-tile-text p { max-width: 26em; }
.buy-tile-pic { width: 100%; }
.buy-last { padding-bottom: var(--gap-section); }
.buy-last .order-bar { margin-top: 0; }
.buy-last .order-bar-text { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }

/* 7. FAQ: filled tiles */
.faq { padding-block: var(--gap-section); }
.faq-inner { display: grid; gap: 32px; }
.faq-list { display: grid; gap: 6px; }
.faq details { border-radius: var(--r); background: var(--tint); transition: background-color 0.2s; }
.faq details[open] { background: var(--orange); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 60px;
  padding: 14px 24px;
  border-radius: var(--r);
  font-size: 18px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 28px/1 var(--sans); transition: rotate 0.2s var(--ease); }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { max-width: 52ch; padding: 0 24px 24px; }

/* 9. Footer */
.footer { padding: 48px 0 120px; /* room for the sticky buy bar */ background: var(--deep); }
.footer-mark { font: 800 22px/1.15 var(--display); font-stretch: 125%; letter-spacing: -0.01em; }
.footer-row { display: grid; gap: 20px; margin-top: 24px; align-items: center; }
.footer-logo { width: 72px; }
.footer-row p + p { margin-top: 6px; }
.footer-row a { color: var(--white); text-underline-offset: 4px; }

/* Sticky buy bar (mobile only) */
.buy-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px var(--margin) calc(10px + env(safe-area-inset-bottom));
  background: var(--ink);
}
.buy-bar p { display: flex; flex-direction: column; gap: 2px; }
.buy-bar-label { font-size: var(--t-small); }
.buy-bar .price { font-size: 28px; }

/* Checkout dialog: bottom sheet on mobile, centred panel from 720px */
dialog {
  width: 100%;
  max-width: 100%;
  max-height: 92dvh;
  margin: auto 0 0;
  padding: 24px 20px;
  border: 0;
  border-radius: var(--r) var(--r) 0 0;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 12px 40px rgba(39, 9, 63, 0.25); /* taste-skill-ignore: the dialog is an overlay */
  overflow-y: auto;
}
dialog::backdrop { background: rgba(39, 9, 63, 0.7); }
dialog h2 { font-size: 28px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.dialog-close {
  min-height: 48px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--purple);
  font: 500 var(--t-body)/1 var(--sans);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  margin: 0 0 24px;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--tint);
  font-variant-numeric: tabular-nums;
}
.summary dd { margin: 0; text-align: right; }
#done-summary { margin: 20px 0 0; }
.summary dt:last-of-type, .summary dd:last-of-type { font-weight: 500; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, .pay legend { font-size: var(--t-small); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--muted);
  border-radius: 16px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}
.field textarea { padding: 14px 16px; resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--error); }
.hint { color: var(--muted); font-size: var(--t-small); }
.error { color: var(--error); font-size: var(--t-small); font-weight: 500; }

.pay { margin: 0 0 16px; padding: 0; border: 0; }
.pay label { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; }
.pay input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--purple); }

#order-error, #review-error { margin-bottom: 12px; }
dialog form .btn { width: 100%; }
dialog form .btn:disabled { background: var(--tint-2); cursor: default; }
.privacy { margin-top: 12px; color: var(--muted); font-size: var(--t-small); }
.privacy a { color: var(--purple); }

/* Entrances (only when the script has run) */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] {
    opacity: 0;
    translate: 0 28px;
    transition: opacity 0.6s var(--ease), translate 0.6s var(--ease), transform 0.2s var(--ease);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js [data-rise].in { opacity: 1; translate: 0 0; }

  /* The load moment: the disc swells in, the name and the box follow */
  .disc { animation: disc-in 0.9s var(--ease) both; }
  .hero-text > * { animation: rise-in 0.7s var(--ease) both; }
  .hero-text > :nth-child(2) { animation-delay: 0.08s; }
  .hero-text > :nth-child(3) { animation-delay: 0.16s; }
  .hero-text > :nth-child(4) { animation-delay: 0.24s; }
  .hero-box { animation: box-in 0.9s 0.2s var(--ease) both; }
  .hero-box img { animation: float 7s 1.2s ease-in-out infinite alternate; }
  @keyframes disc-in { from { scale: 0.6; opacity: 0; } }
  @keyframes rise-in { from { opacity: 0; translate: 0 28px; } }
  @keyframes box-in { from { opacity: 0; transform: translateY(60px) rotate(8deg); } }
  @keyframes float { to { transform: translateY(-10px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (min-width: 720px) {
  .bundles { grid-template-columns: repeat(3, 1fr); }
  .bundle .price { font-size: clamp(30px, 3.8vw, 44px); }
  .order-bar { flex-direction: row; align-items: center; justify-content: space-between; }
  .facts, .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps li { grid-template-columns: 1fr; align-content: start; }
  .label-tile { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(32px, 5vw, 80px); }
  .footer-row { grid-template-columns: auto 1fr auto; gap: 24px; }
  dialog { width: 460px; margin: auto; padding: 28px; border-radius: var(--r); }
  .buy-bar { display: none; }
  .footer { padding-bottom: 48px; }
}

@media (min-width: 860px) {
  :root { --t-display: clamp(56px, 6.6vw, 104px); --box-h: clamp(440px, 44vw, 660px); }
  .nav-links { display: flex; }
  .buy-tile { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
  .buy-tile-pic { align-self: end; }
  .bundles-head { grid-template-columns: 1fr auto; align-items: end; }
  .hero { display: flex; align-items: center; min-height: calc(var(--box-h) + 120px); }
  .hero-inner { width: 100%; padding-block: 48px 72px; }
  .hero-text { max-width: 56%; gap: 28px; }
  .disc {
    left: auto;
    right: -14vw;
    bottom: auto;
    top: 50%;
    width: min(66vw, 980px);
    height: min(66vw, 980px);
    translate: 0 -50%;
  }
  .hero-box {
    position: absolute;
    top: 50%;
    right: calc(22vw - var(--box-h) * 0.348);
    width: auto;
    height: var(--box-h);
    margin: 0;
    translate: 0 -50%;
  }
  .hero-box img { width: auto; height: 100%; }
  .panel { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); align-items: center; gap: clamp(32px, 5vw, 80px); }
  .member-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
  .reviews-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
  .faq-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
  .faq-inner h2 { position: sticky; top: 96px; }
}
