/* ============================================================
   Grammo — landing page
   Monochrome grotesk on warm paper. Colour comes only from the
   watercolour keepsakes. The signature is the voice waveform.
   ============================================================ */

/* self-hosted Schibsted Grotesk — no third-party font request */
@font-face {
  font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('/fonts/SchibstedGrotesk-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 500;
  font-display: swap; src: url('/fonts/SchibstedGrotesk-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 600;
  font-display: swap; src: url('/fonts/SchibstedGrotesk-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 700;
  font-display: swap; src: url('/fonts/SchibstedGrotesk-Bold.woff2') format('woff2');
}

:root {
  --linen:      #E7E6E2;   /* page canvas */
  --paper:      #F1F1EF;   /* raised surface */
  --paper-cool: #EDECE8;   /* muted band */
  --surface:    #FFFFFF;   /* cards, fields */
  --ink:        #1B1B1A;   /* text, filled controls, played bars */
  --ink-deep:   #211E18;   /* darkest — the close section */
  --ink-70: rgba(27,27,26,.70);
  --ink-55: rgba(27,27,26,.55);
  --ink-40: rgba(27,27,26,.40);
  --ink-22: rgba(27,27,26,.22);
  --line:   rgba(27,27,26,.12);
  --line-2: rgba(27,27,26,.18);

  --sans: 'Schibsted Grotesk', system-ui, -apple-system, sans-serif;

  --shadow-card: 0 22px 44px -22px rgba(27,27,26,.34);
  --shadow-soft: 0 10px 24px -12px rgba(27,27,26,.22);

  --wrap: 1120px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(27,27,26,.14); }

/* ---------- shared type ---------- */
.eyebrow {
  font-size: .72rem; font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-55); margin: 0;
}
.eyebrow--light { color: rgba(252,252,251,.6); }

.display {
  font-weight: 700;
  font-size: clamp(3rem, 8.4vw, 6rem);
  line-height: .96; letter-spacing: -.035em; margin: .28em 0 0;
  white-space: nowrap;   /* keep "Boken som" on one line; the <br> makes line 2 */
}
.h2 {
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  line-height: 1.02; letter-spacing: -.03em; margin: .3em 0 0;
}
.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  line-height: 1.55; color: var(--ink-70);
  max-width: 30ch; margin: 1.4rem 0 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  letter-spacing: .01em; border-radius: 999px; border: 1px solid transparent;
  padding: .92em 1.5em; cursor: pointer; transition: transform .25s var(--ease), background .25s, box-shadow .25s, color .25s;
}
.btn--sm { padding: .62em 1.1em; font-size: .85rem; }
.btn--ink   { background: var(--ink); color: #fff; }
.btn--ink:hover   { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: rgba(27,27,26,.05); }
.btn--paper { background: #FCFCFB; color: var(--ink); }
.btn--paper:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -16px rgba(0,0,0,.5); }
.btn .arr { transition: transform .25s var(--ease); }
.btn--ghost:hover .arr { transform: translateX(3px); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 5vw, 3rem);
  background: rgba(231,230,226,.72);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-stuck { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: .5rem; }
.brand__word { font-weight: 700; letter-spacing: -.02em; font-size: 1.2rem; }
.brand__logo { width: 26px; height: 26px; display: block; color: var(--ink); }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem); }
.nav__links > a:not(.btn) { font-weight: 500; font-size: .95rem; color: var(--ink-70); transition: color .2s; }
.nav__links > a:not(.btn):hover { color: var(--ink); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(3rem, 8vw, 6.5rem) clamp(1.2rem, 5vw, 3rem) clamp(3rem, 7vw, 5rem);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__copy { max-width: 34rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.2rem; }
.fineprint { margin: 1.4rem 0 0; font-size: .85rem; color: var(--ink-40); letter-spacing: .01em; }

.hero__stage { position: relative; display: grid; place-items: center; }
.stage__hint {
  position: absolute; bottom: -1.6rem; left: 50%; transform: translateX(-50%);
  font-size: .8rem; letter-spacing: .04em; color: var(--ink-40); white-space: nowrap; margin: 0;
}

/* ---------- soundcard (the product's iconic component) ---------- */
.soundcard {
  background: var(--surface); border-radius: 8px;
  padding: 12px 12px 16px; margin: 0;
  box-shadow: var(--shadow-card);
  width: min(340px, 78vw);
}
.soundcard--hero { transform: rotate(-2deg); }
.soundcard__photo { border-radius: 3px; overflow: hidden; aspect-ratio: 1/1; background: var(--paper-cool); }
.soundcard__photo img { width: 100%; height: 100%; object-fit: cover; }
.soundcard__body { padding: 14px 6px 4px; }
.soundcard__name { font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; margin: 0; }
.soundcard__role { font-size: .82rem; color: var(--ink-55); margin: .2rem 0 0; }

.player { display: flex; align-items: center; gap: 11px; margin-top: 14px; }
.player--mini { gap: 8px; margin-top: 11px; }
.play {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  background: var(--ink); border: none; cursor: pointer;
  display: grid; place-items: center; transition: transform .2s var(--ease);
}
.play:hover { transform: scale(1.06); }
.play svg { width: 13px; height: 13px; fill: #fff; margin-left: 1px; }
.dot { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--ink);
  position: relative; }
.dot::after { content:""; position:absolute; inset:0; margin:auto; width:0; height:0;
  border-left: 6px solid #fff; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transform: translateX(1px); }
.time { flex: 0 0 auto; font-size: .82rem; font-weight: 600; color: var(--ink-55); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.time--sm { font-size: .72rem; }

/* ---------- waveform bars (injected by JS) ---------- */
.wave { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; overflow: hidden; }
.wave i {
  flex: 0 0 auto; width: 3px; border-radius: 2px;
  height: calc(var(--h) * 1px); background: var(--ink-22);
  transition: background .18s ease;
}
.wave i.on { background: var(--ink); }
.wave--lg  { height: 40px; }
.wave--lg  i { width: 3px; }
.wave--sm  { height: 26px; }
.wave--mini { height: 14px; }
.wave--mini i { width: 2px; }
.brand__mark i { width: 2px; height: calc(var(--h) * 1px); background: var(--ink); border-radius: 1px; }

/* ============================================================
   STEPS — a real 3-part sequence, so numbering earns its place
   ============================================================ */
.steps {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) clamp(1.2rem, 5vw, 3rem);
}
.section-head { max-width: 40rem; }
.section-head--center { margin: 0 auto; text-align: center; }
.section-sub { color: var(--ink-70); font-size: 1.05rem; margin: 1rem auto 0; max-width: 40ch; }

.steps__list {
  list-style: none; margin: clamp(2.4rem, 5vw, 4rem) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.2rem, 2.5vw, 2rem);
  counter-reset: step;
}
.step {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 18px; padding: 1.7rem 1.6rem 1.6rem;
  display: flex; flex-direction: column; min-height: 320px;
}
.step__no {
  font-weight: 700; font-size: .9rem; letter-spacing: .06em; color: var(--ink-40);
  font-variant-numeric: tabular-nums;
}
.step__title { font-weight: 600; font-size: 1.35rem; letter-spacing: -.02em; margin: .7rem 0 0; }
.step__text { color: var(--ink-70); font-size: .98rem; margin: .5rem 0 0; }
.step__art { margin-top: auto; padding-top: 1.6rem; }

/* one harmonised chip per step — same surface, height and rhythm, different content */
.chip {
  display: flex; align-items: center; gap: 11px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 .9rem; height: 52px;
}
.chip__icon { flex: 0 0 auto; width: 22px; height: 22px; color: var(--ink); }
.chip__text {
  min-width: 0; font-weight: 600; font-size: .95rem; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chip .wave { flex: 1 1 auto; }

/* ============================================================
   THE BOOK / GALLERY
   ============================================================ */
.book {
  background: var(--paper-cool);
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.2rem, 5vw, 3rem);
  border-top: 1px solid var(--line);
}
.gallery {
  max-width: var(--wrap); margin: clamp(2.6rem, 5vw, 4.4rem) auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.4rem, 3vw, 2.6rem); align-items: start; justify-items: center;
}
.gallery .soundcard { width: min(320px, 82vw); }
.tilt-a { transform: rotate(-2.2deg); }
.tilt-b { transform: rotate(1.4deg) translateY(18px); }
.tilt-c { transform: rotate(-1deg); }
.gallery .soundcard { transition: transform .4s var(--ease), box-shadow .4s; }
.gallery .soundcard:hover { transform: rotate(0) translateY(-6px); box-shadow: 0 30px 56px -24px rgba(27,27,26,.4); }

/* ============================================================
   THE OPEN BOOK — a painterly illustration of the keepsake book.
   The image background matches the section, so it floats seamlessly.
   ============================================================ */
.is-hidden { display: none !important; }

.spread {
  background: #F2EEE9; border-top: 1px solid var(--line);
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.2rem, 5vw, 3rem) clamp(4rem, 9vw, 6.5rem);
  overflow: hidden;
}

.bookstage { margin: clamp(2rem, 4vw, 3.4rem) auto 0; padding: 0; }
.bookimg {
  display: block; width: min(980px, 100%); height: auto; margin: 0 auto;
}

/* ============================================================
   DARK CLOSE
   ============================================================ */
.close {
  background: var(--ink-deep); color: #FCFCFB; text-align: center;
  padding: clamp(4rem, 9vw, 7rem) clamp(1.2rem, 5vw, 3rem);
  display: flex; flex-direction: column; align-items: center;
}
.close__line {
  font-weight: 700; font-size: clamp(2.1rem, 5.2vw, 3.8rem);
  line-height: 1.02; letter-spacing: -.03em; margin: .5rem 0 0; color: #FCFCFB;
}
.wave--band {
  height: 64px; width: min(560px, 86vw); justify-content: center; gap: 3px;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
}
.wave--band i { width: 3px; background: rgba(252,252,251,.28); }
.wave--band i.on { background: #FCFCFB; }
.quote {
  margin: clamp(2rem, 4vw, 3rem) 0 0; max-width: 34ch;
  font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.5; color: rgba(252,252,251,.9);
}
.quote cite { display: block; margin-top: 1rem; font-style: normal; font-size: .9rem; color: rgba(252,252,251,.55); }
.close .btn--paper { margin-top: 2.6rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  background: var(--linen); border-top: 1px solid var(--line);
  padding: clamp(3rem, 6vw, 4.5rem) clamp(1.2rem, 5vw, 3rem) 1.8rem;
}
.foot__inner {
  max-width: var(--wrap); margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 6vw, 5rem);
}
.foot__brand { display: inline-flex; align-items: center; gap: .5rem; }
.foot__tag { color: var(--ink-70); margin: 1.1rem 0 0; max-width: 36ch; font-size: 1rem; line-height: 1.5; }
.foot__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.foot__col { display: flex; flex-direction: column; align-items: flex-start; gap: .7rem; }
.foot__h { font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-40); margin: 0 0 .2rem; }
.foot__col a { font-size: .95rem; color: var(--ink-70); transition: color .2s; }
.foot__col a:hover { color: var(--ink); }
.foot__bottom {
  max-width: var(--wrap); margin: clamp(2.4rem, 5vw, 3.4rem) auto 0;
  padding-top: 1.4rem; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.foot__meta { font-size: .82rem; color: var(--ink-40); margin: 0; letter-spacing: .01em; }
.foot__top { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; font-weight: 600; color: var(--ink-70); transition: color .2s; }
.foot__top svg { width: 13px; height: 13px; }
.foot__top:hover { color: var(--ink); }

/* ============================================================
   REVEAL (scroll) + MOTION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* hero page-load sequence */
.rise { opacity: 0; transform: translateY(16px); }
body.loaded .rise {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0s);
}
.soundcard--hero.rise { transform: translateY(16px) rotate(-2deg); }
body.loaded .soundcard--hero.rise { transform: rotate(-2deg); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .hero__stage { justify-self: center; margin-top: 1.6rem; }
  .hero__copy { max-width: 34rem; margin: 0 auto; }
  .hero__cta { justify-content: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .steps__list { grid-template-columns: minmax(0, 1fr); }
  .step { min-height: 0; }
  .gallery { grid-template-columns: 1fr; }
  .tilt-b { transform: rotate(1.2deg); }
  .foot__inner { grid-template-columns: 1fr; gap: 2.2rem; }
}
@media (max-width: 520px) {
  .nav__links > a:not(.btn) { display: none; }
  .display { font-size: clamp(2.9rem, 15vw, 4rem); }
}

/* focus + reduced motion */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .rise { opacity: 1 !important; transform: none !important; }
}
