/* ==========================================================================
   artemisoft.mk — "Graphite & Ember"
   One stylesheet. Mobile-first. No build step, no external requests.
   Palette derived from the logo: graphite→silver mark, ember orange stroke.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts (self-hosted, subset woff2)
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Instrument Sans';
  src: url('/assets/fonts/instrument-sans-var.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif-400italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Tokens
   Contrast on --bg #101316, computed:
     --fg      #E8ECEE  15.68:1
     --fg-2    #AFB8BE   9.25:1
     --fg-3    #8C959B   6.11:1  (5.33:1 on --elev — still AA)
     --ember   #F36A22   6.12:1  (brand orange passes AA as body text on dark)
   -------------------------------------------------------------------------- */

:root {
  /* surfaces — four steps, each visibly lighter than the last.
     The ground sits at #101316 rather than near-black: light text on a very
     dark field haloes, which smears letterforms for astigmatic and older
     eyes, and roughly a third of adults have some astigmatism. */
  --bg:        #101316;
  --surface:   #161A1D;
  --elev:      #1C2124;
  --elev-2:    #262B2F;

  /* ink — peak white softened from #F2F4F5, muted greys lifted. Net effect:
     highest contrast falls 17.6:1 -> 15.7:1 (less halation) while secondary
     text *rises* 8.4:1 -> 9.3:1. Everything stays well clear of AA. */
  --fg:        #E8ECEE;
  --fg-2:      #AFB8BE;
  --fg-3:      #8C959B;

  /* brand — the plain value first, then a derived one for engines that have
     color-mix(); both are kept so the palette has a single source of truth
     without dropping older browsers */
  --ember:     #F36A22;          /* brand: fills, rules, button grounds */
  --ember-ink: #F36A22;          /* brand as TEXT — overridden in light mode */
  --ember-btn-ink: #101316;      /* ink sitting on an ember button */
  --ember-lift:#FF8340;
  --ember-lift:color-mix(in oklab, var(--ember) 84%, white);
  --ember-dim: rgba(243, 106, 34, 0.14);
  --ember-dim: color-mix(in oklab, var(--ember) 16%, transparent);
  --silver:    #C9CFD4;

  /* edges */
  --line:      rgba(255, 255, 255, 0.08);
  --line-2:    rgba(255, 255, 255, 0.14);

  /* depth */
  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --sh-lg: 0 18px 50px rgba(0, 0, 0, 0.55);

  /* type */
  --sans:  'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono:  ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

  /* motion */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* metrics */
  --wrap: 1180px;
  --gut: 22px;
  --radius: 14px;
  --radius-lg: 20px;
  --header-h: 62px;
}

/* --------------------------------------------------------------------------
   2b. Light theme

   Dark is the default and the identity. This exists because light-on-dark
   haloes, which makes sustained reading harder for astigmatic and older eyes,
   and a reader who finds that uncomfortable should not have to leave.
   Every value below was checked against the light ground, not assumed.
   -------------------------------------------------------------------------- */

:root[data-theme="light"] {
  --bg:        #FBFBFA;
  --surface:   #F3F3F1;
  --elev:      #FFFFFF;
  --elev-2:    #EAEAE7;

  --fg:        #17191B;   /* 17.02:1 */
  --fg-2:      #4E555A;   /*  7.32:1 */
  --fg-3:      #686F74;   /*  4.93:1, and 5.10:1 on white panels */

  --ember-ink: #BF4708;   /*  4.92:1 — #F36A22 is only 2.94:1 here */
  --ember-btn-ink: #FFFFFF;

  --line:      rgba(0, 0, 0, 0.11);
  --line-2:    rgba(0, 0, 0, 0.19);

  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --sh-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --sh-lg: 0 18px 50px rgba(0, 0, 0, 0.10);

  color-scheme: light;
  scrollbar-color: #C9CBCC var(--bg);
}

/* white ink on ember only clears 3.05:1, so the button ground darkens to keep
   the label readable rather than the label lightening to keep the brand */
:root[data-theme="light"] .btn-primary { background: #C2470A; }
:root[data-theme="light"] .btn-primary:hover { background: #A93D06; }

/* grain reads as dirt on a light ground */
:root[data-theme="light"] .grain { opacity: 0.02; }

:root[data-theme="light"] .hero-bloom {
  background:
    radial-gradient(62% 88% at 46% -10%, rgba(243, 106, 34, 0.10), transparent 68%),
    radial-gradient(44% 64% at 10% 2%, rgba(243, 106, 34, 0.05), transparent 72%);
}

:root[data-theme="light"] .site-head.is-stuck { background: rgba(251, 251, 250, 0.78); }
:root[data-theme="light"] .mobile-nav { background: rgba(251, 251, 250, 0.97); }

/* the marks were flattened to white for a dark row; on light they go black */
:root[data-theme="light"] .logo-wall img { filter: brightness(0); opacity: 0.72; }
:root[data-theme="light"] .logo-wall li:hover img { opacity: 0.9; }
:root[data-theme="light"] .logo-wall .has-panel img { filter: grayscale(1) brightness(0.85); opacity: 0.8; }

/* one lockup is white, the other dark; show whichever the theme needs */
.brand .on-light, .foot-brand .on-light { display: none; }
:root[data-theme="light"] .brand .on-dark,
:root[data-theme="light"] .foot-brand .on-dark { display: none; }
:root[data-theme="light"] .brand .on-light,
:root[data-theme="light"] .foot-brand .on-light { display: block; }

/* --------------------------------------------------------------------------
   2c. Theme toggle control
   -------------------------------------------------------------------------- */

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.theme-btn:hover { color: var(--fg); border-color: var(--fg-3); }
.theme-btn svg { display: block; }
.theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: block; }
:root[data-theme="light"] .theme-btn .i-moon { display: none; }

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  /* tells the engine to render form controls, scrollbars and the canvas dark,
     so native UI matches the page instead of flashing white */
  color-scheme: dark;
  accent-color: var(--ember);
  scrollbar-color: var(--elev-2) var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'kern' 1;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

::selection { background: var(--ember); color: var(--ember-btn-ink); }

:focus-visible {
  outline: 2px solid var(--ember-ink);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--ember);
  color: var(--ember-btn-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { left: 12px; }

/* small caps label used to open every section */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  flex: none;
  background: var(--ember);
}

/* the signature move: one italic serif phrase in ember, once per viewport */
.em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ember-ink);
}

/* --------------------------------------------------------------------------
   3b. Cross-document view transitions

   Navigating between these static pages cross-fades instead of flashing white.
   Engines without support ignore the whole block and navigate normally, so
   there is nothing to fall back to and nothing to maintain.
   -------------------------------------------------------------------------- */

@view-transition { navigation: auto; }

::view-transition-old(root) { animation: vt-out 160ms var(--ease) both; }
::view-transition-new(root) { animation: vt-in 260ms var(--ease-out) both; }

@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

/* naming the chrome holds it still across a navigation rather than fading it */
.site-head { view-transition-name: site-head; }
.site-foot { view-transition-name: site-foot; }

/* --------------------------------------------------------------------------
   3c. Film grain
   -------------------------------------------------------------------------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.042;
  background-image: url("data:image/svg+xml,<svg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'><filter%20id='n'><feTurbulence%20type='fractalNoise'%20baseFrequency='0.82'%20numOctaves='3'%20stitchTiles='stitch'/></filter><rect%20width='160'%20height='160'%20filter='url(%23n)'/></svg>");
  background-repeat: repeat;
}

@media (prefers-reduced-transparency: reduce) {
  .grain { display: none; }
}

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.site-head.is-stuck {
  background: rgba(16, 19, 22, 0.74);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--line);
}

.head-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--header-h);
}

/* One image, the real lockup, rather than the mark plus a typed approximation
   of the wordmark — the brand's own letterforms are condensed and nothing in
   our type stack matches them. */
.brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  text-decoration: none;
}
.brand img { height: 24px; width: auto; }

@media (min-width: 900px) {
  .brand img { height: 27px; }
}

.site-nav { display: none; }

.nav-link {
  position: relative;
  padding: 6px 2px;
  font-size: 14.5px;
  color: var(--fg-2);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.nav-link:hover { color: var(--fg); }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease-out);
}
.nav-link:hover::after,
.nav-link[aria-current='page']::after { transform: scaleX(1); }
.nav-link[aria-current='page'] { color: var(--fg); }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease),
              border-color 0.2s var(--ease), box-shadow 0.25s var(--ease), color 0.2s var(--ease);
}
.btn:active { transform: scale(0.975); }

.btn-primary {
  background: var(--ember);
  color: #160902;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}
.btn-primary:hover {
  background: var(--ember-lift);
  box-shadow: 0 8px 26px rgba(243, 106, 34, 0.28), 0 1px 0 rgba(255, 255, 255, 0.22) inset;
}

.btn-ghost {
  border-color: var(--line-2);
  color: var(--fg);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--fg-3); background: rgba(255, 255, 255, 0.04); }

.btn-sm { min-height: 38px; padding: 9px 16px; font-size: 13.5px; }

.head-cta { display: none; }

/* mobile menu */
.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.menu-btn span {
  position: relative;
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease-out), background-color 0.15s linear;
}
.menu-btn span::before,
.menu-btn span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease-out), top 0.2s var(--ease);
}
.menu-btn span::before { top: -5px; }
.menu-btn span::after { top: 5px; }
.menu-btn[aria-expanded='true'] span { background: transparent; }
.menu-btn[aria-expanded='true'] span::before { top: 0; transform: rotate(45deg); }
.menu-btn[aria-expanded='true'] span::after { top: 0; transform: rotate(-45deg); }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  padding: 22px var(--gut) 40px;
  background: rgba(16, 19, 22, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.28s var(--ease), visibility 0.28s;
}
.mobile-nav.open { visibility: visible; opacity: 1; }

.mobile-nav a.m-link {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.mobile-nav.open a.m-link { opacity: 1; transform: none; }
.mobile-nav.open a.m-link:nth-child(1) { transition-delay: 0.04s; }
.mobile-nav.open a.m-link:nth-child(2) { transition-delay: 0.08s; }
.mobile-nav.open a.m-link:nth-child(3) { transition-delay: 0.12s; }
.mobile-nav.open a.m-link:nth-child(4) { transition-delay: 0.16s; }
.mobile-nav.open a.m-link:nth-child(5) { transition-delay: 0.20s; }
.mobile-nav .btn { margin-top: 28px; }
.m-contact {
  margin-top: auto;
  padding-top: 28px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--fg-3);
}
.m-contact a { color: var(--fg-2); text-decoration: none; }

body.nav-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   5. Sections
   -------------------------------------------------------------------------- */

.sec { padding-block: 74px; }
.sec-tight { padding-block: 52px; }
.sec-line { border-top: 1px solid var(--line); }

.sec-head { max-width: 640px; margin-bottom: 38px; }

.sec-title {
  font-size: clamp(28px, 5.6vw, 42px);
  letter-spacing: -0.032em;
}
.sec-intro {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.68;
  color: var(--fg-2);
}

/* text link with a sliding arrow */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ember-ink);
  text-decoration: none;
}
.arrow-link svg { transition: transform 0.3s var(--ease-out); }
.arrow-link:hover svg { transform: translateX(5px); }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: 54px;
  padding-bottom: 60px;
  overflow: hidden;
}

/* ambient: engineering grid + a single ember bloom. Purely decorative. */
.hero-bg {
  position: absolute;
  inset: -10% -20% auto;
  height: 780px;
  pointer-events: none;
  z-index: 0;
}
.hero-bloom {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(62% 88% at 46% -10%, rgba(243, 106, 34, 0.095), transparent 68%),
    radial-gradient(44% 64% at 10% 2%, rgba(243, 106, 34, 0.038), transparent 72%);
}

.hero > .wrap { position: relative; z-index: 1; }

.hero h1 {
  max-width: 15ch;
  font-size: clamp(40px, 9.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.038em;
}

.hero-lede {
  max-width: 54ch;
  margin-top: 24px;
  font-size: clamp(17px, 2.2vw, 19.5px);
  line-height: 1.66;
  color: var(--fg-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
@media (max-width: 479px) {
  .hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero-actions .btn { width: 100%; }
  .cta-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .cta-actions .btn { width: 100%; }
}

/* fact rail under the hero */
.rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}
.rail-item {
  padding: 18px 18px 20px;
  background: var(--surface);
}
.rail-k {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.rail-v {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--fg);
}
.rail-v a { color: var(--ember-ink); text-decoration: none; }
.rail-v .sub { display: block; margin-top: 4px; font-size: 13.5px; color: var(--fg-3); }

/* --------------------------------------------------------------------------
   7. Client logo wall
   -------------------------------------------------------------------------- */

.clients-note {
  margin-bottom: 26px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-2);
}

.clients-line {
  max-width: 58ch;
  margin: -10px 0 26px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-2);
}

.logo-wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.logo-wall li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.logo-wall li:hover { border-color: var(--line-2); background: var(--elev); }

/* the anchor fills the tile so the whole box is the target, not just the mark */
.logo-wall a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  padding: 14px 16px;
  text-decoration: none;
}

/* Every mark is flattened to white so six unrelated brand palettes read as one
   row. Height is capped per-logo because their aspect ratios run 2.3:1 to 6.7:1. */
.logo-wall img {
  max-height: 26px;
  max-width: 100%;
  width: auto;
  opacity: 0.78;
  filter: brightness(0) invert(1);
  transition: opacity 0.3s var(--ease);
}
.logo-wall li:hover img { opacity: 1; }
.logo-wall .tall img { max-height: 34px; }
.logo-wall .wide img { max-height: 22px; }

/* A lockup with its own colour panel behind the type cannot be flattened to
   white — it becomes a solid block. Desaturate instead, so the knockout
   survives and the tile still reads as part of a monochrome row. */
.logo-wall .has-panel img {
  filter: grayscale(1) brightness(1.2);
  opacity: 0.88;
}

/* typographic fallback while a real mark is missing */
.logo-wall .logo-text {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg-2);
  transition: color 0.3s var(--ease);
}
.logo-wall li:hover .logo-text { color: var(--fg); }

/* --------------------------------------------------------------------------
   8. Capability panels
   -------------------------------------------------------------------------- */

.caps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cap {
  position: relative;
  padding: 26px 22px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--sh-sm);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), border-color 0.35s var(--ease),
              background-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.cap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ember), transparent);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.cap:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  background: var(--elev);
  box-shadow: var(--sh-md);
}
.cap:hover::before { opacity: 1; }

.cap-n {
  display: block;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--ember-ink);
}
.cap h3 {
  margin-top: 14px;
  font-size: 20px;
  letter-spacing: -0.022em;
}
.cap p {
  margin-top: 10px;
  font-size: 15.5px;
  line-height: 1.66;
  color: var(--fg-2);
}
/* with an odd number of cards the last one spans the row rather than leaving
   a hole next to it */
.caps > .cap:last-child:nth-child(odd) { grid-column: 1 / -1; }

.cap-meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--fg-3);
}

/* --------------------------------------------------------------------------
   9. Work records
   -------------------------------------------------------------------------- */

.work { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }

.work-item {
  position: relative;
  display: block;
  padding: 22px 14px 22px 18px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.3s var(--ease);
}
.work-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: -1px;
  bottom: -1px;
  width: 2px;
  background: var(--ember);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform 0.35s var(--ease-out);
}
.work-item:hover { background: var(--surface); }
.work-item:hover::before { transform: scaleY(1); }

.work-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.work-desc {
  margin-top: 6px;
  max-width: 62ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--fg-2);
}
/* --------------------------------------------------------------------------
   10. Stack groups
   -------------------------------------------------------------------------- */

.stack-groups {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}
.stack-group { padding: 22px 20px 24px; background: var(--surface); }
.stack-group h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.stack-why {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-2);
}
.stack-note {
  max-width: 68ch;
  margin-top: 22px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg-3);
}
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.stack-list li {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--elev);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--fg-2);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.stack-list li:hover { border-color: var(--line-2); color: var(--fg); }

/* --------------------------------------------------------------------------
   11. Assurances (why we are a safe partner)
   -------------------------------------------------------------------------- */

.assure { display: grid; gap: 28px; margin: 0; padding: 0; list-style: none; }
.assure li { padding-top: 20px; border-top: 1px solid var(--line-2); }
.assure h3 { font-size: 18px; letter-spacing: -0.02em; }
.assure p { margin-top: 9px; font-size: 15.5px; line-height: 1.66; color: var(--fg-2); }

/* --------------------------------------------------------------------------
   12. CTA band
   -------------------------------------------------------------------------- */

.cta-band {
  position: relative;
  padding: 46px 24px 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 130% at 12% 0%, rgba(243, 106, 34, 0.13), transparent 58%),
    var(--surface);
  overflow: hidden;
}
.cta-band h2 {
  max-width: 17ch;
  font-size: clamp(27px, 6vw, 40px);
  letter-spacing: -0.032em;
}
.cta-band p {
  max-width: 46ch;
  margin-top: 16px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--fg-2);
}
/* structural first column of the .cta-band grid; min-width:0 stops long
   words in the heading from blowing the track out */
.cta-inner { min-width: 0; }
/* pages that drop the second column let the first one span the whole band */
.cta-band > .cta-inner:only-child { grid-column: 1 / -1; max-width: 62ch; }

.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.cta-next {
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.cta-next li {
  position: relative;
  padding: 14px 0 14px 40px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-2);
  counter-increment: step;
}
.cta-next li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 15px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ember-ink);
}
.cta-next-h {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.cta-direct {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--fg-3);
}
.cta-direct a { color: var(--fg); text-decoration: none; }
.cta-direct a:hover { color: var(--ember-ink); }

/* --------------------------------------------------------------------------
   13. Prose (inner pages)
   -------------------------------------------------------------------------- */

.prose { max-width: 68ch; }
.prose p { margin-top: 19px; font-size: 17px; line-height: 1.75; color: var(--fg-2); }
.prose p:first-child { margin-top: 0; }
.prose h2 {
  margin-top: 46px;
  font-size: clamp(23px, 4.4vw, 30px);
  letter-spacing: -0.028em;
}
.prose h3 { margin-top: 32px; font-size: 18px; letter-spacing: -0.02em; }
.prose a { color: var(--ember-ink); text-decoration: none; border-bottom: 1px solid var(--ember-dim); }
.prose a:hover { border-bottom-color: var(--ember); }
.prose ul { margin: 18px 0 0; padding-left: 0; list-style: none; }
.prose ul li {
  position: relative;
  padding-left: 20px;
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-2);
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 7px;
  height: 1px;
  background: var(--ember);
}

.page-head { padding-top: 52px; padding-bottom: 8px; }
.page-head h1 {
  max-width: 18ch;
  font-size: clamp(34px, 7.6vw, 58px);
  letter-spacing: -0.036em;
}
.page-head .hero-lede { margin-top: 20px; }

/* phased sequence, used on /services/ */
.seq {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.seq li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg-2);
}
.seq li:not(:last-child)::after { content: '→'; color: var(--ember); }

/* --------------------------------------------------------------------------
   14. Contact form
   -------------------------------------------------------------------------- */

.form-card {
  padding: 26px 22px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--sh-sm);
}
.field { margin-top: 18px; }
.field:first-child { margin-top: 0; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg-2);
}
.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 16px; /* < 16px makes iOS zoom on focus */
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--fg-3); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ember-ink);
  box-shadow: 0 0 0 3px var(--ember-dim);
}
.field textarea { min-height: 140px; resize: vertical; field-sizing: content; max-height: 60vh; }
.field-row { display: grid; gap: 18px; }
/* the row's gap does the spacing; a bare .field inside it must not add its own */
.field-row .field { margin-top: 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note {
  margin-top: 18px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--fg-3);
}
.form-note a { color: var(--fg-2); }

.form-status { display: none; }
.form-status.ok, .form-status.err {
  display: block;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line-2);
  border-left-width: 3px;
  border-radius: 10px;
  background: var(--elev);
  font-size: 15px;
  line-height: 1.55;
}
.form-status.ok { border-left-color: #3FBF7F; }
.form-status.err { border-left-color: var(--ember); }
.form-status a { color: var(--ember-ink); }

.contact-facts { display: grid; gap: 26px; }
.contact-facts h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.contact-facts div p, .contact-facts div address {
  margin-top: 10px;
  font-style: normal;
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-2);
}
.contact-facts a { color: var(--fg); text-decoration: none; }
.contact-facts a:hover { color: var(--ember-ink); }

/* --------------------------------------------------------------------------
   15. Footer
   -------------------------------------------------------------------------- */

.site-foot { margin-top: 20px; border-top: 1px solid var(--line); background: var(--surface); }
.foot-grid { display: grid; gap: 32px; padding-block: 46px 26px; }
.foot-brand { display: inline-flex; align-items: center; text-decoration: none; }
.foot-brand img { height: 24px; width: auto; }
.foot-about { margin-top: 16px; max-width: 34ch; font-size: 14.5px; line-height: 1.65; color: var(--fg-3); }

.foot-col h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-2);
}
.foot-col ul { margin: 14px 0 0; padding: 0; list-style: none; }
.foot-col li { margin-top: 2px; }
.foot-col a, .foot-col address {
  display: block;
  padding: 7px 0;
  font-style: normal;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--fg-2);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.foot-col a:hover { color: var(--ember-ink); }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  gap: 6px;
  padding-block: 20px 30px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--fg-3);
}

/* registered identity — procurement cannot open a file without it */
.foot-legal { max-width: 70ch; font-size: 12.5px; line-height: 1.6; }

/* --------------------------------------------------------------------------
   16. Scroll reveal
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

.stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(1) { transition-delay: 0.00s; }
.stagger.in > *:nth-child(2) { transition-delay: 0.06s; }
.stagger.in > *:nth-child(3) { transition-delay: 0.12s; }
.stagger.in > *:nth-child(4) { transition-delay: 0.18s; }
.stagger.in > *:nth-child(5) { transition-delay: 0.24s; }
.stagger.in > *:nth-child(6) { transition-delay: 0.30s; }
.stagger.in > *:nth-child(7) { transition-delay: 0.36s; }
.stagger.in > *:nth-child(8) { transition-delay: 0.42s; }

/* first paint of the hero, no observer needed */
.rise { animation: rise 0.85s var(--ease-out) both; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.13s; }
.rise-3 { animation-delay: 0.21s; }
.rise-4 { animation-delay: 0.30s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   17. Breakpoints
   -------------------------------------------------------------------------- */

@media (min-width: 620px) {
  :root { --gut: 32px; }
  .logo-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stack-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  :root { --gut: 40px; --header-h: 70px; }

  .menu-btn, .mobile-nav { display: none; }
  .site-nav { display: flex; align-items: center; gap: 30px; }
  .head-cta { display: inline-flex; }

  .sec { padding-block: 104px; }
  .sec-tight { padding-block: 70px; }

  .hero { padding-top: 84px; padding-bottom: 76px; }
  .hero-actions { margin-top: 38px; }
  .rail { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 76px; }
  .rail-item { padding: 22px 22px 24px; }

  .logo-wall { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }

  .caps { gap: 16px; }
  .cap { padding: 30px 28px 32px; }

  .work-item { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 8px 40px; padding: 24px 18px; align-items: baseline; }
  .work-desc { margin-top: 0; }

  

  .assure { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 48px; }

  .cta-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
    gap: 64px;
    align-items: start;
    padding: 68px 60px 70px;
  }
  .cta-next { margin-top: 22px; }

  .contact-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 56px; align-items: start; }
  .form-card { padding: 34px 32px 38px; }
  .contact-facts { position: sticky; top: calc(var(--header-h) + 28px); }

  .page-head { padding-top: 76px; }

  .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-block: 60px 34px; }
}

@media (min-width: 1000px) {
  .stack-groups { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   18. Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; }
}

/* --------------------------------------------------------------------------
   18b. Other user preferences
   -------------------------------------------------------------------------- */

/* Some people disable transparency at OS level; blur becomes a solid panel. */
@media (prefers-reduced-transparency: reduce) {
  .site-head.is-stuck,
  .mobile-nav {
    background: var(--bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Raise every edge and mute when the visitor asks for more contrast. */
@media (prefers-contrast: more) {
  :root {
    --line:   rgba(255, 255, 255, 0.22);
    --line-2: rgba(255, 255, 255, 0.36);
    --fg-2:   #C6CDD2;
    --fg-3:   #A6AEB4;
  }
}

/* --------------------------------------------------------------------------
   19. Print — procurement people print this
   -------------------------------------------------------------------------- */

@media print {
  .site-head, .mobile-nav, .menu-btn, .hero-bg, .grain, .btn, form, .form-status, .skip { display: none !important; }
  body, .site-foot, .cap, .rail-item, .cta-band, .form-card, .stack-group {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
  }
  .hero-lede, .sec-intro, .work-desc, .cap p, .prose p, .foot-col a { color: #222 !important; }
  .em { color: #000 !important; }
  a { text-decoration: none; color: #000 !important; }
  .sec { padding-block: 24px; }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; }
}
