/* =================================================================
   AITERO — engineering-precise landing page
   Design system: warm paper, ink, one signal accent, mono grid.
   ================================================================= */

:root {
  /* Color */
  --paper:        oklch(0.972 0.005 95);
  --paper-deep:   oklch(0.955 0.006 95);
  --card:         oklch(0.995 0.002 95);
  --ink:          oklch(0.205 0.008 60);
  --ink-soft:     oklch(0.38 0.008 60);
  --muted:        oklch(0.55 0.006 60);
  --faint:        oklch(0.70 0.005 70);
  --hair:         oklch(0.86 0.005 80);
  --hair-strong:  oklch(0.78 0.006 75);
  --accent:       oklch(0.62 0.205 38);
  --accent-deep:  oklch(0.52 0.19 38);
  --accent-tint:  oklch(0.62 0.205 38 / 0.10);

  /* Type */
  --sans: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, monospace;
  --display: var(--sans);

  /* Layout */
  --maxw: 1280px;
  --gut: clamp(20px, 4vw, 64px);
  --rule: 1px solid var(--hair);
}

/* theme override hooks (Tweaks) */
[data-theme="dark"] {
  --paper:        oklch(0.205 0.008 60);
  --paper-deep:   oklch(0.18 0.008 60);
  --card:         oklch(0.245 0.008 60);
  --ink:          oklch(0.96 0.004 90);
  --ink-soft:     oklch(0.80 0.005 85);
  --muted:        oklch(0.66 0.006 80);
  --faint:        oklch(0.50 0.006 70);
  --hair:         oklch(0.34 0.008 65);
  --hair-strong:  oklch(0.44 0.008 65);
  --card:         oklch(0.235 0.009 60);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.45;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

/* ---------- container + grid scaffold ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gut);
  position: relative;
}

/* hairline column rules running down the page edges */
.rail {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
}
.rail::before, .rail::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--hair);
  opacity: 0.6;
}
.rail::before { left: var(--gut); }
.rail::after  { right: var(--gut); }
@media (max-width: 720px) { .rail { display: none; } }

/* crosshair plus mark */
.plus {
  position: relative;
  display: inline-block;
  width: 11px; height: 11px;
  flex: none;
}
.plus::before, .plus::after {
  content: ""; position: absolute; background: var(--accent);
}
.plus::before { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-0.5px); }
.plus::after  { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-0.5px); }

/* ---------- mono microlabel ---------- */
.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.mono--accent { color: var(--accent); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* section index header */
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--hair-strong);
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.sec-head .idx {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
  text-transform: uppercase;
}
.sec-head h2 {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
  max-width: 18ch;
}
.sec-head .note {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  max-width: 30ch;
  line-height: 1.6;
  text-align: right;
}
.sec-head .note--quote {
  font-size: 14.5px;
  letter-spacing: 0.02em;
  max-width: 34ch;
  align-self: center;
  margin-right: 30px;
}
.sec-head .note--quote::before { content: "\201D"; color: var(--accent); margin-right: 1px; }
.sec-head .note--quote::after { content: "\201D"; color: var(--accent); margin-left: 1px; }
:lang(en) .sec-head .note--quote::before { content: "\201C"; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  font-weight: 500;
  padding: 13px 20px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-1px); }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translate(2px, -2px); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hair-strong);
}
.btn--ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); }

/* ================================================================
   NAV
   ================================================================ */
header.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
header.nav.scrolled { border-bottom-color: var(--hair-strong); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark {
  width: 13px; height: 13px; background: var(--accent);
  position: relative; flex: none;
}
.brand .name {
  font-size: 19px; font-weight: 600; letter-spacing: -0.01em;
}
.brand .name sup { font-size: 9px; color: var(--muted); font-weight: 500; vertical-align: top; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 8px 12px;
  position: relative;
  transition: color .18s ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px;
  height: 1px; background: var(--accent); transform: scaleX(0);
  transform-origin: left; transition: transform .22s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after { transform: scaleX(1); }

.nav-right { display: flex; align-items: center; gap: 18px; }
.nav-clock { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0.03em; }

.lang-switch { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.05em; }
.lang-switch a { color: var(--faint); text-decoration: none; transition: color .15s ease; }
.lang-switch a:hover { color: var(--accent); }
.lang-switch [aria-current] { color: var(--ink); }
.lang-switch a + span::before,
.lang-switch span + a::before { content: "/"; margin-right: 8px; color: var(--faint); }

.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-links, .nav-clock { display: none; }
}

/* ================================================================
   HERO
   ================================================================ */
.hero { padding-top: 132px; padding-bottom: 72px; position: relative; }
.hero .tagline {
  margin-bottom: 30px;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(40px, 7vw, 92px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
  max-width: 16ch;
  text-wrap: balance;
}
.hero h1 .em { color: var(--accent); }
.hero-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  margin-top: 44px;
  padding-top: 38px;
  border-top: 1px solid var(--hair);
  align-items: start;
}
@media (max-width: 820px) { .hero-body { grid-template-columns: 1fr; gap: 32px; } }
.hero-lead {
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 40ch;
  letter-spacing: -0.01em;
}
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* spec list */
.specs { display: flex; flex-direction: column; }
.specs .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hair);
}
.specs .row:first-child { border-top: 1px solid var(--hair); }
.specs .k { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.specs .v { font-size: 14px; color: var(--ink); text-align: right; font-weight: 500; }

/* marquee strip */
.strip {
  border-top: 1px solid var(--hair-strong);
  border-bottom: 1px solid var(--hair-strong);
  overflow: hidden;
  background: var(--paper-deep);
  margin-top: 4px;
}
.strip-track {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
  width: max-content;
}
.strip:hover .strip-track { animation-play-state: paused; }
.strip-item {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft);
  padding: 14px 28px;
}
.strip-item .dot { width: 5px; height: 5px; background: var(--accent); border-radius: 50%; flex: none; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .strip-track { animation: none; } }

/* ================================================================
   SECTION shell
   ================================================================ */
section.block { padding-block: clamp(72px, 9vw, 128px); position: relative; }
section.block.alt { background: var(--paper-deep); border-block: 1px solid var(--hair); }

/* ---------- services ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--hair);
  border-left: 1px solid var(--hair);
}
@media (max-width: 760px) { .svc-grid { grid-template-columns: 1fr; } }
.svc {
  padding: 36px 34px 40px;
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  position: relative;
  transition: background .2s ease;
}
.svc:hover { background: var(--card); }
.svc .num { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.08em; }
.svc h3 { font-size: 23px; font-weight: 600; letter-spacing: -0.02em; margin: 16px 0 12px; }
.svc p { font-size: 15.5px; color: var(--ink-soft); line-height: 1.55; max-width: 42ch; }
.svc .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.tag {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
  padding: 4px 9px; border: 1px solid var(--hair-strong);
}
.svc .corner { position: absolute; top: 18px; right: 18px; opacity: 0; transition: opacity .2s ease; }
.svc:hover .corner { opacity: 1; }

/* ---------- selected work ---------- */
.work { display: flex; flex-direction: column; border-top: 1px solid var(--hair-strong); }
.proj {
  display: grid;
  grid-template-columns: 64px 1.1fr 1fr;
  gap: 36px;
  padding: 40px 0;
  border-bottom: 1px solid var(--hair-strong);
  align-items: center;
  position: relative;
  transition: padding .25s ease;
}
@media (max-width: 880px) {
  .proj { grid-template-columns: 1fr; gap: 22px; padding: 32px 0; }
  .proj .proj-idx { display: none; }
}
.proj-idx { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: 0.05em; align-self: start; padding-top: 6px; }
.proj-main h3 {
  font-family: var(--display);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 600; letter-spacing: -0.025em; line-height: 1.0;
  transition: color .2s ease;
}
.proj:hover .proj-main h3 { color: var(--accent); }
.proj-main .desc { font-size: 16px; color: var(--ink-soft); line-height: 1.5; margin-top: 14px; max-width: 46ch; }
.proj-meta { display: flex; gap: 30px; margin-top: 18px; flex-wrap: wrap; }
.proj-meta .stat .n { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; display: block; }
.proj-meta .stat .l { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }

.proj-shot {
  position: relative;
}
.proj-shot image-slot {
  width: 100%; height: 230px; display: block;
  border: 1px solid var(--hair-strong);
  --slot-bg: var(--paper-deep);
}
.proj-shot .shot-tag {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
  background: var(--paper); padding: 3px 7px; border: 1px solid var(--hair);
  pointer-events: none; z-index: 2;
}
.proj .view {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--ink); margin-top: 16px; text-transform: uppercase;
}
.proj .view .arr { color: var(--accent); transition: transform .2s ease; }
.proj:hover .view .arr { transform: translate(3px,-3px); }

/* ---------- approach + stack ---------- */
.approach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
@media (max-width: 880px) { .approach-grid { grid-template-columns: 1fr; gap: 48px; } }
.steps { display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 48px 1fr; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--hair); }
.step:first-child { border-top: 1px solid var(--hair); }
.step .sn { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.05em; padding-top: 5px; }
.step h4 { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.step p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; margin-top: 7px; max-width: 44ch; }

.stack-panel { background: var(--ink); color: var(--paper); padding: 38px 34px; position: relative; }
[data-theme="dark"] .stack-panel { background: var(--card); border: 1px solid var(--hair-strong); }
.stack-panel .ph { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.stack-panel h3 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin: 14px 0 6px; color: var(--paper); }
.stack-panel > p { font-size: 14.5px; color: oklch(0.78 0.005 85); line-height: 1.55; max-width: 40ch; margin-bottom: 28px; }
[data-theme="dark"] .stack-panel > p { color: var(--ink-soft); }
.tool { padding: 18px 0; border-top: 1px solid oklch(0.4 0.008 65); display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: baseline; }
[data-theme="dark"] .tool { border-top-color: var(--hair); }
.tool .tn { font-size: 16px; font-weight: 600; color: var(--paper); }
.tool .tt { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); text-align: right; white-space: nowrap; }
.tool .td { grid-column: 1 / -1; font-size: 13.5px; color: oklch(0.74 0.005 85); line-height: 1.5; }
[data-theme="dark"] .tool .td { color: var(--muted); }

/* ================================================================
   CONTACT + FOOTER
   ================================================================ */
.contact { padding-block: clamp(80px, 11vw, 150px); position: relative; }
.contact h2 {
  font-family: var(--display);
  font-size: clamp(38px, 6.5vw, 86px);
  font-weight: 600; letter-spacing: -0.035em; line-height: 0.96;
  max-width: 18ch; text-wrap: balance;
}
.contact h2 .em { color: var(--accent); }
.contact .lead { font-size: clamp(17px,2vw,20px); color: var(--ink-soft); max-width: 44ch; margin-top: 26px; line-height: 1.5; }
.contact-cta { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }
.contact-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 64px; padding-top: 30px; border-top: 1px solid var(--hair);
}
@media (max-width: 680px) { .contact-meta { grid-template-columns: 1fr; gap: 18px; } }
.contact-meta .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.contact-meta a, .contact-meta .v { font-size: 16px; color: var(--ink); border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.contact-meta a:hover { border-bottom-color: var(--accent); }

footer.foot { border-top: 1px solid var(--hair-strong); padding-block: 30px; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot-inner .mono { font-size: 11.5px; }

/* tweak: hide grid guides */
body.no-guides .rail { display: none; }
body.no-guides .plus { visibility: hidden; }

/* ---------- reveal animation ----------
   Default state is fully visible (robust if JS never runs). JS arms hidden
   elements and tweens them in via rAF — we deliberately avoid CSS transitions
   here because some preview iframes freeze transition interpolation. */
.reveal { will-change: opacity, transform; }
