/* Seamrun website v4. Colours, type and radii come from /assets/tokens.css (design-tokens/tokens.json). */

:root {
  --glow-teal: var(--color-bg-accent);
  --glow-violet: #563B9C;
  --glow-warm: #F99341;
  --glow-strength: 26%;
  --gutter: max(16px, calc((100% - 1120px) / 2));
  --gutter-wide: max(16px, calc((100% - 1240px) / 2));
  --section-pad: clamp(72px, 10vw, 120px);
}
:root[data-theme="light"] { --glow-strength: 16%; }

/* Show the image that matches the theme. Without JS, follow the system setting. */
[data-theme="dark"] .only-light, [data-theme="light"] .only-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .only-light { display: none; } }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .only-dark { display: none; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--color-bg-page); color: var(--color-text-primary);
  font: var(--type-body); font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-text-accent); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
em { font-style: italic; color: var(--color-text-accent); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--color-bg-raised); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* Layout helpers */
.wrap { padding-inline: var(--gutter); }
.wide { margin-inline: var(--gutter-wide); }
.narrow { max-width: 960px; margin-inline: auto; padding-inline: 16px; }
.narrow-860 { max-width: 860px; margin-inline: auto; padding-inline: 16px; }
.center { text-align: center; }
section { position: relative; padding-block: var(--section-pad); }

/* Type */
.eyebrow { font: var(--type-h3); color: var(--color-text-accent); margin-bottom: 16px; }
h1 { font: var(--type-displayHero); font-size: clamp(44px, 12.5vw, 128px); letter-spacing: var(--type-displayHero-tracking); line-height: 1; }
h2 { font: var(--type-displayDesktop); font-size: clamp(40px, 5.2vw, 72px); letter-spacing: var(--type-displayDesktop-tracking); text-wrap: balance; }
h2.left, .sub.left { text-align: left; margin-inline: 0; }
.sub { font: var(--type-bodyLarge); color: var(--color-text-secondary); max-width: 760px; margin: 20px auto 0; text-wrap: pretty; }
.lede { font: var(--type-bodyLarge); font-size: clamp(19px, 2vw, 26px); line-height: 1.4; color: var(--color-text-secondary); max-width: 840px; margin: 20px auto 0; text-wrap: balance; }
.fine { font: var(--type-caption); color: var(--color-text-secondary); margin-top: 20px; }
.fine a { color: inherit; }
.overline { font: var(--type-overline); letter-spacing: var(--type-overline-tracking); text-transform: uppercase; color: var(--color-text-accent); margin-bottom: 10px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: var(--type-label); text-decoration: none; border: 1px solid transparent; border-radius: var(--radius-full);
  background: var(--color-bg-accent); color: var(--color-text-on-accent); cursor: pointer;
  transition: background var(--duration-quick) var(--ease-out), transform var(--duration-instant) var(--ease-out);
}
.btn:hover { background: var(--color-bg-accent-hover); }
.btn:active { transform: scale(var(--press-scale)); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-lg { min-height: 56px; padding: 0 28px; }
.btn-sm { min-height: 32px; padding: 0 14px; font: var(--type-labelSmall); }
.btn-block { width: 100%; }
.btn-secondary { background: transparent; color: var(--color-text-primary); border-color: var(--color-border-strong); }
.btn-secondary:hover { background: var(--color-bg-surface); }
.link { font: var(--type-label); text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 52px; padding-inline: max(16px, calc((100% - 1120px) / 2));
  background: var(--color-bg-glass); -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid var(--color-border-default);
}
.logo { display: flex; align-items: center; gap: 8px; font: var(--type-label); color: var(--color-text-primary); text-decoration: none; }
.nav-links { display: flex; gap: 36px; }
.nav-links a { font: var(--type-caption); color: var(--color-text-secondary); text-decoration: none; }
.nav-links a:hover { color: var(--color-text-primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.theme-switch {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  background: transparent; border: 1px solid var(--color-border-default); color: var(--color-text-primary);
}
.theme-switch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }
@media (max-width: 860px) { .nav-links { display: none; } }

/* Hero: the seam-line canvas sits behind the copy and phones and fades into the page. */
.hero { position: relative; overflow: hidden; text-align: center; padding: clamp(64px, 8vw, 110px) 16px 0; isolation: isolate; }
.hero .seams { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: 0; transition: opacity 600ms var(--ease-out); }
.hero .seams.ready { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 22%; z-index: -1; background: linear-gradient(180deg, transparent, var(--color-bg-page)); }
.hero-copy { max-width: 880px; margin: 0 auto; }
.hero .eyebrow { margin-bottom: 20px; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 28px; margin-top: 32px; }
.hero-stage { position: relative; max-width: 920px; margin: clamp(40px, 6vw, 96px) auto 0; }
.hero-stage::before {
  content: ""; position: absolute; inset: 30% -20% -10%; z-index: -1; filter: blur(60px);
  background:
    radial-gradient(45% 50% at 25% 60%, color-mix(in srgb, var(--glow-violet) 55%, transparent), transparent 70%),
    radial-gradient(45% 50% at 75% 60%, color-mix(in srgb, var(--glow-warm) 45%, transparent), transparent 70%),
    radial-gradient(40% 40% at 50% 40%, color-mix(in srgb, var(--glow-teal) 30%, transparent), transparent 70%);
  opacity: calc(var(--glow-strength) * 3);
}
.hero-stage img { width: 100%; margin-bottom: -6%; }

/* Soft drifting glows behind the other sections, on the one page background. */
section.glow { isolation: isolate; }
section.glow::before {
  content: ""; position: absolute; inset: -20% -10%; z-index: -1; pointer-events: none; filter: blur(48px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent);
  background:
    radial-gradient(38% 46% at var(--x1) var(--y1), color-mix(in srgb, var(--c1) var(--glow-strength), transparent), transparent 70%),
    radial-gradient(32% 40% at var(--x2) var(--y2), color-mix(in srgb, var(--c2) var(--glow-strength), transparent), transparent 70%);
  animation: drift 38s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate3d(-3%, -2%, 0) scale(1); } to { transform: translate3d(3%, 2%, 0) scale(1.06); } }
.g-teal-violet { --c1: var(--glow-teal); --x1: 18%; --y1: 30%; --c2: var(--glow-violet); --x2: 82%; --y2: 70%; }
.g-violet-warm { --c1: var(--glow-violet); --x1: 80%; --y1: 25%; --c2: var(--glow-warm); --x2: 20%; --y2: 80%; }
.g-warm-teal   { --c1: var(--glow-warm); --x1: 75%; --y1: 75%; --c2: var(--glow-teal); --x2: 15%; --y2: 20%; }

/* Numbers */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin: clamp(48px, 7vw, 88px) 0 0; }
.stats dt {
  font: 400 clamp(52px, 5vw, 72px)/1.08 var(--font-sans); letter-spacing: -0.02em; width: fit-content;
  background: linear-gradient(90deg, #563B9C, #B15F82 25%, #DF7064 50%, #F99341 75%, #F9C641);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats dd { margin: 10px 0 0; color: var(--color-text-secondary); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; } }

/* Breaks */
.map-tile { margin-top: clamp(48px, 7vw, 100px); margin-bottom: 0; }
.map-tile img { width: 100%; border-radius: var(--radius-xl); }
figcaption { font: var(--type-caption); color: var(--color-text-secondary); margin-top: 12px; }
.captions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 32px; }
.captions h3, .steps b { font: var(--type-label); }
.captions p { color: var(--color-text-secondary); margin-top: 6px; }
@media (max-width: 760px) { .captions { grid-template-columns: 1fr; gap: 20px; } }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(48px, 7vw, 84px); }
.tile {
  display: flex; flex-direction: column; gap: 10px; padding: 40px; border-radius: var(--radius-xl); overflow: hidden;
  background: color-mix(in srgb, var(--color-bg-surface) 82%, transparent); border: 1px solid var(--color-border-default);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); min-height: 440px;
}
.tile h3 { font: var(--type-titleScreen); font-size: clamp(30px, 3vw, 40px); letter-spacing: var(--type-titleScreen-tracking); text-wrap: balance; }
.tile p:not(.overline) { color: var(--color-text-secondary); max-width: 440px; }
.tile img { margin-top: auto; padding-top: 28px; width: 100%; max-width: 420px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-2 img { max-width: 100%; }
.tile-night { background: #1E0505; border-color: #2E0909; }
.tile-night .overline, .tile-night h3 { color: #F09A90; }
.tile-night p:not(.overline) { color: #C8423A; }
.tile-honest { flex-direction: row; align-items: center; justify-content: space-between; gap: 40px; min-height: 0; }
.tile-honest > div:first-child { max-width: 560px; }
.honest-stat b { display: block; font: 300 clamp(56px, 5vw, 72px)/1.08 var(--font-sans); letter-spacing: -0.02em; }
.honest-stat span { color: var(--color-text-secondary); }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
  .tile { padding: 28px; min-height: 0; }
  .tile-honest { flex-direction: column; align-items: flex-start; }
}

/* Offline */
.split { display: grid; grid-template-columns: minmax(0, 700px) minmax(0, 1fr); gap: 60px; align-items: center; }
.split h2 { text-wrap: wrap; }
.split-art img { width: 100%; max-width: 400px; margin-inline: auto; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; }
.steps li::before {
  content: counter(step); grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font: var(--type-label); background: var(--color-bg-surface); border: 1px solid var(--color-border-default); color: var(--color-text-accent);
}
.steps span { color: var(--color-text-secondary); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 40px; } }

/* iPad and foldables */
.devices { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: end; margin-top: clamp(48px, 7vw, 96px); }
.devices figure { margin: 0; }
@media (max-width: 760px) { .devices { grid-template-columns: 1fr; } }

/* Proof */
.big-number { font: 300 clamp(120px, 16vw, 200px)/1 var(--font-sans); letter-spacing: -0.03em; }
.proof-body { font: var(--type-bodyLarge); font-size: clamp(19px, 2vw, 24px); line-height: 1.45; color: var(--color-text-secondary); margin-top: 20px; text-wrap: pretty; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 440px)); gap: 24px; justify-content: center; margin: clamp(48px, 7vw, 84px) 16px 0; }
.plan {
  display: flex; flex-direction: column; padding: 36px; border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--color-bg-surface) 82%, transparent); border: 1px solid var(--color-border-default);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.plan-main { border-color: var(--color-bg-accent); }
.tag { align-self: flex-start; font: var(--type-labelSmall); padding: 4px 10px; border-radius: var(--radius-full); background: var(--color-bg-accent); color: var(--color-text-on-accent); margin-bottom: 18px; }
.plan h3 { font: var(--type-h3); }
.price { margin-top: 18px; display: flex; align-items: baseline; gap: 8px; }
.price b { font: 300 64px/1.06 var(--font-sans); letter-spacing: -0.02em; }
.price span { font: var(--type-bodyLarge); color: var(--color-text-secondary); }
.note { color: var(--color-text-secondary); margin-top: 8px; padding-bottom: 18px; border-bottom: 1px solid var(--color-border-default); }
.plan ul { list-style: none; padding: 0; margin: 18px 0 32px; display: grid; gap: 14px; flex: 1; align-content: start; }
.plan li { display: grid; grid-template-columns: 19px 1fr; gap: 10px; }
.plan li::before {
  content: ""; width: 19px; height: 19px; margin-top: 3px; background: var(--color-text-accent);
  -webkit-mask: url("/img/check.svg") center / contain no-repeat; mask: url("/img/check.svg") center / contain no-repeat;
}
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } .plan { padding: 28px; } .price b { font-size: 56px; } }

/* FAQ */
.faq h2 { margin-bottom: 16px; }
.faq details { border-bottom: 1px solid var(--color-border-default); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px;
  font: var(--type-h3); font-size: clamp(19px, 2vw, 24px); padding: 23px 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--color-text-secondary); transition: transform var(--duration-quick) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { font: var(--type-bodyLarge); color: var(--color-text-secondary); padding: 0 0 24px; max-width: 760px; }

/* Waitlist */
.final h2 { font-size: clamp(40px, 5.2vw, 72px); }
.waitlist { display: grid; grid-template-columns: 320px 260px auto; gap: 12px; align-items: end; justify-content: center; margin-top: 36px; text-align: left; }
.field { display: grid; gap: 8px; }
.field span { font: var(--type-labelSmall); }
.field input, .field select {
  font: var(--type-body); height: 56px; padding: 0 16px; width: 100%; border-radius: var(--radius-md);
  color: var(--color-text-primary); background: var(--color-bg-raised); border: 1px solid var(--color-border-strong);
}
.field select { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 22px) 26px, calc(100% - 17px) 26px; background-size: 5px 5px; background-repeat: no-repeat; }
.field input::placeholder { color: var(--color-text-secondary); }
.waitlist.error :invalid { border-color: var(--color-status-danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; text-align: center; min-height: 24px; color: var(--color-text-secondary); }
.waitlist.error .form-status { color: var(--color-status-danger); }
.waitlist.done .form-status { color: var(--color-status-fresh); font-weight: 600; }
@media (max-width: 760px) { .waitlist { grid-template-columns: 1fr; } .waitlist .btn { width: 100%; } }

/* Footer */
.footer { border-top: 1px solid var(--color-border-default); padding-block: 60px 40px; font: var(--type-caption); color: var(--color-text-secondary); }
.footer-row { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--color-border-default); }
.footer-row > div { max-width: 520px; }
.footer-brand { font: var(--type-label); color: var(--color-text-primary); margin-bottom: 8px; }
.footer-links { display: flex; gap: 28px; }
.footer-links a { color: var(--color-text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--color-text-primary); }
.legal { margin-top: 20px; }

/* Plain pages (privacy, terms, help) */
.doc { max-width: 720px; margin: 0 auto; padding: 72px 16px 96px; }
.doc h1 { font: var(--type-displayMobile); font-size: clamp(40px, 6vw, 56px); margin-bottom: 8px; }
.doc h2 { font: var(--type-h3); margin: 36px 0 10px; }
.doc p, .doc li { color: var(--color-text-secondary); margin: 0 0 12px; }
.doc .updated { font: var(--type-caption); margin-bottom: 32px; }

/* Calm motion: fade and rise 8 px. Only when JS is on and motion is allowed. */
.js .reveal { opacity: 0; transform: translateY(8px); transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  section.glow::before { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
