/* ==========================================================
   TOKENS
   ========================================================== */
:root {
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);

  --paper: #F6F4FB;
  --sheet: #FFFFFF;
  --panel: #ECE7F6;
  --viewer: #E3DDF0;
  --viewer-bar: #D5CEE7;
  --ink: #241B35;
  --muted: #675F78;
  --line: #D9D2E7;
  --line-strong: #B4A9CE;
  --accent: #C8235C;          /* hibiscus: buttons */
  --accent-deep: #8F1443;
  --accent-text: #B01C51;     /* hibiscus: text on paper */
  --accent-soft: #F8DDE8;
  --teal: #0F766E;            /* screen teal: the three steps */
  --hi: rgba(255, 206, 74, .75);
  --focus: #241B35;

  --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15101D;
    --sheet: #1F1829;
    --panel: #241C32;
    --viewer: #0E0A15;
    --viewer-bar: #1B1426;
    --ink: #EFEAF8;
    --muted: #B0A7C2;
    --line: #382D4B;
    --line-strong: #5A4A78;
    --accent-text: #FF8AB0;
    --accent-soft: rgba(255, 138, 176, .15);
    --teal: #5FCBBE;
    --hi: rgba(255, 206, 74, .32);
    --focus: #EFEAF8;
  }
}
:root[data-theme="dark"] {
  --paper: #15101D;
  --sheet: #1F1829;
  --panel: #241C32;
  --viewer: #0E0A15;
  --viewer-bar: #1B1426;
  --ink: #EFEAF8;
  --muted: #B0A7C2;
  --line: #382D4B;
  --line-strong: #5A4A78;
  --accent-text: #FF8AB0;
  --accent-soft: rgba(255, 138, 176, .15);
  --teal: #5FCBBE;
  --hi: rgba(255, 206, 74, .32);
  --focus: #EFEAF8;
}

/* ==========================================================
   BASE
   ========================================================== */
*, *::before, *::after { box-sizing: inherit; }
html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.72 var(--serif);
  -webkit-font-smoothing: antialiased;
}
p, ul, ol, h1, h2, h3, figure, blockquote { margin: 0; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Reading progress */
.progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  pointer-events: none;
}
.progress i {
  display: block; height: 3px; background: var(--accent);
  transform-origin: left center; transform: scaleX(0);
}

/* ==========================================================
   LAYOUT
   ========================================================== */
main { padding: clamp(2rem, 6vw, 4.5rem) 1.25rem 3rem; }
.prose { max-width: 40rem; margin-inline: auto; }
.stack > * + * { margin-top: 1.15rem; }
.section { margin-top: clamp(3.5rem, 8vw, 5.5rem); }

h1 {
  font-weight: 800;
  font-size: clamp(2.35rem, 7.2vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
h2 {
  font-weight: 800;
  font-size: clamp(1.75rem, 4.6vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.028em;
}
h3 {
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* Hero */
.hero .lede { font-size: 1.25rem; line-height: 1.6; }

/* The marker sweep on the jargon words: the page's one load-time moment */
mark.jargon {
  color: inherit;
  padding: 0 .14em;
  margin: 0 -.05em;
  background:
    linear-gradient(transparent 56%, var(--hi) 56%, var(--hi) 94%, transparent 94%)
    left center / 0% 100% no-repeat;
  animation: sweep .7s cubic-bezier(.3,.7,.2,1) forwards;
  animation-delay: calc(.45s + var(--i, 0) * .22s);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
@keyframes sweep { to { background-size: 100% 100%; } }
@media (prefers-reduced-motion: reduce) {
  mark.jargon { animation: none; background-size: 100% 100%; }
  html { scroll-behavior: auto; }
}

/* The three reasons */
.reasons { list-style: none; padding: 0; margin-top: 2rem; }
.reasons > li {
  display: grid;
  grid-template-columns: 2.9rem minmax(0, 1fr);
  gap: 0 1rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}
.reasons > li:last-child { border-bottom: 1px solid var(--line); }
.reasons .num {
  font: 800 2.9rem/0.95 var(--display);
  letter-spacing: -0.04em;
  color: var(--accent-text);
}
.questions { border-left: 3px solid var(--accent); padding-left: 1rem; }
.questions p {
  font: 600 1.3rem/1.35 var(--display);
  letter-spacing: -0.01em;
}
.questions p + p { margin-top: .15rem; }
@media (min-width: 66rem) {
  .reasons > li { margin-left: -4rem; grid-template-columns: 3rem minmax(0, 1fr); gap: 0 1rem; }
  .reasons > li { width: calc(100% + 4rem); }
}

/* "In short..." */
.short {
  margin-top: 2.25rem;
  padding: 1.6rem 1.6rem 1.7rem;
  background: var(--panel);
  border-left: 5px solid var(--teal);
  border-radius: 4px 14px 14px 4px;
}
.short .lead { font: 600 1.05rem var(--display); color: var(--muted); margin-bottom: .5rem; }
.short .steps p {
  font: 800 clamp(1.4rem, 4.4vw, 1.9rem)/1.2 var(--display);
  letter-spacing: -0.025em;
}
.short .steps p + p { margin-top: .35rem; }

/* ==========================================================
   COUNTRY GATE (full-screen, shown once on landing)
   ========================================================== */
body.gate-open { overflow: hidden; }
.country-gate {
  position: fixed; inset: 0; z-index: 999;
  display: grid; place-items: center;
  padding: 1.25rem;
  padding-top: calc(1.25rem + env(safe-area-inset-top, 0px));
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  background: rgba(21, 16, 29, .62);
  backdrop-filter: blur(3px);
}
.country-gate[hidden] { display: none; }
.country-card {
  width: 100%; max-width: 26rem;
  max-height: 100%; overflow-y: auto;
  background: var(--sheet);
  border-radius: 18px;
  padding: clamp(1.5rem, 5vw, 2.1rem);
  box-shadow: 0 30px 60px -20px rgba(10, 6, 20, .55);
}
.country-card h2 {
  font-size: clamp(1.4rem, 5vw, 1.75rem);
  margin-top: .3rem;
}
.country-sub { margin-top: .6rem; color: var(--muted); font-family: var(--display); font-size: .98rem; line-height: 1.5; }
.country-list {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .6rem;
}
.country-list button {
  display: flex; align-items: center; gap: .55rem;
  padding: .75rem .8rem;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: 600 .98rem/1.2 var(--display);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.country-list button .flag { font-size: 1.25rem; line-height: 1; }
.country-list button:hover { border-color: var(--accent); background: var(--accent-soft); }
.country-skip {
  display: block;
  margin: 1.1rem auto 0;
  background: none; border: none;
  font: 600 .9rem var(--display);
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
.country-skip:hover { color: var(--ink); }
@media (max-width: 26rem) {
  .country-list { grid-template-columns: 1fr; }
}
/* Fixed circular badge, top right — tap to change country */
.country-badge {
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top, 0px));
  right: 1rem;
  z-index: 60;
  width: 2.75rem; height: 2.75rem;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sheet);
  border: 2px solid var(--line);
  box-shadow: 0 8px 20px -8px rgba(20, 10, 40, .35);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.country-badge[hidden] { display: none; }
.country-badge:hover { border-color: var(--accent); }
.country-badge:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (max-width: 30rem) {
  .country-badge {
    width: 2.4rem; height: 2.4rem; font-size: 1.15rem;
    top: calc(.75rem + env(safe-area-inset-top, 0px));
    right: .75rem;
  }
}
/* ==========================================================
   FOUR THINGS SECTION + AI CALLOUT
   ========================================================== */
.disadvantage {
  margin-top: .6rem;
  padding-left: 1rem;
  border-left: 3px solid var(--line-strong);
  color: var(--muted);
  font-size: .98rem;
  line-height: 1.6;
}
.disadvantage + .disadvantage { margin-top: .5rem; }
.disadvantage b { color: var(--ink); font-weight: 700; }

.eyebrow {
  display: block;
  font: 700 .85rem var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: .4rem;
}

.ai-callout {
  margin-top: 1.75rem;
  padding: clamp(1.25rem, 4vw, 1.75rem) clamp(1.25rem, 4vw, 1.9rem);
  background: var(--panel);
  border-radius: 10px;
  border-left: 5px solid var(--accent);
}
.ai-callout .caution {
  font: 700 1.05rem var(--display);
  color: var(--accent-text);
}

.ai-helps { list-style: none; padding: 0; margin-top: 1rem; }
.ai-helps li {
  position: relative;
  padding-left: 1.9rem;
  margin-top: .65rem;
}
.ai-helps li::before {
  content: "";
  position: absolute; left: 0; top: .3em;
  width: 1.15rem; height: 1.15rem;
  border-radius: 50%;
  background: var(--teal);
}
.ai-helps li::after {
  content: "";
  position: absolute; left: .3rem; top: .53em;
  width: .5rem; height: .28rem;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

/* Product introduction */
.product {
  display: grid;
  grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
  gap: 2.25rem;
  align-items: start;
  max-width: 54rem;
  margin: 2.25rem auto 0;
}
.slot {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 4 / 5;
  width: 100%;
  border: 2px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
  overflow: hidden;
  cursor: pointer;
  font: 500 .9rem/1.4 var(--display);
}
.slot:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot-hint { display: grid; gap: .3rem; justify-items: center; padding: 1rem; }
.slot-hint svg { width: 2.6rem; height: 2.6rem; stroke: currentColor; }
.slot-hint b { font-size: 1.05rem; color: var(--ink); }
.slot.filled { border-style: solid; border-color: transparent; box-shadow: 0 16px 36px -14px rgba(36, 27, 53, .5); }
.slot.filled .slot-hint { display: none; }

.how { list-style: none; padding: 0; counter-reset: how; margin-top: 1.1rem; }
.how li {
  counter-increment: how;
  position: relative;
  padding-left: 3rem;
}
.how li + li { margin-top: 1rem; }
.how li::before {
  content: counter(how);
  position: absolute; left: 0; top: .05rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text);
  font: 800 1rem var(--display);
}
.product .title-line { font-weight: 600; }

/* Call-to-action button */
.cta-row { margin-top: 2rem; }
.cta {
  display: inline-flex; align-items: center; gap: 1rem;
  padding: 1.05rem 1.6rem;
  background: var(--accent); color: #fff;
  border-radius: 12px;
  font: 700 1.15rem/1 var(--display);
  letter-spacing: -0.005em;
  text-decoration: none;
  box-shadow: 0 4px 0 var(--accent-deep);
  transition: transform .12s ease, box-shadow .12s ease;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--accent-deep); }
.cta:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-deep); }
.cta:focus-visible { outline-color: var(--focus); }
.cta-price {
  padding-left: 1rem;
  border-left: 1px solid rgba(255,255,255,.5);
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 34rem) {
  .cta { width: 100%; justify-content: center; }
}

/* Testimonials */
.quotes { margin-top: 1.75rem; }
.quote { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.quote:last-child { border-bottom: 1px solid var(--line); }
.quote blockquote { font-size: 1.08rem; line-height: 1.65; }
.quote figcaption { margin-top: .7rem; font: 500 .98rem var(--display); color: var(--muted); }
.quote figcaption b { font-weight: 700; color: var(--ink); }
.quote.feature { border-top: 4px solid var(--accent); padding-top: 1.75rem; }
.quote.feature blockquote {
  font-size: clamp(1.3rem, 3.6vw, 1.6rem);
  line-height: 1.45;
  font-style: italic;
  font-weight: 500;
}

/* PDF viewer */
.viewer {
  max-width: 44rem;
  margin: 2rem auto 0;
  background: var(--viewer);
  border-radius: 14px;
  overflow: hidden;
}
.viewer-bar {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem 1rem;
  background: var(--viewer-bar);
  font: 500 .85rem var(--display);
  color: var(--muted);
}
.viewer-bar svg { flex: none; width: 1.15rem; height: 1.15rem; stroke: var(--accent-text); }
.viewer-bar .file { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-bar .pill {
  flex: none; padding: .15rem .6rem; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 600;
}
.pages { display: grid; gap: 1.4rem; padding: clamp(.75rem, 3vw, 1.5rem); }

.sheet {
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.414;           /* A4 proportions; grows if text needs more room */
  background: #fff;
  color: #241B35;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(20,10,40,.25), 0 18px 34px -14px rgba(20,10,40,.55);
  font-family: var(--serif);
  overflow-wrap: break-word;
}
.sheet-body {
  padding: 8% 9.5% 15%;              /* % of width = same as cqw, works in every browser */
  font-size: .86rem;                 /* fallback for browsers without container units */
  font-size: max(2cqw, .86rem);
  line-height: 1.55;
}
.sheet-body p { margin: 0 0 1em; text-wrap: pretty; }
.sheet .book-title {
  font: 800 2.15em/1.05 var(--display);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #241B35;
  margin: 0;
}
.sheet .book-sub {
  margin: .9em 0 0;
  padding-bottom: 1.1em;
  border-bottom: 3px solid #C8235C;
  font-style: italic;
  font-size: 1.05em;
  color: #4A4060;
}
.sheet .greet { margin-top: 1.6em; font: 700 1.2em var(--display); }
.sheet .said { list-style: none; padding: 0; margin: 0 0 1em; }
.sheet .said li {
  border-left: 3px solid #C8235C;
  border-left: max(.55cqw, 3px) solid #C8235C;
  background: #FBF1F5;
  padding: .55em 1em;
  font-style: italic;
}
.sheet .ask { font: 600 1.15em/1.4 var(--display); color: #A61B4E; padding-left: 1em; border-left: 3px solid #C8235C; border-left: max(.55cqw, 3px) solid #C8235C; }
.sheet .book-h {
  margin: 1.8em 0 .7em;
  font: 800 1.25em/1.2 var(--display);
  letter-spacing: .01em;
  text-transform: uppercase;
  color: #241B35;
}
.sheet .uses { margin: 0 0 1em; padding-left: 1.3em; columns: 2; column-gap: 2em; }
.sheet .uses li { break-inside: avoid; padding-left: .2em; }
.sheet .uses li::marker { color: #C8235C; }
.sheet-foot {
  position: absolute;
  left: 9.5%; right: 9.5%; bottom: 1.1rem;
  padding-top: .5rem;
  left: 9.5cqw; right: 9.5cqw; bottom: 4.5cqw;
  padding-top: 1.6cqw;
  border-top: 1px solid #E5DFF0;
  text-align: center;
  font: 500 .74rem var(--display);
  font-size: max(1.7cqw, .74rem);
  color: #7C7391;
}
.viewer-end { max-width: 44rem; margin: 1.25rem auto 0; text-align: center; color: var(--muted); font-family: var(--display); font-size: .98rem; }

/* Offer */
.ticket {
  margin-top: 1.75rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 20px 40px -26px rgba(36, 27, 53, .45);
}
.ticket .big {
  font: 800 clamp(3.2rem, 12vw, 5rem)/1 var(--display);
  letter-spacing: -0.045em;
  color: var(--accent-text);
}
.ticket .value { margin-top: .5rem; font: 500 1.02rem var(--display); color: var(--muted); }
.ticket .value s { text-decoration-thickness: 2px; text-decoration-color: var(--accent); }
.ticket .pick { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font: 600 .95rem var(--display); color: var(--muted); }
.chips { margin-top: .75rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(8.4rem, 1fr)); gap: .6rem; }
.chip {
  display: grid; gap: .1rem; text-align: left;
  padding: .65rem .8rem;
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px;
  font: 700 1.05rem/1.25 var(--display);
  cursor: pointer;
}
.chip small { font: 500 .8rem var(--display); color: var(--muted); }
.chip:hover { border-color: var(--line-strong); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.fine { margin-top: 1rem; font: 400 .85rem/1.5 var(--display); color: var(--muted); }

footer { padding: 2.5rem 1.25rem 3rem; text-align: center; font: 400 .85rem var(--display); color: var(--muted); }

/* Mobile */
@media (max-width: 47rem) {
  .product { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .product .cover { max-width: 19rem; }
}
@media (max-width: 34rem) {
  body { font-size: 1.06rem; }
  .reasons > li { grid-template-columns: 2.2rem minmax(0, 1fr); gap: 0 .75rem; }
  .reasons .num { font-size: 2.2rem; }
  .short { padding: 1.25rem 1.1rem 1.35rem; }
  .sheet .uses { columns: 1; }
  .viewer-bar .pill { display: none; }
}

/* ==========================================================
   SAMPLE PAGES ON SMALL SCREENS
   Below 40rem the pages stop trying to keep A4 proportions.
   They fill the screen width, keep readable text, and grow
   to fit their content. "Page 1" / "Page 2" sits at the bottom.
   ========================================================== */
@media (max-width: 40rem) {
  .viewer { border-radius: 10px; }
  .pages { gap: 1rem; padding: .6rem; }

  .sheet { aspect-ratio: auto; }
  .sheet-body {
    padding: 1.6rem 1.25rem .6rem;
    font-size: .96rem;
    line-height: 1.6;
  }
  .sheet .book-title { font-size: 1.7em; line-height: 1.08; }
  .sheet .book-sub { font-size: 1em; }
  .sheet .greet { font-size: 1.15em; }
  .sheet .said li,
  .sheet .ask { border-left-width: 3px; }
  .sheet .book-h { font-size: 1.15em; }
  .sheet .uses { columns: 1; }

  .sheet-foot {
    position: static;
    margin: 0 1.25rem;
    padding: .7rem 0 1rem;
    font-size: .78rem;
  }
}
@media (max-width: 22rem) {
  .sheet-body { padding: 1.3rem 1rem .5rem; font-size: .92rem; }
  .sheet-foot { margin: 0 1rem; }
}
