/* Allix Industries — design tokens */
:root {
  --bg: #ffffff;
  --bg-elev: #f4f6f8;
  --ink: #0a0a0a;
  --ink-2: #2b2b2b;
  --ink-3: #6b7280;
  --rule: #e3e6ec;
  --accent: #d4001a;
  --accent-2: #ff3344;
  --accent-ink: #ffffff;
  --button: #0046d5;
  --button-ink: #ffffff;
  --grid: #eef1f5;

  --display: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --title: "Roboto", "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --pad-x: clamp(20px, 4vw, 64px);
  --gutter: 24px;
  --row: 96px;

  --radius: 2px;
}

[data-theme="dark"] {
  --bg: #0a0f1a;
  --bg-elev: #121826;
  --ink: #f4f6fa;
  --ink-2: #b8c0cf;
  --ink-3: #7d8699;
  --rule: #1f2738;
  --grid: #15192a;
  --accent-ink: #ffffff;
}

[data-density="compact"] {
  --row: 72px;
  --pad-x: clamp(16px, 3vw, 48px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--display);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

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

.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.rule { height: 1px; background: var(--rule); width: 100%; }
.vrule { width: 1px; background: var(--rule); align-self: stretch; }

.container {
  width: 100%;
  padding-inline: var(--pad-x);
}

.section-head {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--gutter);
  align-items: baseline;
  padding-block: 32px 24px;
  border-bottom: 1px solid var(--rule);
}
.section-head .num { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; }
.section-head h2 {
  font-family: var(--title);
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0;
  line-height: 1;
}

/* Top nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px var(--pad-x);
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-family: "Roboto", sans-serif;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav .brand { display: flex; align-items: center; gap: 10px; }
.nav .brand .wordmark { font-size: 16px; }
.nav .brand-mark { width: 22px; height: 22px; }
.nav .links { display: flex; gap: 28px; justify-content: center; }
.nav .links a { font-size: 13px; color: var(--ink-2); position: relative; padding: 6px 0; }
.nav .links a:hover { color: var(--ink); }
.nav .links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--accent); }
.nav .right { display: flex; gap: 12px; align-items: center; justify-content: flex-end; }
.lang { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; }
.lang button { background: transparent; border: 0; padding: 4px 10px; font-size: 11px; color: var(--ink-3); font-family: var(--mono); letter-spacing: 0.06em; }
.lang button.on { background: var(--ink); color: var(--bg); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; font-size: 13px; border-radius: 999px;
  border: 1px solid var(--button); background: var(--button); color: var(--button-ink);
  transition: transform .15s ease, background .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn .arrow { display: inline-block; transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Hero */
.hero {
  position: relative;
  border-bottom: 1px solid var(--rule);
  padding: 24px var(--pad-x) 64px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(212,0,26,0.04) 0%, transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 79px, var(--rule) 79px 80px),
    repeating-linear-gradient(90deg, transparent 0 79px, var(--rule) 79px 80px),
    var(--bg);
  background-blend-mode: normal, normal, normal, normal;
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  align-items: end;
  min-height: 76vh;
}
.hero-eyebrow { grid-column: 1 / span 12; display: flex; gap: 24px; align-items: center; padding-top: 24px; color: var(--ink-3); }
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.85); } }

.hero h1 {
  grid-column: 1 / span 12;
  font-family: var(--title);
  font-size: clamp(48px, 9.5vw, 168px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  font-weight: 900;
  margin: 0;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--accent); font-style: italic; font-weight: 400; }
.hero h1 .strike { display: inline-block; position: relative; }
.hero-meta {
  grid-column: 1 / span 12;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  margin-top: 24px;
}
.hero-meta .lede { grid-column: span 6; font-size: clamp(16px, 1.4vw, 20px); color: var(--ink-2); max-width: 56ch; line-height: 1.5; }
.hero-meta .stats { grid-column: span 6; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat { border-left: 1px solid var(--rule); padding-left: 14px; }
.stat .v { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.02em; font-weight: 500; }
.stat .l { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; grid-column: 1 / span 12; }

/* corner ticks */
.corner-ticks {
  position: absolute; inset: 12px var(--pad-x);
  pointer-events: none;
}
.corner-ticks span {
  position: absolute; width: 10px; height: 10px;
  border-color: var(--ink); border-style: solid;
}
.corner-ticks span.tl { top: 0; left: 0; border-width: 1px 0 0 1px; }
.corner-ticks span.tr { top: 0; right: 0; border-width: 1px 1px 0 0; }
.corner-ticks span.bl { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.corner-ticks span.br { bottom: 0; right: 0; border-width: 0 1px 1px 0; }

/* Marquee ticker */
.ticker {
  display: flex; gap: 64px; align-items: center;
  border-block: 1px solid var(--rule);
  padding-block: 18px;
  overflow: hidden;
  background: var(--bg-elev);
}
.ticker-track {
  display: flex; gap: 64px; align-items: center;
  flex-shrink: 0; min-width: 100%;
  animation: marquee 38s linear infinite;
}
.ticker-track .item { display: flex; align-items: center; gap: 12px; color: var(--ink-2); white-space: nowrap; }
.ticker-track .item .mono { color: var(--ink-3); }
@keyframes marquee {
  to { transform: translateX(-100%); }
}

/* Capabilities */
.caps {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--rule);
}
.cap {
  grid-column: span 4;
  padding: 28px;
  border-right: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  background: var(--bg);
  position: relative;
  cursor: pointer;
  transition: background .25s ease;
  min-height: 280px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.cap:hover { background: var(--bg-elev); }
.cap:nth-child(3n) { border-right: 0; }
.cap .num { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; }
.cap h3 { font-family: var(--title); font-size: 24px; font-weight: 700; letter-spacing: -0.015em; margin: 12px 0 0; line-height: 1.15; max-width: 22ch; }
.cap p { color: var(--ink-2); font-size: 14px; line-height: 1.5; margin: 16px 0 0; max-width: 38ch; }
.cap .bullets { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 6px; }
.cap .bullets li { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; }
.cap .bullets li::before { content: "→ "; color: var(--accent); }
.cap .arrow-r { position: absolute; top: 28px; right: 28px; opacity: 0; transform: translateX(-4px); transition: all .25s ease; }
.cap:hover .arrow-r { opacity: 1; transform: translateX(0); }

/* Process */
.process {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--rule);
}
.process-intro { grid-column: 1 / span 4; padding: 56px 28px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 16px; }
.process-intro p { color: var(--ink-2); font-size: 16px; max-width: 38ch; line-height: 1.5; margin: 0; }
.process-steps { grid-column: 5 / span 8; display: flex; flex-direction: column; position: relative; z-index: 1; }
.process { position: relative; overflow: hidden; }
.process-intro { position: relative; z-index: 1; }
.process-broll {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 33.3333%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.55;
  filter: grayscale(0.5) contrast(1.05);
  pointer-events: none;
  mix-blend-mode: multiply;
  /* Diagonal ellipse: vertices land exactly at TL & BR corners. Major-axis solid plateau extends most of the way out; only the last ~25% feathers to transparent at the corners. */
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 100 100'><defs><radialGradient id='g' cx='50' cy='50' r='70.71' gradientUnits='userSpaceOnUse' gradientTransform='rotate(45 50 50) translate(50 50) scale(1 0.784) translate(-50 -50)'><stop offset='0%25' stop-color='white' stop-opacity='1'/><stop offset='65%25' stop-color='white' stop-opacity='1'/><stop offset='100%25' stop-color='white' stop-opacity='0'/></radialGradient></defs><rect width='100' height='100' fill='url(%23g)'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 100 100'><defs><radialGradient id='g' cx='50' cy='50' r='70.71' gradientUnits='userSpaceOnUse' gradientTransform='rotate(45 50 50) translate(50 50) scale(1 0.784) translate(-50 -50)'><stop offset='0%25' stop-color='white' stop-opacity='1'/><stop offset='65%25' stop-color='white' stop-opacity='1'/><stop offset='100%25' stop-color='white' stop-opacity='0'/></radialGradient></defs><rect width='100' height='100' fill='url(%23g)'/></svg>");
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  transform: none;
}
.process-broll-fade { display: none; }
[data-theme="dark"] .process-broll { mix-blend-mode: screen; opacity: 0.28; }
.step {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 24px;
  align-items: start;
  padding: 28px;
  border-bottom: 1px solid var(--rule);
  transition: background .2s ease;
  position: relative;
}
.step:last-child { border-bottom: 0; }
.step:hover { background: var(--bg-elev); }
.step .stepnum {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  padding-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.step .stepnum::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
  margin-top: 6px;
}
.step h3 { font-family: var(--title); margin: 0 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -0.015em; }
.step p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; max-width: 56ch; }
.step .duration { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.06em; padding-top: 6px; white-space: nowrap; }

/* Industries */
.industries {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--rule);
}
.ind {
  grid-column: span 3;
  border-right: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
  padding: 32px 24px;
  position: relative;
  min-height: 220px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--bg);
  transition: background .2s ease;
}
.ind:hover { background: var(--bg-elev); }
.ind:nth-child(4n) { border-right: 0; }
.ind .glyph { width: 64px; height: 64px; }
.ind h4 { font-family: var(--title); margin: 24px 0 6px; font-size: 18px; font-weight: 700; letter-spacing: -0.015em; }
.ind .meta { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }

/* Projects */
.projects { border-bottom: 1px solid var(--rule); }
.project {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
  padding: 32px var(--pad-x);
  border-top: 1px solid var(--rule);
  align-items: stretch;
  position: relative;
  cursor: pointer;
  transition: background .2s ease;
}
.project:hover { background: var(--bg-elev); }
.project .idx { grid-column: 1 / span 1; font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; padding-top: 6px; }
.project .title { grid-column: 2 / span 5; }
.project .title .client { font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; }
.project .title h3 { font-family: var(--title); margin: 8px 0 0; font-size: clamp(22px, 2.4vw, 32px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.project .scope { grid-column: 7 / span 3; display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.project .scope span { font-family: var(--mono); font-size: 11px; color: var(--ink-2); letter-spacing: 0.04em; text-transform: uppercase; }
.project .scope span::before { content: "▪ "; color: var(--accent); margin-right: 4px; }
.project .preview {
  grid-column: 10 / span 3;
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(135deg, var(--rule) 0 1px, transparent 1px 10px),
    var(--bg-elev);
  border: 1px solid var(--rule);
  display: flex; align-items: end; justify-content: space-between; padding: 12px;
  font-family: var(--mono); font-size: 10px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.project .preview .label { background: var(--bg); padding: 4px 8px; }

/* CTA + Contact */
.cta {
  position: relative;
  padding: clamp(64px, 12vw, 160px) var(--pad-x);
  border-bottom: 1px solid var(--rule);
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
}
.cta-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter);
  align-items: end;
}
.cta h2 {
  grid-column: 1 / span 12;
  font-family: var(--title);
  font-size: clamp(40px, 7vw, 120px); line-height: 0.92; letter-spacing: -0.035em;
  font-weight: 900; margin: 0; text-wrap: balance;
}
.cta h2 .accent { color: var(--accent); font-style: italic; font-weight: 400; }
.cta-row { grid-column: 1 / span 12; display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); margin-top: 48px; padding-top: 32px; border-top: 1px solid color-mix(in oklch, var(--bg) 22%, transparent); }
.cta-row .col { grid-column: span 3; }
.cta-row .col .l { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; opacity: .6; margin-bottom: 8px; }
.cta-row .col .v { font-size: 16px; }
.cta-row .col .v a:hover { color: var(--accent); }
.cta-row .actions { grid-column: span 3; display: flex; justify-content: flex-end; align-items: end; }

.cta .bg-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.08;
  background-image:
    linear-gradient(to right, var(--bg) 1px, transparent 1px),
    linear-gradient(to bottom, var(--bg) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* Footer */
.footer {
  padding: 32px var(--pad-x);
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase;
}
.footer .links { display: flex; gap: 24px; }

/* nav dropdown */
.has-dd { position: relative; }
.dd-trigger { background: transparent; border: 0; padding: 6px 0; font-size: 13px; color: var(--ink-2); font-family: inherit; display: inline-flex; align-items: center; }
.dd-trigger:hover, .dd-trigger.active { color: var(--ink); }
.dd-menu {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
  background: var(--bg); border: 1px solid var(--rule);
  min-width: 220px; padding: 6px; display: flex; flex-direction: column;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08); z-index: 60;
}
.dd-menu a {
  padding: 10px 12px; font-size: 13px; color: var(--ink); white-space: nowrap;
  border-radius: 2px;
}
.dd-menu a:hover { background: var(--bg-elev); color: var(--accent); }
.diagram { color: var(--accent); z-index: 0; opacity: 0.35; }
.hero-grid { position: relative; z-index: 1; }
.diagram {
  position: absolute; right: var(--pad-x); top: 96px; bottom: 96px; width: clamp(180px, 22vw, 320px);
  pointer-events: none;
  display: flex; flex-direction: column; gap: 16px; align-items: end;
}
.diagram .dline { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.06em; text-transform: uppercase; display: flex; gap: 8px; align-items: center; }
.diagram .dline .v { color: var(--ink); }
.diagram svg { width: 100%; height: auto; }

@media (max-width: 900px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav .links { display: none; }
  .hero h1 { font-size: clamp(40px, 13vw, 96px); }
  .hero-meta .lede, .hero-meta .stats { grid-column: span 12; }
  .cap { grid-column: span 12; border-right: 0; }
  .ind { grid-column: span 6; }
  .ind:nth-child(4n) { border-right: 1px solid var(--rule); }
  .ind:nth-child(2n) { border-right: 0; }
  .process-intro, .process-steps { grid-column: 1 / -1; }
  .process-intro { border-right: 0; border-bottom: 1px solid var(--rule); }
  .project { grid-template-columns: repeat(6, 1fr); }
  .project .idx { grid-column: 1 / span 1; }
  .project .title { grid-column: 2 / span 5; }
  .project .scope { grid-column: 1 / span 6; flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .project .preview { grid-column: 1 / span 6; aspect-ratio: 16 / 9; }
  .diagram { display: none; }
  .cta-row .col, .cta-row .actions { grid-column: span 6; }
}
