/* ============================================================================
   Serlow — motion layer styles
   ----------------------------------------------------------------------------
   Loaded after styles.css and built on its tokens (--paper, --warm, --ink,
   --muted, --line, --amber, --copper, --dark, --dark-raised, --dark-text,
   --display, --body, --hand, --ease). The few extra tones below are the ones
   styles.css already uses as literals, named here so they can be reused.

   One new colour, asked for by name: pure red, used like a red marker on a
   printed page — handwritten notes, the drawn underline, index numbers.
   Never body text: red on paper is about 3.9:1, so it only appears large.
   ========================================================================== */

:root {
  --red: #FF0000;
  --dark-border: #393025;   /* roadmap card border in styles.css */
  --dark-muted: #b5ab9c;    /* roadmap secondary text in styles.css */
  --accent-text: #a25123;   /* nav hover/current colour in styles.css */
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sweep: cubic-bezier(.76, 0, .24, 1);
}

/* ───────────────────── red highlighter ───────────────────── */

.hand-note, .release-hand { color: var(--red); }
.drawn-word svg { stroke: var(--red); stroke-width: 2.6; }
.drawn-word svg path { stroke-dasharray: 100; stroke-dashoffset: 100;
  animation: marker-draw .7s .55s var(--ease) forwards; }
@keyframes marker-draw { to { stroke-dashoffset: 0; } }
.tiny-star { color: var(--red); }

/* ───────────────────── lazy loading: faster reveals ─────────────────────
   Sections settle in under half a second and move only 14px. */
.motion-ready .reveal { transform: translateY(14px);
  transition: opacity .46s var(--ease), transform .46s var(--ease); }
.reveal.visible:nth-child(2) { transition-delay: .05s; }
.reveal.visible:nth-child(3) { transition-delay: .1s; }

.motion-ready .lz { opacity: 0; translate: 0 14px;
  transition: opacity .44s var(--ease), translate .44s var(--ease); }
.motion-ready .lz.in { opacity: 1; translate: none; }

img.lazy-fade { opacity: 0; transition: opacity .42s var(--ease); }
img.lazy-fade.is-loaded { opacity: 1; }

/* ───────────────────── topbar: QIXARC ───────────────────── */

.topbar-co { display: inline-flex; align-items: center; gap: 7px; }
.topbar-co img { width: 16px; height: 16px; }
.topbar-co a { font-weight: 600; letter-spacing: .06em; }

/* ───────────────────── header: glass + three-dot button ───────────────────── */

.header { transition: background-color .28s var(--ease), border-color .28s var(--ease); }
.header.is-glass { background: color-mix(in srgb, var(--paper) 60%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.header.is-glass.is-dark { background: color-mix(in srgb, var(--dark) 60%, transparent);
  border-color: var(--dark-border); color: var(--dark-text); }
.header.is-dark .brand img { filter: invert(1) brightness(1.4); }
.header.is-dark .nav-cta { border-color: var(--dark-border); }
.header.is-dark .nav-links a:hover, .header.is-dark .nav-links a[aria-current] { color: var(--amber); }

.nav-links a { position: relative; transition: color .25s var(--ease); }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current] { text-decoration: none; }
.nav-links a:hover::after, .nav-links a[aria-current]::after { transform: scaleX(1); }

.menu-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; padding: 0;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  transition: border-color .25s var(--ease), background-color .25s var(--ease); }
.menu-btn i { width: 4.5px; height: 4.5px; border-radius: 50%; background: currentColor; display: block; }
.menu-btn:hover, .menu-btn:focus-visible { border-color: var(--ink); background: var(--warm); }
.menu-btn:hover i { animation: dot-hop .6s var(--ease); }
.menu-btn:hover i:nth-child(2) { animation-delay: 70ms; }
.menu-btn:hover i:nth-child(3) { animation-delay: 140ms; }
@keyframes dot-hop { 40% { transform: translateY(-4px); } }
.header.is-dark .menu-btn { color: var(--dark-text); border-color: var(--dark-border); }
.header.is-dark .menu-btn:hover { background: var(--dark-raised); }
.nav-cta + .menu-btn { margin-left: -10px; }

@media (max-width: 800px) {
  .nav-cta + .menu-btn { margin-left: 0; }
}

/* ───────────────────── full-screen menu ───────────────────── */

html.menu-open { overflow: hidden; }
.menu[hidden] { display: none; }
.menu { position: fixed; inset: 0; z-index: 70;              /* over the header, under the curtain */
  background: var(--dark); color: var(--dark-text);
  display: grid; grid-template-rows: auto 1fr auto;
  padding-inline: max(20px, calc((100% - 1200px) / 2)); overflow: auto; overscroll-behavior: contain; }

.menu__top, .menu__foot, .menu__nav { position: relative; z-index: 1; }
.menu__top { display: flex; align-items: center; gap: 14px; height: 80px; }
.brand--light { color: var(--dark-text); }
.menu__tag { margin-left: auto; font: 500 24px var(--hand); color: var(--red); }
.menu__close { width: 44px; height: 44px; border-radius: 50%; position: relative;
  border: 1px solid var(--dark-border); background: transparent; color: var(--dark-text);
  transition: border-color .25s var(--ease), transform .4s var(--ease); }
.menu__close i { position: absolute; left: 13px; right: 13px; top: 50%; height: 1.5px; background: currentColor; border-radius: 2px; }
.menu__close i:first-child { transform: rotate(45deg); }
.menu__close i:last-child { transform: rotate(-45deg); }
.menu__close:hover, .menu__close:focus-visible { border-color: var(--amber); transform: rotate(90deg); }

.menu__nav { align-self: center; padding-block: 12px; }
.menu__list { list-style: none; margin: 0 auto; padding: 0; width: min(760px, 100%); }
.menu__row { background-image: linear-gradient(var(--dark-border), var(--dark-border));
  background-repeat: no-repeat; background-position: center bottom; background-size: 100% 1px; }
.menu__row:hover, .menu__row:focus-within { background-image: linear-gradient(var(--amber), var(--amber)); }
.menu__link { display: grid; grid-template-columns: 3.2rem 1fr 3.2rem; align-items: center; padding: .14em 0 .2em; }
.menu__link:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.menu__n { font: 11px var(--mono); letter-spacing: .08em; color: var(--red); }
.menu__label { display: block; text-align: center; white-space: nowrap; overflow: hidden;
  font-family: var(--display); font-weight: 400; letter-spacing: -.04em; line-height: 1.06;
  font-size: clamp(30px, min(7.4vh, 12.4vw), 74px); padding: .04em 0 .1em; }
.menu__ch { display: inline-block; transition: color .25s var(--ease); }
.menu__link:hover .menu__ch, .menu__link:focus-visible .menu__ch, .menu__link.is-chosen .menu__ch { color: var(--amber); }
.menu__link:hover .menu__label, .menu__link.is-chosen .menu__label { font-style: italic; }

.menu__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
  padding: 14px 0 20px; border-top: 1px solid var(--dark-border); font-size: 12px; color: var(--dark-muted); }
.menu__mail { color: var(--dark-text); border-bottom: 1px solid var(--dark-border); }
.menu__mail:hover { border-bottom-color: var(--amber); }
.menu__meta { margin-left: auto; font: 20px var(--hand); }
.menu__foot .socials { gap: 2px; }
.menu__foot .social svg { width: 40px; height: 40px; }

.menu__streaks { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.menu__streaks i { position: absolute; top: 0; left: 0; width: 160px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--dark-text)); opacity: 0;
  animation: streak 6s linear infinite paused; }
.menu-open .menu__streaks i { animation-play-state: running; }
.menu__streaks i:nth-child(1) { top: 8%;  left: 10%; animation-delay: -1s; }
.menu__streaks i:nth-child(2) { top: 26%; left: 60%; animation-delay: -3.2s; animation-duration: 7s; }
.menu__streaks i:nth-child(3) { top: 50%; left: 30%; animation-delay: -5s; }
.menu__streaks i:nth-child(4) { top: 70%; left: 75%; animation-delay: -2.1s; animation-duration: 8s; }
.menu__streaks i:nth-child(5) { top: 12%; left: 82%; animation-delay: -4.4s; animation-duration: 5.5s; }
.menu__streaks i:nth-child(6) { top: 84%; left: 20%; animation-delay: -.4s; animation-duration: 7.5s; }
@keyframes streak {
  0%   { opacity: 0;   transform: translate(-40vw, -24vh) rotate(28deg); }
  10%  { opacity: .45; }
  60%  { opacity: 0;   transform: translate(30vw, 14vh) rotate(28deg); }
  100% { opacity: 0;   transform: translate(30vw, 14vh) rotate(28deg); }
}
@media (max-width: 520px) {
  .menu__link { grid-template-columns: 2.4rem 1fr 2.4rem; }
  .menu__tag { display: none; }
  .menu__top .brand { margin-right: auto; }
  .menu__meta { margin-left: 0; }
}

/* ───────────────────── section curtain ───────────────────── */

.pt-curtain { position: fixed; left: 0; right: 0; top: 0; height: 100vh; height: 100lvh;
  z-index: 80; background: var(--dark); color: var(--dark-text);
  transform: translateY(100%); visibility: hidden; pointer-events: none; will-change: transform; }
.pt-curtain.is-active { visibility: visible; }
/* Liquid leading edge: rides above the panel on the way up and flattens as
   it lands, so the panel itself is exactly one viewport. */
.pt-curtain__edge { position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); height: 9vh;
  background: var(--dark); transform-origin: bottom;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0 120V60C150 10 300 10 450 50s300 70 450 30 225-60 300-40v70z' fill='black'/%3E%3C/svg%3E") 0 100% / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0 120V60C150 10 300 10 450 50s300 70 450 30 225-60 300-40v70z' fill='black'/%3E%3C/svg%3E") 0 100% / 100% 100% no-repeat; }
.pt-curtain__in { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.pt-curtain__label { display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  opacity: 0; transform: translateX(60px); }
.pt-curtain__idx { font: 12px var(--mono); letter-spacing: .12em; color: var(--red); }
.pt-curtain__idx:empty { display: none; }
.pt-curtain__name { font-family: var(--display); font-size: clamp(46px, 8vw, 96px); line-height: 1; letter-spacing: -.05em; }
.pt-curtain__bar { display: block; width: 100%; height: 2px; margin-top: 6px; background: var(--amber);
  transform-origin: left; transform: scaleX(0); }
.pt-busy, .pt-busy * { pointer-events: none !important; }

/* ───────────────────── liquid ink ───────────────────── */

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.liquid { position: absolute; pointer-events: none; z-index: 0; }
.liquid svg { width: 100%; height: 100%; overflow: visible; }
.tone-amber { fill: var(--amber); }
.tone-copper { fill: var(--copper); }
.tone-warm { fill: var(--warm); }
.blob { transform-box: fill-box; transform-origin: center;
  animation: 11s ease-in-out infinite alternate both; animation-play-state: paused; }
.liquid.is-live .blob { animation-play-state: running; }
.blob--a { animation-name: drift-a; }
.blob--b { animation-name: drift-b; animation-duration: 9s; }
.blob--c { animation-name: drift-c; animation-duration: 13s; }
.blob--d { animation-name: drift-d; animation-duration: 10s; }
.blob--e { animation-name: drift-e; animation-duration: 12s; }
@keyframes drift-a { 50% { transform: translate(14px,-18px) scale(1.06); } 100% { transform: translate(-10px,12px) scale(.95); } }
@keyframes drift-b { 50% { transform: translate(46px,-30px) scale(1.12); } 100% { transform: translate(22px,26px) scale(.9); } }
@keyframes drift-c { 50% { transform: translate(-48px,34px) scale(.92); } 100% { transform: translate(-16px,-24px) scale(1.1); } }
@keyframes drift-d { 50% { transform: translate(-36px,-44px) scale(1.15); } 100% { transform: translate(18px,-10px) scale(.88); } }
@keyframes drift-e { 50% { transform: translate(40px,40px) scale(1.18); } 100% { transform: translate(60px,-6px) scale(.9); } }

/* Hero: a warm pool of ink behind the phone and the note. */
.liquid--pool { inset: -6% -10% -4% -6%; opacity: .5; z-index: -1; }
/* Roadmap (dark): a low glow along the bottom. */
.roadmap-section { position: relative; overflow: hidden; isolation: isolate; }
.roadmap-section > .shell { position: relative; z-index: 1; }
.liquid--glow { left: -10%; right: -10%; bottom: -55%; height: 120%; opacity: .2; }
/* Release: ink pooling behind the call to action. */
.release-section { isolation: isolate; }
.release-section > .shell { position: relative; z-index: 1; }
.liquid--release { left: 50%; top: 50%; width: min(760px, 120vw); aspect-ratio: 1; translate: -50% -50%; opacity: .32; }

/* ───────────────────── moving elements: floating hexagons ───────────────────── */

.hero { isolation: isolate; }
.hero > :not(.floaters) { position: relative; z-index: 1; }
.floaters { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.floater { position: absolute; width: 56px; height: 56px; fill: none; stroke-width: 1.2; stroke: var(--line);
  overflow: visible; animation: floaty 16s ease-in-out infinite alternate; }
.floater--1 { top: 18%; left: 44%; width: 64px; height: 64px; stroke: var(--amber); opacity: .8; }
.floater--2 { top: 12%; right: 2%; width: 40px; height: 40px; stroke: var(--red); opacity: .55; animation-duration: 12s; animation-delay: -4s; }
.floater--3 { top: 64%; left: 2%; width: 34px; height: 34px; stroke: var(--copper); opacity: .6; animation-duration: 18s; animation-delay: -7s; }
.floater--4 { top: 72%; left: 48%; width: 82px; height: 82px; stroke: #c9b893; opacity: .5; animation-duration: 21s; animation-delay: -2s; }
.floater--5 { top: 40%; right: 46%; width: 26px; height: 26px; stroke: var(--copper); opacity: .4; animation-duration: 14s; animation-delay: -9s; }
@keyframes floaty { 0% { transform: translate(0,0) rotate(0); } 50% { transform: translate(18px,-26px) rotate(40deg); } 100% { transform: translate(-14px,16px) rotate(90deg); } }
@media (max-width: 800px) {
  .floater--1, .floater--4, .floater--5 { display: none; }
  .floater--2 { top: auto; bottom: 30%; right: 3%; }
  .floater--3 { top: auto; bottom: 46%; left: 3%; }
}

/* ───────────────────── liquid fill on ghost buttons ───────────────────── */

.button-ghost { position: relative; overflow: hidden; isolation: isolate;
  transition: transform .2s, color .3s var(--ease), border-color .3s var(--ease); }
.button-ghost::before { content: ''; position: absolute; z-index: -1; left: 50%; top: 50%;
  width: max(240%, 220px); aspect-ratio: 1; border-radius: 42%; background: var(--ink); pointer-events: none;
  translate: -50% 22%; transition: translate .56s var(--ease); animation: liquid-spin 7s linear infinite paused; }
.button-ghost:hover, .button-ghost:focus-visible { color: var(--paper); border-color: var(--ink); }
.button-ghost:hover::before, .button-ghost:focus-visible::before { translate: -50% -50%; animation-play-state: running; }
@keyframes liquid-spin { to { rotate: 360deg; } }

/* ───────────────────── hexagon icons ─────────────────────
   Each network has its own outline — colour AND line style — so the four
   read apart at a glance: email solid, LinkedIn dashed, Instagram dotted,
   X heavy. On hover the hexagon turns a sixth and fills. */

.socials { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.social { --hex: var(--ink); display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); }
.social svg, .cinfo__ico { width: 46px; height: 46px; flex: none; overflow: visible; }
.social__t { display: none; }
.hex-line { fill: transparent; stroke: var(--hex); stroke-width: 1.6; stroke-linejoin: round;
  transform-box: fill-box; transform-origin: center; transition: fill .3s var(--ease), transform .6s var(--ease); }
.hex-icon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.social--mail { --hex: var(--accent-text); }
.social--in { --hex: var(--copper); }
.social--in .hex-line { stroke-dasharray: 5 2.4; }
.social--ig { --hex: var(--red); }
.social--ig .hex-line { stroke-dasharray: .1 3.2; stroke-linecap: round; stroke-width: 2.2; }
.social--x .hex-line { stroke-width: 2.6; }
.social:hover .hex-line, .social:focus-visible .hex-line { fill: var(--hex); transform: rotate(60deg); }
.social:hover, .social:focus-visible { color: var(--paper); }
.menu .social { color: var(--dark-text); }
.menu .social--mail { --hex: var(--amber); }
.menu .social--x { --hex: var(--dark-text); }
.menu .social:hover, .menu .social:focus-visible { color: var(--dark); }

/* ───────────────────── footer: contact + Built by QIXARC ───────────────────── */

.footer-contact { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: start;
  margin-top: 46px; padding-top: 46px; border-top: 1px solid var(--line); }
.fc-intro h2 { margin: 12px 0 20px; font-size: clamp(40px, 4.4vw, 60px); }
.fc-intro p { color: var(--muted); font-size: 14px; line-height: 1.85; max-width: 420px; }
.fc-intro .hero-actions { margin-top: 26px; }
.cinfo { list-style: none; margin: 0; padding: 0; }
.cinfo li { display: grid; grid-template-columns: 46px 1fr; column-gap: 14px; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--line); }
.cinfo__ico { grid-row: span 2; color: var(--ink); }
.cinfo__ico--amber { --hex: var(--accent-text); }
.cinfo__ico--copper { --hex: var(--copper); }
.cinfo__ico--red { --hex: var(--red); }
.cinfo__ico--ink { --hex: var(--ink); }
.cinfo__k { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cinfo__v { font-size: 15px; overflow-wrap: anywhere; }
a.cinfo__v:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--red); }
.fc-follow-label { display: block; margin: 24px 0 8px; font: 500 22px var(--hand); color: var(--red); }

.built-by { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 9px;
  border: 1px solid var(--line); border-radius: 999px; transition: border-color .25s var(--ease); }
.built-by img { width: 18px; height: 18px; transition: transform .7s var(--ease); }
.built-by b { color: var(--ink); letter-spacing: .08em; font-weight: 600; }
.built-by:hover { border-color: var(--muted); }
.built-by:hover img { transform: rotate(360deg); }

@media (max-width: 800px) {
  .footer-contact { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-wrap: wrap; }
}

/* ───────────────────── pencil cursor + ink drops ───────────────────── */

.pencil, .inktrail { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 90; }
.inktrail { z-index: 89; }
.pencil { width: 44px; height: 44px; opacity: 0; will-change: transform;
  filter: drop-shadow(0 3px 5px rgba(20,18,16,.28)); transition: opacity .2s var(--ease); }
.pencil.is-live { opacity: 1; }
.pencil__body polygon { stroke: var(--ink); stroke-width: .9; stroke-linejoin: round; }
.p-lead { fill: var(--ink); }
.p-wood { fill: #e8d3ae; }
.p-barrel { fill: var(--copper); }
.p-ferrule { fill: #c9b893; }
.p-eraser { fill: var(--amber); }
.pencil__ring { fill: none; stroke: var(--copper); stroke-width: 1.6; stroke-dasharray: 3 4.5; opacity: 0; transition: opacity .12s; }
.pencil.is-hot .pencil__ring { opacity: 1; }
.cursor-pencil, .cursor-pencil a, .cursor-pencil button, .cursor-pencil summary, .cursor-pencil [role="tab"] { cursor: none; }

.inkdrop { position: fixed; z-index: 88; pointer-events: none; width: 56px; height: 56px;
  margin: -28px 0 0 -28px; border-radius: 50%; border: 1.5px solid var(--copper); }
.inkdrop--core { width: 10px; height: 10px; margin: -5px 0 0 -5px; border: 0; background: var(--copper); }

/* ───────────────────── reduced motion ───────────────────── */

@media (prefers-reduced-motion: reduce) {
  .blob, .floater, .menu__streaks i, .menu-btn i, .button-ghost::before { animation: none !important; }
  .menu__streaks, .pt-curtain__edge, .inkdrop, .pencil, .inktrail { display: none !important; }
  .drawn-word svg path { animation: none !important; stroke-dashoffset: 0; }
  .hex-line, .built-by img, .menu__close, .button-ghost::before { transition: none !important; }
  .social:hover .hex-line { transform: none; }
  .built-by:hover img { transform: none; }
}

/* ───────────────────── beta download ───────────────────── */

.button-download { gap: 12px; padding-block: 10px; }
.button-download svg { width: 20px; height: 20px; flex: none; }
.dl-text { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.dl-main { font-size: 13px; font-weight: 600; }
.dl-sub { font-size: 10px; opacity: .72; letter-spacing: .04em; }
.install-steps { list-style: none; padding: 0; margin: 34px auto 0; max-width: 560px; display: grid; gap: 10px; text-align: left; }
.install-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: center; font-size: 13px; color: var(--muted);
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--paper) 70%, transparent); }
.install-steps li span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--amber); color: var(--ink); font: 600 12px var(--mono); }
.release-inner .checksum { font: 10px var(--mono); color: var(--muted); max-width: 560px; margin-inline: auto; }
