/* =====================================================================
   ALTTAGSOLUTIONS — single-page site
   ===================================================================== */

:root,
[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-elev-1: #101010;
  --bg-elev-2: #161616;
  --fg: #fafafa;
  --fg-muted: #888;
  --fg-dim: #555;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #00E5FF;
  --accent-rgb: 0, 229, 255;
  --logo-filter: brightness(0) invert(1); /* black logo -> white */
  --noise-mix: overlay;
  --font-display: "Syne", "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
}

[data-theme="light"] {
  --bg: #f5f4f0;
  --bg-elev-1: #ffffff;
  --bg-elev-2: #ebe9e2;
  --fg: #0a0a0a;
  --fg-muted: #555;
  --fg-dim: #999;
  --line: rgba(10, 10, 10, 0.10);
  --line-strong: rgba(10, 10, 10, 0.20);
  --accent: #0066ff;
  --accent-rgb: 0, 102, 255;
  --logo-filter: none; /* keep original black logo */
  --noise-mix: multiply;
}

[data-theme="light"] .bg-dots {
  background-image: radial-gradient(rgba(10, 10, 10, 0.10) 1px, transparent 1px);
}
[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(10, 10, 10, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 10, 10, 0.05) 1px, transparent 1px);
}
[data-theme="light"] .logos::before { background: linear-gradient(90deg, var(--bg), transparent); }
[data-theme="light"] .logos::after  { background: linear-gradient(-90deg, var(--bg), transparent); }
[data-theme="light"] .logo-item {
  filter: grayscale(1) brightness(0.4) contrast(1.2);
  opacity: 0.6;
}
[data-theme="light"] .logo-item:hover { filter: grayscale(0); opacity: 1; }
[data-theme="light"] .work-tile-media {
  background: linear-gradient(135deg, #e8e6df 0%, #d4d2c8 100%) !important;
}
[data-theme="light"] .btn-primary { color: #fff; }
[data-theme="light"] ::selection { background: var(--accent); color: #fff; }

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.5s ease, color 0.5s ease;
  scroll-behavior: smooth;
}

body { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

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

/* ============== layout ============== */

.site {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}

section {
  position: relative;
  padding: 140px 80px;
  max-width: 1480px;
  margin: 0 auto;
}

@media (max-width: 900px) { section { padding: 90px 28px; } }

/* ============== background textures ============== */

.bg-texture {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

.bg-dots {
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: 0 0;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 90%);
}

.bg-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 30%, #000 30%, transparent 90%);
}

.bg-noise {
  opacity: 0.7;
  background-color: var(--bg);
  background-image:
    radial-gradient(at 20% 10%, rgba(var(--accent-rgb), 0.04) 0%, transparent 40%),
    radial-gradient(at 80% 90%, rgba(var(--accent-rgb), 0.03) 0%, transparent 50%);
}
.bg-noise::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.07 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  opacity: 0.4;
  mix-blend-mode: overlay;
}

/* ============== reveal ============== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-in { opacity: 1; transform: translateY(0); }

/* ============== shared atoms ============== */

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 64px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.section-label-num { color: var(--accent); font-weight: 500; }
.section-label-line {
  flex: 0 0 80px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.section-label-text { color: var(--fg); }

.section-headline {
  font-family: var(--font-display);
  font-size: clamp(24px, 5.4vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-weight: 600;
}
.section-headline .muted { color: var(--fg-muted); font-weight: 400; }
.section-lede {
  margin-top: 24px;
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 520px;
  line-height: 1.5;
}

.accent-text { color: var(--accent); }
.muted { color: var(--fg-muted); }

/* ============== buttons ============== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 32px rgba(var(--accent-rgb), 0.4);
}
.btn-primary .btn-arrow { transition: transform 0.3s; }
.btn-primary:hover .btn-arrow { transform: translateX(4px); }

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
}
.btn-ghost:hover { border-color: var(--fg); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color 0.2s;
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
}
.link-arrow:hover { color: var(--accent); border-bottom-color: var(--accent); }
.link-arrow .arrow { transition: transform 0.3s; }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* =====================================================================
   HERO
   ===================================================================== */

.hero {
  min-height: 100vh;
  padding: 0 80px;
  max-width: none;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
@media (max-width: 900px) { .hero { padding: 0 28px; } }

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-scanlines {
  position: absolute; inset: 0; z-index: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.015) 0px,
      rgba(255,255,255,0.015) 1px,
      transparent 1px,
      transparent 4px
    );
  overflow: hidden;
}
.scanline-sweep {
  position: absolute;
  left: 0; right: 0; height: 30vh;
  background: linear-gradient(180deg, transparent, rgba(var(--accent-rgb), 0.12), transparent);
  animation: sweep 6s linear infinite;
}
@keyframes sweep {
  0% { top: -30vh; }
  100% { top: 100vh; }
}

.hero-pulse {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 30% 40%, rgba(var(--accent-rgb), 0.18), transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(var(--accent-rgb), 0.08), transparent 60%);
  animation: pulse 8s ease-in-out infinite alternate;
}
@keyframes pulse {
  0%   { opacity: 0.7; }
  100% { opacity: 1; }
}

/* topnav */
.topnav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.logo {
  display: inline-flex;
  align-items: center;
}
.logo-img {
  height: 64px;
  width: auto;
  display: block;
  filter: var(--logo-filter);
  transition: filter 0.4s ease;
}
@media (max-width: 700px) { .logo-img { height: 46px; } }

.footer-logo-img {
  height: 56px;
  width: auto;
  display: block;
  filter: var(--logo-filter);
  transition: filter 0.4s ease;
}

/* typewriter — grid stacks sizer + visible text in same cell so width is reserved */
.hero-headline-accent.typewriter {
  display: inline-grid;
  grid-template-columns: auto;
  grid-template-rows: auto;
  position: relative;
  vertical-align: baseline;
}
.typewriter-sizer,
.typewriter-text {
  grid-area: 1 / 1;
  white-space: pre;
}
.typewriter-sizer {
  visibility: hidden;
  pointer-events: none;
}
.typewriter-text {
  position: relative;
}
.typewriter-text::after {
  content: "";
  display: inline-block;
  width: 0.06em;
  height: 0.85em;
  background: var(--accent);
  margin-left: 0.04em;
  vertical-align: -0.05em;
  animation: caret-blink 1s steps(2) infinite;
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
}
.typewriter-caret { display: none; }
@keyframes caret-blink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.topnav-links {
  display: flex; gap: 40px;
  list-style: none;
}
.topnav-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  position: relative;
  transition: color 0.2s;
}
.topnav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -6px;
  height: 1px;
  background: var(--accent);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.topnav-links a:hover { color: var(--fg); }
.topnav-links a:hover::after { right: 0; }
.topnav-links a.active { color: var(--fg); }
.topnav-links a.active::after { right: 0; }

.topnav-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  transition: all 0.2s;
}
.topnav-cta:hover { border-color: var(--accent); color: var(--accent); }
.topnav-cta .arrow { transition: transform 0.3s; }
.topnav-cta:hover .arrow { transform: translateX(3px); }

@media (max-width: 700px) {
  .topnav-links { display: none; }
}

/* hero inner */
.hero-inner {
  position: relative;
  z-index: 4;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0;
  max-width: 1320px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 48px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  align-self: flex-start;
}
.eyebrow-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
}
.eyebrow-divider { color: var(--fg-dim); }

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(32px, 7.5vw, 124px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin-bottom: 40px;
  text-wrap: balance;
}
.hero-headline-accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
  position: relative;
}

.hero-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
  margin-bottom: 56px;
  max-width: 780px;
}
.hero-sub-tag { color: var(--fg); }
.hero-sub-sep { color: var(--fg-dim); }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 80px; }

.hero-meta {
  display: flex;
  gap: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hero-meta-item { display: flex; flex-direction: column; gap: 6px; }
.hero-meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.hero-meta-value {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--fg);
  display: inline-flex; align-items: center; gap: 8px;
}
.pulse-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  right: 80px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  z-index: 4;
}
.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--accent), transparent);
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 8px;
  background: var(--accent);
  animation: scroll-down 2s linear infinite;
}
@keyframes scroll-down {
  0%   { top: -8px; }
  100% { top: 100%; }
}
@media (max-width: 900px) { .hero-scroll { display: none; } }

/* =====================================================================
   LOGOS marquee
   ===================================================================== */

.logos {
  padding: 60px 0;
  max-width: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  position: relative;
  z-index: 1;
  background: var(--bg);
}
.logos::before, .logos::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 160px;
  z-index: 2;
  pointer-events: none;
}
.logos::before { left: 0;  background: linear-gradient(90deg, var(--bg), transparent); }
.logos::after  { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }

.logos-rail {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.logos-track {
  display: flex;
  gap: 80px;
  width: max-content;
  animation: marquee 40s linear infinite;
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.logos-rail:hover .logos-track { animation-play-state: paused; }
.logo-item {
  display: flex; align-items: center; justify-content: center;
  height: 40px;
  min-width: 120px;
  white-space: nowrap;
  transition: opacity 0.2s, filter 0.3s;
  opacity: 0.55;
  filter: grayscale(1) brightness(2.4) contrast(0.7);
}
.logo-item:hover { opacity: 1; filter: grayscale(0) brightness(1) contrast(1); }
.logo-item img {
  max-height: 40px;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.logo-item-fallback {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--fg-muted);
}

/* =====================================================================
   WHO WE ARE
   ===================================================================== */

.who-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 100px;
  align-items: start;
}
@media (max-width: 1100px) { .who-grid { grid-template-columns: 1fr; gap: 60px; } }

.who-headline {
  font-family: var(--font-display);
  font-size: clamp(24px, 4.2vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
  text-wrap: balance;
}
.who-body {
  margin-top: 40px;
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 480px;
  line-height: 1.6;
}

.who-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.stat {
  background: var(--bg);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: background 0.3s;
}
.stat:hover { background: var(--bg-elev-1); }
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--fg);
}
.stat-accent .stat-num { color: var(--accent); }
.stat-accent:nth-child(odd) .stat-num { color: var(--fg); }
.stat-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  margin-top: 16px;
}
.stat-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  text-transform: uppercase;
}

/* =====================================================================
   SERVICES
   ===================================================================== */

.services-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 80px;
  margin-bottom: 80px;
  flex-wrap: wrap;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 800px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
  background: var(--bg);
  padding: 48px 40px 40px;
  position: relative;
  transition: background 0.3s, color 0.3s;
  display: flex;
  flex-direction: column;
  gap: 0;
  cursor: pointer;
  min-height: 380px;
}
.service-card:hover { background: var(--bg-elev-1); }

.service-card-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--fg-dim);
  margin-bottom: 32px;
}
.service-card-icon {
  color: var(--accent);
  margin-bottom: 28px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-card:hover .service-card-icon { transform: translateX(4px) scale(1.05); }

.service-card-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin-bottom: 28px;
  max-width: 320px;
}
.service-card-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: auto;
}
.service-card-bullets li {
  display: flex;
  gap: 12px;
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.5;
}
.bullet-dash {
  color: var(--accent);
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.service-card-foot {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  transition: color 0.3s;
}
.service-card:hover .service-card-foot { color: var(--accent); }
.service-card-foot .arrow { transition: transform 0.3s; }
.service-card:hover .service-card-foot .arrow { transform: translateX(4px); }

/* card style variants */
.card-style-filled .service-card { background: var(--bg-elev-1); }
.card-style-filled .service-card:hover { background: var(--bg-elev-2); }

.card-style-minimal {
  background: transparent;
  border: none;
  gap: 60px;
}
.card-style-minimal .service-card {
  background: transparent;
  border-bottom: 1px solid var(--line);
  padding: 32px 0;
  min-height: auto;
}
.card-style-minimal .service-card:hover { background: transparent; }

/* =====================================================================
   WHY CHOOSE US
   ===================================================================== */

.why-head { margin-bottom: 80px; }

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr; } }

.pillar {
  background: var(--bg);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  min-height: 360px;
  transition: background 0.3s;
}
.pillar:hover { background: var(--bg-elev-1); }

.pillar-top {
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pillar-num { color: var(--accent); }
.pillar-label { color: var(--fg); }

.pillar-headline {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 500;
  text-wrap: balance;
}
.pillar-body {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.55;
  margin-bottom: auto;
}
.pillar-deliverables { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}

/* =====================================================================
   FEATURED WORK
   ===================================================================== */

.work-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  margin-bottom: 64px;
  flex-wrap: wrap;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 800px) { .work-grid { grid-template-columns: 1fr; } }

.work-tile {
  display: block;
  cursor: pointer;
  position: relative;
}
.work-tile-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
}
.work-tile-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 12px,
      transparent 12px,
      transparent 24px
    );
  opacity: 0.7;
  transition: opacity 0.4s;
}
.work-tile-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
  transition: opacity 0.3s;
}
.placeholder-mono::before { content: "// "; color: var(--accent); }

.work-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.4) 0%, rgba(10, 10, 10, 0.95) 100%);
  display: flex;
  align-items: flex-end;
  padding: 36px;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.work-tile-overlay-inner {
  transform: translateY(12px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}
.work-tile:hover .work-tile-overlay { opacity: 1; }
.work-tile:hover .work-tile-placeholder { opacity: 0; }
.work-tile:hover .work-tile-overlay-inner { transform: translateY(0); }

.work-tile-name {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-bottom: 8px;
}
.work-tile-cat {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.work-tile-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.work-tile-meta {
  display: flex; justify-content: space-between;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.work-tile-tag { color: var(--fg); }
.work-tile-year { color: var(--fg-dim); }

/* =====================================================================
   CONTACT
   ===================================================================== */

.contact { padding-top: 140px; padding-bottom: 140px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: start;
}
@media (max-width: 1000px) { .contact-grid { grid-template-columns: 1fr; gap: 60px; } }

.contact-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 6.5vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin-bottom: 32px;
}
.contact-lede {
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 440px;
  margin-bottom: 64px;
  line-height: 1.5;
}

.contact-offices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.office {
  background: var(--bg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.office-flag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 12px;
}
.office-email, .office-phone {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--fg);
  transition: color 0.2s;
}
.office-email:hover, .office-phone:hover { color: var(--accent); }
.office-addr {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  text-transform: uppercase;
  margin-top: 8px;
}

/* form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  transition: color 0.2s;
}
.field-filled label, .field:focus-within label { color: var(--accent); }

.field input, .field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  padding: 12px 0;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.field input:focus, .field textarea:focus { border-bottom-color: var(--accent); }

.field-error input, .field-error textarea { border-bottom-color: #ff5470; }
.field-err {
  position: absolute;
  right: 0; top: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #ff5470;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-submit {
  align-self: flex-start;
  margin-top: 16px;
  min-width: 220px;
  justify-content: center;
}
.contact-submit.sending { opacity: 0.7; }
.contact-submit.sent  { background: transparent; color: var(--accent); border-color: var(--accent); }
.contact-submit.error { background: transparent; color: #ff5470;       border-color: #ff5470; }

.btn-spin {
  width: 12px; height: 12px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-check { font-size: 14px; }

/* =====================================================================
   FOOTER
   ===================================================================== */

.footer {
  position: relative;
  border-top: 1px solid var(--line);
  margin-top: 0;
  padding-top: 48px;
  padding-bottom: 0;
  overflow: hidden;
}
.footer-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 80px 48px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr; padding: 0 28px 32px; text-align: center; gap: 24px; }
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 14px;
  display: flex; align-items: center; gap: 8px;
}
.footer-logo-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-nav {
  list-style: none;
  display: flex;
  gap: 32px;
}
.footer-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--accent); }

.footer-meta {
  display: flex; gap: 12px; justify-content: flex-end;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.footer-dot { color: var(--accent); }
@media (max-width: 900px) { .footer-meta { justify-content: center; } }

.footer-bigtype {
  font-family: var(--font-display);
  font-size: clamp(60px, 16vw, 280px);
  font-weight: 600;
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-align: center;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 auto;
  padding: 0 20px;
  user-select: none;
  pointer-events: none;
}

/* =====================================================================
   tweaks panel overrides (panel ships its own theme; just nudge a couple things)
   ===================================================================== */

.tweaks-panel {
  font-family: var(--font-mono) !important;
}

/* =====================================================================
   THEME TOGGLE
   ===================================================================== */

.topnav-right {
  display: flex; align-items: center; gap: 16px;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 0;
  height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  transition: border-color 0.2s;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); }

.tt-track {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 26px;
  margin: 3px;
  border-radius: 999px;
  background: var(--bg-elev-2);
  transition: background 0.4s;
}
.tt-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.45);
}
.tt-light .tt-thumb { transform: translateX(30px); }

/* =====================================================================
   SCROLL PROGRESS BAR
   ===================================================================== */

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 100;
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5);
  transition: transform 0.05s linear;
}

/* =====================================================================
   MAGNETIC + INTERACTIONS
   ===================================================================== */

.magnetic-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sharper hover lift + accent on cards */
.service-card {
  transform: translateY(0);
  transition: background 0.3s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
}
.service-card::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.service-card:hover { transform: translateY(-4px); }
.service-card:hover::after { width: 100%; }

/* Pillar accent slide */
.pillar {
  overflow: hidden;
}
.pillar::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 2px;
  background: var(--accent);
  transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.pillar:hover::before { left: 0; }

/* Stat hover */
.stat {
  cursor: default;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(var(--accent-rgb), 0.08));
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.stat:hover::before { opacity: 1; }
.stat-num {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.stat:hover .stat-num { transform: translateY(-4px); }

/* Hero CTA hover glow boost */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transition: left 0.6s;
}
.btn-primary:hover::before { left: 100%; }

/* Topnav links — softer animated underline */
.topnav-links a {
  cursor: pointer;
}
.topnav-links a::after {
  height: 1px;
  background: var(--accent);
  bottom: -8px;
}

/* =====================================================================
   CONTACT OFFICES — stack on narrow phones before columns get too tight
   ===================================================================== */

@media (max-width: 580px) {
  .contact-offices {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   MOBILE — phones ≤ 480px (320 / 375 / 390 / 430)
   ===================================================================== */

@media (max-width: 480px) {
  section { padding: 64px 16px; }
  .hero   { padding: 0 16px; }

  .hero-inner    { padding: 36px 0; }
  .hero-eyebrow  { margin-bottom: 24px; }
  .hero-headline { margin-bottom: 20px; }
  .hero-sub      { font-size: 13px; margin-bottom: 28px; }
  .hero-actions  { flex-direction: column; margin-bottom: 48px; }
  .hero-actions .btn { width: 100%; justify-content: center; min-height: 44px; }
  .hero-meta     { gap: 24px; }

  .section-label      { margin-bottom: 40px; gap: 10px; }
  .section-label-line { flex: 0 0 32px; }
  .section-lede       { font-size: 16px; }

  .services-head { gap: 20px; margin-bottom: 48px; }
  .service-card  { padding: 32px 20px 24px; min-height: auto; }

  .why-head { margin-bottom: 48px; }
  .pillar   { padding: 32px 20px; min-height: auto; }

  .work-head         { gap: 16px; margin-bottom: 40px; }
  .work-tile-overlay { padding: 20px; }

  .contact        { padding-top: 64px; padding-bottom: 64px; }
  .contact-lede   { font-size: 16px; margin-bottom: 40px; }
  .contact-submit { width: 100%; justify-content: center; }

  .footer-inner { padding: 0 16px 24px; }
  .footer-nav   { flex-wrap: wrap; gap: 16px; justify-content: center; }

  .topnav-cta { min-height: 44px; padding: 11px 14px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.05s !important;
  }
}
