/* Kestle: leadership coaching template.
   1. BRAND SETTINGS: colours and fonts. Edit here first.
   2. Base, 3. Header, 4. Sections, 5. Cards and forms, 6. Footer, 7. Motion, 8. Plain version, 9. Phone. */

/* 1 ---------------------------------------------------------------------- BRAND SETTINGS */
:root {
  --paper: #f3eee3;        /* page background (also the ribbon scene background) */
  --paper-2: #ebe3d3;      /* slightly deeper paper, used for fields and bands */
  --panel: rgba(251, 248, 241, .90);   /* cards sit on the ribbon, so they are nearly opaque */
  --ink: #17202b;          /* text and the thin second strand */
  --ink-2: #4a525d;        /* secondary text */
  --line: rgba(23, 32, 43, .14);
  --accent: #b9461a;       /* buttons, links, highlights (the ribbon colour is set in js/config.js) */
  --accent-deep: #8f3010;

  --font-display: 'Fraunces', 'Cormorant', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/fraunces-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 100 900; font-display: swap; src: url('../fonts/fraunces-latin-wght-italic.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2'); }

/* 2 ---------------------------------------------------------------------- Base */
:root {
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: clamp(20px, 6vw, 92px);
  --max: 1296px;
  --radius: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 400; letter-spacing: -.02em; line-height: 1.04; }
em { font-style: italic; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; transition: top .2s; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

#ribbon { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; display: block; }
main, .footer { position: relative; z-index: 1; }

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 22px; display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--accent); border-radius: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 16px/1 var(--font-body); letter-spacing: .005em; text-decoration: none;
  padding: 18px 28px; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .35s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .35s var(--ease);
}
.btn-primary { background: var(--accent); color: #fff9f1; box-shadow: 0 10px 24px -10px rgba(185, 70, 26, .65); }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(143, 48, 16, .7); }
.btn-ghost { background: rgba(251, 248, 241, .7); color: var(--ink); border-color: rgba(23, 32, 43, .35); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); }
.btn-wide { width: 100%; }

/* 3 ---------------------------------------------------------------------- Header */
.nav { position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: 72px; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; transition: background .3s, box-shadow .3s; }
.nav.scrolled { background: rgba(243, 238, 227, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--font-display); font-size: 21px; letter-spacing: -.01em; }
.mono { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: italic 500 15px/1 var(--font-display); letter-spacing: 0; }
.nav-links { display: flex; gap: 34px; font-size: 15px; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--ink-2); position: relative; padding: 6px 0; transition: color .2s; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }
.btn-nav { padding: 12px 20px; font-size: 14.5px; background: var(--ink); color: var(--paper); }
.btn-nav:hover { background: var(--accent); }

/* 4 ---------------------------------------------------------------------- Sections */
.sec { position: relative; padding: clamp(90px, 11vw, 160px) 0; }
.head { max-width: 640px; }
.head h2, .about-copy h2, .book-copy h2 { font-size: clamp(38px, 4.9vw, 70px); }
.lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); margin: 24px 0 0; max-width: 54ch; }
.head h2 + .lede { margin-top: 22px; }
.head, .about-copy, .book-copy { text-shadow: 0 0 22px var(--paper), 0 0 10px var(--paper); }

/* hero */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: stretch; padding: 0; }
.hero-grid { display: flex; flex-direction: column; justify-content: space-between; padding-top: 140px; padding-bottom: 44px; }
.hero-copy { max-width: 700px; }
.hero h1 { font-size: clamp(76px, 10.4vw, 156px); line-height: .9; letter-spacing: -.035em; font-weight: 380; text-shadow: 0 0 30px var(--paper), 0 0 12px var(--paper); }
.hero h1 .h1-a { display: block; }
.hero h1 .h1-b { display: block; font-weight: 340; color: var(--accent); letter-spacing: -.03em; padding-bottom: .06em; }
.promise { font-family: var(--font-display); font-size: clamp(23px, 2.5vw, 34px); line-height: 1.22; letter-spacing: -.012em; max-width: 21em; margin: 30px 0 0; color: var(--ink); text-shadow: 0 0 20px var(--paper), 0 0 8px var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero-facts { list-style: none; margin: 40px 0 0; padding: 0; display: flex; gap: clamp(24px, 4vw, 56px); flex-wrap: wrap; }
.hero-facts li { display: flex; flex-direction: column; gap: 2px; padding-left: 16px; border-left: 2px solid var(--accent); }
.hero-facts strong { font: 500 22px/1.1 var(--font-display); letter-spacing: -.01em; }
.hero-facts span { font-size: 14px; color: var(--ink-2); }

/* lanes: empty bands where the ribbon does its gesture; js/paths.js measures them */
.lane { height: clamp(150px, 15vw, 210px); }
.tiers .lane { height: clamp(150px, 14vw, 190px); }
.results .lane { height: clamp(120px, 12vw, 170px); margin-bottom: 30px; }

/* how it works: a staircase, so the ribbon can step down with it */
.steps { list-style: none; margin: 96px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: start; counter-reset: s; }
.step { background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px 26px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 24px 40px -30px rgba(23, 32, 43, .4); }
.step:nth-child(2) { margin-top: 84px; }
.step:nth-child(3) { margin-top: 168px; }
.step:nth-child(4) { margin-top: 252px; }
.steps { padding-bottom: 0; }
.step-n { font: italic 400 40px/1 var(--font-display); color: var(--accent); margin-bottom: 14px; }
.step h3 { font-size: 26px; margin-bottom: 10px; }
.step p { font-size: 16px; color: var(--ink-2); margin: 0 0 18px; }
.step-meta { margin-top: auto; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--accent-deep); padding-top: 14px; border-top: 1px solid var(--line); }

/* tiers */
.tier-grid { align-items: stretch; margin-top: 8px; }
.tier { display: flex; flex-direction: column; position: relative; }
.tier h3 { font-size: 30px; }
.tier .price { margin: 18px 0 8px; font-size: 15px; color: var(--ink-2); }
.tier .price span { font: 400 54px/1 var(--font-display); letter-spacing: -.03em; color: var(--ink); margin-right: 6px; }
.tier .tier-note { color: var(--ink-2); font-size: 16px; margin: 0 0 22px; }
.ticks { list-style: none; margin: 0 0 30px; padding: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; font-size: 16px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ''; position: absolute; left: 2px; top: .52em; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg) translateY(-3px); }
.tier .btn { margin-top: auto; }
.tier.tier-main { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 0 40px 70px -36px rgba(23, 32, 43, .75); }
.tier-main .price, .tier.tier-main .tier-note { color: rgba(243, 238, 227, .78); }
.tier.tier-main .price span { color: #fff6ea; }
.tier-main .ticks { border-color: rgba(243, 238, 227, .22); }
.tier-main .ticks li::before { border-color: #ff9a62; }
.badge { position: absolute; top: -14px; left: 28px; background: var(--accent); color: #fff9f1; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 7px 14px; border-radius: 999px; }

/* about */
.about-grid { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: clamp(48px, 8vw, 120px); align-items: center; }
.portrait { margin: 0; position: relative; justify-self: center; width: 100%; max-width: 360px; }
.portrait svg { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(23, 32, 43, .18)); }
.mono-text { font: italic 400 112px 'Fraunces', serif; fill: #17202b; letter-spacing: -.04em; }
.portrait figcaption { text-align: center; font-size: 13px; color: var(--ink-2); margin-top: 54px; }
.about-copy { max-width: 640px; }
.about-copy h2 { margin-bottom: 28px; }
.about-copy p { font-size: 18px; color: var(--ink-2); }
.facts { list-style: none; margin: 34px 0 0; padding: 26px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 14px 44px; font-size: 14.5px; color: var(--ink-2); }
.facts li { display: flex; flex-direction: column; }
.facts strong { font: 500 24px/1.2 var(--font-display); color: var(--ink); letter-spacing: -.01em; }

/* quotes */
.quotes { margin-top: 56px; }
.quote { margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.quote blockquote { margin: 0; }
.quote p { font: 380 clamp(21px, 1.9vw, 25px)/1.34 var(--font-display); letter-spacing: -.01em; margin: 0; }
.quote p::before { content: '\201C'; display: block; font: italic 400 64px/.7 var(--font-display); color: var(--accent); margin-bottom: 6px; }
.quote figcaption { font-size: 14.5px; color: var(--ink-2); padding-top: 18px; border-top: 1px solid var(--line); }
.quote figcaption strong { color: var(--ink); font-weight: 650; }
.sample-note { margin: 30px 0 0; font-size: 13.5px; color: var(--ink-2); }

/* questions */
.faq-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(36px, 7vw, 110px); align-items: start; }
.qa { display: grid; gap: 12px; }
.qa details { background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 16px; transition: background .3s, box-shadow .3s; }
.qa details[open] { background: rgba(255, 252, 246, .96); box-shadow: 0 24px 40px -30px rgba(23, 32, 43, .4); }
.qa summary { list-style: none; cursor: pointer; padding: 22px 64px 22px 26px; font: 450 clamp(19px, 1.7vw, 22px)/1.25 var(--font-display); letter-spacing: -.01em; position: relative; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before, .qa summary::after { content: ''; position: absolute; right: 26px; top: 50%; width: 16px; height: 2px; background: var(--accent); transition: transform .35s var(--ease); }
.qa summary::after { transform: rotate(90deg); }
.qa details[open] summary::after { transform: rotate(0); }
.qa details p { padding: 0 64px 24px 26px; margin: 0; color: var(--ink-2); font-size: 16.5px; }

/* last call */
.book { padding-bottom: clamp(110px, 12vw, 170px); }
.book-grid { display: grid; grid-template-columns: 1fr minmax(380px, 520px); gap: clamp(40px, 8vw, 130px); align-items: start; }
.book-copy { max-width: 520px; }
.bookform { background: var(--panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 3vw, 38px); box-shadow: 0 40px 70px -40px rgba(23, 32, 43, .5); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field input, .field select, .field textarea { width: 100%; font: 400 16px/1.4 var(--font-body); color: var(--ink); background: var(--paper); border: 1.5px solid rgba(23, 32, 43, .22); border-radius: 12px; padding: 14px 16px; transition: border-color .2s, box-shadow .2s; }
.field textarea { resize: vertical; min-height: 92px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(185, 70, 26, .16); }
.form-error { color: #9d2a0b; font-size: 14.5px; margin: -4px 0 14px; font-weight: 500; }
.thanks { text-align: center; padding: 26px 8px; }
.thanks svg { width: 64px; height: 64px; margin: 0 auto 18px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.thanks h3 { font-size: 40px; margin-bottom: 12px; }
.thanks p { color: var(--ink-2); }
.thanks-note { font-size: 13.5px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }

/* cards */
.cards { display: grid; gap: 20px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 32px 32px; box-shadow: 0 24px 40px -30px rgba(23, 32, 43, .4); }
.card h3 { font-size: 28px; margin-bottom: 14px; }
.card p { color: var(--ink-2); font-size: 16.5px; margin: 0; }
.glyph { width: 50px; height: 50px; margin-bottom: 26px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.glyph circle { fill: var(--paper); }

/* 6 ---------------------------------------------------------------------- Footer */
.footer { background: var(--ink); color: rgba(243, 238, 227, .78); padding: 70px 0 46px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px 60px; align-items: start; }
.foot-mark { font: 380 clamp(40px, 5vw, 64px)/1 var(--font-display); letter-spacing: -.03em; color: var(--paper); margin: 0 0 12px; }
.foot-line { margin: 0; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; justify-self: end; font-size: 15.5px; }
.foot-links a { text-decoration: none; border-bottom: 1px solid rgba(243, 238, 227, .3); }
.foot-links a:hover { color: #fff; border-color: #ff9a62; }
.foot-small { grid-column: 1 / -1; font-size: 13.5px; margin: 20px 0 0; padding-top: 24px; border-top: 1px solid rgba(243, 238, 227, .16); }

/* 7 ---------------------------------------------------------------------- Motion */
html.live .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
html.live .reveal.in { opacity: 1; transform: none; }
html.live .hero .reveal:nth-child(2) { transition-delay: .08s; }
html.live .cards .reveal:nth-child(2), html.live .steps .reveal:nth-child(2) { transition-delay: .09s; }
html.live .cards .reveal:nth-child(3), html.live .steps .reveal:nth-child(3) { transition-delay: .18s; }
html.live .steps .reveal:nth-child(4) { transition-delay: .27s; }
html.live .hero-copy > * { opacity: 0; transform: translateY(24px); animation: rise 1s var(--ease) forwards; }
html.live .hero-copy > :nth-child(1) { animation-delay: .1s; }
html.live .hero-copy > :nth-child(2) { animation-delay: .22s; }
html.live .hero-copy > :nth-child(3) { animation-delay: .4s; }
html.live .hero-copy > :nth-child(4) { animation-delay: .52s; }
html.live .hero-facts { opacity: 0; animation: rise 1s var(--ease) .7s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
html.sceneonly .nav, html.sceneonly main, html.sceneonly .footer, html.sceneonly .skip { visibility: hidden; }
html.sceneonly body { overflow: hidden; }

/* 8 ---------------------------------------------------------------------- Plain version (reduced motion, no WebGL) */
html.reduced #ribbon, html.plain #ribbon { display: none; }
html.reduced .hero, html.plain .hero {
  background:
    linear-gradient(90deg, var(--paper) 0%, rgba(243, 238, 227, .86) 34%, rgba(243, 238, 227, 0) 64%),
    url('../poster-scene.webp') right center / cover no-repeat;
}
html.reduced .nav, html.plain .nav { background: rgba(243, 238, 227, .9); }
@media (prefers-reduced-motion: reduce) { .btn, .nav-links a::after, .qa summary::before, .qa summary::after { transition: none; } html { scroll-behavior: auto; } }

/* 9 ---------------------------------------------------------------------- Smaller screens */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .faq-grid, .book-grid { grid-template-columns: 1fr; }
  .foot-links { justify-self: start; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .cards.three { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 240px; justify-self: start; }
  .tier-grid { gap: 52px; }
  .tier-grid .tier { margin: 0; }
}
@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .nav { height: 62px; }
  .nav-name { font-size: 19px; }
  .btn-nav { padding: 11px 16px; font-size: 14px; }
  :root { --gutter: 24px; }
  .sec { padding: 78px 0; }
  .book { padding-top: 112px; }
  .hero-grid { padding-top: 96px; padding-bottom: 28px; }
  .hero { min-height: max(100svh, 780px); }
  .hero h1 { font-size: clamp(64px, 20vw, 92px); }
  .hero h1 .h1-a, .hero h1 .h1-b { display: inline; }
  .hero h1 { line-height: .96; }
  .promise { font-size: 22px; margin-top: 20px; max-width: 16em; }
  .actions { margin-top: 285px; gap: 10px; flex-direction: column; align-items: stretch; max-width: 340px; }
  .hero-facts { margin-top: 22px; gap: 14px 22px; }
  .hero-facts strong { font-size: 18px; }
  .hero-facts span { font-size: 12.5px; }
  .head h2, .about-copy h2, .book-copy h2 { font-size: clamp(34px, 9.6vw, 44px); }
  .lane { height: 120px; }
  .tiers .lane { height: 90px; }
  .results .lane { height: 100px; margin-bottom: 10px; }
  .steps { grid-template-columns: 1fr; gap: 18px; margin-top: 44px; }
  .step:nth-child(n) { margin-top: 0; }
  .step { padding: 24px 22px; }
  .card { padding: 26px 22px; }
  .tier-grid { gap: 46px; margin-top: 0; }
  .tier .price span { font-size: 46px; }
  .qa summary { padding: 18px 52px 18px 20px; font-size: 19px; }
  .qa summary::before, .qa summary::after { right: 20px; }
  .qa details p { padding: 0 20px 20px; }
  .mono-text { font-size: 112px; }
  .foot-mark { font-size: 40px; }
  html.reduced .hero, html.plain .hero { background: url('../poster-scene.webp') 92% 372px / 185% auto no-repeat; }
}
