/* ==========================================================================
   ADURIC.COM — DESIGN TOKENS
   System font stack only: zero font requests, zero font-swap CLS. That is
   a deliberate performance decision, not an oversight — see /about/.
   ========================================================================== */

:root {
  --ink-950: #05070A;
  --ink-900: #0A0E14;
  --ink-800: #12171F;
  --ink-700: #1B222D;
  --ink-600: #29323F;
  --ink-500: #465162;
  --ink-400: #6B7787;
  --ink-300: #9AA5B1;
  --ink-200: #C7CED6;
  --ink-100: #E6E9ED;
  --ink-50:  #F5F6F8;
  --white:   #FFFFFF;

  --acc-700: #0F766E;
  --acc-600: #14A897;
  --acc-500: #2DD4BF;
  --acc-400: #5EEAD4;
  --acc-300: #99F6E9;
  --acc-100: #D3FBF4;

  --warn: #F5A524;
  --err:  #F0654A;
  --ok:   #4ADE80;

  --bg:          var(--ink-950);
  --bg-raised:   var(--ink-900);
  --bg-card:     var(--ink-800);
  --fg:          var(--ink-100);
  --fg-strong:   var(--white);
  --fg-muted:    var(--ink-300);
  --fg-faint:    var(--ink-400);
  --line:        var(--ink-700);
  --line-strong: var(--ink-600);
  --link:        var(--acc-400);

  --ff-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, Roboto, Helvetica, Arial, sans-serif;
  --ff-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Consolas", Menlo, monospace;

  --fs-display: clamp(2.5rem, 1.2rem + 5.8vw, 5rem);
  --fs-h1:      clamp(2.1rem, 1.3rem + 3.4vw, 3.4rem);
  --fs-h2:      clamp(1.65rem, 1.25rem + 1.8vw, 2.4rem);
  --fs-h3:      clamp(1.2rem, 1.05rem + 0.65vw, 1.5rem);
  --fs-lead:    clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
  --fs-body:    1.0625rem;
  --fs-sm:      0.9375rem;
  --fs-xs:      0.8125rem;
  --fs-label:   0.75rem;

  --lh-tight: 1.06;
  --lh-head:  1.15;
  --lh-body:  1.64;

  --tr-tight: -0.03em;
  --tr-head:  -0.02em;
  --tr-label: 0.12em;

  --sp-section: clamp(4rem, 2.6rem + 5.6vw, 8rem);
  --sp-section-s: clamp(2.5rem, 1.8rem + 2.8vw, 4.5rem);
  --gutter: clamp(1.25rem, 0.8rem + 1.8vw, 2.5rem);
  --maxw: 1200px;
  --maxw-narrow: 780px;
  --maxw-text: 66ch;
  --header-h: 68px;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;
  --hair: 1px solid var(--line);

  --sh-md: 0 2px 4px rgba(0,0,0,.2), 0 12px 30px -12px rgba(0,0,0,.5);

  --ease: cubic-bezier(.22,1,.36,1);
  --dur-fast: 150ms;
  --dur: 300ms;

  --z-header: 60;
  --z-consent: 90;
}

@media (max-width: 640px) {
  :root { --header-h: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur: 0ms; }
}

/* ==========================================================================
   BASE
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}
img, svg, video { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-weight: 650; color: var(--fg-strong); margin: 0 0 0.5em; line-height: var(--lh-head); letter-spacing: var(--tr-head); }
h1 { font-size: var(--fs-h1); letter-spacing: var(--tr-tight); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; color: var(--fg); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--acc-400); outline-offset: 2px; border-radius: 4px; }
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: var(--maxw-narrow); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--acc-400); color: var(--ink-950); padding: .75em 1.25em;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }
[hidden] { display: none !important; }

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

.eyebrow {
  display: inline-block; font-size: var(--fs-label); font-weight: 700;
  letter-spacing: var(--tr-label); text-transform: uppercase; color: var(--acc-400);
  margin-bottom: .75em;
}
.lead { font-size: var(--fs-lead); color: var(--fg-muted); max-width: var(--maxw-text); }

.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  padding: .85em 1.5em; border-radius: var(--r-pill); font-weight: 600;
  font-size: var(--fs-sm); border: var(--hair); transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--acc-400); color: var(--ink-950); border-color: var(--acc-400); }
.btn-primary:hover { background: var(--acc-300); border-color: var(--acc-300); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--acc-400); color: var(--acc-300); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header); height: var(--header-h);
  display: flex; align-items: center; background: rgba(5,7,10,.82); backdrop-filter: blur(10px);
  border-bottom: var(--hair);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.logo { font-weight: 700; font-size: 1.05rem; color: var(--fg-strong); letter-spacing: var(--tr-tight); }
.logo:hover { text-decoration: none; color: var(--acc-300); }
.nav { display: flex; align-items: center; gap: clamp(1.1rem, .6rem + 1.2vw, 2rem); }
.nav a { color: var(--fg-muted); font-size: var(--fs-sm); font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg-strong); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; padding: .5em; }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 auto; width: min(78vw, 320px);
    background: var(--bg-raised); border-left: var(--hair); flex-direction: column;
    align-items: flex-start; padding: 2rem var(--gutter); gap: 1.5rem;
    transform: translateX(100%); transition: transform var(--dur) var(--ease);
  }
  .nav[data-open="true"] { transform: translateX(0); }
  .nav a { font-size: 1.05rem; }
}

/* Hero */
.hero { padding-block: clamp(3.5rem, 2.5rem + 4vw, 6.5rem) var(--sp-section-s); }
.hero h1 { max-width: 16ch; }
.hero-ctas { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

/* Stat strip */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: var(--hair); border-radius: var(--r-lg); overflow: hidden;
}
.stat-strip .stat { background: var(--bg-raised); padding: 1.5rem 1.25rem; }
.stat .value { display: block; font-family: var(--ff-mono); font-size: clamp(1.15rem, 1rem + .7vw, 1.6rem); font-weight: 600; color: var(--acc-300); letter-spacing: -0.01em; }
.stat .label { display: block; font-size: var(--fs-xs); color: var(--fg-muted); margin-top: .35em; }
@media (max-width: 760px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }

/* Section */
.section { padding-block: var(--sp-section); }
.section-s { padding-block: var(--sp-section-s); }
.section-alt { background: var(--bg-raised); }
.section-head { max-width: var(--maxw-text); margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem); }

/* Case study cards (home grid) */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, .6rem + 1.6vw, 1.75rem); }
@media (max-width: 820px) { .work-grid { grid-template-columns: 1fr; } }

.work-card {
  display: flex; flex-direction: column; background: var(--bg-card); border: var(--hair);
  border-radius: var(--r-lg); overflow: hidden; transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.work-card:hover { border-color: var(--line-strong); transform: translateY(-3px); text-decoration: none; }
.work-card .shot-wrap { aspect-ratio: 16/10; overflow: hidden; background: var(--ink-800); border-bottom: var(--hair); }
.work-card .shot-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 500ms var(--ease); }
.work-card:hover .shot-wrap img { transform: scale(1.035); }
.work-card .body { padding: 1.5rem; }
.work-card .kicker { display: block; font-size: var(--fs-xs); color: var(--fg-faint); font-weight: 600; letter-spacing: var(--tr-label); text-transform: uppercase; margin-bottom: .6em; }
.work-card h3 { font-size: 1.2rem; margin-bottom: .35em; }
.work-card p { color: var(--fg-muted); font-size: var(--fs-sm); margin: 0; }

/* Process list */
.process-list { display: grid; gap: 1px; background: var(--line); border: var(--hair); border-radius: var(--r-lg); overflow: hidden; }
.process-item { background: var(--bg-raised); padding: 1.5rem clamp(1.25rem, 1rem + 1vw, 2rem); display: flex; gap: 1.25rem; }
.process-item .num { font-family: var(--ff-mono); color: var(--acc-400); font-weight: 600; flex: none; }
.process-item p { color: var(--fg-muted); margin: 0; font-size: var(--fs-sm); }

/* Testimonials */
.testi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 820px) { .testi-grid { grid-template-columns: 1fr; } }
.testi-card { background: var(--bg-card); border: var(--hair); border-radius: var(--r-lg); padding: clamp(1.5rem, 1.2rem + 1vw, 2.25rem); display: flex; flex-direction: column; }
.testi-card blockquote { margin: 0 0 1.25rem; font-size: var(--fs-sm); color: var(--fg); }
.testi-card .who { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5em; }
.testi-card .who strong { color: var(--fg-strong); font-size: var(--fs-sm); }
.testi-card .who span { color: var(--fg-muted); font-size: var(--fs-xs); }
.testi-card .note { display: block; font-size: 0.7rem; color: var(--fg-faint); margin-top: .5em; font-style: italic; }

/* Case study page */
.study-hero { padding-block: clamp(2.5rem, 2rem + 2vw, 4rem) var(--sp-section-s); }
.study-meta { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin-top: 1.5rem; font-size: var(--fs-sm); color: var(--fg-muted); }
.study-meta a { color: var(--acc-300); }
.study-shot { border-radius: var(--r-lg); overflow: hidden; border: var(--hair); margin-top: 2rem; }
.study-video { border-radius: var(--r-lg); overflow: hidden; border: var(--hair); margin: 2rem 0; }
.study-video video { width: 100%; display: block; }

.prose { max-width: var(--maxw-text); }
.prose p { color: var(--fg-muted); }
.prose h3 { margin-top: 0; }

.what-i-did { display: grid; gap: 1.25rem; margin: 1.5rem 0 2.5rem; }
.what-i-did .item { padding-left: 1.25rem; border-left: 2px solid var(--acc-700); }
.what-i-did .item h4 { font-size: 1.02rem; color: var(--fg-strong); margin: 0 0 .4em; }
.what-i-did .item p { margin: 0; color: var(--fg-muted); font-size: var(--fs-sm); }

.compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line);
  border: var(--hair); border-radius: var(--r-lg); overflow: hidden; margin: 2rem 0;
}
.compare > div { background: var(--bg-raised); padding: 1.75rem; text-align: center; }
.compare .tag { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: var(--tr-label); color: var(--fg-faint); font-weight: 600; }
.compare .num { font-family: var(--ff-mono); font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.2rem); font-weight: 700; margin-top: .35em; }
.compare .before .num { color: var(--err); }
.compare .after .num { color: var(--ok); }
.compare-bar-wrap { margin: 2rem 0; }
.compare-bar { height: 34px; border-radius: var(--r-sm); background: var(--ink-800); overflow: hidden; border: var(--hair); position: relative; margin-bottom: .6rem; }
.compare-bar > span { display: block; height: 100%; border-radius: var(--r-sm); }
.compare-bar.before-bar > span { background: var(--err); }
.compare-bar.after-bar > span { background: var(--ok); }
.compare-bar-label { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--fg-muted); font-family: var(--ff-mono); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: var(--hair); border-radius: var(--r-lg); overflow: hidden; margin: 2rem 0; }
.stat-row .cell { background: var(--bg-raised); padding: 1.5rem 1.1rem; }
.stat-row .cell .value { font-family: var(--ff-mono); font-weight: 700; color: var(--acc-300); font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem); }
.stat-row .cell .label { color: var(--fg-muted); font-size: var(--fs-xs); margin-top: .4em; }
@media (max-width: 760px) { .stat-row { grid-template-columns: 1fr; } }

.callout { border: var(--hair); border-left: 3px solid var(--warn); border-radius: var(--r-md); padding: 1.25rem 1.5rem; background: var(--bg-card); margin: 2rem 0; }
.callout .eyebrow { color: var(--warn); }
.callout p:last-child { margin: 0; }

.placeholder-block { border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 1.1rem 1.4rem; color: var(--fg-faint); font-size: var(--fs-sm); margin: 2rem 0; }

.grid-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: var(--hair); border-radius: var(--r-lg); overflow: hidden; margin: 2rem 0; }
.grid-thumbs img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
@media (max-width: 700px) { .grid-thumbs { grid-template-columns: repeat(2, 1fr); } }

.study-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: var(--sp-section-s); padding-top: 2rem; border-top: var(--hair); flex-wrap: wrap; }
.study-nav a { font-size: var(--fs-sm); }

/* About page */
.facts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: var(--hair); border-radius: var(--r-lg); overflow: hidden; margin: 2rem 0; }
.facts-grid .cell { background: var(--bg-raised); padding: 1.1rem 1.4rem; }
.facts-grid .cell .label { font-size: var(--fs-xs); color: var(--fg-faint); text-transform: uppercase; letter-spacing: var(--tr-label); }
.facts-grid .cell .value { margin-top: .3em; color: var(--fg); font-size: var(--fs-sm); }
@media (max-width: 700px) { .facts-grid { grid-template-columns: 1fr; } }

.timeline { display: grid; gap: 0; margin-top: 1rem; }
.tl-item { display: grid; grid-template-columns: 140px 1fr; gap: 1.5rem; padding: 1.5rem 0; border-top: var(--hair); }
.tl-item:first-child { border-top: none; }
.tl-item .period { font-family: var(--ff-mono); color: var(--acc-400); font-size: var(--fs-sm); }
.tl-item h4 { margin: 0 0 .4em; font-size: 1.05rem; }
.tl-item p { margin: 0; color: var(--fg-muted); font-size: var(--fs-sm); }
@media (max-width: 640px) { .tl-item { grid-template-columns: 1fr; gap: .4rem; } }

.tech-groups { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.tech-groups .g { display: grid; grid-template-columns: 160px 1fr; gap: 1rem; padding-bottom: 1.25rem; border-bottom: var(--hair); }
.tech-groups .g:last-child { border-bottom: none; }
.tech-groups .g .label { font-weight: 600; color: var(--fg-strong); font-size: var(--fs-sm); }
.tech-groups .g .items { color: var(--fg-muted); font-size: var(--fs-sm); }
@media (max-width: 640px) { .tech-groups .g { grid-template-columns: 1fr; gap: .3rem; } }

/* Contact form */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 1.5rem + 2vw, 4rem); align-items: start; }
@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: .5em; color: var(--fg); }
.field input, .field textarea {
  width: 100%; background: var(--bg-card); border: var(--hair); border-radius: var(--r-sm);
  padding: .8em 1em; color: var(--fg); font-size: var(--fs-body); transition: border-color var(--dur-fast) var(--ease);
}
.field input:focus, .field textarea:focus { border-color: var(--acc-400); outline: none; }
.field textarea { min-height: 140px; resize: vertical; }
.form-status { margin-top: 1rem; font-size: var(--fs-sm); }
.form-status[data-state="ok"] { color: var(--ok); }
.form-status[data-state="err"] { color: var(--err); }
.contact-email { font-family: var(--ff-mono); font-size: 1.15rem; color: var(--acc-300); }

/* Footer */
.site-footer { border-top: var(--hair); padding-block: 2.5rem; background: var(--bg-raised); }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; align-items: center; }
.site-footer p { margin: 0; color: var(--fg-faint); font-size: var(--fs-xs); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--fg-muted); font-size: var(--fs-xs); }

/* Consent banner */
.consent-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: var(--z-consent);
  max-width: 560px; margin-inline: auto; background: var(--bg-card); border: var(--hair);
  border-radius: var(--r-lg); padding: 1.25rem 1.5rem; box-shadow: var(--sh-md);
}
.consent-banner p { font-size: var(--fs-sm); color: var(--fg-muted); margin: 0 0 1rem; }
.consent-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.consent-actions .btn { padding: .6em 1.2em; font-size: var(--fs-xs); }

/* Reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 560ms var(--ease), transform 560ms var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* 404 */
.error-page { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; }
