/* Layout concept: a warm sand-coloured studio page with one hard tonal break,
   the always-night "Infinite War: Frontline" band, set between the hero and the studio info.
   Pixel squares and dune curves are the only ornaments; both come from the Kum logo. */

@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-var.woff") format("woff");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("../fonts/chakra-petch-semibold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("../fonts/chakra-petch-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand: Desert Noon */
  --sand: #F1E3C4;
  --dune: #E0A84E;
  --ink: #17181D;
  --cream: #FAF7F0;

  /* Theme tokens (light) */
  --bg: #FAF7F0;
  --surface: #F1E3C4;
  --fg: #17181D;
  --muted: #5B564B;
  --line: #E2D7C0;
  --accent: #E0A84E;
  --accent-text: #85591A;
  --on-accent: #17181D;
  --focus: #17181D;
  --mark-sky: #F1E3C4;
  --mark-ink: #17181D;
  --sky: #F1E3C4;
  --ground: #17181D;
  --sun: #17181D;

  /* Infinite War band: one fixed night look in both themes */
  --war-bg: #0D110F;
  --war-panel: #141A16;
  --war-line: #2A332C;
  --war-fg: #ECE7DA;
  --war-muted: #A3A897;
  --war-signal: #E0A84E;

  /* Type */
  --font-display: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-war: "Chakra Petch", "Eurostile", "Bahnschrift", "Arial Narrow", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  --step-4: clamp(2.4rem, 1.4rem + 4.4vw, 4.4rem);

  --radius: 14px;
  --gutter: 20px;
  --maxw: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121317;
    --surface: #1B1C21;
    --fg: #F1E9D8;
    --muted: #ADA697;
    --line: #2B2C33;
    --accent: #E0A84E;
    --accent-text: #EBBF6E;
    --on-accent: #17181D;
    --focus: #F1E9D8;
    --mark-sky: #F1E3C4;
    --mark-ink: #17181D;
    --sky: #1D212C;
    --ground: #0A0B0E;
    --sun: #F1E3C4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121317;
  --surface: #1B1C21;
  --fg: #F1E9D8;
  --muted: #ADA697;
  --line: #2B2C33;
  --accent: #E0A84E;
  --accent-text: #EBBF6E;
  --on-accent: #17181D;
  --focus: #F1E9D8;
  --mark-sky: #F1E3C4;
  --mark-ink: #17181D;
  --sky: #1D212C;
  --ground: #0A0B0E;
  --sun: #F1E3C4;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--bg);
}

img, svg, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.025em;
}
p { margin: 0; }

a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--fg); }

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

[id] { scroll-margin-top: calc(76px + env(safe-area-inset-top, 0px)); }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip-link {
  position: absolute;
  left: max(12px, env(safe-area-inset-left, 0px));
  top: calc(-60px + env(safe-area-inset-top, 0px));
  z-index: 100;
  background: var(--fg);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: calc(12px + env(safe-area-inset-top, 0px)); color: var(--bg); }

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
}
.brand-mark { width: 32px; height: 32px; }
.m-sky { fill: var(--mark-sky); }
.m-ink { fill: var(--mark-ink); }
.m-dune { fill: var(--dune); }
.brand-word { font-weight: 800; font-size: 1.45rem; letter-spacing: -0.05em; line-height: 1; }
.brand-sub { font-size: 0.7rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--fg);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 10px;
}
.site-nav a:hover { background: var(--surface); color: var(--fg); }

.header-actions { display: flex; gap: 6px; align-items: center; }
.icon-btn {
  width: 44px; height: 44px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .i-moon { display: none; }
.icon-btn[aria-pressed="true"] .i-sun { display: none; }
.icon-btn[aria-pressed="true"] .i-moon { display: block; }
.lang-link {
  height: 44px; padding: 0 12px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--fg);
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.04em;
  text-decoration: none;
}
.lang-link:hover { background: var(--surface); }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .brand-sub { display: none; }
  .nav-toggle { display: inline-grid; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    gap: 2px;
    padding-block: 10px 16px;
    padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 12px; font-size: 1.05rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .15s ease, background-color .15s ease;
}
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { color: var(--bg); transform: translateY(-1px); }
.btn-ghost { border-color: var(--fg); color: var(--fg); background: transparent; }
.btn-ghost:hover { background: var(--surface); color: var(--fg); }
.text-btn {
  font: inherit; font-size: var(--step--1); font-weight: 600;
  color: var(--fg); background: none; border: 0; padding: 10px 4px;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 96px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.045em; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.sandbox { margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sandbox-frame {
  border-radius: 22px;
  overflow: hidden;
  background: var(--sky);
  box-shadow: 0 1px 0 var(--line), 0 24px 60px -30px rgba(23, 24, 29, 0.45);
}
#sand {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  image-rendering: pixelated;
  touch-action: pan-y;
  cursor: crosshair;
}
.sandbox-caption {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-size: var(--step--1); color: var(--muted);
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Infinite War band ---------- */
.war {
  background: var(--war-bg);
  color: var(--war-fg);
  padding-block: clamp(56px, 8vw, 112px);
  position: relative;
  isolation: isolate;
}
.war::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--war-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--war-line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .35;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%);
  mask-image: linear-gradient(180deg, #000, transparent 70%);
}
.war ::selection { background: var(--war-signal); color: var(--war-bg); }
.war-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.war-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.war-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-war); font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  font-size: var(--step--1); color: var(--war-muted);
}
.dot { width: 9px; height: 9px; background: var(--war-signal); border-radius: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .dot { animation: blink 1.6s steps(2, jump-none) infinite; }
}
@keyframes blink { 50% { opacity: .25; } }

.war-title {
  font-family: var(--font-war);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.92;
  font-size: clamp(2.8rem, 1.6rem + 5.4vw, 5.6rem);
  display: flex; flex-direction: column;
}
.war-sub {
  color: var(--war-signal);
  letter-spacing: 0.22em;
  font-size: 0.48em;
  margin-top: 0.35em;
}
.war-lede { color: var(--war-muted); font-size: var(--step-1); max-width: 32em; }
.war-lede, .war-note { line-height: 1.65; }

.war-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--war-line);
  border-bottom: 1px solid var(--war-line);
}
.war-facts div { padding: 14px 12px 14px 0; display: flex; flex-direction: column; gap: 4px; }
.war-facts div + div { padding-left: 16px; border-left: 1px solid var(--war-line); }
.war-facts dt {
  font-family: var(--font-war); font-weight: 600;
  font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--war-muted);
}
.war-facts dd { margin: 0; font-weight: 600; font-size: 0.98rem; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px;
  padding: 10px 20px 10px 16px;
  border: 1.5px solid var(--war-line);
  border-radius: 12px;
  background: var(--war-panel);
  color: var(--war-fg);
}
.store svg { width: 24px; height: 24px; fill: none; stroke: var(--war-signal); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.store span { display: flex; flex-direction: column; line-height: 1.15; font-weight: 600; font-size: 1.05rem; }
.store small { font-size: 0.72rem; font-weight: 500; color: var(--war-muted); letter-spacing: 0.04em; }
.war-note { color: var(--war-muted); font-size: var(--step--1); max-width: 36em; }
.war-note a { color: var(--war-signal); }
.war-note a:hover { color: var(--war-fg); }
.war :focus-visible { outline-color: var(--war-signal); }

.war-art { margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.war-frame { position: relative; padding: 10px; }
#war {
  width: 100%; height: auto;
  aspect-ratio: 4 / 3;
  image-rendering: pixelated;
  touch-action: pan-y;
  cursor: crosshair;
  background: var(--war-bg);
}
.hud { position: absolute; width: 22px; height: 22px; border-color: var(--war-signal); border-style: solid; border-width: 0; }
.hud-tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.hud-tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.hud-bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.hud-br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.war-caption {
  font-family: var(--font-war); font-weight: 600;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--war-muted); padding-left: 10px;
}

@media (max-width: 900px) {
  .war-grid { grid-template-columns: minmax(0, 1fr); }
  .war-art { order: -1; }
}
@media (max-width: 480px) {
  .war-facts { grid-template-columns: minmax(0, 1fr); }
  .war-facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--war-line); }
  .store { flex: 1 1 100%; }
}

/* ---------- What we build ---------- */
.build { padding-block: clamp(64px, 9vw, 120px); }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: var(--step-3); font-weight: 700; }

.disciplines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.disciplines li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 8px 28px;
  align-items: center;
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
}
.px-icon { width: 40px; height: 40px; fill: var(--fg); shape-rendering: crispEdges; transition: fill .2s ease, transform .2s ease; }
.disciplines li:hover .px-icon { fill: var(--accent); transform: translateY(-2px); }
.disciplines h3 { font-size: var(--step-2); font-weight: 700; }
.disciplines p { color: var(--muted); max-width: 36em; }

@media (max-width: 700px) {
  .disciplines li { grid-template-columns: 40px minmax(0, 1fr); }
  .disciplines p { grid-column: 2; }
  .px-icon { width: 32px; height: 32px; }
}

/* ---------- Studio ---------- */
.studio { background: var(--surface); padding-block: clamp(64px, 9vw, 120px); }
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.studio-word { display: flex; flex-direction: column; gap: 6px; }
.studio-word .word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 3rem + 10vw, 11rem);
  letter-spacing: -0.07em;
  line-height: 0.8;
}
.studio-word .phon { font-size: var(--step--1); color: var(--muted); letter-spacing: 0.04em; margin-top: 18px; }
.studio-word .def { font-size: var(--step-2); font-weight: 600; }
.studio-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 38rem; }
.studio-copy h2 { font-size: var(--step-3); font-weight: 700; }
.studio-copy p:not(.eyebrow) { font-size: var(--step-1); color: var(--muted); }

@media (max-width: 760px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Contact ---------- */
.contact { padding-block: clamp(64px, 9vw, 120px); }
.contact-inner { display: flex; flex-direction: column; gap: 14px; }
.contact h2 { font-size: var(--step-3); font-weight: 700; }
.contact-lede { color: var(--muted); font-size: var(--step-1); }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 10px; }
.email {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1rem + 2.6vw, 2.6rem);
  letter-spacing: -0.03em;
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
  overflow-wrap: anywhere;
}
.email:hover { color: var(--accent-text); }
.copy-status { min-height: 1.6em; font-size: var(--step--1); color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { position: relative; padding-top: 28px; }
.footer-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  font-size: var(--step--1); color: var(--muted);
  padding-bottom: 20px;
}
.footer-row nav { display: flex; gap: 20px; }
.footer-row a { color: var(--fg); }
.footer-dunes { width: 100%; height: clamp(60px, 9vw, 120px); }
.d-back { fill: var(--dune); }
.d-front { fill: var(--ground); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .sandbox, .war-art, .footer-dunes { display: none; }
  .war { background: none; color: #000; }
}
