/* =========================================================================
   3D05, Precision on Black
   Realizes the active Novamira design direction. Every colour below comes
   from the saved DESIGN.md palette.
   ========================================================================= */

/* ---------- Fonts (self-hosted, no external requests) ---------- */
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-var-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('../fonts/opensans-var.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0D0D0D;
  --surface: #1A1A1A;
  --panel: #2C2C2C;
  --ink: #FFFFFF;
  --muted: #D9D9D9;
  --accent: #3CB54A;
  --accent-lift: #4ACB59;
  --info: #2E8BC0;
  --energy: #C0392B;
  --hairline: #2C2C2C;

  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Open Sans', system-ui, sans-serif;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 28px;
  --space-lg: 56px;
  --space-xl: 96px;
  --space-section: 140px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --container: 1240px;
  --gutter: 32px;
  --measure: 66ch;
}

/* ---------- Reset (:where() so component rules always win) ---------- */
*, *::before, *::after { box-sizing: border-box; }

:where(body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol) {
  margin: 0;
  padding: 0;
}
:where(ul, ol) { list-style: none; }
:where(img, svg, video) { display: block; max-width: 100%; height: auto; }
:where(a) { color: inherit; text-decoration: none; }
:where(button, input, textarea, select) { font: inherit; color: inherit; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Type scale ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-weight: 800; font-size: clamp(2.5rem, 4.4vw, 3.9rem); }
h2 { font-weight: 700; font-size: clamp(2rem, 3.6vw, 3rem); letter-spacing: -0.015em; }
h3 { font-weight: 600; font-size: clamp(1.25rem, 1.8vw, 1.55rem); line-height: 1.15; letter-spacing: -0.01em; }
h4 { font-weight: 600; font-size: 1.05rem; line-height: 1.2; letter-spacing: 0; }

p { max-width: var(--measure); }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--muted); line-height: 1.6; }
.small { font-size: 0.9rem; line-height: 1.5; color: var(--muted); }

a.link { color: var(--info); }
a.link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--space-section); position: relative; }
.section--surface { background: var(--surface); }
.section--tight { padding-block: var(--space-xl); }

.rule { height: 1px; background: var(--hairline); border: 0; }
.rule--act { height: 2px; background: var(--accent); }

.section-head { max-width: 780px; margin-bottom: var(--space-lg); }
.section-head p { margin-top: var(--space-sm); }

/* ---------- Layer-line motif ---------- */
.layers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.028) 0px,
    rgba(255,255,255,0.028) 1px,
    transparent 1px,
    transparent 7px
  );
  mask-image: linear-gradient(to bottom, transparent, var(--ink) 22%, var(--ink) 78%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, var(--ink) 22%, var(--ink) 78%, transparent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 17px 30px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: #0D0D0D; }
.btn--primary:hover { background: var(--accent-lift); transform: translateY(1px); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--muted); }
.btn--secondary:hover { border-color: var(--ink); background: rgba(255,255,255,0.05); transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn[disabled] { opacity: .6; cursor: default; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }

/* ---------- Site header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(13,13,13,0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  height: 76px;
}
.site-logo img { height: 48px; width: auto; }
.site-logo__text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

/* Primary navigation lives in nav.css, which is enqueued after this file. */

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); }
.nav-toggle span + span { margin-top: 5px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: var(--space-xl);
  align-items: center;
  min-height: calc(100svh - 76px);
  padding-block: var(--space-xl);
}
.hero__content { position: relative; z-index: 2; max-width: 660px; }
.hero h1 { margin-bottom: var(--space-md); }
.hero h1 .accent { color: var(--accent); }
.hero .lede { margin-bottom: var(--space-lg); max-width: 50ch; }

.build {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
}
.build svg { width: 100%; height: 100%; overflow: visible; }

/* ---------- Capability bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-sm);
}
.tile {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}
.tile--wide { grid-column: span 4; }
.tile--half { grid-column: span 3; }
.tile--third { grid-column: span 2; }
.tile--tall { grid-column: span 2; min-height: 300px; }
.tile--feature {
  grid-column: span 4;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(60,181,74,0.16), transparent 62%),
    var(--surface);
  min-height: 300px;
  justify-content: flex-end;
}
.tile h3 { margin-bottom: 2px; }
.tile p { color: var(--muted); font-size: 0.96rem; max-width: 46ch; }

/* ---------- Process strata ---------- */
.steps { border-top: 1px solid var(--hairline); }
.step {
  display: grid;
  grid-template-columns: 88px 1fr 1.15fr;
  gap: var(--space-md);
  align-items: start;
  padding-block: var(--space-md);
  border-bottom: 1px solid var(--hairline);
  position: relative;
}
.step::before {
  content: "";
  position: absolute;
  left: 0; top: -1px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .5s cubic-bezier(.2,.7,.3,1);
}
.step:hover::before { width: 100%; }
.step__idx {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--panel);
  padding-top: 4px;
  transition: color .2s ease;
}
.step:hover .step__idx { color: var(--accent); }
.step p { color: var(--muted); }
.step h3 a:hover { color: var(--accent); }

/* ---------- Work gallery ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-sm);
}
.work {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--hairline);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.work--lg { grid-column: span 4; min-height: 420px; }
.work--sm { grid-column: span 2; min-height: 420px; }
.work--third { grid-column: span 2; min-height: 300px; }
.work img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work__scrim {
  position: relative;
  z-index: 2;
  padding: var(--space-md);
  background: linear-gradient(to top, rgba(13,13,13,0.92) 12%, rgba(13,13,13,0.55) 55%, transparent);
}
.work__scrim h3 { margin-bottom: 4px; }
.work__scrim p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* Declared local placeholders, composed like the final photograph and built
   only from palette colours. Replaced by real photography once selected. */
.work__ph {
  position: absolute;
  inset: 0;
  background-color: var(--surface);
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 9px),
    radial-gradient(120% 90% at 22% 12%, rgba(60,181,74,0.30), transparent 58%),
    linear-gradient(145deg, rgba(60,181,74,0.10), rgba(13,13,13,0.85) 62%);
}
.work__ph--b {
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 9px),
    radial-gradient(120% 90% at 78% 16%, rgba(46,139,192,0.32), transparent 58%),
    linear-gradient(145deg, rgba(46,139,192,0.12), rgba(13,13,13,0.85) 62%);
}
.work__ph--c {
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 9px),
    radial-gradient(110% 100% at 50% 8%, rgba(60,181,74,0.22), transparent 62%),
    linear-gradient(160deg, rgba(60,181,74,0.07), rgba(13,13,13,0.88) 70%);
}
.work__ph--d {
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 9px),
    radial-gradient(120% 95% at 30% 88%, rgba(46,139,192,0.26), transparent 60%),
    linear-gradient(200deg, rgba(46,139,192,0.09), rgba(13,13,13,0.86) 65%);
}
.work__ph--e {
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 9px),
    radial-gradient(115% 90% at 70% 82%, rgba(60,181,74,0.18), transparent 62%),
    linear-gradient(120deg, rgba(60,181,74,0.06), rgba(13,13,13,0.88) 62%);
}

/* ---------- Audience split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.split__col { padding: var(--space-lg); background: var(--surface); }
.split__col + .split__col { border-left: 1px solid var(--hairline); background: var(--bg); }
.split__col h3 { margin-bottom: var(--space-sm); }
.split__col > p { color: var(--muted); }
.split__col ul { margin-top: var(--space-md); display: grid; gap: 10px; }
.split__col li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 0.97rem;
}
.split__col li::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 9px; height: 2px;
  background: var(--accent);
}
.split__col--info li::before { background: var(--info); }

/* ---------- CTA band ---------- */
.cta-band {
  border-top: 2px solid var(--accent);
  background:
    radial-gradient(90% 140% at 12% 0%, rgba(60,181,74,0.13), transparent 60%),
    var(--surface);
}
.cta-band__inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}
.cta-band h2 { margin-bottom: var(--space-sm); }
.cta-band .small { margin-top: var(--space-md); }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--space-sm); }
.field { display: grid; gap: 7px; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.field input, .field textarea, .field select {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--ink);
  font-size: 0.98rem;
  width: 100%;
  transition: border-color .16s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 0.62; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(60,181,74,0.18);
}
.field textarea { min-height: 130px; resize: vertical; }
.form__note { font-size: 0.84rem; color: var(--muted); opacity: .85; }
.form__status { font-size: 0.92rem; padding: 12px 14px; border-radius: var(--radius-sm); display: none; }
.form__status.is-ok { display: block; background: rgba(60,181,74,0.12); border: 1px solid var(--accent); }
.form__status.is-err { display: block; background: rgba(192,57,43,0.12); border: 1px solid var(--energy); }

/* Honeypot: present for bots, never shown or focusable for people. */
.td-hp {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hairline); padding-block: var(--space-xl) var(--space-lg); }
.site-footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
}
.site-footer img { height: 74px; width: auto; margin-bottom: var(--space-sm); }
.site-footer h4 { margin-bottom: var(--space-sm); color: var(--ink); }
.site-footer ul { display: grid; gap: 9px; }
.site-footer a { color: var(--muted); font-size: 0.95rem; }
.site-footer a:hover { color: var(--ink); }
.site-footer__bottom {
  border-top: 1px solid var(--hairline);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Prose (interior pages) ---------- */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: var(--space-md); }
.prose h2 { margin-top: var(--space-lg); }
.prose h3 { margin-top: var(--space-md); }
.prose a { color: var(--info); text-decoration: underline; text-underline-offset: 2px; }
.prose ul { display: grid; gap: 10px; }
.prose li { position: relative; padding-left: 22px; color: var(--muted); }
.prose li::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 9px; height: 2px;
  background: var(--accent);
}
.prose strong { font-weight: 600; color: var(--ink); }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 10px; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 10px 13px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.94rem;
}
.pagination .page-numbers:hover { color: var(--ink); border-color: var(--muted); }
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #0D0D0D; font-weight: 600; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #0D0D0D;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 0 0 var(--radius-md) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Reveal (degrades to visible without JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.3,1);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-lg); min-height: 0; }
  .build { max-width: 400px; }
  .cta-band__inner { grid-template-columns: 1fr; gap: var(--space-lg); }
  .tile--wide, .tile--feature { grid-column: span 6; }
  .tile--half { grid-column: span 3; }
  .tile--third, .tile--tall { grid-column: span 3; }
  .work--lg, .work--sm { grid-column: span 6; min-height: 320px; }
  .work--third { grid-column: span 3; }
  .site-footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --space-section: 76px; --space-xl: 60px; --gutter: 20px; }
  /* Mobile navigation rules live in nav.css, which is enqueued after this
     file so its base rules cannot override the collapsed state. */
  .step { grid-template-columns: 44px 1fr; }
  .step__body--wide { grid-column: 2 / -1; }
  .split { grid-template-columns: 1fr; }
  .split__col + .split__col { border-left: 0; border-top: 1px solid var(--hairline); }
  .tile--half, .tile--third, .tile--tall { grid-column: span 6; min-height: 0; }
  .work--third { grid-column: span 6; min-height: 260px; }
  .site-footer__top { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; align-items: stretch; }
}
