/* ==========================================================================
   Emberframe Studio — demo site stylesheet
   Dark, cinematic theme. No frameworks, no external fonts, no dependencies.
   ========================================================================== */

:root {
  --bg: #0c0d12;
  --bg-alt: #12141c;
  --surface: #181b26;
  --surface-2: #1f2333;
  --text: #eef0f6;
  --text-muted: #9aa1b5;
  --accent: #ff6b35;
  --accent-2: #ffd166;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; }

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

.container-narrow { width: min(760px, 92%); }

/* ---------- Accessibility ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #16130f;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 13, 18, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-mark { width: 28px; height: 28px; }

.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-menu a:hover,
.nav-menu a[aria-current="page"] { color: var(--text); }

.nav-cta {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #16130f !important;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { width: 100%; }
  .nav-menu a {
    display: block;
    padding: 1rem 4%;
    font-size: 1.05rem;
  }
  .nav-cta { border-radius: 0; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 0 6rem;
  min-height: 68vh;
  display: flex;
  align-items: center;
}

.hero-sub { min-height: 46vh; padding: 5rem 0 4rem; }

.hero-inner { position: relative; z-index: 2; }

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0.75rem 0 1.25rem;
}

.gradient-text {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.25rem;
  flex-wrap: wrap;
}

/* animated background */
.hero-bg { position: absolute; inset: 0; z-index: 1; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}

.orb-1 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #ff6b35, transparent 65%);
  top: -140px; right: -80px;
  animation: drift 14s ease-in-out infinite alternate;
}

.orb-2 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #4361ee, transparent 65%);
  bottom: -120px; left: -60px;
  animation: drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-60px, 40px) scale(1.15); }
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* animated "runner" strip — a nod to walk cycles */
.hero-runner {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  border-top: 1px solid var(--line);
  overflow: hidden;
  z-index: 2;
}

.runner-track { position: relative; height: 100%; }

.runner {
  position: absolute;
  bottom: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  animation: run 6s linear infinite;
  box-shadow: 0 0 18px rgba(255, 107, 53, 0.65);
}

@keyframes run {
  0%   { left: -3%; transform: translateY(0); }
  10%  { transform: translateY(-16px); }
  20%  { transform: translateY(0); }
  30%  { transform: translateY(-16px); }
  40%  { transform: translateY(0); }
  50%  { transform: translateY(-16px); }
  60%  { transform: translateY(0); }
  70%  { transform: translateY(-16px); }
  80%  { transform: translateY(0); }
  90%  { transform: translateY(-16px); }
  100% { left: 103%; transform: translateY(0); }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #16130f;
  box-shadow: 0 8px 26px rgba(255, 107, 53, 0.35);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-lg { padding: 1.05rem 2.2rem; font-size: 1.1rem; }

/* ---------- Sections ---------- */

.section { padding: 5.5rem 0; }

.section-alt { background: var(--bg-alt); }

.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0.6rem 0 2.5rem;
}

/* ---------- Logos strip ---------- */

.logos {
  border-block: 1px solid var(--line);
  padding: 1.6rem 0;
  background: var(--bg-alt);
}

.logos .container {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.logos-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.logos-row {
  display: flex;
  gap: 2.2rem;
  list-style: none;
  flex-wrap: wrap;
}

.logos-row li {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 107, 53, 0.4);
}

.card-icon { font-size: 1.7rem; margin-bottom: 0.9rem; }

.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

.card p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Work grid ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.work-item {
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}

.work-item:hover { transform: translateY(-6px); border-color: rgba(255, 209, 102, 0.4); }

.work-thumb {
  height: 180px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.thumb-1 { background: linear-gradient(135deg, #2b1055, #7597de); }
.thumb-2 { background: linear-gradient(135deg, #42275a, #ff6b35); }
.thumb-3 { background: linear-gradient(135deg, #134e5e, #71b280); }

.work-tag {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.work-item h3 { padding: 1.1rem 1.25rem 0.2rem; font-size: 1.15rem; }

.work-item p { padding: 0 1.25rem 1.25rem; color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Process ---------- */

.process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  list-style: none;
  counter-reset: step;
}

.process li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.step-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
}

.process h3 { margin: 0.5rem 0 0.4rem; font-size: 1.05rem; }

.process p { color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Split (story) ---------- */

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.prose p { color: var(--text-muted); margin-bottom: 1.1rem; max-width: 56ch; }

.media-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.5rem 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.bounce-ball {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-2), var(--accent) 70%);
  margin-inline: auto;
  animation: bounce 1.4s cubic-bezier(0.28, 0.84, 0.42, 1) infinite;
  box-shadow: 0 0 24px rgba(255, 107, 53, 0.4);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0) scale(1, 1); animation-timing-function: ease-out; }
  15%       { transform: translateY(0) scale(1.15, 0.85); }
  45%       { transform: translateY(-110px) scale(0.95, 1.05); animation-timing-function: ease-in; }
  75%       { transform: translateY(0) scale(1.05, 0.95); }
}

.media-floor {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
  margin-top: 0.4rem;
}

.media-caption {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1.2rem;
  font-style: italic;
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  list-style: none;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 1.1rem;
  font-weight: 800;
  font-size: 1.5rem;
  color: #16130f;
}

.avatar-1 { background: linear-gradient(135deg, #ffd166, #ff6b35); }
.avatar-2 { background: linear-gradient(135deg, #7597de, #b8c0ff); }
.avatar-3 { background: linear-gradient(135deg, #71b280, #d4fc79); }

.team-card h3 { font-size: 1.15rem; }

.team-role {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.25rem 0 0.75rem;
}

.team-card > p:last-child { color: var(--text-muted); font-size: 0.92rem; }

.team-note {
  text-align: center;
  color: var(--text-muted);
  margin-top: 2rem;
  font-style: italic;
}

/* ---------- Timeline ---------- */

.timeline {
  list-style: none;
  position: relative;
  padding-left: 2rem;
  max-width: 640px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2));
  border-radius: 2px;
}

.timeline li { position: relative; padding-bottom: 2.2rem; }

.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -2rem;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
}

.tl-date {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  text-transform: uppercase;
}

.timeline h3 { margin: 0.3rem 0 0.3rem; font-size: 1.1rem; }

.timeline p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.6rem;
}

.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs [aria-current] { color: var(--text); }

/* ---------- FAQ ---------- */

.faq-list { display: grid; gap: 0.9rem; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1.15rem 1.4rem;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 3rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.25s;
}

.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq-item p {
  padding: 0 1.4rem 1.25rem;
  color: var(--text-muted);
}

/* ---------- CTA band ---------- */

.cta-band {
  padding: 6rem 0;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(255, 107, 53, 0.22), transparent 60%),
    var(--bg-alt);
  border-top: 1px solid var(--line);
  text-align: center;
}

.cta-inner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0.6rem; }

.cta-inner p { color: var(--text-muted); margin-bottom: 2rem; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-note { color: var(--text-muted); font-size: 0.9rem; }

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover { color: var(--text); }

.footer-copy { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Scroll reveal ----------
   Gated behind html.js so content stays visible for no-JS visitors
   and crawlers that don't execute JavaScript. */

html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

html.js .reveal.visible { opacity: 1; transform: none; }

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; }
}

/* ---------- Easing playground ---------- */

.playground {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 760px) { .playground { grid-template-columns: 1fr; } }

.easing-choices {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.easing-btn {
  font: inherit;
  text-align: left;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.easing-btn:hover { color: var(--text); }

.easing-btn[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(255, 107, 53, 0.1);
}

.easing-btn small {
  display: block;
  font-size: 0.78rem;
  opacity: 0.75;
}

.playground-stage { min-width: 0; }

.easing-curve {
  width: 100%;
  max-width: 340px;
  height: auto;
  display: block;
  margin-bottom: 1.5rem;
}

.curve-grid { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.curve-axis { stroke: rgba(255, 255, 255, 0.2); stroke-width: 1.5; }
.curve-path {
  stroke: url(#curve-grad);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
}
.curve-dot { fill: var(--accent-2); }

.demo-track {
  position: relative;
  height: 72px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.demo-track::before,
.demo-track::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: var(--line);
}
.demo-track::before { left: 36px; }
.demo-track::after { right: 36px; }

.demo-ball {
  position: absolute;
  top: 50%;
  left: 36px;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-2), var(--accent) 70%);
  box-shadow: 0 0 18px rgba(255, 107, 53, 0.5);
  will-change: transform;
}

.playground-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.playground-hint { color: var(--text-muted); font-size: 0.88rem; }

/* ---------- Testimonials ---------- */

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.quote-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.quote-mark {
  font-size: 2.6rem;
  line-height: 1;
  color: var(--accent);
  font-family: Georgia, serif;
}

.quote-card blockquote {
  border: 0;
  font-size: 1.02rem;
  color: var(--text);
  flex: 1;
}

.quote-attr { color: var(--text-muted); font-size: 0.88rem; }
.quote-attr strong { color: var(--text); display: block; font-size: 0.95rem; }

/* ---------- Onion-skin runner ghosts ---------- */

.runner-ghost {
  position: absolute;
  bottom: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  animation: run 6s linear infinite;
}

.ghost-1 { opacity: 0.3; animation-delay: -0.09s; }
.ghost-2 { opacity: 0.16; animation-delay: -0.18s; }
.ghost-3 { opacity: 0.07; animation-delay: -0.27s; }

/* ---------- Brand guidelines page ---------- */

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.25rem;
}

.swatch {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.swatch-chip { height: 92px; }

.swatch dl { padding: 1rem 1.2rem; }
.swatch dt { font-weight: 700; font-size: 0.98rem; }
.swatch dd { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.15rem; }
.swatch code {
  font-size: 0.8rem;
  color: var(--accent-2);
  background: rgba(255, 209, 102, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
}

.logo-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.logo-cell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  place-items: center;
  min-height: 190px;
  position: relative;
}

.logo-cell.on-light { background: #f2f0ea; }

.logo-cell-label {
  position: absolute;
  top: 0.85rem;
  left: 1.1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.logo-cell.on-light .logo-cell-label { color: #6b6f7e; }

.type-scale { display: grid; gap: 1.4rem; }

.type-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.4rem;
}

@media (max-width: 600px) { .type-row { grid-template-columns: 1fr; gap: 0.3rem; } }

.type-meta { color: var(--text-muted); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }

.spec-display { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.spec-h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -0.015em; }
.spec-body { font-size: 1.05rem; color: var(--text-muted); max-width: 56ch; }
.spec-eyebrow { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.8rem; font-weight: 600; color: var(--accent); }

.motion-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.motion-spec {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}

.motion-spec h3 { font-size: 1.02rem; margin-bottom: 0.2rem; }
.motion-spec code { font-size: 0.78rem; color: var(--accent-2); }
.motion-spec p { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.5rem; }

.motion-demo-lane {
  height: 46px;
  margin-top: 1rem;
  border-radius: 9px;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}

.motion-demo-dot {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}

.lane-standard .motion-demo-dot { animation: lane-slide 2.4s cubic-bezier(0.16, 1, 0.3, 1) infinite; }
.lane-overshoot .motion-demo-dot { animation: lane-slide 2.4s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; }
.lane-linear .motion-demo-dot { animation: lane-slide 2.4s linear infinite; }

@keyframes lane-slide {
  0%, 12% { transform: translateX(0); }
  70%, 100% { transform: translateX(calc(min(230px, 60vw) - 44px)); }
}

/* ---------- 404 page ---------- */

.page-404 {
  min-height: 72vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 0;
}

.frame-counter {
  font-variant-numeric: tabular-nums;
  font-size: clamp(4rem, 14vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dropped-frame {
  display: inline-block;
  animation: frame-drop 2.2s var(--ease-out) infinite;
  transform-origin: 50% 100%;
}

@keyframes frame-drop {
  0%, 55% { transform: none; opacity: 1; }
  70% { transform: translateY(10px) rotate(8deg); opacity: 0.6; }
  85% { transform: translateY(60px) rotate(24deg); opacity: 0; }
  86%, 100% { transform: none; opacity: 1; }
}
