/* ============================================================================
   DANTARSIB · SIGNATURE EXPERIENCE — full design system
   Industrial-luxury, cinematic, cursor-reactive. Shared across all pages.
   ============================================================================ */

:root {
  --bg: #07090d;
  --bg-2: #0b0e14;
  --bg-3: #0f131b;
  --bg-4: #131823;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #eef1f6;
  --ink-dim: #c2c9d6;
  --muted: #7e8798;
  --muted-2: #5b6373;
  --accent: #fd7903;
  --accent-2: #ff9e42;
  --accent-deep: #c85e00;
  --glow: rgba(253, 121, 3, 0.55);
  --glow-soft: rgba(253, 121, 3, 0.18);
  --danger: #ff5b5b;
  --ok: #4ad395;

  --maxw: 1280px;
  --maxw-narrow: 920px;
  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --ease-lux: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-mech: cubic-bezier(0.65, 0.05, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: 0.01em;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #0a0a0a; }
button { font-family: inherit; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }
.wrap-narrow { max-width: var(--maxw-narrow); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 30px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ============================================================================
   ATMOSPHERE LAYERS
   ============================================================================ */
.atmo-grid {
  position: fixed; inset: -2px; z-index: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 38%, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 38%, #000 0%, transparent 72%);
  opacity: 0.5;
  pointer-events: none;
}
.atmo-spot {
  position: fixed; width: 60vmax; height: 60vmax;
  left: 0; top: 0;
  transform: translate3d(-50%, -50%, 0);
  background: radial-gradient(circle, rgba(253,121,3,0.10) 0%, rgba(253,121,3,0.04) 30%, transparent 60%);
  z-index: 0; pointer-events: none; will-change: transform;
}
.atmo-vignette {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(130% 120% at 50% 30%, transparent 45%, rgba(0,0,0,0.55) 100%);
}
.atmo-grain {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================================
   HEADER (real logo top-left + premium nav)
   ============================================================================ */
.x-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(14px, 1.8vw, 22px) clamp(20px, 5vw, 64px);
  gap: 24px;
  transition: background 0.5s var(--ease-lux), backdrop-filter 0.5s var(--ease-lux), border-color 0.5s var(--ease-lux);
  border-bottom: 1px solid transparent;
}
.x-header.is-stuck {
  background: rgba(7, 9, 13, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line-soft);
}

/* Real logo — sits directly on the dark header, no white container.
   The JPEG already has a near-black backdrop; `mix-blend-mode: screen` on the
   image makes that backdrop dissolve into the header, so only the white
   DANTARSIB type and the orange roofs read against the dark UI. */
.logo-mark {
  display: inline-flex; align-items: center;
  padding: 0;
  background: transparent;
  transition: transform 0.4s var(--ease-lux), opacity 0.4s var(--ease-lux);
}
.logo-mark img {
  height: 56px; width: auto; display: block;
  mix-blend-mode: screen;
  /* small extra punch so the orange roofs and white type stay crisp at the
     scaled-down header size, without crushing the original color balance */
  filter: contrast(1.05) saturate(1.05);
}
.logo-mark:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}
@media (max-width: 720px) {
  .logo-mark img { height: 46px; }
}

/* Center nav */
.x-nav {
  display: flex; gap: 4px; align-items: center;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  padding: 6px;
}
.x-link {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 9px 16px;
  border-radius: 100px;
  transition: all 0.35s var(--ease-lux);
  position: relative;
}
.x-link:hover { color: var(--ink); background: rgba(255,255,255,0.05); }
.x-link.is-active {
  color: #0a0a0a;
  background: var(--accent);
  box-shadow: 0 0 24px var(--glow-soft);
}

.x-header-right {
  display: flex; align-items: center; gap: 18px;
  font-size: 0.82rem; color: var(--muted);
}
.x-header-right .quick { transition: color 0.3s; }
.x-header-right .quick:hover { color: var(--ink); }

.header-cta {
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink);
  transition: all 0.4s var(--ease-lux);
  position: relative; overflow: hidden;
}
.header-cta:hover {
  border-color: var(--accent);
  color: #0a0a0a;
  background: var(--accent);
  box-shadow: 0 0 30px var(--glow-soft);
}

/* Hamburger */
.x-menu {
  display: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  position: relative;
}
.x-menu span {
  position: absolute; left: 50%; top: 50%;
  width: 18px; height: 1.5px; background: var(--ink);
  transform: translate(-50%, -50%);
  transition: all 0.4s var(--ease-lux);
}
.x-menu span:nth-child(1) { transform: translate(-50%, -7px); }
.x-menu span:nth-child(3) { transform: translate(-50%, 5px); }
.x-menu.is-open span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.x-menu.is-open span:nth-child(2) { opacity: 0; }
.x-menu.is-open span:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg); }

.x-drawer {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(7,9,13,0.96);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  transform: translateY(-100%);
  transition: transform 0.55s var(--ease-lux);
}
.x-drawer.is-open { transform: translateY(0); }
.x-drawer a {
  font-family: var(--font-display);
  font-size: 1.5rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-dim);
  padding: 8px 24px; border-radius: 100px;
  transition: all 0.3s var(--ease-lux);
}
.x-drawer a:hover { color: #0a0a0a; background: var(--accent); }

/* Below 980px the central nav collapses to a hamburger drawer.
   The hamburger MUST appear at the same breakpoint as the nav hides,
   otherwise tablet portrait users (768px etc.) lose navigation entirely. */
@media (max-width: 980px) {
  .x-nav { display: none; }
  .x-header-right .quick { display: none; }
  .x-menu { display: grid; place-items: center; }
}
@media (max-width: 720px) {
  .header-cta { display: none; }
  .x-header { gap: 12px; }
  .x-header-right { gap: 10px; }
}

/* ============================================================================
   HERO STAGE (3D mount)
   ============================================================================ */
.stage {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  z-index: 5;
  padding-top: 80px;
  overflow: hidden;
}

.robot3d-mount {
  position: absolute;
  inset: 0;
  z-index: 10;
}
.robot3d-mount canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.robot3d-mount[data-fallback="true"]::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(50% 50% at 50% 50%, rgba(253,121,3,0.18), transparent 70%),
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.4) 100%);
}

/* Connector lines & nodes float ABOVE the canvas */
.connectors, .nodes { position: absolute; inset: 0; z-index: 25; }
.connectors { pointer-events: none; overflow: visible; }
.connectors line { stroke: var(--line); stroke-width: 1; opacity: 0; transition: opacity 0.45s var(--ease-lux), stroke 0.45s var(--ease-lux); }
.connectors line.is-active { stroke: var(--accent); opacity: 0.6; }

.nodes { pointer-events: none; }
.node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 10px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(10, 13, 19, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink-dim);
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transition:
    border-color 0.45s var(--ease-lux),
    color 0.45s var(--ease-lux),
    background 0.45s var(--ease-lux),
    box-shadow 0.45s var(--ease-lux),
    transform 0.5s var(--ease-lux);
  opacity: 0;
}
.node .idx { font-size: 0.6rem; color: var(--muted-2); letter-spacing: 0.1em; transition: color 0.45s var(--ease-lux); }
.node .dotmark { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); transition: all 0.45s var(--ease-lux); }
.node:hover, .node.is-active {
  border-color: var(--accent);
  color: #fff;
  background: rgba(253, 121, 3, 0.10);
  box-shadow: 0 0 0 1px rgba(253, 121, 3, 0.25), 0 10px 40px rgba(253, 121, 3, 0.18);
  transform: translate(-50%, -50%) scale(1.06);
}
.node:hover .dotmark, .node.is-active .dotmark { background: var(--accent); box-shadow: 0 0 12px var(--glow); }
.node:hover .idx, .node.is-active .idx { color: var(--accent-2); }

/* Vertical side labels */
.side-label {
  position: absolute;
  top: 50%; transform: translateY(-50%) rotate(-90deg);
  transform-origin: left top;
  z-index: 20;
  display: flex; gap: 14px; align-items: center;
  font-family: var(--font-display);
  font-size: 0.7rem; letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--muted);
}
.side-label strong { color: var(--accent); font-weight: 600; letter-spacing: 0.18em; }
.side-left { left: 26px; transform: translateY(-50%) rotate(-90deg); }
.side-right { right: 26px; transform: translateY(-50%) rotate(90deg); transform-origin: right top; right: 0; top: 50%; }
.side-right { right: 4px; }

/* Scroll cue */
.scroll-cue {
  position: absolute; bottom: 26px; left: 50%;
  transform: translateX(-50%); z-index: 30;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 0.62rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--muted);
}
.scroll-cue .bar {
  width: 1px; height: 46px;
  background: linear-gradient(var(--accent), transparent);
  position: relative; overflow: hidden;
}
.scroll-cue .bar::after {
  content: "";
  position: absolute; top: 0; left: 0; width: 100%; height: 40%;
  background: var(--accent);
  animation: cueDrop 1.8s var(--ease-mech) infinite;
}
@keyframes cueDrop {
  0% { transform: translateY(-120%); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(260%); opacity: 0; }
}

/* ============================================================================
   GENERIC CONTENT SECTIONS
   ============================================================================ */
.section { position: relative; z-index: 5; padding: clamp(90px, 14vh, 180px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 76px); }
.section-head h2 { font-size: clamp(2.1rem, 6vw, 4.4rem); margin-top: 22px; color: var(--ink); }
.section-head h2 .accent { color: var(--accent); }

.lead { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.18rem); max-width: 620px; margin-top: 22px; }

.r-up { will-change: transform, opacity; }
.r-mask { overflow: hidden; }
.r-mask > * { display: inline-block; }

/* ===== Manifesto ===== */
.manifesto {
  border-top: 1px solid var(--line-soft);
  background: radial-gradient(120% 80% at 80% 0%, rgba(253,121,3,0.05), transparent 60%);
}
.manifesto h2 { font-size: clamp(2.2rem, 7.2vw, 6rem); line-height: 1.0; color: var(--ink); font-weight: 600; }
.manifesto h2 em { font-style: normal; color: var(--accent); }
.manifesto .sig { margin-top: 40px; display: flex; gap: 16px; align-items: center; color: var(--muted); font-size: 0.9rem; }
.manifesto .sig .rule { width: 56px; height: 1px; background: var(--accent); }

/* ===== Services list ===== */
.services { border-top: 1px solid var(--line-soft); }
.svc-list {
  display: grid; gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  overflow: hidden;
}
.svc {
  position: relative; display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: clamp(16px, 4vw, 48px);
  padding: clamp(28px, 4vw, 48px) clamp(22px, 3vw, 40px);
  background: var(--bg-2);
  transition: background 0.5s var(--ease-lux);
  overflow: hidden;
}
.svc::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(253,121,3,0.10), transparent 45%);
  opacity: 0; transition: opacity 0.5s var(--ease-lux);
}
.svc:hover { background: var(--bg-3); }
.svc:hover::before { opacity: 1; }
.svc .num { font-family: var(--font-display); font-size: 0.9rem; color: var(--accent); letter-spacing: 0.1em; position: relative; z-index: 1; }
.svc .body { position: relative; z-index: 1; }
.svc .body h3 { font-size: clamp(1.4rem, 3vw, 2.1rem); color: var(--ink); margin-bottom: 8px; }
.svc .body p { color: var(--muted); max-width: 560px; font-size: 0.98rem; }
.svc .go {
  position: relative; z-index: 1;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--ink); font-size: 1.1rem;
  transition: all 0.45s var(--ease-lux);
  flex-shrink: 0;
}
.svc:hover .go { background: var(--accent); border-color: var(--accent); color: #0a0a0a; transform: rotate(-45deg); }
@media (max-width: 720px) {
  .svc { grid-template-columns: auto 1fr; }
  .svc .go { display: none; }
}

/* ===== Stats ===== */
.stats {
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.stat { background: var(--bg); padding: clamp(40px, 6vw, 70px) clamp(22px, 3vw, 40px); position: relative; }
.stat .v { font-family: var(--font-display); font-size: clamp(3rem, 9vw, 6.4rem); font-weight: 700; color: var(--ink); line-height: 1; letter-spacing: -0.04em; }
.stat .v .u { color: var(--accent); }
.stat .k { margin-top: 14px; color: var(--muted); font-size: 0.82rem; letter-spacing: 0.22em; text-transform: uppercase; }
.stat .tick { position: absolute; left: 0; top: 0; width: 100%; height: 2px; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--accent), transparent); }
@media (max-width: 720px) { .stat-grid { grid-template-columns: 1fr; } }

/* ===== Heritage ===== */
.heritage { border-top: 1px solid var(--line-soft); }
.heritage-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.heritage p.big { font-family: var(--font-display); font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.4; color: var(--ink-dim); font-weight: 400; }
.heritage p.big b { color: var(--accent); font-weight: 600; }
.team { display: grid; gap: 14px; }
.team .member {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--bg-2);
  transition: border-color 0.4s var(--ease-lux), transform 0.4s var(--ease-lux);
}
.team .member:hover { border-color: var(--accent); transform: translateX(6px); }
.team .member .ring {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--accent);
  display: grid; place-items: center;
  color: var(--accent);
  font-family: var(--font-display); font-weight: 700;
  flex-shrink: 0;
}
.team .member h4 { font-family: var(--font-display); color: var(--ink); font-size: 1rem; }
.team .member span { color: var(--muted); font-size: 0.82rem; }
@media (max-width: 860px) { .heritage-grid { grid-template-columns: 1fr; } }

/* ===== Finale ===== */
.finale {
  border-top: 1px solid var(--line-soft);
  text-align: center;
  background: radial-gradient(80% 120% at 50% 120%, rgba(253,121,3,0.16), transparent 60%);
  padding: clamp(110px, 18vh, 220px) 0;
}
.finale h2 { font-size: clamp(2.4rem, 8vw, 6.6rem); color: var(--ink); }
.finale h2 .accent { color: var(--accent); }
.finale .lead { margin: 26px auto 0; }
.cta-row { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

.btn {
  font-family: var(--font-display);
  letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.8rem;
  padding: 16px 30px; border-radius: 100px;
  border: 1px solid var(--line);
  color: var(--ink);
  transition: all 0.4s var(--ease-lux);
  position: relative; overflow: hidden;
  cursor: pointer; background: transparent;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn .lbl { position: relative; z-index: 1; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #0a0a0a; font-weight: 600; }
.btn-primary:hover { box-shadow: 0 0 40px var(--glow); transform: translateY(-2px); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-large { padding: 20px 36px; font-size: 0.85rem; }

.contact-line {
  margin-top: 44px; display: flex; flex-wrap: wrap;
  gap: 10px 28px; justify-content: center;
  color: var(--muted); font-size: 0.9rem;
}
.contact-line a { color: var(--ink-dim); transition: color 0.3s; }
.contact-line a:hover { color: var(--accent); }

/* ===== Footer ===== */
.x-footer {
  position: relative; z-index: 5;
  border-top: 1px solid var(--line-soft);
  padding: 40px 0; color: var(--muted-2); font-size: 0.8rem;
}
.x-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
.x-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.x-footer a:hover { color: var(--accent); }

/* ============================================================================
   PAGE HEADER (subpages cinematic banner)
   ============================================================================ */
.page-hero {
  position: relative;
  padding: clamp(140px, 22vh, 240px) 0 clamp(60px, 10vh, 110px);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  z-index: 5;
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 90% at 80% 20%, rgba(253,121,3,0.10), transparent 60%),
    linear-gradient(180deg, rgba(253,121,3,0.04), transparent 80%);
  z-index: -1;
}
.page-hero .crumbs {
  display: inline-flex; gap: 10px; align-items: center;
  font-family: var(--font-display);
  font-size: 0.7rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}
.page-hero .crumbs a { color: var(--ink-dim); }
.page-hero .crumbs a:hover { color: var(--accent); }
.page-hero .crumbs em { font-style: normal; color: var(--accent); font-weight: 500; }
.page-hero h1 {
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 1.0;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.page-hero h1 .accent { color: var(--accent); }
.page-hero p.lead { margin-top: 28px; max-width: 700px; font-size: clamp(1rem, 1.5vw, 1.2rem); color: var(--muted); }
.page-hero .hero-meta {
  margin-top: 48px;
  display: flex; flex-wrap: wrap;
  gap: 36px;
  border-top: 1px solid var(--line-soft);
  padding-top: 28px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.page-hero .hero-meta b { color: var(--accent); font-weight: 600; }

/* ============================================================================
   COMPANY / TIMELINE
   ============================================================================ */
.about-block {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px);
}
.about-block .panel {
  border: 1px solid var(--line-soft);
  background: var(--bg-2);
  padding: clamp(28px, 4vw, 44px);
  border-radius: 16px;
  position: relative; overflow: hidden;
}
.about-block .panel .icon {
  width: 48px; height: 48px; border-radius: 12px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--accent); margin-bottom: 22px;
  background: rgba(253,121,3,0.06);
}
.about-block .panel h3 { font-size: 1.4rem; margin-bottom: 12px; color: var(--ink); }
.about-block .panel p { color: var(--muted); }
@media (max-width: 820px) { .about-block { grid-template-columns: 1fr; } }

.timeline {
  position: relative;
  padding-left: 40px;
}
.timeline::before {
  content: ""; position: absolute;
  left: 12px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line) 8%, var(--line) 92%, transparent);
}
.tl-item {
  position: relative;
  padding: 0 0 clamp(40px, 5vw, 60px) clamp(24px, 4vw, 40px);
}
.tl-item::before {
  content: ""; position: absolute;
  left: -32px; top: 10px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(253,121,3,0.15);
}
.tl-item .yr {
  font-family: var(--font-display); color: var(--accent);
  font-size: 0.82rem; letter-spacing: 0.32em; text-transform: uppercase;
  margin-bottom: 10px;
}
.tl-item h3 { font-size: clamp(1.2rem, 2.6vw, 1.7rem); color: var(--ink); margin-bottom: 10px; }
.tl-item p { color: var(--muted); max-width: 720px; }

/* Team grid */
.team-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.team-card {
  border: 1px solid var(--line-soft);
  background: var(--bg-2);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.4s var(--ease-lux), transform 0.4s var(--ease-lux);
}
.team-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.team-card .photo {
  aspect-ratio: 4/5; background: var(--bg-3);
  position: relative; overflow: hidden;
}
.team-card .photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.2) contrast(1.05); transition: filter 0.6s var(--ease-lux), transform 0.8s var(--ease-lux); }
.team-card:hover .photo img { filter: grayscale(0) contrast(1.1); transform: scale(1.04); }
.team-card .info { padding: 24px 28px; }
.team-card .info h3 { font-size: 1.3rem; margin-bottom: 6px; }
.team-card .info p { color: var(--muted); font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.24em; text-transform: uppercase; }
@media (max-width: 720px) { .team-grid { grid-template-columns: 1fr; } }

/* ============================================================================
   SERVICES PAGE GRID
   ============================================================================ */
.svc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 16px; overflow: hidden;
}
.svc-tile {
  background: var(--bg-2);
  padding: clamp(28px, 4vw, 40px);
  transition: background 0.4s var(--ease-lux);
  position: relative; overflow: hidden;
  min-height: 220px;
  display: flex; flex-direction: column;
}
.svc-tile:hover { background: var(--bg-3); }
.svc-tile .ic {
  width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--accent);
  margin-bottom: 22px;
  background: rgba(253,121,3,0.06);
}
.svc-tile h3 { font-size: 1.15rem; margin-bottom: 10px; color: var(--ink); }
.svc-tile p { color: var(--muted); font-size: 0.92rem; }
.svc-tile .arrow {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--accent);
  padding-top: 18px;
}
@media (max-width: 920px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .svc-grid { grid-template-columns: 1fr; } }

.svc-cluster + .svc-cluster { margin-top: clamp(60px, 8vw, 96px); }
.svc-cluster .cluster-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 36px; gap: 24px; flex-wrap: wrap;
}
.svc-cluster h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.svc-cluster .cluster-head p { color: var(--muted); max-width: 420px; }

/* ============================================================================
   PROJECTS / GALLERY
   ============================================================================ */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
}
.filter-btn {
  font-family: var(--font-display);
  font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-dim);
  padding: 10px 18px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.35s var(--ease-lux);
}
.filter-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.filter-btn.active { background: var(--accent); color: #0a0a0a; border-color: var(--accent); }

.projects-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 16px; overflow: hidden;
}
.project-card {
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
}
.project-card .project-image,
.project-card .project-image img {
  width: 100%; height: 100%;
}
.project-card .project-image img {
  object-fit: cover;
  transition: transform 0.9s var(--ease-lux), filter 0.5s var(--ease-lux);
  filter: brightness(0.85) saturate(0.9);
}
.project-card:hover .project-image img { transform: scale(1.06); filter: brightness(1) saturate(1); }
.project-card::after {
  content: attr(data-label);
  position: absolute; left: 18px; bottom: 16px;
  font-family: var(--font-display); font-size: 0.7rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink);
  padding: 6px 12px; border-radius: 100px;
  background: rgba(7,9,13,0.78);
  border: 1px solid rgba(255,255,255,0.12);
  transform: translateY(8px); opacity: 0;
  transition: all 0.5s var(--ease-lux);
}
.project-card:hover::after { transform: translateY(0); opacity: 1; }
.project-card.is-hidden { display: none; }
@media (max-width: 900px) { .projects-container { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .projects-container { grid-template-columns: 1fr; } }

/* ============================================================================
   CAREERS
   ============================================================================ */
.benefits-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 16px; overflow: hidden;
}
.benefit-card {
  background: var(--bg-2);
  padding: clamp(24px, 3vw, 36px);
  transition: background 0.4s var(--ease-lux);
}
.benefit-card:hover { background: var(--bg-3); }
.benefit-card .ic {
  width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--accent); margin-bottom: 20px;
  background: rgba(253,121,3,0.06);
}
.benefit-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.benefit-card p { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 900px) { .benefits-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .benefits-grid { grid-template-columns: 1fr; } }

.jobs-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.job-card {
  border: 1px solid var(--line-soft);
  background: var(--bg-2);
  border-radius: 16px;
  padding: clamp(28px, 3.5vw, 40px);
  transition: border-color 0.4s var(--ease-lux), transform 0.4s var(--ease-lux);
}
.job-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.job-card h3 { font-size: 1.3rem; margin-bottom: 16px; color: var(--ink); }
.job-card .job-details {
  display: flex; flex-wrap: wrap; gap: 18px;
  color: var(--muted); font-size: 0.82rem;
  font-family: var(--font-display); letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.job-card .job-details p { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.job-card .job-details i { color: var(--accent); }
.job-card .job-description { color: var(--muted); margin-bottom: 24px; font-size: 0.95rem; }
@media (max-width: 760px) { .jobs-grid { grid-template-columns: 1fr; } }

/* ============================================================================
   FORMS (used by Contact + Careers; preserves Netlify field names)
   ============================================================================ */
.x-form {
  border: 1px solid var(--line-soft);
  background: var(--bg-2);
  border-radius: 16px;
  padding: clamp(28px, 4vw, 48px);
  display: grid; gap: 22px;
}
.x-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) { .x-form .form-row { grid-template-columns: 1fr; } }
.x-form .form-group { display: flex; flex-direction: column; gap: 8px; }
.x-form label {
  font-family: var(--font-display);
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.x-form input,
.x-form select,
.x-form textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color 0.3s var(--ease-lux), background 0.3s var(--ease-lux), box-shadow 0.3s var(--ease-lux);
}
.x-form input:focus,
.x-form select:focus,
.x-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-2);
  box-shadow: 0 0 0 4px rgba(253,121,3,0.12);
}
.x-form input.error,
.x-form select.error,
.x-form textarea.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(255,91,91,0.12);
}
.x-form textarea { min-height: 140px; resize: vertical; }
.x-form select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23fd7903' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 38px;
}
.x-form input[type="file"] { padding: 10px; background: var(--bg); border-style: dashed; }
.x-form input[type="file"]::file-selector-button {
  font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  background: var(--accent); color: #0a0a0a;
  border: none; border-radius: 8px;
  padding: 10px 14px; cursor: pointer; margin-right: 14px;
}
.x-form small { color: var(--muted); font-size: 0.78rem; }
.x-form .checkbox-container,
.x-form .checkbox-label {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.88rem; color: var(--ink-dim);
  letter-spacing: normal; text-transform: none;
  font-family: var(--font-body);
}
.x-form .checkbox-container a,
.x-form .checkbox-label a { color: var(--accent); }
.x-form .checkbox-container input,
.x-form .checkbox-label input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 3px; }
.x-form .checkmark { display: none; } /* legacy span kept for backward markup compat */

/* Contact info cards */
.contact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden;
}
.contact-card {
  background: var(--bg-2);
  padding: clamp(28px, 3.5vw, 40px);
  transition: background 0.4s var(--ease-lux);
}
.contact-card:hover { background: var(--bg-3); }
.contact-card .ic {
  width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--accent); margin-bottom: 22px;
  background: rgba(253,121,3,0.06);
}
.contact-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.contact-card p, .contact-card a { color: var(--muted); font-size: 0.95rem; transition: color 0.3s; }
.contact-card a:hover { color: var(--accent); }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.map-container {
  margin-top: 40px;
  border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden;
  background: var(--bg-2);
}
.map-container iframe {
  width: 100%; height: 450px; border: 0; display: block;
  filter: grayscale(0.6) invert(0.92) hue-rotate(180deg);
}

/* ============================================================================
   PRIVACY / LONG-FORM
   ============================================================================ */
.longform {
  display: grid; gap: clamp(40px, 5vw, 60px);
  max-width: 860px;
}
.longform-section h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 18px; color: var(--ink); }
.longform-section h3 { font-size: 1.05rem; color: var(--accent); margin: 20px 0 10px; font-family: var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; }
.longform-section p, .longform-section li { color: var(--ink-dim); font-size: 1rem; line-height: 1.75; }
.longform-section ul { padding-left: 20px; }
.longform-section li { margin-bottom: 10px; }
.longform-section li strong { color: var(--ink); }
.longform-section .panel-soft {
  margin-top: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 22px;
  background: var(--bg-2);
}

/* Back to top */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--accent);
  background: rgba(7,9,13,0.7);
  backdrop-filter: blur(10px);
  color: var(--accent);
  cursor: pointer;
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s var(--ease-lux), transform 0.4s var(--ease-lux), background 0.3s;
  z-index: 50;
}
.back-to-top.show { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: var(--accent); color: #0a0a0a; transform: translateY(-3px); }

/* ============================================================================
   INTRO OVERLAY
   ============================================================================ */
.intro {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: grid; place-items: center;
  pointer-events: none;
}
.intro .scanline {
  position: absolute; left: 0; top: 50%;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 24px var(--glow);
}
.intro .ilabel {
  font-family: var(--font-display);
  letter-spacing: 0.5em; font-size: 0.7rem;
  color: var(--muted); text-transform: uppercase;
}

/* ============================================================================
   NOTIFICATION (used by form handlers)
   ============================================================================ */
.notification {
  position: fixed; top: 80px; right: 24px;
  z-index: 110;
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(15, 19, 27, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  font-size: 0.9rem;
  max-width: 380px;
}
.notification-success { border-color: var(--ok); }
.notification-error { border-color: var(--danger); }
.notification .notification-content { display: flex; align-items: center; gap: 10px; }
.notification-close { background: none; border: none; color: var(--ink); cursor: pointer; margin-left: auto; font-size: 1.1rem; }

/* ============================================================================
   MOBILE TWEAKS — tablet, phone, narrow phone
   ============================================================================ */

/* Use dynamic viewport units where supported so the hero never gets cropped
   by the mobile browser's expanding/collapsing address bar. */
@supports (height: 100dvh) {
  .stage { min-height: 100dvh; }
}

/* ----- Tablet (≤820px) ----- */
@media (max-width: 820px) {
  .stage { padding-top: 100px; }
  .side-label { display: none; }
  /* Drop the backdrop-filter on the floating nodes — repeated blur regions
     are the single biggest GPU cost on mobile WebKit. */
  .node {
    font-size: 0.66rem; padding: 7px 12px;
    backdrop-filter: none; -webkit-backdrop-filter: none;
    background: rgba(7, 9, 13, 0.82);
  }
  .connectors { opacity: 0.45; }
}

/* ----- Phone (≤720px) — replace the orbital node layout with a clean
   bottom action-bar of the 4 most useful destinations. The percentage-based
   absolute positions would otherwise overlap each other AND the robot. ----- */
@media (max-width: 720px) {
  .stage { padding-top: 90px; padding-bottom: 24px; }
  .connectors { display: none; }

  .nodes {
    position: absolute;
    inset: auto 12px calc(env(safe-area-inset-bottom, 0px) + 70px) 12px;
    display: flex; flex-wrap: wrap;
    justify-content: center; align-items: center;
    gap: 8px;
    pointer-events: auto;
  }
  /* Override the inline left/top from the markup */
  .nodes .node {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;            /* skip the entrance fade — these are nav */
    font-size: 0.64rem; padding: 8px 12px;
    border-color: var(--line);
    background: rgba(10, 13, 19, 0.88);
  }
  .nodes .node:hover,
  .nodes .node.is-active,
  .nodes .node:active {
    transform: none !important;       /* avoid the scale that breaks flex layout */
  }
  /* Keep only the four primary destinations on phone — drop duplicates */
  .nodes .node:nth-child(n + 5) { display: none; }

  .scroll-cue { bottom: max(14px, env(safe-area-inset-bottom, 0px)); }
  .scroll-cue .bar { height: 36px; }
}

/* ----- Narrow phone (≤480px) — even more breathing room around the robot ----- */
@media (max-width: 480px) {
  .stage { padding-top: 84px; padding-bottom: 18px; }
  .nodes {
    inset: auto 8px calc(env(safe-area-inset-bottom, 0px) + 60px) 8px;
    gap: 6px;
  }
  .nodes .node {
    font-size: 0.6rem;
    padding: 7px 10px;
    letter-spacing: 0.14em;
  }
  /* hide the small "01" index inside each node to keep buttons compact */
  .nodes .node .idx { display: none; }
  /* Show only 3 nav nodes on the smallest screens */
  .nodes .node:nth-child(n + 4) { display: none; }
}

/* ----- Touch tweak: nodes can't rely on :hover state ----- */
@media (hover: none) {
  .node:active {
    border-color: var(--accent);
    background: rgba(253, 121, 3, 0.12);
  }
}

/* ----- Safer fixed-UI placement on phones with home indicator / notch ----- */
.back-to-top {
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  right: max(20px, env(safe-area-inset-right, 0px));
}
.notification {
  right: max(16px, env(safe-area-inset-right, 0px));
  top: max(76px, calc(env(safe-area-inset-top, 0px) + 76px));
  max-width: min(380px, calc(100vw - 32px));
}

/* ----- Intermediate breakpoint for contact-grid (was 3→1, now 3→2→1) ----- */
@media (max-width: 980px) and (min-width: 600px) {
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ----- Map iframe: trim height on phones (was 450px fixed) ----- */
@media (max-width: 720px) {
  .map-container iframe { height: 320px; }
}
@media (max-width: 480px) {
  .map-container iframe { height: 260px; }
}

/* ----- Page hero on phones: tighter top padding (the header is shorter too) ----- */
@media (max-width: 720px) {
  .page-hero { padding: clamp(100px, 16vh, 150px) 0 clamp(40px, 8vh, 70px); }
  .page-hero .hero-meta { gap: 18px; padding-top: 22px; margin-top: 32px; }
  .page-hero .hero-meta > * { font-size: 0.68rem; }
}

/* ----- Stats: cleaner stacked layout on phone ----- */
@media (max-width: 720px) {
  .stat { padding: clamp(28px, 5vw, 40px) clamp(20px, 4vw, 30px); }
  .stat .v { font-size: clamp(2.6rem, 12vw, 3.6rem); }
}

/* ----- Manifesto headline scaling on phone (don't let it become huge) ----- */
@media (max-width: 720px) {
  .manifesto h2 { font-size: clamp(2rem, 10vw, 3.4rem); line-height: 1.05; }
  .manifesto .sig { flex-wrap: wrap; }
  .finale h2 { font-size: clamp(2rem, 10vw, 3.6rem); }
  .finale .cta-row { flex-direction: column; align-items: stretch; padding: 0 16px; }
  .finale .btn { justify-content: center; }
}

/* ----- Footer: nicer wrap on phones ----- */
@media (max-width: 720px) {
  .x-footer .wrap { flex-direction: column; align-items: flex-start; gap: 14px; text-align: left; }
  .x-footer nav { gap: 12px 16px; }
}

/* ----- Touch-friendly tap targets across the board ----- */
@media (hover: none) {
  .x-link, .x-drawer a, .btn, .header-cta, .filter-btn, .x-menu {
    -webkit-tap-highlight-color: transparent;
  }
  .btn-primary:active { transform: translateY(0); box-shadow: 0 0 22px var(--glow); }
}

/* ----- Drop the GPU-heavy grain layer on small phones to save battery ----- */
@media (max-width: 480px) {
  .atmo-grain { display: none; }
  /* lighter atmospheric spot too */
  .atmo-spot { opacity: 0.6; }
}

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-cue .bar::after { animation: none; }
  .node { opacity: 1 !important; }
  .r-up, .r-mask > * { opacity: 1 !important; transform: none !important; }
  .atmo-grain { display: none; }
}
