/* ============ Spatial & Form — tokens ============ */
:root {
  --obsidian: #121316;
  --obsidian-2: #1a1c20;
  --obsidian-3: #22252a;
  --chalk: #F5F5F3;
  --chalk-dim: rgba(245, 245, 243, 0.68);
  --azure: #0052FF;
  --azure-bright: #3d7bff;
  --silver: #B8BCC2;
  --hair: rgba(184, 188, 194, 0.18);
  --hair-strong: rgba(184, 188, 194, 0.35);
  --danger: #ff6b6b;
  --ok: #4ade80;

  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Space Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 64px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: clip; }
body {
  margin: 0;
  background: var(--obsidian);
  color: var(--chalk);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--azure); color: #fff; padding: 10px 16px; text-decoration: none;
}
.skip:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--azure-bright); outline-offset: 3px; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; }
.dim { color: var(--silver); opacity: 0.7; }
.azure { color: var(--azure-bright); }

/* ============ Nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  background: rgba(18, 19, 22, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair);
}
.nav-mark {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 22px; font-weight: 500; text-decoration: none;
}
.mark-icon { width: 34px; height: 34px; display: block; }
.wordmark {
  font-family: "Montserrat", var(--sans); font-size: 22px; font-weight: 400;
  color: #dfe6f2; letter-spacing: -0.01em;
}
.wordmark b { font-weight: 700; color: #fff; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--chalk-dim); transition: color 0.2s;
}
.nav-links a:hover { color: var(--chalk); }
.nav-links .nav-cta {
  color: var(--chalk); border: 1px solid var(--hair-strong); padding: 9px 16px;
}
.nav-links .nav-cta:hover { border-color: var(--azure); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--hair-strong);
  width: 44px; height: 44px; padding: 12px 10px; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle .bar { display: block; height: 1px; background: var(--chalk); }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: calc(100svh - 81px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
  padding: 72px var(--gutter) 96px;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
}
.hero-grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--hair) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hair) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 60% 45%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 45%, #000 20%, transparent 75%);
  opacity: 0.6;
}
.reg { position: absolute; width: 18px; height: 18px; border: 1px solid var(--silver); opacity: 0.45; }
.reg-tl { top: 28px; left: var(--gutter); border-right: 0; border-bottom: 0; }
.reg-br { bottom: 28px; right: var(--gutter); border-left: 0; border-top: 0; }

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--silver); margin-bottom: 28px;
}
.display {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(48px, 7.4vw, 108px);
  line-height: 0.98; letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144;
}
.lede {
  margin-top: 28px; max-width: 540px;
  font-size: clamp(16px, 1.4vw, 18px); font-weight: 300; color: var(--chalk-dim);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn-primary { background: var(--azure); color: #fff; }
.btn-primary:hover { background: var(--azure-bright); }
.btn-primary:disabled { opacity: 0.55; cursor: progress; }
.btn-ghost { border-color: var(--hair-strong); color: var(--chalk); background: transparent; }
.btn-ghost:hover { border-color: var(--chalk); }

/* The recurring chrome/glass object */
.hero-object { position: relative; aspect-ratio: 1; width: 100%; max-width: 460px; justify-self: center; }
.orb {
  position: absolute; inset: 14%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 26%, #fff 0%, rgba(255,255,255,0.55) 6%, transparent 24%),
    radial-gradient(circle at 70% 82%, rgba(61,123,255,0.9), transparent 45%),
    linear-gradient(145deg, #e6e9ee 0%, #9aa1ad 26%, #2a2d33 50%, #121316 58%, #0052FF 82%, #6b9bff 100%);
  box-shadow:
    0 0 80px rgba(0, 82, 255, 0.35),
    inset -18px -24px 60px rgba(0, 0, 0, 0.45),
    inset 10px 12px 30px rgba(255, 255, 255, 0.12);
  animation: float 9s ease-in-out infinite;
}
.orb-ring {
  position: absolute; inset: 2%;
  border-radius: 50%;
  border: 1px solid var(--hair-strong);
  transform: rotateX(72deg);
  animation: spin 24s linear infinite;
}
.orb-ring::after {
  content: ""; position: absolute; top: -4px; left: 50%;
  width: 7px; height: 7px; border-radius: 50%; background: var(--azure-bright);
  box-shadow: 0 0 10px var(--azure);
}
.coord {
  position: absolute; right: 0; bottom: 4%;
  font-family: var(--mono); font-size: 11px; line-height: 1.7; color: var(--silver);
  border-left: 1px solid var(--hair-strong); padding-left: 10px;
}
.status {
  position: absolute; left: var(--gutter); bottom: 36px;
  display: flex; align-items: center; gap: 10px; color: var(--silver);
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--azure-bright);
  box-shadow: 0 0 0 0 rgba(61,123,255,0.6); animation: pulse 2.4s infinite;
}

@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes spin { to { transform: rotateX(72deg) rotateZ(360deg); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61,123,255,0.6); }
  70% { box-shadow: 0 0 0 10px rgba(61,123,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,123,255,0); }
}

/* ============ Sections ============ */
.section {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 120px var(--gutter);
  border-top: 1px solid var(--hair);
}
.section-head { margin-bottom: 56px; max-width: 820px; }
.label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--silver); margin-bottom: 18px;
}
.label .azure { margin-right: 10px; }
.h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 4.4vw, 60px); line-height: 1.05; letter-spacing: -0.02em;
}
.h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1.15; margin: 8px 0 12px; }

/* ============ Work ============ */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--obsidian-2);
  border: 1px solid var(--hair);
  transition: border-color 0.3s, transform 0.3s;
}
.card:hover { border-color: var(--hair-strong); transform: translateY(-3px); }
.card-wide { grid-column: 1 / -1; flex-direction: row; }
.card-wide .card-visual { flex: 1.2; min-height: 380px; }
.card-wide .card-body { flex: 1; align-self: center; }
.card-body { padding: 28px 28px 32px; }
.card-body > p:not(.meta) { color: var(--chalk-dim); font-size: 15px; font-weight: 300; }
.meta { color: var(--silver); font-size: 11px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tags li {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--hair-strong); padding: 5px 10px; color: var(--silver);
}

.card-visual {
  position: relative; overflow: hidden;
  min-height: 260px;
  background:
    linear-gradient(to right, var(--hair) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(to bottom, var(--hair) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(ellipse at 60% 50%, rgba(0,82,255,0.22), transparent 60%),
    var(--obsidian-3);
  border-bottom: 1px solid var(--hair);
}
.card-wide .card-visual { border-bottom: 0; border-right: 1px solid var(--hair); }
.frame { position: absolute; inset: 18px; pointer-events: none; }
.frame::before, .frame::after {
  content: ""; position: absolute; width: 22px; height: 22px; border: 1px solid var(--silver); opacity: 0.5;
}
.frame::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.frame::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }

/* AR atom */
.atom { position: absolute; inset: 0; display: grid; place-items: center; }
.nucleus {
  width: 54px; height: 54px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff, #9aa1ad 30%, #0052FF 85%);
  box-shadow: 0 0 40px rgba(0,82,255,0.6);
}
.orbit {
  position: absolute; width: 230px; height: 84px; border-radius: 50%;
  border: 1px solid rgba(184,188,194,0.45);
}
.o1 { transform: rotate(0deg); }
.o2 { transform: rotate(60deg); }
.o3 { transform: rotate(-60deg); }
.tag-float {
  position: absolute; left: 32px; bottom: 30px; color: var(--azure-bright);
  border: 1px solid rgba(61,123,255,0.5); padding: 5px 10px; font-size: 10px;
}

/* UI stack */
.ui-stack { position: absolute; inset: 0; display: grid; place-items: center; }
.ui-stack span {
  position: absolute; width: 46%; aspect-ratio: 9 / 16; max-height: 78%;
  border: 1px solid var(--hair-strong); border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  backdrop-filter: blur(6px);
}
.ui-stack span:nth-child(1) { transform: translate(-34%, 6%) rotate(-8deg); opacity: 0.5; }
.ui-stack span:nth-child(2) { transform: translate(34%, 6%) rotate(8deg); opacity: 0.5; }
.ui-stack span:nth-child(3) {
  background:
    linear-gradient(var(--azure), var(--azure)) 14% 16% / 40% 6px no-repeat,
    linear-gradient(rgba(245,245,243,0.25), rgba(245,245,243,0.25)) 14% 28% / 72% 4px no-repeat,
    linear-gradient(rgba(245,245,243,0.15), rgba(245,245,243,0.15)) 14% 34% / 56% 4px no-repeat,
    linear-gradient(rgba(0,82,255,0.35), rgba(0,82,255,0.35)) 50% 70% / 72% 30% no-repeat,
    linear-gradient(180deg, #1f2228, #15171b);
}

/* Type glyph */
.v-type { display: grid; place-items: center; }
.big-glyph {
  font-family: var(--serif); font-size: 150px; line-height: 1; font-weight: 400;
  background: linear-gradient(160deg, #f0f2f5 10%, #8b92a0 45%, #0052FF 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Game lanes */
.lanes { position: absolute; inset: 0; display: flex; justify-content: center; gap: 22%; perspective: 300px; }
.lanes span {
  width: 1px; height: 130%; margin-top: -10%;
  background: linear-gradient(to bottom, transparent, var(--azure-bright), transparent);
  transform: rotateX(55deg);
}

/* Space */
.planet {
  position: absolute; width: 120px; height: 120px; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff, #a9b1bf 25%, #0052FF 80%);
  box-shadow: 0 0 60px rgba(0,82,255,0.5);
}
.planet::after {
  content: ""; position: absolute; inset: -26px -60px; border-radius: 50%;
  border: 1px solid rgba(245,245,243,0.4); transform: rotate(-18deg);
}
.star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--chalk); }
.s1 { top: 22%; left: 20%; } .s2 { top: 70%; left: 78%; } .s3 { top: 30%; left: 82%; }

/* ============ About ============ */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: start; }
.statement {
  font-family: var(--serif); font-size: clamp(22px, 2.2vw, 30px); line-height: 1.4; font-weight: 400;
}
.caps { display: grid; gap: 0; border-top: 1px solid var(--hair); }
.caps div { padding: 20px 0; border-bottom: 1px solid var(--hair); }
.caps dt { color: var(--azure-bright); text-transform: uppercase; margin-bottom: 6px; }
.caps dd { color: var(--chalk-dim); font-weight: 300; }

/* ============ Process ============ */
.process {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--hair-strong);
}
.process li { padding: 24px 20px 0 0; position: relative; }
.process li::before {
  content: ""; position: absolute; top: -5px; left: 0;
  width: 9px; height: 9px; border-radius: 50%; background: var(--obsidian); border: 1px solid var(--azure-bright);
}
.process .mono { display: block; margin-bottom: 10px; }
.process h3 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin-bottom: 8px; }
.process p { color: var(--chalk-dim); font-size: 14px; font-weight: 300; }

/* ============ Contact ============ */
.contact-title { font-size: clamp(44px, 6vw, 88px); }
.form {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 24px;
  background: var(--obsidian-2); border: 1px solid var(--hair);
  padding: clamp(20px, 3vw, 40px);
  max-width: 960px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--silver);
}
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--chalk);
  background: var(--obsidian); border: 1px solid var(--hair-strong);
  padding: 13px 14px; border-radius: 0; transition: border-color 0.2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--azure-bright); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.err { min-height: 18px; font-size: 13px; color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-status { font-size: 14px; }
.form-status.ok { color: var(--ok); }
.form-status.bad { color: var(--danger); }

/* ============ Footer ============ */
.footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  padding: 28px var(--gutter); border-top: 1px solid var(--hair);
  color: var(--silver);
}
.social { display: flex; gap: 24px; }
.social a { font-size: 14px; text-decoration: none; color: var(--chalk-dim); }
.social a:hover { color: var(--chalk); }

/* ============ Reveal on scroll ============ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 48px; padding-bottom: 120px; }
  .hero-object { max-width: 320px; order: -1; }
  .card-wide { flex-direction: column; }
  .card-wide .card-visual { min-height: 280px; border-right: 0; border-bottom: 1px solid var(--hair); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .process { grid-template-columns: 1fr 1fr; row-gap: 32px; border-top: 0; }
  .process li { border-top: 1px solid var(--hair-strong); }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--obsidian); border-bottom: 1px solid var(--hair);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 18px var(--gutter); border-top: 1px solid var(--hair); }
  .nav-links .nav-cta { border: 0; border-top: 1px solid var(--hair); padding: 18px var(--gutter); }
  .work-grid { grid-template-columns: 1fr; }
  .section { padding: 80px var(--gutter); }
  .form { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .footer { flex-direction: column; align-items: flex-start; }
}

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