/* Scryptic website v2. Tokens from the Scryptic web design guide v1.0 (§1); no new hex values. */
:root {
  --ink: #0C0D0F; --graphite: #5B6068; --steel: #A3A8B0; --line: #E3E2DC; --paper: #F4F3EF; --white: #FFFFFF;
  --signal: #FF4D12; --signal-hover: #FF6A3D; --on-signal: #0C0D0F; --ink-hover: #2A2D33;
  --success: #0F7B4C;
  --font-brand: "JetBrains Mono", ui-monospace, monospace;
  --font-text: "Inter", system-ui, sans-serif;
  --r: 4px; --r-sm: 2px;
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
  --header-h: 68px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 17px/28px var(--font-text); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: var(--white); padding: 12px 16px; border-radius: var(--r); }
.skip:focus { top: 16px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 720px) { .wrap { padding: 0 48px; } }
@media (min-width: 1300px) { .wrap { padding: 0 24px; } }
.num { font-family: var(--font-brand); white-space: nowrap; }
.dark { background: var(--ink); color: var(--white); }

/* Type */
.label { font: 400 12px/16px var(--font-brand); letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite); }
h1 { font: 500 clamp(44px, 7vw, 88px)/1 var(--font-brand); letter-spacing: -0.04em; }
h2 { font: 500 clamp(32px, 4.2vw, 52px)/1.08 var(--font-brand); letter-spacing: -0.03em; }
h3 { font: 500 26px/32px var(--font-brand); letter-spacing: -0.02em; }
.lead { font-size: 20px; line-height: 31px; color: var(--graphite); max-width: 34ch; }
.dark .lead { color: var(--steel); }
@media (max-width: 719px) { body { font-size: 16px; line-height: 26px; } .lead { font-size: 18px; line-height: 28px; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 14px 22px;
  font: 500 15px/1 var(--font-text); border-radius: var(--r); border: 1px solid transparent; text-decoration: none; white-space: nowrap;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease); }
.btn--signal { background: var(--signal); color: var(--on-signal); }
.btn--signal:hover { background: var(--signal-hover); }
.btn--primary { background: var(--ink); color: var(--white); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--text { padding-inline: 4px; color: var(--ink); }
.btn--text:hover { text-decoration: underline; }
.btn--block { width: 100%; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

/* Header */
.header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent; transition: background-color 200ms var(--ease), border-color 200ms var(--ease); }
.header.scrolled { border-color: var(--line); }
.header.is-dark { background: rgba(12,13,15,0.86); color: var(--white); border-color: var(--ink-hover); }
.header-row { display: flex; align-items: center; gap: 32px; height: 100%; }
.logo { padding: 6px 0; }
.logo img { height: 25px; width: auto; }
.logo-dark, .header.is-dark .logo-light { display: none; }
.header.is-dark .logo-dark { display: block; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { font-size: 15px; color: var(--graphite); text-decoration: none; padding: 10px 0; border-bottom: 2px solid transparent; transition: color 150ms var(--ease), border-color 150ms var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--signal); }
.header.is-dark .nav a { color: var(--steel); }
.header.is-dark .nav a:hover { color: var(--white); }
.btn--header { min-height: 40px; padding: 10px 16px; background: var(--ink); color: var(--white); }
.btn--header:hover { background: var(--ink-hover); }
.header.is-dark .btn--header { background: var(--white); color: var(--ink); }
.header.cta-signal .btn--header { background: var(--signal); color: var(--on-signal); }
.header.cta-signal .btn--header:hover { background: var(--signal-hover); }
@media (max-width: 719px) { .nav { display: none; } .btn--header { margin-left: auto; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: calc(var(--header-h) + 64px) 0 96px; }
/* Faint blueprint grid, neutral only, fading out toward the edges */
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--ink-hover) 1px, transparent 1px), linear-gradient(90deg, var(--ink-hover) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 65% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 80% 70% at 65% 45%, #000 20%, transparent 75%); }
.hero > .wrap { position: relative; }
.hero-grid { display: grid; gap: 72px; align-items: center; }
@media (min-width: 1024px) { .hero { min-height: 100svh; display: flex; align-items: center; padding-bottom: 64px; } .hero-grid { grid-template-columns: 1.2fr 0.8fr; gap: 64px; width: 100%; } }
.hero-copy { display: grid; gap: 32px; justify-items: start; }
.hero h1 { font-size: clamp(52px, 6.4vw, 92px); line-height: 0.98; letter-spacing: -0.045em; }
.flourish { color: var(--white); }
.hero .lead { font-size: 21px; line-height: 32px; max-width: 30ch; }
.dark .btn--text { color: var(--white); }
.hero-visual { display: grid; gap: 24px; justify-items: center; }
.stack { position: relative; width: 100%; max-width: 400px; }
.stack .device { position: relative; z-index: 1; }
.device--back { position: absolute !important; z-index: 0 !important; top: -40px; left: 56px; width: 100%; opacity: 0.35; pointer-events: none; }
.device--back .screen { padding-bottom: 120px; }
.toast { position: absolute; z-index: 2; left: -56px; top: 232px; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px;
  background: var(--ink); color: var(--white); border: 1px solid var(--ink-hover); border-radius: var(--r); box-shadow: 0 12px 32px rgba(12,13,15,0.35);
  font-size: 14px; line-height: 18px; opacity: 0; transform: translateY(10px); transition: opacity 250ms var(--ease), transform 250ms var(--ease); }
.toast.in { opacity: 1; transform: none; }
.toast strong { display: block; font-weight: 600; }
.toast small { display: block; color: var(--steel); font: 400 12px/18px var(--font-brand); }
.toast-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--success); color: var(--white); flex-shrink: 0; }
.toast-icon svg { width: 14px; height: 14px; }
@media (max-width: 1023px) { .device--back { left: 28px; top: -28px; } .toast { left: -8px; } }
@media (max-width: 479px) { .device--back { display: none; } .toast { left: 8px; } }
.try { width: 100%; max-width: 400px; display: grid; gap: 8px; }
.try label { font: 400 12px/16px var(--font-brand); letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel); }
.try input { min-height: 48px; padding: 10px 14px; border: 1px solid var(--graphite); border-radius: var(--r); font: 500 17px/24px var(--font-text); color: var(--white); background: transparent; transition: border-color 150ms var(--ease); }
.try input:hover { border-color: var(--steel); }
.try input:focus-visible { border-color: var(--white); }
.try input::placeholder { color: var(--graphite); }

/* Device + screens (product mockups) */
.device { width: 100%; max-width: 400px; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.device-bar { padding: 10px 16px; background: var(--paper); border-bottom: 1px solid var(--line); font: 400 12px/16px var(--font-brand); color: var(--graphite); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen { display: grid; gap: 16px; align-content: start; padding: 24px 22px 22px; }
.s-eyebrow { font: 400 11px/16px var(--font-brand); letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite); }
.s-title { font: 500 24px/30px var(--font-brand); letter-spacing: -0.03em; overflow-wrap: anywhere; }
.lines { border-top: 1px solid var(--line); }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.total { display: flex; justify-content: space-between; font-weight: 600; font-size: 15px; }
.total .num { font-weight: 500; font-size: 18px; }
.note { font-size: 13px; line-height: 20px; color: var(--graphite); }
.tiles { display: grid; gap: 6px; }
.tiles--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 64px 64px; }
.tiles--3 .tile:first-child, .tiles--hero .tile:first-child { grid-row: span 2; }
.tiles--hero { grid-template-columns: 2fr 1fr; grid-template-rows: 92px 92px; }
.tiles--grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 96px; }
.tile { position: relative; overflow: hidden; border-radius: var(--r-sm); display: block; }
.tile svg { position: absolute; inset: auto 0 0; width: 100%; height: 82%; }
.t1 { background: var(--graphite); } .t1 svg { fill: var(--ink); }
.t2 { background: var(--paper); } .t2 svg { fill: var(--steel); }
.t3 { background: var(--steel); } .t3 svg { fill: var(--graphite); }
.t4 { background: var(--ink); } .t4 svg { fill: var(--graphite); }
.byline { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 18px; font-weight: 500; }
.byline small, .post-head small { display: block; font-weight: 400; color: var(--graphite); font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--white); font: 500 14px/1 var(--font-brand); flex-shrink: 0; }
.bubble { padding: 14px 16px; background: var(--paper); border-radius: var(--r); font-size: 14px; line-height: 22px; }
.facts { display: grid; grid-template-columns: repeat(3, auto); gap: 12px; }
.facts div { display: grid; gap: 2px; }
.facts dt { font: 400 11px/16px var(--font-brand); text-transform: uppercase; letter-spacing: 0.08em; color: var(--graphite); }
.facts dd { font-size: 13px; line-height: 20px; font-weight: 500; }
.tracker { display: grid; gap: 0; }
.tracker li { position: relative; padding: 9px 0 9px 28px; font-size: 14px; line-height: 20px; color: var(--steel); }
.tracker li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--steel); background: var(--white); }
.tracker li:not(:last-child)::after { content: ""; position: absolute; left: 9px; top: 25px; bottom: -11px; width: 1px; background: var(--line); }
.tracker .done { color: var(--ink); }
.tracker .done::before { background: var(--ink); border-color: var(--ink); }
.tracker .now { color: var(--ink); font-weight: 600; }
.tracker .now::before { background: var(--signal); border-color: var(--signal); } /* "you are here" marker */
.held { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; line-height: 22px; }
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-pair .btn { min-height: 44px; padding-inline: 8px; }
.post-head { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; line-height: 18px; }
.avatar--g { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.tile--post { height: 230px; }
.post-tag { position: absolute; left: 12px; top: 12px; padding: 6px 10px; background: var(--white); color: var(--ink); border-radius: var(--r-sm); font: 500 11px/1 var(--font-brand); letter-spacing: 0.06em; text-transform: uppercase; }

/* Hero device builds in once on load */
.js #hero-device .screen > * { opacity: 0; transform: translateY(8px); transition: opacity 300ms var(--ease), transform 300ms var(--ease); }
.js #hero-device .screen.built > * { opacity: 1; transform: none; }

/* Story */
.story { padding: 120px 0 40px; border-top: 1px solid var(--line); }
.story-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: 24px; }
.story-grid { display: grid; }
.step { display: grid; gap: 14px; align-content: center; padding: 56px 0; }
.step p:not(.step-n) { color: var(--graphite); max-width: 42ch; }
.step-n { font: 500 14px/1 var(--font-brand); color: var(--graphite); }
.step-media { margin-top: 16px; display: flex; justify-content: center; }
.step-media .device { max-width: 380px; }
.stage { display: none; }

@media (min-width: 1024px) {
  .story-grid { grid-template-columns: 1fr 1fr; gap: 96px; }
  .step { min-height: 78vh; padding: 0; opacity: 0.28; transition: opacity 300ms var(--ease); }
  .step.is-active { opacity: 1; }
  .step-media { display: none; }
  .stage { display: flex; align-items: center; gap: 24px; position: sticky; top: calc(var(--header-h) + (100vh - var(--header-h) - 560px) / 2); height: 560px; justify-content: center; }
  .device--stage { max-width: 400px; }
  .screens { position: relative; height: 520px; }
  .screens .screen { position: absolute; inset: 0; opacity: 0; transform: translateY(12px); transition: opacity 300ms var(--ease), transform 300ms var(--ease); pointer-events: none; }
  .screens .screen.is-on { opacity: 1; transform: none; }
  .dots { display: grid; gap: 10px; }
  .dots li { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background-color 200ms var(--ease), transform 200ms var(--ease); }
  .dots li.is-on { background: var(--ink); transform: scale(1.35); }
}

/* Crafts */
.crafts { padding: 120px 0; background: var(--paper); }
.crafts-line { font: 500 clamp(32px, 5vw, 64px)/1.1 var(--font-brand); letter-spacing: -0.035em; }
.craft { border-bottom: 3px solid var(--ink); }
.crafts-sub { margin-top: 24px; max-width: 56ch; color: var(--graphite); }

/* Company */
.company { padding: 120px 0; }
.company-grid { display: grid; gap: 24px 96px; margin-bottom: 64px; }
.company-grid > div { display: grid; gap: 16px; align-content: start; }
@media (min-width: 1024px) { .company-grid { grid-template-columns: 1fr 1fr; align-items: end; } }
.company-copy { color: var(--graphite); max-width: 56ch; }
.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
@media (min-width: 900px) { .team { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.team img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r); filter: grayscale(1); transition: filter 300ms var(--ease); margin-bottom: 14px; background: var(--paper); }
.team li:hover img { filter: none; }
.name { font-weight: 600; font-size: 16px; line-height: 22px; }
.role { font-size: 14px; color: var(--graphite); }

/* Closing */
.closing { padding: 144px 0; text-align: center; }
.closing-inner { display: grid; gap: 28px; justify-items: center; }
.closing h2 { font-size: clamp(36px, 5.6vw, 72px); max-width: 14ch; }
.closing .lead { max-width: 44ch; }
.closing-mail { font-size: 15px; color: var(--steel); margin-top: 8px; }
.closing-mail a { color: var(--white); }

/* Footer */
.footer { padding: 56px 0 32px; border-top: 1px solid var(--ink-hover); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 32px; }
.footer-row img { width: 160px; }
.social { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.social a { display: inline-block; padding: 10px 0; color: var(--white); text-decoration: none; font-size: 15px; }
.social a:hover { text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--ink-hover); color: var(--steel); font-size: 14px; }
.footer-base a { color: var(--steel); }
.term-open { background: none; border: 0; color: var(--steel); font: 400 13px/1 var(--font-brand); cursor: pointer; min-height: 44px; padding: 0; }
.term-open:hover { color: var(--white); }
kbd { font: inherit; padding: 2px 6px; border: 1px solid var(--graphite); border-radius: var(--r-sm); color: var(--white); }

/* Terminal (easter egg dialog) */
.terminal { width: min(640px, calc(100vw - 32px)); padding: 0; background: var(--ink); color: var(--white); border: 1px solid var(--ink-hover); border-radius: var(--r);
  font: 400 14px/22px var(--font-brand); box-shadow: 0 24px 64px rgba(12,13,15,0.35); }
.terminal::backdrop { background: rgba(12,13,15,0.5); }
.terminal[open] { animation: pop 200ms var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.term-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 16px; border-bottom: 1px solid var(--ink-hover); color: var(--steel); font-size: 12px; }
.term-close { background: none; border: 1px solid var(--ink-hover); border-radius: var(--r-sm); color: var(--steel); font: inherit; min-height: 32px; padding: 0 10px; cursor: pointer; }
.term-close:hover { color: var(--white); border-color: var(--steel); }
.term-body { height: min(340px, 50vh); overflow-y: auto; padding: 16px; }
.term-body p { white-space: pre-wrap; word-break: break-word; color: var(--steel); }
.term-body .cmd { color: var(--white); }
.term-body .cmd::before { content: "$ "; color: var(--steel); }
.term-body .em, .term-body a { color: var(--white); }
.term-body .gap { height: 10px; }
.term-input { display: flex; align-items: center; gap: 10px; padding: 8px 16px 14px; color: var(--steel); }
.term-input input { flex: 1; min-width: 0; min-height: 36px; background: transparent; border: 0; color: var(--white); font: inherit; caret-color: var(--signal); outline: none; }
@media (max-width: 719px) { .terminal { font-size: 12px; line-height: 19px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js #hero-device .screen > *, .toast { opacity: 1; transform: none; }
}
