/* ==========================================================================
   Frolix — design system
   Palette comes from the brand mark (lime cloud) on a deep green-black ink.
   ========================================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0d1210;
  --ink-2: #151c18;
  --ink-3: #1f2823;
  --paper: #f3f5f2;
  --white: #ffffff;
  --lime: #bed62f;
  --lime-deep: #a3ba1d;
  --lime-ink: #1d2400;
  --muted: #56605a;
  --muted-on-dark: #a4aea8;
  --rule: rgba(13, 18, 16, 0.16);
  --rule-on-dark: rgba(255, 255, 255, 0.16);

  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Hanken Grotesk", "Avenir Next", "Segoe UI", sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --max: 1280px;
  --radius: 4px;
  --header-h: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.04; letter-spacing: -0.025em; margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.on-paper :focus-visible, .section-light :focus-visible { outline-color: var(--ink); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--lime); color: var(--lime-ink); padding: 10px 16px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }
.vh {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: var(--radius); border: 2px solid transparent;
  font-family: var(--display); font-weight: 600; font-size: 1rem; letter-spacing: -0.005em;
  text-decoration: none; cursor: pointer; line-height: 1.1;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-lime { background: var(--lime); color: var(--lime-ink); }
.btn-lime:hover { background: #cde43a; }
.btn-ghost { border-color: rgba(255, 255, 255, 0.5); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: var(--ink-3); }
.btn-arrow::after { content: "\2192"; font-family: var(--body); transition: transform 0.25s var(--ease); }
.btn-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  color: var(--white);
  transition: background-color 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid {
  background: rgba(13, 18, 16, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--rule-on-dark);
}
.header-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; text-decoration: none; color: inherit; line-height: 0; }
.brand-logo { height: 40px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 36px; }
.site-nav ul { display: flex; gap: 32px; }
.site-nav ul a {
  position: relative; text-decoration: none; font-weight: 500; font-size: 0.98rem; padding: 6px 0;
  color: rgba(255, 255, 255, 0.82); transition: color 0.2s;
}
.site-nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--lime);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.site-nav ul a:hover, .site-nav ul a[aria-current="page"] { color: var(--white); }
.site-nav ul a:hover::after, .site-nav ul a[aria-current="page"]::after { transform: scaleX(1); }
.nav-cta { padding: 11px 20px; font-size: 0.95rem; }

.nav-toggle { display: none; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end;
  background: var(--ink); color: var(--white); overflow: hidden; isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-wall {
  position: absolute; left: 50%; top: 50%;
  width: max(calc(105vw + 20svh), calc(110svh + 12vw));
  max-width: none; height: auto;
  filter: brightness(0.62) saturate(0.78);
  transform: translate(-50%, -50%) rotate(-9deg);
  animation: wall-drift 70s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes wall-drift {
  from { transform: translate(-50%, -54%) rotate(-9deg); }
  to   { transform: translate(-50%, -46%) rotate(-9deg); }
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(13, 18, 16, 0.94) 0%, rgba(13, 18, 16, 0.78) 38%, rgba(13, 18, 16, 0.18) 78%, rgba(13, 18, 16, 0.35) 100%),
    linear-gradient(0deg, rgba(13, 18, 16, 0.85) 0%, rgba(13, 18, 16, 0) 45%);
}
.hero-in { padding-top: calc(var(--header-h) + 40px); padding-bottom: clamp(48px, 9vh, 96px); }

.hero-brand { margin: 0 0 clamp(22px, 3.4vw, 40px); }
.hero-logo {
  display: block;
  width: clamp(190px, 24vw, 340px);
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35));
}
.hero-lead {
  max-width: 21em; font-family: var(--display); font-weight: 500; letter-spacing: -0.02em;
  font-size: clamp(1.35rem, 2.5vw, 2.1rem); line-height: 1.18; margin: 0 0 clamp(24px, 3vw, 36px); color: rgba(255, 255, 255, 0.94);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-brand, .hero-lead, .hero-cta { animation: rise 0.9s var(--ease) both; }
.hero-lead { animation-delay: 0.12s; }
.hero-cta { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* ---------- Inner page hero ---------- */
.page-hero {
  position: relative; background: var(--ink); color: var(--white); overflow: hidden; isolation: isolate;
  padding: calc(var(--header-h) + clamp(56px, 9vw, 120px)) 0 clamp(56px, 8vw, 104px);
}
.page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("/assets/img/wall-sm.webp") 70% 40% / cover no-repeat; opacity: 0.2;
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 95%);
  mask-image: linear-gradient(90deg, transparent 20%, #000 95%);
}
.eyebrow {
  font-family: var(--display); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--lime); margin: 0 0 20px; display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.page-hero h1 { font-size: clamp(2.6rem, 7.2vw, 6.4rem); letter-spacing: -0.045em; max-width: 14ch; }
.page-hero .lede { max-width: 38em; margin: clamp(20px, 3vw, 32px) 0 0; font-size: clamp(1.1rem, 1.7vw, 1.35rem); color: rgba(255, 255, 255, 0.82); line-height: 1.5; }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-dark { background: var(--ink); color: var(--white); }
.section-lime { background: var(--lime); color: var(--lime-ink); position: relative; overflow: hidden; }
/* The cloud from the brand mark, used as a quiet watermark on lime sections */
.section-lime::after {
  content: ""; position: absolute; right: -4%; top: -26%; width: min(58vw, 700px); aspect-ratio: 113 / 75; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 113 75'%3E%3Cg opacity='.055' fill='%230d1210'%3E%3Ccircle cx='27' cy='51' r='21'/%3E%3Ccircle cx='54' cy='30' r='27'/%3E%3Ccircle cx='82' cy='38' r='22'/%3E%3Ccircle cx='90' cy='52' r='17'/%3E%3Crect x='27' y='42' width='66' height='30' rx='15'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}
.section-lime > .wrap { position: relative; z-index: 1; }
.section-white { background: var(--white); }
.section-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 80px); align-items: end; margin-bottom: clamp(40px, 6vw, 80px); }
.section-head h2, .h2 { font-size: clamp(2.1rem, 4.6vw, 4rem); }
.section-head p { margin: 0; font-size: 1.15rem; max-width: 34em; color: var(--muted); }
.section-dark .section-head p { color: var(--muted-on-dark); }
/* Client strip under the hero */
.clients { background: var(--paper); border-bottom: 1px solid rgba(13, 18, 16, 0.1); padding: clamp(26px, 3.4vw, 40px) 0; }
.clients-in { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px clamp(24px, 4vw, 56px); }
.clients-label { margin: 0; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #5d6b00; }
.clients-list { display: flex; flex-wrap: wrap; gap: 8px clamp(22px, 3vw, 40px); margin: 0; padding: 0; list-style: none; }
.clients-list li { font-family: var(--display); font-weight: 600; font-size: clamp(1.02rem, 1.5vw, 1.28rem); letter-spacing: -0.02em; color: var(--ink); }
.clients-list .more { color: var(--muted); font-weight: 500; }
.stack-note { margin: 22px 0 0; font-size: 0.95rem !important; color: var(--muted); max-width: 36em; }

.section-dark .eyebrow, .section-lime .eyebrow { margin-bottom: 18px; }
.section-lime .eyebrow { color: var(--lime-ink); }
.section:not(.section-dark):not(.section-lime) .eyebrow { color: #5d6b00; }

/* ---------- Service rows (home) ---------- */
.svc-list { border-top: 1px solid var(--ink); }
.svc {
  display: grid; grid-template-columns: 64px minmax(0, 4fr) minmax(0, 5fr) 40px; gap: clamp(12px, 3vw, 40px); align-items: center;
  padding: clamp(22px, 2.6vw, 34px) 0; border-bottom: 1px solid var(--rule); text-decoration: none; position: relative;
  transition: padding-left 0.35s var(--ease), background-color 0.3s;
}
.svc::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 0; background: var(--lime-deep); transition: width 0.45s var(--ease);
}
.svc:hover { padding-left: 16px; background: rgba(190, 214, 47, 0.14); }
.svc:hover::before { width: 100%; }
.svc-n { font-family: var(--display); font-weight: 600; color: var(--muted); font-size: 0.95rem; }
.svc h3 { font-size: clamp(1.5rem, 2.8vw, 2.4rem); }
.svc p { margin: 0; color: var(--muted); max-width: 30em; }
.svc-arr { font-size: 1.6rem; justify-self: end; transition: transform 0.3s var(--ease); font-family: var(--body); }
.svc:hover .svc-arr { transform: translateX(6px); }

/* ---------- Work grid ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3.4vw, 52px) clamp(18px, 2.4vw, 36px); }
.work-item[hidden] { display: none; }
.work-link { display: block; text-decoration: none; }
.shot { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-3); border-radius: var(--radius); }
.shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%;
  transition: object-position 6s cubic-bezier(0.3, 0.1, 0.3, 1);
}
.work-link:hover .shot img, .work-link:focus-visible .shot img { object-position: 50% 100%; }
.work-meta { display: flex; flex-direction: column; gap: 2px; padding-top: 16px; }
.work-name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 12px; }
.work-name::after { content: "\2197"; margin-left: auto; font-family: var(--body); font-weight: 400; opacity: 0; transform: translate(-6px, 6px); transition: opacity 0.25s, transform 0.3s var(--ease); }
.work-link:hover .work-name::after, .work-link:focus-visible .work-name::after { opacity: 1; transform: none; }
.work-num { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.work-role { color: var(--muted); font-size: 0.95rem; }
.section-more { margin-top: clamp(40px, 5vw, 64px); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(32px, 4vw, 56px); }
.filter {
  padding: 10px 18px; border-radius: var(--radius); border: 1.5px solid var(--rule); background: transparent; cursor: pointer;
  font-family: var(--display); font-weight: 600; font-size: 0.95rem; transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }
.note { color: var(--muted); font-size: 0.95rem; max-width: 46em; margin-top: clamp(36px, 5vw, 64px); }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.step { border-top: 2px solid var(--lime); padding-top: 22px; }
.step-n { font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--lime); letter-spacing: 0.04em; }
.step h3 { font-size: 1.7rem; margin: 10px 0 12px; }
.step p { color: var(--muted-on-dark); margin: 0; }

/* ---------- CTA band ---------- */
.cta { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 80px); align-items: end; }
.cta h2 { font-size: clamp(2.4rem, 6vw, 5.4rem); letter-spacing: -0.045em; }
.cta p { font-size: 1.15rem; margin: 0 0 24px; max-width: 24em; }
.cta-actions { display: flex; flex-direction: column; align-items: flex-start; }
.cta-mail { margin-top: 18px; font-weight: 600; }

/* ---------- Services page ---------- */
.service { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 96px); padding: clamp(44px, 6vw, 84px) 0; border-top: 1px solid var(--rule); }
.service:first-child { border-top: 0; padding-top: 0; }
.service-n { font-family: var(--display); font-weight: 600; color: var(--muted); font-size: 0.95rem; margin-bottom: 14px; display: block; }
.service h2 { font-size: clamp(2rem, 3.8vw, 3.2rem); margin-bottom: 18px; }
.service .strap { font-family: var(--display); font-size: clamp(1.15rem, 1.8vw, 1.45rem); font-weight: 500; letter-spacing: -0.015em; line-height: 1.25; color: var(--ink); margin: 0; }
.service-body p { font-size: 1.12rem; max-width: 36em; }
.ticks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin-top: 24px; }
.ticks li { padding: 12px 0 12px 28px; border-top: 1px solid var(--rule); position: relative; font-size: 1rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1.28em; width: 14px; height: 2px; background: var(--lime-deep); }

.models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 48px); }
.model { border-top: 2px solid var(--lime); padding-top: 22px; }
.model h3 { font-size: 1.6rem; margin-bottom: 12px; }
.model p { color: var(--muted-on-dark); margin: 0; }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 96px); }
.split h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
.prose p { font-size: 1.18rem; max-width: 36em; }
.prose p:first-child { font-family: var(--display); font-weight: 500; font-size: clamp(1.35rem, 2.2vw, 1.8rem); line-height: 1.28; letter-spacing: -0.015em; }
/* Company profile page */
.pf-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 110px); }
.pf-two h2 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); margin-bottom: 22px; }
.pf-two p { font-size: 1.1rem; max-width: 34em; }
.cap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 4vw, 64px) clamp(32px, 6vw, 110px); }
.cap { border-top: 2px solid var(--ink); padding-top: 22px; }
.cap-n { display: block; font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--lime-deep); letter-spacing: 0.04em; margin-bottom: 10px; }
.cap h3 { font-size: 1.8rem; margin-bottom: 12px; }
.cap p { color: var(--muted); margin: 0 0 20px; max-width: 32em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { font-size: 0.85rem; font-weight: 600; padding: 6px 13px; border: 1.5px solid var(--ink); border-radius: 999px; line-height: 1.2; }
.client-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.client-grid li { padding: 22px 18px 22px 0; border-bottom: 1px solid var(--rule); }
.client-grid strong { display: block; font-family: var(--display); font-size: 1.15rem; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 4px; }
.client-grid span { font-size: 0.88rem; color: var(--muted); overflow-wrap: anywhere; }
.pf-more { margin: 22px 0 0; color: var(--muted); }
.inline-link { color: inherit; font-weight: 600; text-underline-offset: 3px; }
.cta-lines { font-weight: 600; }
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 44px); }
.principle { border-top: 2px solid var(--ink); padding-top: 20px; }
.principle h3 { font-size: 1.45rem; margin-bottom: 10px; }
.principle p { color: var(--muted); margin: 0; font-size: 1rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(36px, 6vw, 112px); align-items: start; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-family: var(--display); font-weight: 600; font-size: 0.95rem; }
.field label .opt { font-family: var(--body); font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; background: var(--white); border: 1.5px solid #c9d0cb; border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #8f9a93; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(190, 214, 47, 0.55); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; }
.form-foot small { color: var(--muted); font-size: 0.9rem; max-width: 30em; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.form-status { grid-column: 1 / -1; margin: 0; padding: 0; font-weight: 500; }
.form-status:not(:empty) { padding: 16px 18px; border-radius: var(--radius); border-left: 4px solid var(--ink); background: var(--white); }
.form-status.is-ok { border-color: var(--lime-deep); background: #f1f7d0; }
.form-status.is-err { border-color: #b3261e; background: #fbeceb; color: #6a120c; }

.details h2 { font-size: 1.4rem; margin-bottom: 8px; }
.details section { padding: 24px 0; border-top: 1px solid var(--rule); }
.details section:first-child { padding-top: 0; border-top: 0; }
.details p { margin: 0; color: var(--muted); }
.details a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.details .stack > * { display: block; }

/* ---------- Legal / prose pages ---------- */
.legal { max-width: 46rem; }
.legal h2 { font-size: 1.6rem; margin: 2.2em 0 0.5em; }
.legal li { margin: 0 0 0.5em; padding-left: 1.2em; position: relative; }
.legal li::before { content: ""; position: absolute; left: 0; top: 0.78em; width: 7px; height: 2px; background: var(--lime-deep); }
.legal a { text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.78); padding: clamp(56px, 7vw, 96px) 0 28px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr)); gap: clamp(28px, 4vw, 64px); }
.footer-brand { color: var(--white); }
.footer-brand p { color: var(--muted-on-dark); margin: 20px 0 0; max-width: 22em; }
.footer-h { font-family: var(--display); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--lime); margin: 0 0 16px; font-weight: 600; }
.site-footer ul li { margin-bottom: 9px; }
.site-footer a { text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.footer-addr { display: block; margin-top: 14px; color: var(--muted-on-dark); }
.footer-base { margin-top: clamp(44px, 6vw, 80px); padding-top: 22px; border-top: 1px solid var(--rule-on-dark); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.92rem; color: var(--muted-on-dark); }

/* ---------- 404 ---------- */
.nf { min-height: 100svh; display: flex; align-items: center; }
.nf h1 { font-size: clamp(5rem, 22vw, 16rem); letter-spacing: -0.07em; color: var(--lime); line-height: 0.85; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: 0.08s; }
.js .reveal.d2 { transition-delay: 0.16s; }
.js .reveal.d3 { transition-delay: 0.24s; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 12px; background: none; border: 0; padding: 10px 0; cursor: pointer;
    font-family: var(--display); font-weight: 600; font-size: 1rem; color: inherit;
  }
  .nav-toggle-bars { position: relative; width: 22px; height: 12px; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform 0.3s var(--ease), top 0.3s var(--ease); }
  .nav-toggle-bars::before { top: 0; }
  .nav-toggle-bars::after { top: 10px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 5px; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 5px; transform: rotate(-45deg); }

  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: var(--ink); flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 28px; padding: 28px var(--gutter) 40px; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0.25s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul li { border-bottom: 1px solid var(--rule-on-dark); }
  .site-nav ul a { display: block; padding: 20px 0; font-family: var(--display); font-weight: 600; font-size: 2rem; letter-spacing: -0.03em; }
  .site-nav ul a::after { display: none; }
  .nav-cta { padding: 18px 24px; font-size: 1.05rem; }
  .site-header.menu-open { background: var(--ink); }

  .section-head, .split, .service, .cta, .contact-grid, .pf-two, .cap-grid { grid-template-columns: minmax(0, 1fr); }
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { align-items: start; }
  .svc { grid-template-columns: 44px minmax(0, 1fr) 28px; }
  .svc p { grid-column: 2 / 3; grid-row: 2; margin-top: 6px; }
  .svc-arr { grid-row: 1; grid-column: 3; }
  .models { grid-template-columns: minmax(0, 1fr); }
  .hero::before {
    background:
      linear-gradient(0deg, rgba(13, 18, 16, 0.95) 0%, rgba(13, 18, 16, 0.7) 55%, rgba(13, 18, 16, 0.35) 100%);
  }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .work-grid, .steps, .principles, .ticks, .client-grid { grid-template-columns: minmax(0, 1fr); }
  .form { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-cta .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-wall { transform: translate(-50%, -50%) rotate(-9deg); }
}
