/* OutfitIQ — R26-IT-052 project website */

:root {
  /* Light surfaces */
  --bg: #f7f5f1;
  --bg-2: #efebe4;
  --surface: #ffffff;
  --ink: #15130f;
  --ink-2: #3b362f;
  --muted: #6f675c;
  --line: #e5dfd5;
  --line-strong: #d4ccbf;

  /* Brand */
  --accent: #c2562c;
  --accent-ink: #9a3f1c;
  --accent-soft: #f8e7dd;
  --accent-light: #ec8f66;

  /* Dark surfaces (hero, footer) */
  --dark: #131210;
  --dark-2: #1d1b18;
  --dark-3: #26231f;
  --dark-line: rgba(255, 255, 255, .09);
  --on-dark: #f4f1ec;
  --on-dark-2: #cfc8bd;
  --on-dark-muted: #9c9488;

  /* Status */
  --ok: #2c6e4a;
  --ok-soft: #e2f0e7;
  --wait: #8a6512;
  --wait-soft: #f7edcf;

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(21, 19, 15, .05);
  --shadow: 0 1px 2px rgba(21, 19, 15, .04), 0 10px 30px -12px rgba(21, 19, 15, .12);
  --shadow-lg: 0 2px 4px rgba(21, 19, 15, .04), 0 30px 60px -20px rgba(21, 19, 15, .25);
  --max: 1180px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.015em;
  margin: 0 0 .45em;
  color: var(--ink);
}
h1 { font-size: clamp(2.7rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
h1 em, h2 em { font-style: italic; }
h3, h4 {
  font-family: var(--sans);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
}
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; color: var(--ink-2); }
strong { color: var(--ink); font-weight: 600; }

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

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 620px) { .container { padding: 0 16px; } }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; color: #fff; }

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

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(19, 18, 16, .97);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--dark-line); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .6); }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-dark); }
.brand:hover { color: var(--on-dark); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: linear-gradient(140deg, var(--accent-light), var(--accent) 55%, var(--accent-ink));
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 18px -6px rgba(194, 86, 44, .7);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 1.45rem; letter-spacing: -.01em; }
.brand-name em { font-style: italic; color: var(--accent-light); }
.brand-id { font-family: var(--mono); font-size: .66rem; color: var(--on-dark-muted); letter-spacing: .08em; margin-top: 2px; }

.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative; display: block; padding: 8px 12px; border-radius: 999px;
  color: var(--on-dark-2); text-decoration: none; font-size: .9rem; font-weight: 500;
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav-links a[aria-current="page"] { color: #fff; }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 1px; width: 4px; height: 4px;
  margin-left: -2px; border-radius: 50%; background: var(--accent-light);
}
.nav-links a.nav-cta {
  margin-left: 8px; padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, .22); color: #fff;
}
.nav-links a.nav-cta:hover { background: var(--accent); border-color: var(--accent); }
.nav-links a.nav-cta[aria-current="page"] { background: var(--accent); border-color: var(--accent); }
.nav-links a.nav-cta[aria-current="page"]::after { display: none; }

.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--dark-line); border-radius: 12px;
  width: 44px; height: 44px; cursor: pointer; color: var(--on-dark);
}
.nav-toggle svg { margin: auto; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1000px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 20px;
    background: var(--dark); border-bottom: 1px solid var(--dark-line);
    box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .6);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: 10px; font-size: 1rem; }
  .nav-links a[aria-current="page"] { background: rgba(255, 255, 255, .06); }
  .nav-links a[aria-current="page"]::after { left: auto; right: 16px; bottom: 50%; margin: 0 0 -2px; }
  .nav-links a.nav-cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- Dark hero surfaces ---------- */

.hero, .page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(55% 75% at 88% -5%, rgba(194, 86, 44, .32), transparent 62%),
    radial-gradient(35% 55% at -5% 105%, rgba(194, 86, 44, .12), transparent 60%),
    var(--dark);
  color: var(--on-dark);
}
.hero::before, .page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 20%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 20%, #000 15%, transparent 75%);
}
.hero h1, .hero h2, .page-hero h1 { color: var(--on-dark); }
.hero p, .page-hero p { color: var(--on-dark-2); }
.hero strong, .page-hero strong { color: #fff; }
.hero .eyebrow, .page-hero .eyebrow { color: var(--accent-light); }
.hero .eyebrow::before, .page-hero .eyebrow::before { background: var(--accent-light); }

.page-hero { padding: 88px 0 80px; }
.page-hero h1 { max-width: 20ch; font-size: clamp(2.6rem, 5.4vw, 4.2rem); }
.page-hero .lead { color: var(--on-dark-2); }
.page-hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 32px; padding-top: 24px;
  border-top: 1px solid var(--dark-line);
  font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; color: var(--on-dark-muted);
}
.page-hero-meta b { color: var(--on-dark); font-weight: 500; }

/* ---------- Generic sections ---------- */

main { display: block; }
.section { padding: 96px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
@media (max-width: 620px) {
  .section { padding: 64px 0; }
  .page-hero { padding: 64px 0 56px; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-ink); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 20px; height: 1px; background: var(--accent); }

.lead { font-size: 1.15rem; line-height: 1.65; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }

.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; margin-bottom: 44px; }
.section-head > div { max-width: 680px; }
.section-head h2 { margin-bottom: .3em; }
.section-head .lead { margin: 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
}

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 600; font-size: .94rem; line-height: 1.2; cursor: pointer; font-family: inherit;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn svg { transition: transform .2s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-accent { background: var(--accent); border-color: var(--accent); box-shadow: 0 10px 24px -10px rgba(194, 86, 44, .8); }
.btn-accent:hover { background: #d4653a; border-color: #d4653a; }
.btn-outline-light { background: transparent; border-color: rgba(255, 255, 255, .25); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: .86rem; }
.btn-sm:hover svg { transform: translate(2px, -2px); }
.btn[aria-disabled="true"] { background: var(--bg-2); border-color: var(--line); color: var(--muted); cursor: not-allowed; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-wait { background: var(--wait-soft); color: var(--wait); }
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge-plain::before { display: none; }

.engine-icon {
  flex: none; width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink);
}

/* ---------- Home ---------- */

.hero { padding: 96px 0 160px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 64px; align-items: center; }

.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  border: 1px solid var(--dark-line); background: rgba(255, 255, 255, .04);
  font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-2);
}
.hero-kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-light); box-shadow: 0 0 0 4px rgba(236, 143, 102, .18); }
.hero-title-full { margin: 22px 0 0; max-width: 46ch; font-size: .95rem; color: var(--on-dark-muted) !important; }
.hero h1 {
  font-size: clamp(4rem, 10vw, 7.2rem); line-height: .92; letter-spacing: -.03em;
  margin: 18px 0 20px;
}
.hero h1 em { color: var(--accent-light); }
.hero-sub { font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 1.75rem); line-height: 1.25; color: var(--on-dark) !important; max-width: 30ch; margin-bottom: 18px; }
.hero .lead { font-size: 1.05rem; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero-meta .badge { background: rgba(255, 255, 255, .06); color: var(--on-dark-2); border: 1px solid var(--dark-line); font-weight: 500; }
.hero-meta .badge::before { background: var(--accent-light); }

.hero-panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .12); border-radius: 24px;
  padding: 10px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px);
}
.hero-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px 14px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted);
}
.hero-panel-head .live { display: inline-flex; align-items: center; gap: 8px; color: var(--on-dark-2); white-space: nowrap; }
.hero-panel-head .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5fbf88; box-shadow: 0 0 0 3px rgba(95, 191, 136, .2); }

.engine-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.engine-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: 16px;
  padding: 14px 16px;
  transition: border-color .25s, transform .25s var(--ease), background-color .25s;
}
.engine-row:hover { border-color: rgba(236, 143, 102, .45); background: var(--dark-3); transform: translateX(4px); }
.engine-row .engine-icon { width: 44px; height: 44px; background: rgba(236, 143, 102, .12); color: var(--accent-light); }
.engine-row div { min-width: 0; flex: 1; }
.engine-row strong { display: block; font-size: .96rem; color: var(--on-dark); font-weight: 600; }
.engine-row span.sub { display: block; font-size: .82rem; color: var(--on-dark-muted); }
.engine-row .engine-no { font-family: var(--mono); font-size: .72rem; color: var(--on-dark-muted); }
.hero-panel-foot {
  display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 14px 16px;
  border-radius: 16px; background: rgba(194, 86, 44, .14); border: 1px dashed rgba(236, 143, 102, .35);
  font-size: .84rem; color: var(--on-dark-2);
}
.hero-panel-foot svg { flex: none; color: var(--accent-light); }

@media (max-width: 980px) {
  .hero { padding: 72px 0 140px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

.stats-band { position: relative; z-index: 2; margin-top: -88px; }
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.stat { padding: 30px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-value { font-family: var(--serif); font-size: clamp(2.4rem, 4vw, 3.1rem); line-height: 1; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-label { font-size: .86rem; line-height: 1.5; color: var(--muted); margin-top: 12px; }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
}

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.split > div { padding: 8px 56px 8px 0; }
.split > div + div { padding: 8px 0 8px 56px; border-left: 1px solid var(--line); }
.split h2 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.text-link svg { transition: transform .2s var(--ease); }
.text-link:hover svg { transform: translateX(3px); }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split > div, .split > div + div { padding: 0; border-left: 0; }
  .split > div + div { padding-top: 40px; border-top: 1px solid var(--line); }
}

.engine-card {
  display: flex; flex-direction: column; position: relative;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.engine-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.engine-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.engine-card .num { font-family: var(--mono); font-size: .78rem; color: var(--muted); letter-spacing: .06em; }
.engine-card p { font-size: .93rem; margin-bottom: 20px; }
.owner {
  display: flex; align-items: center; gap: 10px;
  font-size: .84rem; font-weight: 500; color: var(--ink-2);
  border-top: 1px solid var(--line); padding-top: 16px; margin-top: auto;
}
.owner img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }

.figure {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  padding: 20px; box-shadow: var(--shadow);
}
.figure img { width: 100%; height: auto; border-radius: 12px; }
.figure figcaption {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: .84rem; color: var(--muted); margin-top: 14px; text-align: center;
}
.figure a { display: block; border-radius: 12px; }
.figure a img { transition: transform .4s var(--ease); }
.figure a:hover img { transform: scale(1.01); }

.link-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.link-card:hover { color: inherit; transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.link-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; letter-spacing: -.01em; margin-bottom: .3em; }
.link-card .eyebrow { margin-bottom: 18px; }
.link-card .arrow {
  margin-top: auto; align-self: flex-start; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--ink);
  transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.link-card p { margin-bottom: 24px; }
.link-card:hover .arrow { background: var(--accent); border-color: var(--accent); color: #fff; transform: rotate(-45deg); }

/* ---------- Domain ---------- */

.domain-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 64px; }
.toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.toc-title { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: flex; gap: 12px; padding: 8px 0 8px 18px; margin-left: -1px; border-left: 2px solid transparent;
  color: var(--muted); text-decoration: none; font-size: .92rem; line-height: 1.4;
  transition: color .2s, border-color .2s;
}
.toc a span { font-family: var(--mono); font-size: .72rem; padding-top: 2px; color: var(--line-strong); transition: color .2s; }
.toc a:hover, .toc a.active { color: var(--ink); border-left-color: var(--accent); }
.toc a.active { font-weight: 600; }
.toc a:hover span, .toc a.active span { color: var(--accent); }
@media (max-width: 980px) {
  .domain-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 8px; border-left: 0; }
  .toc a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin: 0; background: var(--surface); gap: 8px; }
  .toc a span { padding-top: 1px; }
}

.domain-section { padding: 0 0 64px; }
.domain-section + .domain-section { border-top: 1px solid var(--line); padding-top: 64px; }
.domain-section h2 { display: flex; flex-direction: column; gap: 14px; margin-bottom: .6em; }
.domain-section h2 .idx {
  align-self: flex-start;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; color: var(--accent-ink);
  padding: 4px 10px; border: 1px solid #ecc9b6; background: var(--accent-soft); border-radius: 999px;
}
.domain-section h3 { margin-top: 2em; font-size: 1.15rem; }
.domain-section > p, .domain-section > ul { max-width: 72ch; }

.callout {
  position: relative;
  border: 1px solid #ecc9b6; border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 22px 26px; border-radius: var(--radius-sm); margin: 24px 0;
}
.callout p { color: var(--ink-2); }
.callout p:last-child { margin-bottom: 0; }
.callout-quote {
  background: var(--dark); border: 0; color: var(--on-dark); padding: 36px 40px;
  border-radius: var(--radius); overflow: hidden;
}
.callout-quote::before {
  content: "\201C"; position: absolute; right: 24px; top: -24px;
  font-family: var(--serif); font-size: 10rem; line-height: 1; color: rgba(236, 143, 102, .18);
}
.callout-quote p { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.6rem); line-height: 1.35; color: var(--on-dark); position: relative; }
.callout-quote strong {
  display: block; margin-bottom: 12px;
  font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-light);
}

.formula {
  font-family: "Cambria Math", "STIX Two Math", "Times New Roman", serif; font-size: 1.15rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 16px 22px; margin: 16px 0 20px; overflow-x: auto; white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.table-wrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); margin: 20px 0; box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  background: var(--bg); font-family: var(--mono); font-weight: 500; font-size: .7rem;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted); white-space: nowrap;
}
td { color: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
td[rowspan] { border-left: 1px solid var(--line); background: #fcfbf9; color: var(--muted); font-size: .86rem; }
td.num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; color: var(--ink); }
.gap-table td:not(:first-child), .gap-table th:not(:first-child) { text-align: center; }
.gap-table td:first-child { min-width: 200px; }
.gap-table th { white-space: normal; line-height: 1.5; vertical-align: bottom; }
.gap-table tr.highlight td { background: var(--accent-soft); color: var(--ink); border-bottom: 0; }
.gap-table tr.highlight td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.yes {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: .8rem;
}
.yes-wide { display: inline-flex; width: auto; padding: 0 10px; border-radius: 999px; gap: 4px; white-space: nowrap; }
.no { color: var(--line-strong); }
.part { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--wait-soft); color: var(--wait); font-size: .76rem; font-weight: 600; white-space: nowrap; }

.list-check { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 12px; }
.list-check li { position: relative; padding-left: 32px; color: var(--ink-2); }
.list-check li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a3f1c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.objective-card { transition: transform .3s var(--ease), box-shadow .3s; }
.objective-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.objective-card h3 { margin-top: 14px; }

.tech-group { display: flex; flex-direction: column; gap: 4px; }
.tech-group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.tech-group-head .engine-icon { width: 38px; height: 38px; border-radius: 11px; }
.tech-group h3 { font-size: 1rem; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); font-size: .84rem; color: var(--ink-2);
  transition: border-color .2s, color .2s, background-color .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--surface); }

.refs-title { margin-top: 56px !important; }
.refs { list-style: none; counter-reset: ref; font-size: .88rem; color: var(--ink-2); padding: 0; margin: 0; display: grid; gap: 2px; }
.refs li {
  counter-increment: ref; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.refs li:last-child { border-bottom: 0; }
.refs li::before { content: "[" counter(ref) "]"; font-family: var(--mono); font-size: .78rem; color: var(--accent-ink); padding-top: 2px; }

/* ---------- Milestones ---------- */

.ms-progress { margin-top: 36px; max-width: 520px; }
.ms-progress-top { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; font-family: var(--mono); font-size: .76rem; letter-spacing: .06em; color: var(--on-dark-muted); }
.ms-progress-top b { color: var(--on-dark); font-weight: 500; }
.ms-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.ms-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-light)); }

.ms-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
@media (max-width: 980px) { .ms-layout { grid-template-columns: 1fr; } }

.picker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 24px;
  padding: 14px 14px 14px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.picker label { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.select {
  appearance: none; -webkit-appearance: none; flex: 1;
  font: inherit; font-weight: 600; color: var(--ink);
  padding: 12px 44px 12px 16px; min-width: 240px; max-width: 100%;
  border: 1px solid var(--line-strong); border-radius: 12px; background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2315130f' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; cursor: pointer;
  transition: border-color .2s;
}
.select:hover { border-color: var(--ink); }
@media (max-width: 520px) { .select { min-width: 0; width: 100%; } }

.milestone-panel[hidden] { display: none; }
.milestone-panel .card { padding: 40px; animation: fade-up .4s var(--ease); }
@media (max-width: 620px) { .milestone-panel .card { padding: 26px; } }
.ms-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.ms-head h2 { margin: 0; font-size: clamp(2rem, 3.6vw, 2.6rem); }
.ms-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 28px 0 32px; }
.ms-fact { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.ms-fact dt { font-family: var(--mono); font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.ms-fact dd { margin: 6px 0 0; font-weight: 600; font-size: 1.05rem; color: var(--ink); }
@media (max-width: 620px) { .ms-facts { grid-template-columns: 1fr; } }

.timeline-card { position: sticky; top: calc(var(--header-h) + 32px); padding: 28px 24px; }
.timeline-card h2 { font-size: 1.7rem; margin-bottom: 20px; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 6px 34px; }
.timeline li::before {
  content: ""; position: absolute; left: 2px; top: 12px; width: 16px; height: 16px; box-sizing: border-box;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong);
}
.timeline li.done::before {
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 9px no-repeat;
  border-color: var(--ok);
}
.timeline li.next::before { background: var(--accent); border-color: var(--accent); }
.timeline button {
  display: block; width: 100%; background: none; border: 0; padding: 8px 12px; border-radius: 10px;
  font: inherit; font-weight: 600; font-size: .93rem; color: var(--ink); line-height: 1.35;
  cursor: pointer; text-align: left; transition: background-color .2s, color .2s;
}
.timeline button:hover { background: var(--bg); color: var(--accent-ink); }
.timeline li.current button { background: var(--accent-soft); color: var(--accent-ink); }
.timeline li.current::before { box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline .when { display: block; font-family: var(--mono); font-weight: 400; font-size: .72rem; letter-spacing: .03em; color: var(--muted); margin-top: 2px; }

/* ---------- Documents / slides ---------- */

.doc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 56px; }
.doc-nav a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); text-decoration: none; font-size: .88rem; font-weight: 500;
  transition: border-color .2s, color .2s;
}
.doc-nav a:hover { border-color: var(--ink); color: var(--ink); }
.doc-nav a span { font-family: var(--mono); font-size: .72rem; color: var(--muted); }

.doc-group + .doc-group { margin-top: 64px; }
.group-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin: 0 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.group-title h2 { font-size: clamp(1.7rem, 3vw, 2.1rem); margin: 0; }
.group-title .muted { font-size: .9rem; }

.doc-list { display: grid; gap: 12px; }
.doc {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px;
  transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.doc:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.doc-icon {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-ink);
}
.doc h3 { font-size: 1rem; margin: 0 0 2px; }
.doc p { margin: 0; font-size: .87rem; color: var(--muted); }
.doc-actions { display: flex; align-items: center; gap: 12px; }
@media (max-width: 680px) {
  .doc { grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; }
  .doc-actions { grid-column: 1 / -1; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); }
}

.deck {
  display: flex; flex-direction: column; overflow: hidden; padding: 0;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.deck:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.deck-thumb {
  position: relative; isolation: isolate; aspect-ratio: 16 / 8; padding: 24px 26px;
  display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(70% 90% at 100% 0%, rgba(194, 86, 44, .45), transparent 60%),
    var(--dark);
  color: var(--on-dark); overflow: hidden;
}
.deck-thumb::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 40px 40px;
}
.deck-meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); }
.deck-title { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.05; max-width: 14ch; }
.deck-no { position: absolute; right: 22px; bottom: 6px; font-family: var(--serif); font-style: italic; font-size: 5.5rem; line-height: 1; color: rgba(255, 255, 255, .08); }
.deck-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.deck-body h3 { margin-bottom: 4px; }
.deck-body p { font-size: .92rem; color: var(--muted); margin-bottom: 22px; }
.deck-body .doc-actions { margin-top: auto; justify-content: space-between; }

/* ---------- About ---------- */

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 40px; border-top: 1px solid var(--dark-line); }
.facts div { padding: 22px 24px 0 0; }
.facts div + div { padding-left: 24px; border-left: 1px solid var(--dark-line); }
.facts dt { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); }
.facts dd { margin: 6px 0 0; color: var(--on-dark); font-weight: 500; font-size: .95rem; line-height: 1.45; }
@media (max-width: 820px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div, .facts div + div { padding: 18px 16px 0 0; border-left: 0; }
}

.member {
  padding: 0; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.member:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.member-photo { aspect-ratio: 4 / 5; background: var(--bg-2); position: relative; overflow: hidden; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; transition: transform .6s var(--ease); }
.member:hover .member-photo img { transform: scale(1.04); }
.member-photo::after { content: ""; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, rgba(19, 18, 16, .35)); pointer-events: none; }
.member-initials {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-size: 3rem; color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-2));
}
.member-body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.member-id { font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .08em; }
.member-body h3 { font-size: 1.1rem; margin: 2px 0 0; }
.member-role { font-size: .88rem; line-height: 1.45; color: var(--accent-ink); font-weight: 500; margin-top: 6px; }
.member-mail {
  display: flex; align-items: center; gap: 8px;
  font-size: .84rem; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line);
  word-break: break-all; text-decoration: none; color: var(--ink-2);
}
.member-role { margin-bottom: 16px; }
.member-mail svg { flex: none; color: var(--muted); }
.member-mail:hover { color: var(--accent); }

.supervisor { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 36px 28px; }
.supervisor .avatar {
  flex: none; width: 116px; height: 116px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--surface); box-shadow: 0 0 0 1px var(--line), 0 0 0 7px var(--accent-soft);
}
.supervisor h3 { font-size: 1.08rem; margin: 0 0 6px; }
.supervisor .sup-role { display: inline-block; font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 6px; }
.supervisor p { margin: 0; font-size: .88rem; color: var(--muted); }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 24px; align-items: stretch; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card { background: var(--dark); border-color: var(--dark); color: var(--on-dark); padding: 36px; position: relative; overflow: hidden; isolation: isolate; }
.contact-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(80% 60% at 100% 0%, rgba(194, 86, 44, .35), transparent 65%);
}
.contact-card h2 { color: var(--on-dark); font-size: 2rem; }
.contact-card > p { color: var(--on-dark-2); }
.contact-item { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--dark-line); }
.contact-item:last-child { border-bottom: 0; padding-bottom: 0; }
.contact-item .engine-icon { width: 44px; height: 44px; background: rgba(236, 143, 102, .12); color: var(--accent-light); }
.contact-item strong { display: block; font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--on-dark-muted); font-weight: 500; margin-bottom: 2px; }
.contact-item a, .contact-item span { color: var(--on-dark); text-decoration: none; font-weight: 500; }
.contact-item a:hover { color: var(--accent-light); text-decoration: underline; }

.form-card { padding: 36px; }
.form-card h2 { font-size: 2rem; }
@media (max-width: 620px) { .contact-card, .form-card { padding: 26px; } }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.form-row { display: grid; gap: 8px; margin-bottom: 18px; }
.form-row label { font-weight: 600; font-size: .86rem; color: var(--ink); }
.input, .textarea {
  font: inherit; font-size: .95rem; color: var(--ink); width: 100%;
  padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.input::placeholder, .textarea::placeholder { color: #a79f93; }
.input:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px rgba(194, 86, 44, .14); }
.textarea { min-height: 170px; resize: vertical; }
.form-note { display: flex; align-items: flex-start; gap: 8px; font-size: .82rem; color: var(--muted); margin: 16px 0 0; }
.form-note svg { flex: none; margin-top: 2px; }

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

.site-footer { background: var(--dark); color: var(--on-dark-muted); font-size: .9rem; padding: 72px 0 0; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; padding-bottom: 56px; }
.footer-brand p { color: var(--on-dark-muted); max-width: 40ch; margin: 20px 0 16px; }
.footer-tag { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-muted); }
.footer-h { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark); margin: 6px 0 18px; }
.footer-links, .footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-links a, .footer-contact a { color: var(--on-dark-2); text-decoration: none; }
.footer-links a:hover, .footer-contact a:hover { color: #fff; }
.footer-contact li { color: var(--on-dark-2); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: center;
  padding: 24px 0 32px; border-top: 1px solid var(--dark-line); font-size: .84rem;
}
.to-top { display: inline-flex; align-items: center; gap: 6px; color: var(--on-dark-2); text-decoration: none; }
.to-top:hover { color: #fff; }
@media (max-width: 820px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 460px) { .footer-top { grid-template-columns: 1fr; } }

/* ---------- Motion ---------- */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* "backwards" fill only: once the entrance finishes, hover transforms work normally */
.js .reveal:not(.in), .js .reveal-stagger:not(.in) > * { opacity: 0; }
.js .reveal.in { animation: fade-up .7s var(--ease) backwards; }
.js .reveal-stagger.in > * { animation: fade-up .6s var(--ease) backwards; }
.js .reveal-stagger.in > *:nth-child(2) { animation-delay: .08s; }
.js .reveal-stagger.in > *:nth-child(3) { animation-delay: .16s; }
.js .reveal-stagger.in > *:nth-child(4) { animation-delay: .24s; }
.js .reveal-stagger.in > *:nth-child(5) { animation-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal:not(.in), .js .reveal-stagger:not(.in) > * { opacity: 1; }
}
