/* =========================================================
   Filament v4 — neo-brutalist edition
   Self-contained. No styles.css. Paper background, ink
   borders, hard offset shadows, amber as loud filled blocks,
   Space Grotesk display + Space Mono labels.
   ========================================================= */

:root {
  --paper: #9e9c9a;
  --paper-2: #c7c6c4;
  --ink: #14110c;
  --amber: #ff3d6e;
  --amber-deep: #e63763;
  --glow: #ff1482;
  --line: 3px;
  --shadow-color: #757575;
  --shadow: 7px 7px 0 var(--shadow-color);
  --shadow-sm: 4px 4px 0 var(--shadow-color);
  --font: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 12px 16px; z-index: 1000;
}
.skip-link:focus { left: 16px; top: 16px; }
[hidden] { display: none !important; }

/* ---- Layout shell ---- */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 clamp(18px, 4vw, 40px);
  min-height: var(--header-h);
  background: var(--paper);
  border-bottom: var(--line) solid var(--ink);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-name {
  font-weight: 700; font-size: 24px; letter-spacing: -0.03em; line-height: 1;
}
.brand-by { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }
.brand-glow-box {
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  padding: 7px 11px;
}
.brand-glow {
  display: inline-block;
  width: 44px;
  height: 22px;
  background-color: var(--glow);
  -webkit-mask: url('assets/GLOW-logo-white.png') left center / contain no-repeat;
  mask: url('assets/GLOW-logo-white.png') left center / contain no-repeat;
}

.site-nav { display: flex; align-items: stretch; }
.site-nav a {
  font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 10px 16px;
  border: var(--line) solid transparent;
  transition: background 120ms, color 120ms;
}
.site-nav a:hover, .site-nav a.is-active { background: var(--ink); color: var(--paper); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-weight: 700;
  font-size: 13px; letter-spacing: 0.02em; text-transform: uppercase;
  padding: 13px 20px;
  border: var(--line) solid var(--ink);
  background: var(--amber); color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 100ms, box-shadow 100ms;
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-color); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ghost { background: var(--paper-2); }
.btn--lg { padding: 18px 28px; font-size: 15px; box-shadow: var(--shadow); }
.btn--lg:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--shadow-color); }

/* Flat mode — hide all hard offset shadows (toggled by the theme tool) */
html.fil-flat .btn,
html.fil-flat .btn:hover,
html.fil-flat .btn--lg,
html.fil-flat .btn--lg:hover,
html.fil-flat .nav-toggle,
html.fil-flat .build,
html.fil-flat .principles li,
html.fil-flat .track-node { box-shadow: none; }
html.fil-flat .btn:hover,
html.fil-flat .btn--lg:hover { transform: none; }
.header-cta { display: inline-flex; }

.nav-toggle {
  display: none; width: 46px; height: 46px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  border: var(--line) solid var(--ink); background: var(--amber);
  box-shadow: var(--shadow-sm);
}
.nav-toggle span { display: block; width: 20px; height: 3px; background: var(--ink); transition: transform 180ms, opacity 180ms; }
.nav-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-nav {
  position: fixed; top: var(--header-h); left: 0; right: 0;
  padding: 18px clamp(18px, 4vw, 40px) 28px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--paper); border-bottom: var(--line) solid var(--ink); z-index: 49;
}
.mobile-nav a {
  font-family: var(--mono); font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 14px 16px; border: var(--line) solid var(--ink); background: var(--paper-2);
}
.mobile-nav a:last-child { background: var(--amber); }
body.nav-open { overflow: hidden; }

/* ---- Section rhythm ---- */
.s { padding: clamp(56px, 9vw, 104px) 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--ink); color: var(--glow);
  padding: 6px 12px; margin: 0 0 clamp(22px, 3vw, 32px);
}

.h2 {
  font-weight: 700; letter-spacing: -0.035em; line-height: 0.98;
  font-size: clamp(34px, 5.6vw, 76px);
  margin: 0 0 clamp(20px, 2.6vw, 30px);
  text-transform: uppercase;
}
.h2 .line { display: block; }
.lead { font-size: clamp(16px, 1.3vw, 19px); max-width: 56ch; margin: 0 0 clamp(24px, 3vw, 36px); line-height: 1.55; }
.prose { max-width: 60ch; font-size: 16px; line-height: 1.6; }
.prose + .prose { margin-top: 1em; }

/* mark = amber highlight block */
.mark { background: var(--amber); padding: 0 0.12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ---- Hero ---- */
.hero {
  min-height: calc(90vh - var(--header-h));
  display: flex; flex-direction: column; justify-content: center;
  padding-top: clamp(40px, 7vh, 88px); padding-bottom: clamp(48px, 8vh, 104px);
}
.hero h1 {
  font-weight: 700; letter-spacing: -0.04em; line-height: 0.84;
  font-size: clamp(48px, 11vw, 150px);
  margin: 0 0 clamp(28px, 4vh, 48px);
  text-transform: uppercase;
}
.hero h1 .line { display: block; }
.hero h1 .mark { display: inline-block; }
.hero .lead { max-width: 50ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---- Approach questions ---- */
.q-list { margin-top: clamp(32px, 4vw, 52px); border-top: var(--line) solid var(--ink); }
.q-list li {
  display: flex; gap: clamp(16px, 3vw, 30px); align-items: baseline;
  padding: clamp(18px, 2.4vw, 26px) 4px;
  border-bottom: var(--line) solid var(--ink);
}
.q-list .n { font-family: var(--mono); font-weight: 700; font-size: clamp(16px, 1.6vw, 22px); flex: 0 0 auto; }
.q-list .q { font-weight: 500; font-size: clamp(19px, 2.4vw, 32px); line-height: 1.1; letter-spacing: -0.02em; }

/* ---- What we build ---- */
.build-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 2.4vw, 28px);
  margin-top: clamp(36px, 4vw, 56px);
}
.build {
  background: var(--paper-2);
  border: var(--line) solid var(--ink);
  box-shadow: var(--shadow);
  padding: clamp(22px, 2.6vw, 32px);
}
.build h3 { font-size: clamp(20px, 2.2vw, 28px); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 12px; text-transform: uppercase; }
.build p { font-size: 15px; line-height: 1.55; margin: 0 0 16px; }
.build .work { font-family: var(--mono); font-size: 12px; line-height: 1.7; }
.build .work b { background: var(--amber); padding: 1px 4px; font-weight: 700; }
.build .work a:hover b { text-decoration: underline; }

/* ---- Process timeline diagram (brutalist take on the v2 layout) ---- */
.track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(10px, 1.5vw, 24px);
  position: relative;
  margin-top: clamp(44px, 5vw, 68px);
}
/* bold connector line through the node centres */
.track::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: var(--ink);
  z-index: 0;
}
.track-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.track-node {
  width: 64px;
  height: 64px;
  border: var(--line) solid var(--ink);
  background: var(--paper-2);
  color: var(--ink);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.track-node svg { width: 28px; height: 28px; }
.track-step--start .track-node { background: var(--amber); }
.track-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.track-title {
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.track-desc {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  max-width: 26ch;
  margin: 0;
}
/* Vertical stack on narrow viewports (mirrors the v2 behaviour) */
@media (max-width: 820px) {
  .track { grid-template-columns: 1fr; gap: 0; margin-top: clamp(32px, 8vw, 48px); }
  .track::before { display: none; }
  .track-step {
    display: grid;
    grid-template-columns: 64px 1fr;
    column-gap: 22px;
    row-gap: 4px;
    align-items: start;
    text-align: left;
    padding-bottom: 30px;
  }
  .track-node { grid-column: 1; grid-row: 1 / 4; margin-bottom: 0; }
  .track-label, .track-title, .track-desc { grid-column: 2; }
  .track-desc { max-width: 46ch; }
  .track-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 72px;
    bottom: -2px;
    width: 3px;
    background: var(--ink);
  }
}

/* ---- Principles ---- */
.principles { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 3vw, 40px); }
.principles li {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
  padding: 10px 14px; border: var(--line) solid var(--ink);
  background: var(--paper-2); box-shadow: var(--shadow-sm);
}

/* ---- Contact ---- */
.contact .h2 { font-size: clamp(38px, 6vw, 88px); }
.contact .lead { max-width: 48ch; }

/* ---- Footer ---- */
.site-footer {
  padding: 22px clamp(18px, 4vw, 40px);
  border-top: var(--line) solid var(--ink);
  font-family: var(--mono); font-size: 12px;
  text-align: center;
}
.site-footer p { margin: 0; }
.site-footer .copy { font-family: var(--font); }
.site-footer a:hover { background: var(--amber); }

/* ---- Reveal ---- */
@media (prefers-reduced-motion: no-preference) {
  .has-motion [data-reveal] {
    opacity: 0; transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .has-motion [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .site-nav, .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 700px) {
  .build-grid { grid-template-columns: 1fr; }
  .q-list li { flex-direction: column; gap: 4px; }
  .cta-row .btn { width: 100%; justify-content: center; }
}
