/* lyfenotebook.com: one page, a 3D notebook that opens as you scroll.
   Lyfe's design language (Theme.swift, Typography.swift, Tasarim-Rehberi):
   Figtree, warm paper #F3F1EA, ballpoint ink #1F3398, lines 1.5 / 2, radius 14.
   Light only: the page is a sheet of paper. */

@font-face { font-family: Figtree; src: url(fonts/Figtree-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap }
@font-face { font-family: Figtree; src: url(fonts/Figtree-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap }
@font-face { font-family: Figtree; src: url(fonts/Figtree-Bold.ttf) format("truetype"); font-weight: 700; font-display: swap }
@font-face { font-family: Figtree; src: url(fonts/Figtree-ExtraBold.ttf) format("truetype"); font-weight: 800; font-display: swap }

:root {
  --paper: #F3F1EA;
  --surface: #FBFAF6;
  --ink: #1F3398;
  --faint: #5669A0;
  --rule: #7888B1;
  --pastel-blue: #C9E1F5;
  --line: 1.5px;
  --radius: 14px;
  --stage-w: 56vw;
  color-scheme: light;
}

* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; scroll-behavior: smooth }
body {
  margin: 0;
  background: var(--paper) url(img/paper.jpg) center top / 1080px auto repeat;
  color: var(--ink);
  font-family: Figtree, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 18px;
  line-height: 1.6;
}
a { color: var(--ink); text-decoration-thickness: var(--line); text-underline-offset: 3px }
b { font-weight: 700 }

/* Head: the pen-line logo, "Notebook", the language. */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(18px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) 0 max(28px, env(safe-area-inset-left));
  pointer-events: none;
}
.top a { pointer-events: auto }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 6px 14px 6px 12px; margin-left: -12px; border-radius: 999px; background: rgba(251, 250, 246, .86); box-shadow: 0 0 0 1px rgba(31, 51, 152, .06) }
.brand .logo {
  width: 64px; aspect-ratio: 680 / 452; background: currentColor;
  -webkit-mask: url(logo.svg) center / contain no-repeat; mask: url(logo.svg) center / contain no-repeat;
}
.brand .word { font-size: 13px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--faint) }
.lang {
  font-size: 12px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  color: var(--faint); text-decoration: none;
  padding: 8px 12px; border: var(--line) solid var(--rule); border-radius: 999px; background: var(--surface);
}
.lang:hover { color: var(--ink); border-color: var(--ink) }

/* The notebook: fixed on the left of a wide screen, the story scrolls on the right. */
.stage { position: fixed; top: 0; left: 0; width: var(--stage-w); height: 100vh; height: 100svh; z-index: 1 }
.stage canvas { display: block; width: 100%; height: 100% }

main { position: relative; z-index: 2; margin-left: var(--stage-w); padding: 0 max(40px, env(safe-area-inset-right)) 0 24px; max-width: calc(var(--stage-w) + 620px) }
.step { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 96px 0; max-width: 520px }

.kicker { margin: 0 0 14px; font-size: 13px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--faint) }
h1 { font-size: clamp(40px, 4.6vw, 64px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.04; margin: 0 0 22px; text-wrap: balance }
h2 { font-size: clamp(30px, 3.2vw, 44px); font-weight: 800; letter-spacing: -1px; line-height: 1.08; margin: 0 0 18px; text-wrap: balance }
p { margin: 0 0 14px; text-wrap: pretty }
.lead { font-size: 20px; color: var(--ink) }

/* The date, as a pastel card stuck on the page. */
.badge {
  align-self: flex-start; width: fit-content; display: inline-flex; align-items: baseline; gap: 10px;
  margin: 14px 0 0; padding: 12px 18px;
  background: var(--pastel-blue); border-radius: 4px; transform: rotate(-1.2deg);
  box-shadow: 0 6px 14px -8px rgba(31, 51, 152, .45);
}
.badge span { font-size: 13px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--faint) }
.badge b { font-size: 24px; font-weight: 800; letter-spacing: -.4px }

.cue { margin-top: 44px; font-size: 13px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--faint); display: flex; align-items: center; gap: 10px }
.cue::after { content: ""; width: 2px; height: 34px; background: var(--rule); animation: cue 1.8s ease-in-out infinite; transform-origin: top }
@keyframes cue { 0%, 100% { transform: scaleY(.35) } 50% { transform: scaleY(1) } }

/* The real screen: shown here only when the notebook can't be drawn, or on a phone. */
.shot { display: none; width: min(210px, 56vw); height: auto; margin: 22px 0 0; border-radius: 22px; box-shadow: 0 18px 40px -22px rgba(31, 51, 152, .55), 0 0 0 1px rgba(31, 51, 152, .08) }
.no-3d .shot { display: block }

.end .mail { margin-top: 26px }
.rows { display: grid; gap: 10px; margin-top: 22px }
.rows a {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface); border-radius: var(--radius);
  padding: 15px 20px; font-size: 18px; font-weight: 700; text-decoration: none;
  box-shadow: 0 0 0 1px rgba(31, 51, 152, .08);
}
.rows a::after { content: "›"; color: var(--faint); font-size: 24px; font-weight: 600; line-height: 1 }
.rows a:hover { box-shadow: 0 0 0 var(--line) var(--ink) }
footer { margin-top: 36px; padding-top: 14px; border-top: var(--line) solid var(--rule); color: var(--faint); font-size: 13px; font-weight: 600 }
footer a { color: var(--faint) }

/* Without the notebook the story is one column. */
.no-3d .stage { display: none }
.no-3d main { margin: 0 auto; padding: 0 24px }

/* A phone: the notebook sits on the top half, the story scrolls under it. */
@media (max-width: 900px) {
  :root { --stage-h: 46svh }
  body { font-size: 17px }
  .top { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); padding-top: max(12px, env(safe-area-inset-top)) }
  .brand .logo { width: 52px }
  .stage {
    position: sticky; z-index: 3; width: 100%; height: var(--stage-h);
    background: var(--paper) url(img/paper.jpg) center top / 1080px auto;
    -webkit-mask: linear-gradient(#000 88%, transparent); mask: linear-gradient(#000 88%, transparent);
  }
  main { margin: 0; padding: 0 22px; max-width: none }
  .step { min-height: 64svh; padding: 28px 0 56px; justify-content: flex-start; max-width: 560px; margin: 0 auto }
  .hero { min-height: 50svh }
  h1 { font-size: 38px; letter-spacing: -1px }
  h2 { font-size: 30px }
  .lead { font-size: 18px }
  .shot { display: block }
  .cue { margin-top: 30px }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  .cue::after { animation: none }
}
