/* Line Lift product site, pass 2. Three layers: the fluid canvas (fixed,
   behind everything), ordinary HTML content, and the pinned acts whose
   state is one custom property (--p, 0..1) written by script.js.
   Palette is the app's own: the paper the App Store shots sit on, the
   studio-desk green, Alizarin Crimson (#8C1F3C) as the accent. */
:root {
  --paper: #f5efe3;
  --dark: #14110f;
  --ink: #2d251f;
  --muted: #6f665c;
  --line: rgba(45, 37, 31, .14);
  --card: rgba(255, 252, 245, .72);
  --accent: #8c1f3c;
  --accent-light: #d98aa0;
  --desk: #3a665b;
  --desk-deep: #2c5046;
  --shadow: 0 30px 80px rgba(65, 48, 35, .18);
  --serif: "Libre Caslon Display", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --p: 0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  z-index: 99;
}
img, video { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }

/* Layer 1 */
#fluid, .fluid-fallback { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }
#fluid[hidden] { display: none; }
.fluid-fallback {
  background:
    radial-gradient(ellipse 40% 30% at 50% 45%, rgba(140,31,60,.55), transparent 70%),
    radial-gradient(ellipse 30% 25% at 58% 40%, rgba(39,70,168,.4), transparent 70%),
    radial-gradient(ellipse 28% 22% at 42% 52%, rgba(217,153,43,.35), transparent 70%),
    var(--paper);
}
/* Without the fluid, the opening cannot be dark: the ground stays paper. */
.no-fluid .act-drop, .no-fluid .act-itch { color: var(--ink); }
.no-fluid .act-drop .eyebrow, .no-fluid .act-itch .eyebrow { color: var(--accent); }
.no-fluid .act-drop .lede, .no-fluid .act-drop .hero-note { color: var(--muted); }
.no-fluid .act-drop .button { background: var(--ink); color: #fffaf1; }
.no-fluid .drop { display: none; }

/* Header: flips light while the ground is dark. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 4rem);
  background: rgba(248, 242, 232, .72);
  border-bottom: 1px solid rgba(45,37,31,.08);
  backdrop-filter: blur(18px);
  transition: background .5s ease, color .5s ease, border-color .5s ease;
}
.brand { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; }
.nav { display: flex; gap: 2rem; font-size: .9rem; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.site-header > .button { justify-self: end; }
.on-dark .site-header { background: rgba(20,17,15,.55); color: #f8f2e8; border-color: rgba(248,242,232,.08); }
.on-dark .nav { color: rgba(248,242,232,.7); }
.on-dark .nav a:hover { color: #fff; }
.on-dark .site-header .button { background: #f8f2e8; color: var(--dark); }

.section-shell { width: min(1180px, calc(100% - 2.5rem)); margin-inline: auto; }
.eyebrow {
  margin: 0 0 1.2rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
h1, h2, h3 { margin: 0; line-height: 1.06; }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.025em; }
h1 { font-size: clamp(3.6rem, 7vw, 7.4rem); }
h2 { font-size: clamp(2.5rem, 5vw, 5rem); }
h3 { font-size: 1.45rem; }
.lede { max-width: 43rem; margin: 1.8rem auto 0; font-size: clamp(1.1rem, 1.5vw, 1.35rem); color: var(--muted); }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 1.4rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-note { margin: 1.4rem 0 0; font-size: .9rem; color: var(--muted); letter-spacing: .02em; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  padding: .85rem 1.3rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fffaf1;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(45,37,31,.16);
  transition: transform .2s ease, box-shadow .2s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(45,37,31,.22); }
.button-small { min-height: 2.55rem; padding: .55rem 1rem; font-size: .88rem; }
.text-link { font-weight: 600; }
.text-link span { display: inline-block; margin-left: .3rem; transition: transform .2s ease; }
.text-link:hover span { transform: translateY(4px); }

/* ---------- pinned acts ---------- */
.pin { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; align-items: center; }

/* Act 1: the drop */
.act-drop { height: 220vh; color: #f8f2e8; }
.act-drop .stage { text-align: center; }
.act-drop .eyebrow { color: var(--accent-light); }
.act-drop .lede, .act-drop .hero-note { color: rgba(248,242,232,.7); }
.act-drop .button { background: #f8f2e8; color: var(--dark); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.drop-copy {
  width: min(900px, calc(100% - 2.5rem));
  margin-inline: auto;
  opacity: calc(1 - var(--p) * 1.8);
  transform: translateY(calc(var(--p) * -14vh));
}
.drop-copy h1 { transition: filter 1.1s ease, opacity 1.1s ease; }
.fluid-ready:not(.bloomed) .drop-copy h1 { filter: blur(10px); opacity: .55; }
.drop {
  position: absolute;
  left: 50%; top: 0;
  width: 14px; height: 20px;
  margin-left: -7px;
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  background: radial-gradient(circle at 35% 30%, #f6c4d2, var(--accent) 60%, #5c1024);
  box-shadow: 0 0 18px rgba(217,138,160,.5);
  opacity: 0;
  pointer-events: none;
}
.drop.falling { animation: fall 1.35s cubic-bezier(.45, 0, .9, .6) forwards; }
@keyframes fall {
  0%   { transform: translateY(-8vh) scaleY(1); opacity: 0; }
  10%  { opacity: 1; }
  88%  { transform: translateY(46vh) scaleY(1.35); opacity: 1; }
  100% { transform: translateY(48vh) scale(2.4, .3); opacity: 0; }
}

/* Act 2: the itch */
.act-itch { height: 260vh; color: var(--ink); }
.itch-lines { width: min(980px, calc(100% - 2.5rem)); margin-inline: auto; display: grid; gap: clamp(1.2rem, 3vh, 2.4rem); }
.itch-lines .line {
  --t: clamp(0, calc((var(--p) - var(--i) * 0.26) * 4.5), 1);
  font-size: clamp(2rem, 4.4vw, 4.2rem);
  opacity: var(--t);
  transform: translateY(calc((1 - var(--t)) * 28px));
  color: var(--ink);
}
.itch-lines .line:nth-child(1) { color: var(--ink); }
.itch-lines .line:nth-child(2) { color: var(--muted); }
.itch-lines .line:nth-child(3) { color: var(--ink); font-style: italic; }

/* Act 3: the device */
.act-device { height: 340vh; }
.act-device .stage { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 6rem); width: min(1180px, calc(100% - 2.5rem)); margin-inline: auto; }
.device-wrap { perspective: 1400px; display: grid; place-items: center; }
.device {
  position: relative;
  width: min(100%, 380px);
  padding: .55rem;
  border-radius: 3.2rem;
  background: #1c1916;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.08);
}
.act-device .device {
  width: min(100%, 36vh, 380px);
  transform: rotateY(calc(-30deg + var(--p) * 52deg)) rotateX(calc(9deg - var(--p) * 12deg)) translateZ(0);
  will-change: transform;
}
.device-screen { aspect-ratio: 886 / 1920; object-fit: cover; border-radius: 2.7rem; background: var(--desk); }
.device-captions { position: relative; min-height: 22rem; }
.step {
  position: absolute; inset: 0;
  display: grid; align-content: center;
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
  pointer-events: none;
}
.step.is-active { opacity: 1; transform: none; pointer-events: auto; }
.step h2 { font-size: clamp(2.2rem, 4vw, 3.8rem); }
.step p:not(.eyebrow) { max-width: 34rem; margin: 1.4rem 0 0; color: var(--muted); font-size: 1.15rem; }

/* Act 4: the tools */
.act-tools { height: 560vh; }
.act-tools .stage { grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 6rem); width: min(1180px, calc(100% - 2.5rem)); margin-inline: auto; }
.tools-copy { position: relative; min-height: 24rem; }
.tools-visual { display: grid; place-items: center; }
.device-still { aspect-ratio: 1246 / 2464; width: min(100%, 34vh, 360px); }
.device-still { overflow: hidden; }
.device-still .shot {
  position: absolute; top: .55rem; left: .55rem;
  width: calc(100% - 1.1rem); height: calc(100% - 1.1rem);
  border-radius: 2.7rem; object-fit: cover;
  opacity: 0; transition: opacity .6s ease;
}
.device-still .shot.is-active { opacity: 1; }
.pigment-sheet { background: var(--paper); padding: 2rem 1.4rem; display: grid; align-content: center; gap: 1.6rem; }
.pigment-sheet p { margin: 0; font-size: .85rem; color: var(--muted); text-align: center; line-height: 1.5; }
.pigment-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: .7rem; }
.pigment-grid li {
  aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 78%, white) 0%, var(--c) 45%, color-mix(in srgb, var(--c) 80%, black) 100%);
  box-shadow: inset 0 -3px 8px rgba(0,0,0,.2), 0 0 0 3px rgba(255,252,245,.9), 0 0 0 4px var(--line);
}

/* ---------- flowing sections ---------- */
.split { display: grid; grid-template-columns: .95fr 1.05fr; align-items: center; gap: clamp(3rem, 8vw, 8rem); padding-block: clamp(5rem, 9vw, 9rem); }
.split.reverse .feature-visual { order: 2; }
.feature-visual img { border-radius: 2.4rem; box-shadow: var(--shadow); }
#sketchbook .feature-visual img { width: min(100%, 380px); margin-inline: auto; border-radius: 2.8rem; }
.feature-copy p:not(.eyebrow) { color: var(--muted); font-size: 1.15rem; margin-top: 1.5rem; }
.clean-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .8rem; }
.clean-list li { display: flex; align-items: flex-start; gap: .8rem; font-weight: 500; line-height: 1.45; }
.clean-list li::before { content: "✓"; flex: none; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; margin-top: .05rem; border: 1px solid var(--line); border-radius: 50%; font-size: .8rem; }

.ipad { padding-block: clamp(5rem, 9vw, 9rem); }
.ipad-copy { max-width: 760px; margin-bottom: 3rem; }
.ipad-copy > p:last-child { max-width: 640px; color: var(--muted); font-size: 1.15rem; margin-top: 1.5rem; }
.wide-image img { width: min(100%, 820px); margin-inline: auto; border-radius: 2rem; box-shadow: var(--shadow); }

.maker { padding-block: clamp(4rem, 8vw, 8rem); max-width: 860px; }
.maker h2 { font-size: clamp(2.2rem, 4vw, 3.8rem); }
.maker > p:last-child { margin-top: 1.6rem; font-size: 1.15rem; color: var(--muted); }
.maker a { text-decoration: underline; text-underline-offset: .2em; color: var(--ink); }

.facts { padding-block: clamp(3rem, 6vw, 6rem); }
.facts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0; }
.facts-grid > div { padding: clamp(1.5rem, 2.5vw, 2rem); border: 1px solid var(--line); border-radius: 1.6rem; background: var(--card); backdrop-filter: blur(8px); }
.facts-grid dt { font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.facts-grid dd { margin: .6rem 0 0; color: var(--ink); line-height: 1.5; }
.facts-grid dd a { text-decoration: underline; text-underline-offset: .2em; }

.final-cta { padding: clamp(6rem, 14vw, 14rem) 1.25rem clamp(5rem, 10vw, 10rem); text-align: center; }
.final-inner { max-width: 850px; margin-inline: auto; }
.final-inner > p:not(.eyebrow):not(.availability) { max-width: 620px; margin: 1.8rem auto 0; color: var(--muted); font-size: 1.15rem; }
.final-inner .button { margin-top: 2rem; }
.availability { margin-top: 1.4rem; color: var(--muted); font-size: .85rem; }
/* The support link sits INSIDE a sentence, so colour alone cannot mark it —
   .availability is already --muted and the link inherits that exactly. An
   underline is what makes it a link rather than a word. */
.availability a { color: inherit; text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.availability a:hover { color: var(--ink); }
.footer { display: flex; justify-content: space-between; padding-block: 2rem; color: var(--muted); font-size: .9rem; }
.footer div { display: flex; gap: 1.4rem; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .75s ease, transform .75s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .act-device .stage, .act-tools .stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: center; gap: 1.5rem; padding-top: 4.5rem; }
  .act-device .device { width: min(44vw, 220px); }
  .act-device .device { transform: rotateY(calc(-18deg + var(--p) * 30deg)) rotateX(calc(6deg - var(--p) * 8deg)); }
  .device-captions, .tools-copy { min-height: 16rem; text-align: center; }
  .step { align-content: start; }
  .step h2 { font-size: clamp(1.9rem, 7vw, 2.6rem); }
  .step p:not(.eyebrow) { margin-inline: auto; font-size: 1.02rem; }
  .act-tools .stage { grid-template-rows: 1fr auto; }
  .device-still { width: min(40vw, 200px); border-radius: 2rem; padding: .35rem; }
  .device-still .shot { top: .35rem; left: .35rem; width: calc(100% - .7rem); height: calc(100% - .7rem); border-radius: 1.7rem; }
  .pigment-sheet { padding: 1rem .7rem; gap: .8rem; }
  .pigment-sheet p { font-size: .62rem; }
  .pigment-grid { gap: .35rem; }
  .split { grid-template-columns: 1fr; }
  .split.reverse .feature-visual { order: initial; }
  .feature-copy { text-align: center; }
  .clean-list { max-width: 420px; margin-inline: auto; text-align: left; }
  .facts-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .site-header { padding-inline: 1rem; }
  .button-small { font-size: 0; width: 2.7rem; padding: 0; }
  .button-small::after { content: "↓"; font-size: 1rem; }
  h1 { font-size: clamp(3.1rem, 15vw, 4.5rem); }
  .hero-actions { flex-direction: column; }
  .itch-lines .line { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  .feature-visual img, .wide-image img { border-radius: 1.6rem; }
  .facts-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 1rem; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .button, .text-link span, .step, .device-still .shot, .site-header { transition: none; }
  .drop { display: none; }
  .drop-copy h1 { filter: none !important; opacity: 1 !important; }
  .act-device .device { transform: none; }
}
