/* Raising the Gifted Mind landing page. Mobile first; breakpoints at 600px and 900px. */

@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 200 900; font-display: swap; src: url("fonts/source-serif-4.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("fonts/source-serif-4-italic.woff2") format("woff2"); }

:root {
  --bg: #151718;          /* banner background */
  --bg-2: #1c1e20;
  --line: #34322d;
  --text: #ebe6dc;
  --text-2: #bdb6a8;
  --text-3: #aca89f;
  --gold: #c6a16b;        /* banner gold */
  --gold-hi: #d9b985;
  --gold-text: #cba977;  /* gold for small text: 7:1 or better on every dark surface */
  --paper: #f4efe6;
  --paper-ink: #1d1d1b;
  --paper-ink-2: #514f4a;
  --mind: #2563b0;
  --heart: #e8743b;
  --body: #6cc49c;
  --sans: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Scrolling works as usual; only the scrollbar is hidden. */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--serif); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-hi); text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, .eyebrow, .btn, .subtitle, nav, .tt-title, dt, .price { font-family: var(--sans); }
h1 { font-weight: 600; font-size: clamp(2.1rem, 8vw, 3.4rem); line-height: 1.08; margin: 0.15em 0 0.2em; letter-spacing: -0.01em; }
h2 { font-weight: 600; font-size: clamp(1.45rem, 5.2vw, 2rem); line-height: 1.2; margin: 0 0 0.6em; }
h3 { font-weight: 600; font-size: 1.15rem; line-height: 1.3; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
.eyebrow { font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-text); margin: 0 0 0.6em; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.narrow .eyebrow { color: var(--gold-text); }

/* Hero */
.hero { background: var(--bg); }
.hero-art img { width: 100%; max-width: 560px; margin: 0 auto; }
.hero-text { padding-top: 22px; padding-bottom: 48px; }
.subtitle { font-weight: 500; color: var(--gold-text); font-size: 1rem; line-height: 1.4; margin: 0 0 1em; }
.lead { color: var(--text-2); font-size: 1.125rem; }

/* Buttons */
.actions { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 12px; }
.actions.center { align-items: stretch; }
.btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 1.05rem; line-height: 1.25; text-decoration: none; transition: background-color .15s, color .15s, border-color .15s; }
.btn small { font-family: var(--serif); font-weight: 400; font-size: 0.85rem; margin-top: 2px; }
.btn-gold { background: var(--gold); color: var(--bg); }
.btn-gold:hover { background: var(--gold-hi); }
.btn-ghost { border: 1.5px solid var(--gold); color: var(--gold-hi); }
.btn-ghost:hover { background: rgba(198, 161, 107, 0.12); }
.btn-dark { background: var(--bg); color: #fff; }
.btn-dark:hover { background: #2a2c2e; }
.fine-link { font-size: 0.95rem; margin: 0; }

/* Sections */
.band { padding: 56px 0; border-top: 1px solid var(--line); }
.band.alt { background: var(--bg-2); }
.band p { color: var(--text-2); }
.band h2 + p, .narrow p { color: var(--text); }
.two { display: grid; gap: 28px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; }
.card p { color: var(--text-2); }
.figure-card { margin: 18px 0 0; }
.figure-card a { display: block; background: #fff; border-radius: 8px; padding: 10px; }
.figure-card figcaption { font-size: 0.85rem; color: var(--text-3); margin-top: 8px; }

/* Try This box, styled like the book's tip blurbs */
.trythis { margin-top: 16px; border-left: 4px solid var(--gold); background: rgba(198, 161, 107, 0.08); border-radius: 0 8px 8px 0; padding: 14px 16px; }
.tt-title { font-weight: 600; color: var(--text); margin: 0 0 8px; }
.trythis dl { margin: 0; }
.trythis dt { font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-text); margin-top: 10px; }
.trythis dd { margin: 2px 0 0; color: var(--text); font-size: 1rem; }

/* Lists */
.lists h2 { font-size: 1.35rem; }
ul.ticks { list-style: none; padding: 0; margin: 0; }
ul.ticks li { position: relative; padding-left: 26px; margin-bottom: 10px; color: var(--text); }
ul.ticks li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--gold); }

/* Worksheets, on paper */
.paper { background: var(--paper); color: var(--paper-ink); border-top: 0; }
.paper .eyebrow { color: #634b26; }
.paper p, .paper .section-lead { color: var(--paper-ink-2); }
.paper h2 + p { color: var(--paper-ink-2); }
.section-lead { max-width: 640px; }
.sheets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0 8px; }
.sheets figure { margin: 0; }
.sheets img { border-radius: 4px 4px 0 0; background: #fff; -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
.sheets figcaption { font-size: 0.9rem; line-height: 1.45; color: var(--paper-ink-2); margin-top: 10px; }
.sheets figcaption strong { color: var(--paper-ink); font-family: var(--sans); font-weight: 600; }
.newsletter { margin-top: 32px; padding: 22px 18px; border-radius: var(--radius); border: 1px solid #ddd4c4; background: #fbf8f2; }
.newsletter h3 { color: var(--paper-ink); }
.newsletter p:last-child { margin-bottom: 0; }
.text-link { font-family: var(--sans); font-weight: 600; color: #654b25; }

/* Buy */
.buy-grid { display: grid; gap: 28px; justify-items: start; }
.cover { width: 62%; max-width: 260px; border-radius: 4px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); justify-self: center; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 0 0 0.8em; }
.price .was { color: var(--text-3); text-decoration: line-through; font-size: 1.25rem; }
.price .now { color: var(--gold-hi); font-weight: 600; font-size: 2.2rem; line-height: 1; }
.price .code { color: var(--text-2); font-family: var(--serif); font-size: 0.95rem; }

/* About */
.about-grid { display: grid; gap: 20px; justify-items: center; text-align: center; }
.about .logo { width: 170px; }
.about p { color: var(--text-2); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 0.9rem; color: var(--text-3); }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; font-size: 0.9rem; }
.footer nav a { color: var(--text-2); text-decoration: none; }
.footer nav a:hover { color: var(--gold-hi); }
.footer p { margin: 0; max-width: 720px; }

@media (min-width: 600px) {
  .wrap { padding: 0 28px; }
  .actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .actions.center { justify-content: center; align-items: center; }
  .sheets { gap: 28px; }
  .card { padding: 28px; }
  .newsletter { padding: 26px 28px; }
  .buy-grid { grid-template-columns: 240px 1fr; align-items: center; }
  .cover { width: 100%; }
  .about-grid { grid-template-columns: 170px 1fr; text-align: left; justify-items: start; align-items: center; }
}

@media (min-width: 900px) {
  body { font-size: 1.125rem; }
  .hero-art img { max-width: 2033px; width: 100%; }
  .hero-text { text-align: center; padding-top: 32px; padding-bottom: 72px; max-width: 820px; }
  .hero-text .actions { justify-content: center; }
  .band { padding: 80px 0; }
  .two { grid-template-columns: 1fr 1fr; gap: 32px; }
  .lists { gap: 56px; }
  .sheets { max-width: 760px; }
}

/* Not-found page */
.notfound { border-top: 0; min-height: 100vh; display: flex; align-items: center; text-align: center; }
.notfound .logo { width: 140px; margin: 0 auto 24px; }
.notfound h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); }

/* Ornaments and motion. Static by default; motion only when the visitor allows it. */
/* The arch sits above centered hero text, so it only shows on wide screens. */
.sunrise { display: none; overflow: visible; }
.sunrise path { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sunrise .d2 { stroke-width: 2.4; opacity: .85; }
.sunrise .d3 { stroke-width: 2.6; }
.btn { transition: background-color .15s, color .15s, border-color .15s, transform .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-gold:hover { box-shadow: 0 8px 22px rgba(198, 161, 107, 0.22); }
.trythis { position: relative; border-left-color: transparent; }
.trythis::before { content: ""; position: absolute; left: -4px; top: 0; bottom: 0; width: 4px; background: var(--gold); transform-origin: top; }

@media (min-width: 900px) {
  .sunrise { display: block; height: auto; margin: 4px auto 20px; width: 58px; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Hero: the arch draws itself, then the orb rises into it. Plays once. */
  .sunrise .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(.65, 0, .35, 1) .15s forwards; }
  .sunrise .d2 { animation-delay: .4s; }
  .sunrise .d3 { animation-duration: 1s; animation-delay: 1.1s; }
  .sunrise .orb { opacity: 0; transform: translateY(14px); transform-box: fill-box; transform-origin: center; animation: rise 1.3s cubic-bezier(.22, 1, .36, 1) .9s forwards; }
  .hero-text > :not(.sunrise) { animation: fade-up .9s cubic-bezier(.22, 1, .36, 1) both; }
  .hero-text > .eyebrow { animation-delay: .25s; }
  .hero-text > h1 { animation-delay: .35s; }
  .hero-text > .subtitle { animation-delay: .45s; }
  .hero-text > .lead { animation-delay: .55s; }
  .hero-text > .actions, .hero-text > .fine-link { animation-delay: .65s; }

  /* As you scroll: blocks fade up and the Try This edge grows.
     Browsers without scroll-driven animations simply show everything. */
  @supports (animation-timeline: view()) {
    .reveal { animation: fade-up linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    .trythis.grow::before { animation: grow linear both; animation-timeline: view(); animation-range: entry 20% cover 45%; }
  }
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
