/* Quipio — legacy site, rebuilt 2026. No external dependencies.
   One committed dark theme: the brand lived on charcoal. */

:root {
  --red: #cf3f2b;
  --red-deep: #a52a18;
  --bg: #17181a;
  --panel: #1e1f22;
  --ink: #ececee;
  --muted: #a2a5ab;
  --hairline: rgba(236, 236, 238, 0.12);
  --cream: #f0e6d2;
  --cream-ink: #2a2419;
  --link: #e88a76;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --round: ui-rounded, "SF Pro Rounded", var(--font);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 4px),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

::selection { background: var(--red); color: #fff; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.shell.narrow { max-width: 700px; }

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.section-lede {
  max-width: 58ch;
  margin: 0;
  font-size: 1.12rem;
  color: var(--muted);
}

section { scroll-margin-top: 72px; }

/* the app's tap-to-highlight motif */
.hl {
  background: var(--red);
  color: #fff;
  padding: 0.05em 0.18em;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hl-dark {
  background: var(--cream-ink);
  color: var(--cream);
  padding: 0.05em 0.18em;
  border-radius: 3px;
}
h1 mark {
  background: linear-gradient(transparent 62%, rgba(207, 63, 43, 0.55) 62%);
  color: inherit;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(23, 24, 26, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img { height: 30px; width: auto; }

.site-header nav { display: flex; gap: clamp(14px, 3vw, 28px); }
.site-header nav a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.9rem;
}
.site-header nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 6px; }

/* ---------- hero ---------- */

.hero { border-bottom: 1px solid var(--hairline); }

.hero-art {
  height: clamp(240px, 42vh, 420px);
  background: url("/images/hero.jpg") center / cover no-repeat;
}

.hero-copy {
  padding: clamp(40px, 7vh, 72px) 24px clamp(56px, 9vh, 96px);
}

.hero h1 {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(2rem, 5.4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.14;
  letter-spacing: -0.015em;
}

.hero-sub {
  max-width: 56ch;
  margin: 24px 0 0;
  font-size: 1.08rem;
  color: var(--muted);
}
.hero-sub em { font-family: var(--serif); font-size: 1.06em; }

/* ---------- stats ---------- */

.stats {
  border-bottom: 1px solid var(--hairline);
  background: var(--panel);
  padding: 44px 0;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat {
  padding-left: 16px;
  border-left: 3px solid var(--red);
}
.stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.stat span {
  display: block;
  margin-top: 6px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- story ---------- */

.story { padding: clamp(64px, 10vh, 110px) 0; }

.story p { margin: 0 0 1.25em; }
.story p:last-child { margin-bottom: 0; }

.story blockquote {
  margin: 2em 0;
  padding: 0;
  border: 0;
}
.story blockquote p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.4;
  color: var(--cream);
}

/* ---------- the film ---------- */

.film { padding: 0 0 clamp(64px, 10vh, 110px); }

.film-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-top: 28px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}
.film-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.film-caption {
  margin: 14px 2px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- how it worked ---------- */

.how {
  background: var(--panel);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: clamp(64px, 10vh, 110px) 0;
}

.steps {
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: clamp(48px, 8vh, 80px);
}

.step {
  display: grid;
  grid-template-columns: minmax(260px, 5fr) 7fr;
  gap: 36px 48px;
  align-items: center;
}
.step:nth-child(even) { direction: rtl; }
.step:nth-child(even) > * { direction: ltr; }

.step h3 {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.step h3 i {
  flex: none;
  font-style: normal;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 30px;
  width: 30px;
  height: 30px;
  text-align: center;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  transform: translateY(-2px);
}
.step p { margin: 0; color: var(--muted); font-size: 0.98rem; }

.step-shots {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.step-shots img {
  width: calc(50% - 8px);
  max-width: 230px;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}
.step-shots.three img { width: calc(33.3% - 11px); max-width: 200px; }

/* ---------- gallery ---------- */

.gallery {
  padding: 0;
  border-bottom: 1px solid var(--hairline);
}
.gallery img { display: block; width: 100%; }
.gallery-caption {
  margin: 0;
  padding: 14px 24px 18px;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---------- community ---------- */

.community { padding: clamp(64px, 10vh, 110px) 0 clamp(40px, 6vh, 64px); }

.phone-rail {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 40px 24px 24px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--red) transparent;
}
.phone-rail figure {
  flex: none;
  margin: 0;
  scroll-snap-align: center;
}
.phone-rail img {
  height: min(384px, 96vw);
  width: auto;
  max-width: none;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}
.phone-rail figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- recognition ---------- */

.recognition {
  border-top: 1px solid var(--hairline);
  padding: clamp(64px, 10vh, 110px) 0;
}

.quip-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
}

.quip-card {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 32px;
  border-radius: 10px;
  text-align: center;
}
.quip-card p { margin: 0; max-width: 18ch; }

.quip-card.cream {
  background: radial-gradient(ellipse at center, #f6eddb, #e7d9bc);
  color: var(--cream-ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  line-height: 1.35;
}

.quip-card.black {
  background: #0d0d0f;
  color: #fff;
  font-size: clamp(1.15rem, 2.3vw, 1.5rem);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

/* ---------- team ---------- */

.team {
  background: var(--panel);
  border-top: 1px solid var(--hairline);
  padding: clamp(64px, 10vh, 110px) 0;
}

.people {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.people .role {
  display: block;
  margin: 0 0 6px;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.people .name {
  display: block;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.people a { font-size: 0.92rem; }

.team-note {
  margin: 44px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- footer ---------- */

.site-footer {
  text-align: center;
  padding: 56px 0 48px;
  border-top: 1px solid var(--hairline);
}
.site-footer img { width: 34px; height: 38px; }
.site-footer p { margin: 18px 0 0; font-size: 0.95rem; color: var(--muted); }
.site-footer .fine { margin-top: 14px; font-size: 0.8rem; color: rgba(236, 236, 238, 0.4); }

/* ---------- reveal ---------- */

.will-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.will-reveal.in { opacity: 1; transform: none; }
.stat-row .stat:nth-child(2), .people li:nth-child(2),
.phone-rail figure:nth-child(2), .quip-card:nth-child(2) { transition-delay: 0.08s; }
.stat-row .stat:nth-child(3), .people li:nth-child(3),
.phone-rail figure:nth-child(3) { transition-delay: 0.16s; }
.stat-row .stat:nth-child(4), .phone-rail figure:nth-child(4) { transition-delay: 0.24s; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .step, .step:nth-child(even) { grid-template-columns: 1fr; direction: ltr; }
  .step-shots { justify-content: flex-start; }
  .quip-cards { grid-template-columns: 1fr; }
  .people { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .stat-row { grid-template-columns: 1fr; gap: 22px; }
  .site-header .shell { padding: 0 16px; }
  .site-header nav { gap: 12px; }
  .site-header nav a { font-size: 0.78rem; }
  .brand img { height: 26px; }
  .step-shots img { max-width: none; }
  .step-shots.three { flex-wrap: wrap; }
  .step-shots.three img { width: calc(50% - 8px); }
}
