/* ==========================================================================
   AKRO — "Engineered for motion"
   Design tokens
   ========================================================================== */

:root {
  /* Color */
  --bg:            #0B0C0E;
  --bg-panel:      #131419;
  --bg-raised:     #1A1C22;
  --line:          #2A2C33;
  --line-strong:   #3C3F48;
  --text:          #F2F3F5;
  --text-muted:    #9498A3;
  --text-faint:    #5C606B;
  --accent:        #FF5A1F;   /* kinetic orange — motion, energy, CTA */
  --accent-soft:   rgba(255, 90, 31, 0.14);
  --engineer:      #4D6BFF;   /* precision blue — grid, structure, data */
  --engineer-soft: rgba(77, 107, 255, 0.14);
  --ok:            #F2F3F5;

  /* Type */
  --font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2:  clamp(1.6rem, 1.4rem + 0.9vw, 2.1rem);
  --step-3:  clamp(2.2rem, 1.8rem + 1.8vw, 3.2rem);
  --step-4:  clamp(2.8rem, 2.1rem + 3.2vw, 4.6rem);
  --step-5:  clamp(3.4rem, 2.3rem + 5vw, 6.2rem);

  /* Layout */
  --maxw: 1240px;
  --gutter: 6vw;
  --border-radius: 0px;
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body, h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

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

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Background grid — the recurring "engineering" motif */
.grid-field {
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  opacity: 0.35;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 12, 14, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.logo svg { width: 26px; height: 26px; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 1px;
  background: var(--text);
  position: relative;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  font-size: var(--step--1);
  color: var(--text-muted);
}
.main-nav a { padding: 6px 2px; border-bottom: 1px solid transparent; transition: color 0.2s ease, border-color 0.2s ease; }
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--text); border-color: var(--accent); }

.nav-cta {
  border: 1px solid var(--line-strong);
  padding: 9px 18px;
  font-size: var(--step--1);
  color: var(--text) !important;
  border-bottom: none !important;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav-cta:hover { border-color: var(--accent); background: var(--accent-soft); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed;
    inset: 76px 0 0 0;
    background: var(--bg);
    padding: 32px var(--gutter);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .main-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 22px; font-size: var(--step-1); }
  body.nav-open .nav-toggle span { transform: rotate(45deg); }
  body.nav-open .nav-toggle span::before { top: 0; transform: rotate(0deg); opacity: 0; }
  body.nav-open .nav-toggle span::after { top: 0; transform: rotate(90deg); }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  border: 1px solid var(--line-strong);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #100701; }
.btn-primary:hover { background: #ff6c38; transform: translateY(-1px); }
.btn-secondary { color: var(--text); }
.btn-secondary:hover { border-color: var(--text); background: var(--bg-raised); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ==========================================================================
   Section rhythm
   ========================================================================== */

.section { padding-block: clamp(64px, 10vw, 128px); border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  margin-bottom: clamp(36px, 5vw, 64px);
  align-items: end;
}
.section-head h2 { font-size: var(--step-3); max-width: 14ch; }
.section-head .lede { color: var(--text-muted); max-width: 46ch; font-size: var(--step-0); }
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; gap: 18px; }
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: var(--step--1);
  color: var(--engineer);
  margin-bottom: 16px;
}
.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--engineer);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-top: clamp(56px, 9vw, 96px);
  padding-bottom: clamp(64px, 9vw, 110px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero .grid-field { position: absolute; inset: 0; z-index: 0; mask-image: linear-gradient(to bottom, black, transparent 85%); }
.hero .container { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 {
  font-size: var(--step-5);
  max-width: 12ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero .lede { margin-top: 22px; max-width: 42ch; color: var(--text-muted); font-size: var(--step-1); }
.hero .btn-row { margin-top: 34px; }

.hero-figure { position: relative; }
.hero-figure svg { width: 100%; height: auto; }

/* Page header (non-home) */
.page-header {
  padding-top: clamp(52px, 8vw, 80px);
  padding-bottom: clamp(40px, 6vw, 64px);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-header .grid-field { position: absolute; inset: 0; mask-image: linear-gradient(to bottom, black, transparent 90%); }
.page-header .container { position: relative; z-index: 1; }
.page-header h1 { font-size: var(--step-4); max-width: 16ch; }
.page-header .lede { margin-top: 18px; max-width: 56ch; color: var(--text-muted); font-size: var(--step-1); }

/* ==========================================================================
   Motion Score panel
   ========================================================================== */

.score-panel {
  border: 1px solid var(--line-strong);
  background: var(--bg-panel);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%);
  padding: clamp(22px, 3vw, 34px);
  position: relative;
}
.score-panel .score-label {
  font-size: var(--step--1);
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.score-panel .score-value {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.4rem);
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}
.score-panel .score-value span { font-size: var(--step-1); color: var(--text-faint); font-weight: 500; }
.score-panel .score-bars { display: flex; gap: 4px; margin-top: 18px; height: 46px; align-items: flex-end; }
.score-panel .score-bars i {
  flex: 1;
  background: var(--line-strong);
  display: block;
}
.score-panel .score-bars i.is-active { background: var(--accent); }

/* ==========================================================================
   Value / feature blocks
   ========================================================================== */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.block {
  background: var(--bg);
  padding: clamp(26px, 3vw, 36px);
}
.block .num { font-family: var(--font-display); color: var(--text-faint); font-size: var(--step--1); margin-bottom: 18px; }
.block h3 { font-size: var(--step-1); margin-bottom: 12px; }
.block p { color: var(--text-muted); font-size: var(--step--1); }

/* ==========================================================================
   Split rows (image/text alternating)
   ========================================================================== */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 6vw, 80px);
  align-items: center;
}
.split.reverse .split-figure { order: 2; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse .split-figure { order: 0; }
}
.split-figure {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  padding: clamp(20px, 3vw, 40px);
}
.split-body h2, .split-body h3 { font-size: var(--step-2); margin-bottom: 16px; }
.split-body p { color: var(--text-muted); margin-bottom: 14px; }
.split-body .btn { margin-top: 10px; }

/* ==========================================================================
   Stats row
   ========================================================================== */

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 760px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--bg);
  padding: 26px;
}
.stat .n { font-family: var(--font-display); font-size: var(--step-3); color: var(--accent); font-variant-numeric: tabular-nums; }
.stat .l { color: var(--text-muted); font-size: var(--step--1); margin-top: 6px; }

/* ==========================================================================
   Lists (specs, included items)
   ========================================================================== */

.spec-list { border-top: 1px solid var(--line); }
.spec-list li {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.spec-list li .term { color: var(--text-muted); font-size: var(--step--1); }
.spec-list li .desc { font-size: var(--step-0); }
@media (max-width: 620px) { .spec-list li { grid-template-columns: 1fr; gap: 6px; } }

.check-list li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.check-list li svg { flex: none; margin-top: 3px; }
.check-list li strong { display: block; margin-bottom: 3px; }
.check-list li span { color: var(--text-muted); font-size: var(--step--1); }

/* ==========================================================================
   Colour / type / logo swatches (brand system page)
   ========================================================================== */

.swatch-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 760px) { .swatch-row { grid-template-columns: repeat(2, 1fr); } }
.swatch { background: var(--bg); }
.swatch .fill { height: 96px; }
.swatch .meta { padding: 14px 16px; font-size: var(--step--1); }
.swatch .meta .name { font-family: var(--font-display); }
.swatch .meta .hex { color: var(--text-muted); }

.type-sample { border-bottom: 1px solid var(--line); padding: 26px 0; display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: baseline; }
.type-sample .role { color: var(--text-muted); font-size: var(--step--1); }
@media (max-width: 620px) { .type-sample { grid-template-columns: 1fr; gap: 6px; } }

.logo-lockup {
  border: 1px solid var(--line);
  background: var(--bg-panel);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 6vw, 70px);
}
.logo-lockup.on-light { background: #EDEEF0; }
.logo-lockup.on-light svg .mark-fg { fill: #0B0C0E; }
.logo-lockup.on-light .lockup-word { color: #0B0C0E; }
.lockup-word { font-family: var(--font-display); font-weight: 700; margin-left: 14px; font-size: 1.4rem; }
.logo-lockup .row { display: flex; align-items: center; }
.logo-lockup svg { width: 56px; height: 56px; }

.icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 760px) { .icon-grid { grid-template-columns: repeat(3, 1fr); } }
.icon-grid .cell { background: var(--bg); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.icon-grid .cell svg { width: 28px; height: 28px; stroke: var(--text); }

/* ==========================================================================
   Cards (industries / solutions)
   ========================================================================== */

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }
.card { background: var(--bg); padding: clamp(26px, 3vw, 34px); display: flex; flex-direction: column; gap: 14px; transition: background 0.2s ease; }
.card:hover { background: var(--bg-panel); }
.card svg { width: 30px; height: 30px; stroke: var(--engineer); }
.card h3 { font-size: var(--step-1); }
.card p { color: var(--text-muted); font-size: var(--step--1); }
.card .tag { font-size: var(--step--1); color: var(--text-faint); margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }

/* ==========================================================================
   Quote / story block
   ========================================================================== */

.pull-quote {
  font-family: var(--font-display);
  font-size: var(--step-2);
  max-width: 22ch;
  line-height: 1.25;
  border-left: 2px solid var(--accent);
  padding-left: clamp(20px, 3vw, 34px);
}
.pull-quote cite { display: block; margin-top: 20px; font-family: var(--font-body); font-size: var(--step--1); color: var(--text-muted); font-style: normal; }

/* ==========================================================================
   Timeline (about / brand story)
   ========================================================================== */

.timeline { position: relative; padding-left: 30px; border-left: 1px solid var(--line); }
.timeline-item { position: relative; padding-bottom: 44px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -35px;
  top: 4px;
  width: 9px;
  height: 9px;
  background: var(--accent);
}
.timeline-item .year { font-family: var(--font-display); color: var(--text-muted); font-size: var(--step--1); margin-bottom: 8px; }
.timeline-item h3 { font-size: var(--step-1); margin-bottom: 8px; }
.timeline-item p { color: var(--text-muted); max-width: 60ch; }

/* ==========================================================================
   Gallery (explore page)
   ========================================================================== */

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .gallery { grid-template-columns: 1fr; } }
.gallery figure { background: var(--bg-panel); aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px 16px;
  font-size: var(--step--1);
  color: var(--text-muted);
  background: linear-gradient(to top, rgba(11,12,14,0.9), transparent);
}
.gallery svg { width: 60%; height: 60%; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-panel { border: 1px solid var(--line); background: var(--bg-panel); padding: clamp(24px, 4vw, 44px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .field-full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

.field label { display: block; font-size: var(--step--1); color: var(--text-muted); margin-bottom: 8px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  padding: 13px 14px;
  color: var(--text);
  transition: border-color 0.2s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--accent); outline: none; }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: var(--step--1); color: var(--text-faint); margin-top: 16px; }

.form-status { padding: 14px 16px; border: 1px solid var(--line-strong); font-size: var(--step--1); margin-bottom: 22px; }
.form-status.success { border-color: var(--accent); color: var(--text); }
.form-status.error { border-color: #C74519; color: var(--text); }

/* ==========================================================================
   Contact info strip
   ========================================================================== */

.contact-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 48px; }
@media (max-width: 760px) { .contact-info { grid-template-columns: 1fr; } }
.contact-info .cell { background: var(--bg); padding: 24px; }
.contact-info .cell .l { color: var(--text-muted); font-size: var(--step--1); margin-bottom: 8px; }
.contact-info .cell .v { font-family: var(--font-display); font-size: var(--step-0); }

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta-band {
  padding-block: clamp(56px, 8vw, 96px);
  text-align: left;
  position: relative;
  overflow: hidden;
}
.cta-band .container { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { font-size: var(--step-3); max-width: 18ch; }
.cta-band .grid-field { position: absolute; inset: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { border-top: 1px solid var(--line); padding-block: 50px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 26px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font-size: var(--step--1); color: var(--text-muted); margin-bottom: 16px; font-weight: 500; }
.footer-grid ul li { margin-bottom: 10px; font-size: var(--step--1); }
.footer-grid ul a:hover { color: var(--accent); }
.footer-brand p { color: var(--text-muted); font-size: var(--step--1); margin-top: 14px; max-width: 32ch; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--text-faint); font-size: var(--step--1); }

/* ==========================================================================
   Reveal-on-load motion (single orchestrated moment)
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

.path-draw {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 2.4s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.dot-pulse { animation: pulse 2.6s ease-in-out infinite; transform-origin: center; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
  .path-draw { stroke-dashoffset: 0; animation: none; }
  .dot-pulse { animation: none; }
}
