/* ============================================================
   UNSTUCK · a fictional coaching practice
   Morning lilac grey paper, deep indigo plum ink, marigold.
   Newsreader carries the voice, Schibsted Grotesk the plumbing.
   The typography enacts the promise: stuck, then free.
   ============================================================ */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-italic-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted";
  src: url("fonts/schibsted-var.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --paper: #EFEEF4;
  --paper-2: #E5E4EC;
  --ink: #23203A;
  --ink-soft: #55516E;
  --marigold: #E08A00;
  --marigold-deep: #8F5400;
  --line: #CFCDDB;
  --agm-gradient: linear-gradient(125deg, hsl(188 92% 60%), hsl(214 90% 62%) 45%, hsl(256 88% 70%) 78%, hsl(286 80% 66%));
  --e-out: cubic-bezier(.16, 1, .3, 1);
  --page: clamp(1.4rem, 5vw, 5rem);
  --z-head: 30;
  --z-skip: 50;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 380;
  color: var(--ink);
  background: linear-gradient(180deg, var(--paper) 0%, #EAE9F1 55%, var(--paper) 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

::selection { background: var(--marigold); color: var(--ink); }

.sans, .kicker, .note, .btn, .quiet, .masthead nav a, .price, .field label, .form-note,
.letterhead, .cue, .coach-role, .step-num { font-family: "Schibsted", "Helvetica Neue", sans-serif; }

/* ---------- skip + focus ---------- */

.skip {
  position: fixed;
  top: .75rem; left: .75rem;
  z-index: var(--z-skip);
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: 2rem;
  transform: translateY(-300%);
  transition: transform .2s var(--e-out);
}
.skip:focus { transform: none; }

:focus-visible {
  outline: 2px solid var(--marigold-deep);
  outline-offset: 3px;
}

/* ---------- progress hairline ---------- */

.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 40;
  pointer-events: none;
}
.progress-fill {
  display: block;
  height: 100%;
  background: var(--marigold);
  transform: scaleX(0);
  transform-origin: left;
}

/* ---------- letterhead corners ---------- */

.letterhead {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lh-tl { position: fixed; bottom: 1.1rem; left: var(--page); }
.lh-tr { position: fixed; bottom: 1.1rem; right: var(--page); text-align: right; }
@media (max-width: 760px) { .letterhead { display: none; } }

/* ---------- masthead ---------- */

.masthead {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-head);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: .9rem var(--page);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.wordmark {
  font-family: "Newsreader", serif;
  font-weight: 640;
  font-size: 1.5rem;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  padding: .3rem .3rem .3rem 0;
}
.wordmark em { color: var(--marigold); font-style: normal; }

.masthead nav { display: flex; gap: 1.5rem; margin-left: auto; }
.masthead nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  padding: .45rem .1rem;
  position: relative;
  transition: color .3s;
}
.masthead nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 2px;
  height: 1px; width: 100%;
  background: var(--marigold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--e-out);
}
.masthead nav a:hover { color: var(--ink); }
.masthead nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: .7rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  border: 0;
  border-radius: 2.4rem;
  cursor: pointer;
  transition: background .25s, transform .25s var(--e-out), box-shadow .3s;
  box-shadow: 0 12px 28px -16px rgba(35, 32, 58, .5);
}
.btn:hover { background: #3A3560; box-shadow: 0 16px 32px -16px rgba(35, 32, 58, .55); }
.btn:active { transform: translateY(1px); }
.btn-big { padding: 1rem 2.1rem; font-size: 1rem; }

.quiet {
  display: inline-block;
  padding: .8rem .3rem;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .95rem;
  text-decoration: underline;
  text-underline-offset: .35em;
  text-decoration-color: var(--marigold);
  transition: color .25s;
}
.quiet:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem var(--page) 6rem;
  position: relative;
}

.kicker {
  font-size: clamp(.66rem, 1.1vw, .8rem);
  font-weight: 600;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: clamp(1.4rem, 4vh, 2.4rem);
}
.kicker .dot { color: var(--marigold); }

.title {
  font-family: "Schibsted", sans-serif;
  font-weight: 860;
  font-size: clamp(3.4rem, 17.5vw, 15.5rem);
  line-height: .84;
  letter-spacing: -.03em;
  color: var(--ink);
  user-select: none;
  white-space: nowrap;
}
.title .tch {
  display: inline-block;
  will-change: transform;
  transition: color .3s;
}
.title:hover .tch { color: #2E2950; }

.subhead {
  max-width: 42ch;
  margin-top: clamp(1.8rem, 5vh, 3rem);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.45;
  color: var(--ink-soft);
  text-wrap: balance;
}

.swap {
  font: inherit;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
  font-style: italic;
  font-weight: 540;
  padding: 0 .06em;
  /* underline hugs the glyphs (not a padded box edge) so it never
     drops onto the line below when the subhead wraps on mobile */
  text-decoration: underline dashed var(--marigold-deep);
  text-underline-offset: .2em;
  text-decoration-thickness: 1px;
  transition: color .3s, opacity .3s, transform .3s;
}
.swap:hover { color: var(--marigold-deep); }

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  flex-wrap: wrap;
  margin-top: clamp(2rem, 5vh, 3rem);
}

.cue {
  position: absolute;
  bottom: 3.4rem;
  left: var(--page);
  display: flex;
  align-items: center;
  gap: .9rem;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.cue-bar {
  width: 52px; height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.cue-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--marigold);
  transform: translateX(-100%);
  animation: cue 2.8s cubic-bezier(.76, 0, .24, 1) infinite;
}
@keyframes cue {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}
@media (pointer: coarse) { .cue { display: none; } }

/* ---------- sections shared ---------- */

section { padding: clamp(5rem, 12vh, 9rem) var(--page); }

.note {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--marigold-deep);
  margin-bottom: clamp(1.6rem, 4vh, 2.6rem);
}
.note .num { color: var(--ink-soft); font-feature-settings: "tnum"; }

h2 {
  font-weight: 480;
  font-size: clamp(2.2rem, 5.4vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -.015em;
  margin-bottom: clamp(2rem, 5vh, 3rem);
  text-wrap: balance;
}

/* ---------- statements: the moving type ---------- */

.statement {
  min-height: 74vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.line { text-wrap: balance; }
.line.big {
  font-size: clamp(2.1rem, 7.2vw, 7.5rem);
  font-weight: 420;
  line-height: 1.04;
  letter-spacing: -.02em;
}
.line.small {
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  color: var(--ink-soft);
  margin-top: 1.6rem;
}
.line.em { color: var(--marigold-deep); font-weight: 500; }
.italic { font-style: italic; }

/* word mask reveal. Each word stays whole; lines wrap between words,
   never inside them, so the per-letter spans can never split a word. */
.word {
  display: inline-block;
  overflow: clip;
  vertical-align: top;
  padding: 0 .045em .06em;
  margin: 0 -.045em;
  white-space: nowrap;
}
.word > .inner {
  display: inline-block;
  white-space: nowrap;
  transform: translateY(112%) rotate(-3deg);
  transition: transform 1s var(--e-out);
  will-change: transform;
}
.reveal .word > .inner { transform: none; }
.reveal .word:nth-child(2) > .inner { transition-delay: .06s; }
.reveal .word:nth-child(3) > .inner { transition-delay: .12s; }
.reveal .word:nth-child(4) > .inner { transition-delay: .18s; }
.reveal .word:nth-child(5) > .inner { transition-delay: .24s; }
.reveal .word:nth-child(6) > .inner { transition-delay: .30s; }
.reveal .word:nth-child(7) > .inner { transition-delay: .36s; }
.reveal .word:nth-child(8) > .inner { transition-delay: .42s; }

/* per letter spans for the cursor field */
.ch { display: inline-block; will-change: transform; }

/* touch devices: a native ripple sweeps across each statement line as it
   enters view (JS adds .rippling). Compositor driven, so it stays smooth
   during an iOS finger scroll where JS position reads would stall. */
@media (pointer: coarse) {
  .statement .line.big.rippling .ch {
    animation: chRipple .62s cubic-bezier(.16, 1, .3, 1) both;
    animation-delay: calc(var(--i, 0) * 0.028s);
  }
}
@keyframes chRipple {
  0%   { transform: none; }
  42%  { transform: translateY(-5px) scale(1.13); }
  100% { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .statement .line.big.rippling .ch { animation: none; }
}

/* ---------- offers ---------- */

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  align-items: start;
}

.offer {
  background: rgba(255, 255, 255, .55);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 2.2rem 2rem;
  transition: transform .4s var(--e-out), box-shadow .4s, border-color .3s;
}
.offer:hover {
  transform: translateY(-4px);
  border-color: var(--marigold);
  box-shadow: 0 26px 44px -30px rgba(35, 32, 58, .35);
}
.offer h3 {
  font-weight: 520;
  font-size: 1.7rem;
  margin-bottom: .3rem;
}
.offer .price {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--marigold-deep);
  margin-bottom: 1rem;
}
.offer p:last-child { color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- method ---------- */

.method { background: var(--paper-2); }

.steps {
  list-style: none;
  max-width: 46rem;
}
.steps li {
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 0; }
.steps h3 {
  font-weight: 500;
  font-size: 1.6rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: .5rem;
}
.step-num {
  font-size: .8rem;
  font-weight: 700;
  color: var(--marigold-deep);
  border: 1px solid var(--marigold);
  border-radius: 50%;
  width: 1.8rem; height: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.steps p { color: var(--ink-soft); max-width: 38rem; }

/* ---------- coach ---------- */

.coach-cols {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.coach-cols h2 { margin-bottom: .4rem; }
.coach-role {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--marigold-deep);
}
.coach-body p { max-width: 34rem; color: var(--ink-soft); }
.coach-body p + p { margin-top: 1.2rem; }
.pull {
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
  line-height: 1.35;
  color: var(--ink);
  border-left: 2px solid var(--marigold);
  padding-left: 1.2rem;
}

/* ---------- closer + form ---------- */

.closer {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.closer form {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  max-width: 28rem;
}

.hp { position: absolute; left: -9999px; }

.field { margin-bottom: 1.2rem; }
.field label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .45rem;
}
.field input,
.field textarea {
  width: 100%;
  padding: .85rem 1rem;
  font-family: "Newsreader", serif;
  font-size: 1.05rem;
  color: var(--ink);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line);
  border-radius: .6rem;
  transition: border-color .25s, box-shadow .25s;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--marigold-deep);
  box-shadow: 0 0 0 3px rgba(224, 138, 0, .18);
}

.form-note { margin-top: 1rem; font-size: .82rem; color: var(--ink-soft); }

/* ---------- footer ---------- */

.foot {
  padding: 3rem var(--page) 4.4rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .95rem;
  text-align: center;
}
.foot p + p { margin-top: .5rem; }
.credit strong {
  font-weight: 640;
  background: var(--agm-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- reveal-line (non split blocks) ---------- */

.js .reveal-line {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--e-out), transform .9s var(--e-out);
}
.js .reveal-line.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .masthead nav { display: none; }
  .masthead .btn { margin-left: auto; }
  .offer-grid { grid-template-columns: 1fr; }
  .coach-cols { grid-template-columns: 1fr; gap: 1.6rem; }
  .statement { min-height: 58vh; }
}

/* ---------- still mode ---------- */

.still .word > .inner { transform: none !important; transition: none !important; }
.still .reveal-line { opacity: 1 !important; transform: none !important; transition: none !important; }
.still .cue-bar::after { animation: none; }
.still .title .tch { transform: none !important; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .word > .inner { transform: none !important; transition: none !important; }
  .js .reveal-line { opacity: 1; transform: none; transition: none; }
  .cue-bar::after { animation: none; }
  .title .tch { transform: none !important; }
  .offer, .btn { transition-property: background, border-color, box-shadow, color; }
  .offer:hover { transform: none; }
}
