/*
  longwave.css
  Brand layer for Longwave - a brand, content & communications studio for finance voices.
  Sits on top of the HTML5 UP "Landed" base (main.css); reuses only its nav/panel mechanics.

  Brand system (locked):
    Ink          #23201B  body text on light; near-black grounds
    Teal         #0E4A50  PRIMARY - hero + dark sections, buttons on light
    Signal amber #D0691F  accent/stroke on LIGHT grounds only
    Glow amber   #E9A94E  accent/stroke on DARK/teal grounds only
    Cream/Paper  #F3ECDD  light background, text on dark grounds

  Amber rule: accent / stroke only. Never a filled amber block or button.
  Never amber+cream lettering on near-black. On dark use cream text + amber on teal.
*/

/* ============================================================
   1. Tokens
   ============================================================ */
:root {
  --ink:          #23201B;
  --teal:         #0E4A50;
  --teal-deep:    #0A383D;
  --teal-2:       #12585F;
  --amber:        #D0691F; /* signal - light grounds */
  --amber-glow:   #E9A94E; /* glow - dark grounds */
  --cream:        #F3ECDD;
  --cream-2:      #FBF7EF;
  --white:        #FFFFFF;

  /* Derived tints */
  --ink-70:       rgba(35, 32, 27, 0.72);
  --ink-55:       rgba(35, 32, 27, 0.70);   /* raised from 0.55 for AA contrast */
  --cream-80:     rgba(243, 236, 221, 0.82);
  --cream-60:     rgba(243, 236, 221, 0.62);
  --line-light:   rgba(35, 32, 27, 0.12);   /* dividers only */
  --line-dark:    rgba(243, 236, 221, 0.16); /* dividers only */
  --stroke-light: rgba(14, 74, 80, 0.45);   /* interactive boundary, light ground */
  --stroke-dark:  rgba(243, 236, 221, 0.45); /* interactive boundary, dark ground */
  --surface-dark: rgba(243, 236, 221, 0.05);
  --surface-dark-2: rgba(243, 236, 221, 0.08);

  --font-display: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease:  cubic-bezier(0.22, 0.61, 0.36, 1);
  --r:     14px;
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  22px;
  --maxw:  1160px;
  --pad:    1.5rem;   /* CHROME ONLY: #header, #titleBar */
  --gutter: 1.5rem;   /* CONTENT ONLY: .lw-container - steps DOWN on phones */

  /* ---------- Spacing scale (8px base) ---------- */
  --s-1:  0.25rem;  --s-2:  0.5rem;   --s-3:  0.75rem;
  --s-4:  1rem;     --s-5:  1.5rem;   --s-6:  2rem;
  --s-7:  2.5rem;   --s-8:  3rem;     --s-9:  4rem;   --s-10: 5.5rem;

  /* ---------- Type scale (rem+vw so interpolation is LIVE from 320px) ---------- */
  --fs-micro: 0.75rem;
  --fs-sm:    0.875rem;
  --fs-base:  1rem;
  --fs-lead:  clamp(1.05rem, 0.95rem + 0.5vw, 1.22rem);
  --fs-h4:    1rem;
  --fs-h3:    1.3125rem;
  --fs-h2:    clamp(1.65rem, 1.25rem + 2vw, 2.5rem);
  --fs-h2-lg: clamp(1.9rem, 1.4rem + 2.5vw, 3rem);
  --fs-h1:    clamp(2.2rem, 1.4rem + 4vw, 3.7rem);

  /* ---------- Tracking / leading / measure ---------- */
  --ls-micro:   0.14em;
  --ls-heading: -0.018em;
  --lh-tight: 1.45;
  --lh-body:  1.65;
  --lh-loose: 1.75;
  --lh-head:  1.14;
  --measure:       62ch;
  --measure-lead:  54ch;
  --measure-legal: 66ch;
}

/* Content gutter steps DOWN on phones (was stepping UP - the root cause of "cramped") */
@media screen and (max-width: 640px) { :root { --gutter: 1.25rem; } }
@media screen and (max-width: 480px) { :root { --gutter: 1rem;    } }

/* ============================================================
   2. Base reset / typography (override HTML5 UP base)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  background: var(--cream) !important;
  font-family: var(--font-body) !important;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  color: var(--ink) !important;
  font-size: 16px !important;
  line-height: 1.7 !important;
  font-weight: 400;
  letter-spacing: 0;
}

body, input, select, textarea, button {
  font-family: var(--font-body) !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display) !important;
  color: var(--ink) !important;
  line-height: 1.14 !important;
  letter-spacing: -0.018em;
  font-weight: 700 !important;
  margin: 0 0 0.6em 0 !important;
}

h1 { font-size: clamp(2.2rem, 5.2vw, 3.7rem) !important; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.5rem) !important; font-weight: 600 !important; }
h3 { font-size: 1.2rem !important; font-weight: 600 !important; }
h4 { font-size: 1rem !important; font-weight: 600 !important; }

p { margin: 0 0 1.2em 0 !important; color: var(--ink-70); }
p:last-child { margin-bottom: 0 !important; }
strong, b { color: var(--ink) !important; font-weight: 600 !important; }

a {
  color: var(--teal) !important;
  text-decoration: none !important;
  transition: color 0.2s var(--ease);
}
/* Scoped: the blanket `border:none !important` also zeroed .lw-btn's 2px border,
   which is why the ghost button could never render a stroke on any page. */
a:not(.lw-btn) { border: none !important; }
a:hover { color: var(--amber) !important; }

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

ul { list-style: none; padding: 0; margin: 0; }

/* Visible, on-brand focus for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.lw-btn:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}
.lw-dark a:focus-visible,
.lw-dark button:focus-visible,
.lw-dark .lw-btn:focus-visible { outline-color: var(--amber-glow); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--cream) !important;
  padding: 0.7rem 1.2rem;
  /* Above #titleBar (z-index 10000), which otherwise covers it at <=980px */
  z-index: 10002;
  border-radius: 0 0 8px 0;
  font-weight: 600;
}
.skip-link:focus,
.skip-link:focus-visible { left: 0; outline: 3px solid var(--amber-glow); outline-offset: -3px; }

/* Screen-reader-only (keeps heading hierarchy intact without visual change) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Kill HTML5 UP page-wrapper padding */
#page-wrapper { padding: 0 !important; }
body.is-preload *, body:after { transition: none; }

/* ============================================================
   3. Layout
   ============================================================ */
.lw-container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.lw-container.narrow { max-width: 800px; }

/* Section rhythm: sections are NOT all equal weight. A flat, uniform stack is
   the single strongest "generated" tell. Three deliberate weights below. */
.lw-section { padding: clamp(3.5rem, 2.5rem + 5vw, 6.5rem) 0; position: relative; }
.lw-section.tight { padding: clamp(2.75rem, 2rem + 3.75vw, 4.5rem) 0; }
/* Statement sections carry extra air - they are the beats between dense blocks */
.lw-section.lw-statement { padding: clamp(4.5rem, 3rem + 7.5vw, 8rem) 0; }
/* A dense section sits tighter than the statement that introduced it */
.lw-section.lw-dark { padding: clamp(4rem, 2.75rem + 6vw, 7rem) 0; }

/* Grounds */
.lw-cream  { background: var(--cream); color: var(--ink); }
.lw-paper  { background: var(--cream-2); color: var(--ink); }
.lw-dark   { background: var(--teal); color: var(--cream); }
.lw-dark h1, .lw-dark h2, .lw-dark h3, .lw-dark h4 { color: var(--cream) !important; }
.lw-dark p { color: var(--cream-80); }
.lw-dark strong { color: var(--cream) !important; }
.lw-dark a { color: var(--cream) !important; }
.lw-dark a:hover { color: var(--amber-glow) !important; }

/* ============================================================
   4. Eyebrow + section headers
   ============================================================ */
.lw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  /* Was --amber: 3.67:1 on cream, fails AA. Teal is 8.4:1. The amber wave-mark in
     ::before is a hardcoded data URI, so the brand gesture stays amber. */
  color: var(--teal);
  margin: 0 0 1.1rem;
}
.lw-dark .lw-eyebrow,
.lw-pagehero .lw-eyebrow,
.lw-cta .lw-eyebrow { color: var(--amber-glow); }
/* Wave-mark (the brand gesture) replaces the leading dash on every eyebrow */
.lw-eyebrow::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 34px;
  height: 15px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 24' fill='none' stroke='%23D0691F' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M2 12 C 9 2 16 22 23 12 S 37 2 44 12 S 51 22 58 12'/%3E%3C/svg%3E");
}
.lw-dark .lw-eyebrow::before,
.lw-pagehero .lw-eyebrow::before,
.lw-cta .lw-eyebrow::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 24' fill='none' stroke='%23E9A94E' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M2 12 C 9 2 16 22 23 12 S 37 2 44 12 S 51 22 58 12'/%3E%3C/svg%3E");
}

/* 760px at 1.08rem is ~88ch, well past the 75ch legibility ceiling */
.lw-section-head { max-width: var(--measure); margin: 0 0 clamp(2rem, 1.5rem + 2.5vw, 3rem); }
.lw-section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.lw-section-head p { font-size: 1.08rem; }

.lw-lead { font-size: var(--fs-lead); line-height: var(--lh-body); max-width: var(--measure); }

/* ============================================================
   5. Buttons
   ============================================================ */
.lw-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.2s var(--ease),
              color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  text-align: center;
  white-space: nowrap;
}
.lw-btn:hover { transform: translateY(-2px); }
.lw-btn .lw-arrow { transition: transform 0.2s var(--ease); }
.lw-btn:hover .lw-arrow { transform: translateX(3px); }

/* On LIGHT grounds: teal fill, cream text */
.lw-btn-primary {
  background: var(--teal);
  color: var(--cream) !important;
  box-shadow: 0 8px 22px -12px rgba(14, 74, 80, 0.7);
}
.lw-btn-primary:hover { background: var(--teal-deep); color: var(--cream) !important; }

.lw-btn-ghost {
  background: transparent;
  color: var(--teal) !important;
  border-color: var(--stroke-light);
}
.lw-btn-ghost:hover { border-color: var(--teal); color: var(--teal) !important; }

/* On DARK/teal grounds: cream fill, teal text.
   #lw-hero is a dark ground but carries neither .lw-dark nor .lw-cta, so it must be
   named explicitly - omitting it rendered the hero's ghost CTA teal-on-teal (1:1). */
#lw-hero .lw-btn-primary,
.lw-dark .lw-btn-primary,
.lw-cta .lw-btn-primary,
.lw-btn-oncream {
  background: var(--cream);
  color: var(--teal) !important;
  box-shadow: 0 10px 30px -14px rgba(0,0,0,0.55);
}
.lw-dark .lw-btn-primary:hover,
.lw-cta .lw-btn-primary:hover,
.lw-btn-oncream:hover { background: var(--white); color: var(--teal) !important; }

#lw-hero .lw-btn-ghost,
.lw-dark .lw-btn-ghost,
.lw-cta .lw-btn-ghost,
.lw-pagehero .lw-btn-ghost {
  color: var(--cream) !important;
  border-color: var(--stroke-dark);
}
#lw-hero .lw-btn-ghost:hover,
.lw-dark .lw-btn-ghost:hover,
.lw-cta .lw-btn-ghost:hover,
.lw-pagehero .lw-btn-ghost:hover { border-color: var(--amber-glow); color: var(--cream) !important; }

/* ============================================================
   6. Header / nav
   ============================================================ */
#header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--teal);
  border-bottom: 1px solid var(--line-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 74px;
  padding: 0 var(--pad);
  max-width: 100%;
}
#header::after { display: none; } /* remove HTML5UP pseudo */

#logo { margin: 0; padding: 0; border: 0; }
#logo a { display: inline-flex; align-items: center; }
#logo img { height: 26px; width: auto; }

#nav { display: flex; }
#nav > ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}
#nav > ul > li { margin: 0; padding: 0; }
#nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--cream) !important;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  position: relative;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
#nav a:not(.lw-btn):hover { color: var(--amber-glow) !important; }
#nav li.current > a:not(.lw-btn) { color: var(--cream) !important; }
#nav li.current > a:not(.lw-btn)::after {
  content: "";
  position: absolute;
  left: 0.9rem; right: 0.9rem; bottom: 0.28rem;
  height: 2px;
  background: var(--amber-glow);
  border-radius: 2px;
}
#nav .lw-btn {
  margin-left: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-size: 0.92rem;
}
/* Nav CTA button: cream fill needs teal label (override #nav a cream rule) */
#nav a.lw-btn-oncream,
#nav a.lw-btn-oncream:hover { color: var(--teal) !important; }
#nav li.current > a.lw-btn::after { display: none; }
#nav .nav-soon {
  color: var(--cream-60) !important;
  cursor: default;
}
#nav .nav-soon:hover { color: var(--cream-60) !important; }
.nav-soon-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber-glow);
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  padding: 0.08rem 0.45rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* Hide the mobile title bar on desktop (main.js injects it) */
#titleBar { display: none; }

/* ============================================================
   7. Mobile nav panel (generated by main.js / util.js)
   ============================================================ */
@media screen and (max-width: 980px) {
  #header { display: none; }
  #titleBar {
    display: block;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 60px;
    z-index: 10000;
    background: var(--teal);
    border-bottom: 1px solid var(--line-dark);
  }
  #titleBar .title {
    display: flex;
    align-items: center;
    height: 60px;
    padding-left: 1.4rem;
    color: var(--cream);
  }
  #titleBar .title img { height: 22px; width: auto; }
  #titleBar .title span.apex-accent, #titleBar .title { font-family: var(--font-display); }
  #titleBar .title { padding-right: 64px; }
  #titleBar .toggle {
    position: absolute;
    top: 0 !important;
    left: auto !important;
    right: 0 !important;
    width: 60px !important;
    height: 60px !important;
    border: 0;
    text-decoration: none;
    z-index: 5;
  }
  /* 3-bar hamburger (replaces main.css Font Awesome icon) */
  #titleBar .toggle::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    top: 29px !important;
    left: auto !important;
    right: 18px !important;
    width: 24px !important;
    height: 2px !important;
    background: var(--cream) !important;
    color: transparent !important;
    box-shadow: 0 -7px 0 var(--cream), 0 7px 0 var(--cream) !important;
    font-size: 0 !important;
    line-height: 0 !important;
  }

  /* ---- Canonical nav panel ----
     main.css declares #navPanel{display:none} at top level and only re-enables it
     inside its own max-width:736px query, while this brand layer switches the
     header at 980px. That left 737-980px with NO working navigation at all.
     Everything the panel needs is therefore declared here, in one place.
     translateX uses -100%, not a pixel value, so it can never desync from width. */
  #navPanel {
    display: block;
    position: fixed;
    top: 0; left: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    z-index: 10001;
    background: var(--teal-deep);
    padding: 4rem 1.25rem 2rem;
    box-shadow: 0 0 60px rgba(0,0,0,0.4);
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.4s var(--ease);
  }
  body.navPanel-visible #navPanel { transform: translateX(0); }

  /* The panel overlays rather than pushing the page. Pushing required the wrapper
     shift to match the panel width exactly, which is what broke before. */
  #page-wrapper,
  body.navPanel-visible #page-wrapper,
  body.navPanel-visible #titleBar {
    transform: none !important;
  }

  /* Scrim: gives the open panel a ground and a tap-to-close target */
  #navPanel::after { content: none; }
  body.navPanel-visible::after {
    content: "";
    position: fixed; inset: 0;
    background: rgba(10, 56, 61, 0.55);
    z-index: 10000;
  }
  #navPanel nav { display: block; }
  #navPanel .link {
    display: block;
    padding: 0.9rem 0.5rem;
    color: var(--cream) !important;
    border-bottom: 1px solid var(--line-dark);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.05rem;
  }
  #navPanel .link:hover { color: var(--amber-glow) !important; }
  #navPanel .link.depth-1 { padding-left: 1.5rem; font-size: 0.95rem; }
  body { padding-top: 0; }
  /* push content below fixed mobile bar */
  #page-wrapper { padding-top: 60px !important; }
}

/* ============================================================
   8. Hero
   ============================================================ */
#lw-hero {
  position: relative;
  background: var(--teal);
  color: var(--cream);
  overflow: hidden;
  padding: clamp(4rem, 11vw, 8rem) 0 clamp(3.5rem, 8vw, 6rem);
}
#lw-hero .lw-container { position: relative; z-index: 2; }

/* decorative amber wave lines (stroke-only accent, on teal) */
.hero-waves {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
}
.hero-waves svg { position: absolute; width: 160%; height: auto; }
.hero-waves .w1 { top: 18%; left: -30%; opacity: 0.55; }
.hero-waves .w2 { top: 46%; left: -20%; opacity: 0.32; }
.hero-waves .w3 { top: 72%; left: -40%; opacity: 0.2; }
.hero-glow {
  position: absolute;
  z-index: 0;
  width: 640px; height: 640px;
  right: -180px; top: -160px;
  background: radial-gradient(circle, rgba(233,169,78,0.14), transparent 68%);
  pointer-events: none;
}

.hero-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber-glow);
  margin-bottom: 1.6rem;
}
.hero-lockup .wave-mark { width: 34px; height: auto; }
#lw-hero h1 {
  color: var(--cream) !important;
  max-width: 16ch;
  margin-bottom: 1.1rem !important;
}
#lw-hero .hero-sub {
  color: var(--cream-80);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.6;
  max-width: 60ch;
  margin-bottom: 0 !important;
}
/* .hero-actions is defined once, in section 19b, so it also works standalone
   (404.html previously needed an inline margin-top patch). */

/* ============================================================
   9. The opportunity
   ============================================================ */
.lw-statement h2 {
  font-size: clamp(1.9rem, 4vw, 3rem) !important;
  max-width: 18ch;
}
.lw-statement .lw-lead { max-width: 62ch; margin-top: 1.2rem; }
.lw-rule {
  width: 54px;
  height: 3px;
  background: var(--amber);
  border-radius: 3px;
  margin: 0 0 1.6rem;
}
.lw-dark .lw-rule { background: var(--amber-glow); }

/* ============================================================
   10. What we do - the machine (cards)
   ============================================================ */
.machine-intro {
  max-width: 62ch;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.6;
  color: var(--cream-80);
  margin-bottom: clamp(2rem, 4vw, 3rem) !important;
}

.card-grid {
  display: grid;
  /* min() guards the 320px viewport - a bare 260px minimum overflows the container */
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.25rem;
}
.card-grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }

/* Machine: 5 cards as 3-on-top, 2-centred-below (flex so the remainder centres) */
.machine-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  grid-template-columns: none;
}
.machine-grid > .lw-card { flex: 1 1 260px; max-width: 380px; }
@media screen and (min-width: 861px) {
  .machine-grid > .lw-card {
    flex: 0 1 calc(33.333% - 0.84rem);
    max-width: calc(33.333% - 0.84rem);
  }
}

.lw-card {
  position: relative;
  background: var(--surface-dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--r);
  /* Padding steps DOWN on phones. Fixed 1.9/1.7rem consumed 30.7% of a 375px
     viewport and wrapped card copy at ~33 characters. */
  padding: clamp(1.25rem, 0.75rem + 2.2vw, 1.9rem) clamp(1.1rem, 0.6rem + 2.2vw, 1.7rem);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
  overflow: hidden;
}
.lw-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--amber-glow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.lw-card:hover {
  transform: translateY(-4px);
  border-color: rgba(233,169,78,0.4);
  background: var(--surface-dark-2);
}
.lw-card:hover::before { transform: scaleX(1); }
.lw-card .card-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--amber-glow);
  margin-bottom: 1rem;
}
.lw-card .card-icon {
  width: 46px; height: 46px;
  margin-bottom: 1.1rem;
  color: var(--amber-glow);
}
.lw-card .card-icon svg { width: 100%; height: 100%; display: block; }
.lw-card h3 { color: var(--cream) !important; margin-bottom: 0.5rem !important; }
.lw-card p { color: var(--cream-80); font-size: 0.97rem; margin: 0 !important; }

/* Light-ground card variant (used on About/Work) */
.lw-cream .lw-card,
.lw-paper .lw-card {
  background: var(--white);
  border-color: var(--line-light);
  box-shadow: 0 20px 40px -32px rgba(35,32,27,0.4);
}
.lw-cream .lw-card::before,
.lw-paper .lw-card::before { background: var(--amber); }
.lw-cream .lw-card h3,
.lw-paper .lw-card h3 { color: var(--teal) !important; }
.lw-cream .lw-card p,
.lw-paper .lw-card p { color: var(--ink-70); }
.lw-cream .lw-card .card-icon,
.lw-cream .lw-card .card-num,
.lw-paper .lw-card .card-icon,
.lw-paper .lw-card .card-num { color: var(--amber); }
.lw-cream .lw-card:hover,
.lw-paper .lw-card:hover { border-color: rgba(208,105,31,0.4); }

/* ============================================================
   11. Two-column feature (who it's for / how we work)
   ============================================================ */
.lw-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.lw-split.stack { align-items: start; }

.lw-panel {
  border-left: 3px solid var(--amber);
  padding-left: 1.5rem;
}
.lw-dark .lw-panel { border-left-color: var(--amber-glow); }

.lw-checklist { margin-top: 1.3rem; display: grid; gap: 0.75rem; }
.lw-checklist li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 1rem;
  color: var(--ink-70);
}
.lw-dark .lw-checklist li { color: var(--cream-80); }
.lw-checklist .tick {
  flex: 0 0 auto;
  margin-top: 0.15rem;
  width: 20px; height: 20px;
  color: var(--amber);
}
.lw-dark .lw-checklist .tick { color: var(--amber-glow); }

/* ============================================================
   12. CTA band
   ============================================================ */
.lw-cta {
  background: var(--teal-deep);
  color: var(--cream);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.lw-cta .lw-container { position: relative; z-index: 2; }
.lw-cta h2 { color: var(--cream) !important; max-width: 20ch; margin-left: auto; margin-right: auto; }
.lw-cta p { color: var(--cream-80); max-width: 54ch; margin-left: auto; margin-right: auto; }
.lw-cta .hero-glow { left: 50%; top: 40%; transform: translate(-50%,-50%); right: auto; }
.lw-cta .lw-actions { margin-top: 1.8rem; display: flex; justify-content: center; flex-wrap: wrap; gap: 0.9rem; }

/* ============================================================
   13. Contact form
   ============================================================ */
.contact-wrap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-aside .lw-eyebrow { margin-bottom: 1.3rem; }
.contact-aside .lw-lead { margin-bottom: 1.5rem; }
.contact-points { display: grid; gap: 1rem; margin-top: 1.75rem; }
.contact-point { display: flex; gap: 0.8rem; align-items: flex-start; }
.contact-point .cp-icon { width: 22px; height: 22px; color: var(--amber); flex: 0 0 auto; margin-top: 0.15rem; }
.contact-point p { font-size: 0.96rem; margin: 0 !important; }

.lw-form {
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  box-shadow: 0 30px 60px -40px rgba(35,32,27,0.45);
}
.lw-field { margin-bottom: 1.15rem; }
.lw-field.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.lw-field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.86rem;
  color: var(--ink);
  margin-bottom: 0.45rem;
}
.lw-field .opt { color: var(--ink-55); font-weight: 400; }
.lw-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink) !important;
  background: var(--cream-2) !important;
  border: 1.5px solid var(--line-light) !important;
  border-radius: 10px;
  padding: 0.8rem 0.95rem;
  line-height: 1.4;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
select.lw-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2323201B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
}
.lw-input:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(14,74,80,0.12);
  outline: none;
}
/* Keyboard focus must stay visible. Declared after :focus at equal specificity
   so it wins; pointer focus keeps the quieter shadow-only treatment. */
.lw-input:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}
.lw-input::placeholder { color: var(--ink-55); }
textarea.lw-input { min-height: 130px; resize: vertical; }

.lw-form .lw-btn { width: 100%; justify-content: center; margin-top: 0.4rem; }

.lw-form-note { font-size: 0.82rem; color: var(--ink-70); margin: 1rem 0 0 !important; text-align: center; }

.field-error {
  display: none;
  color: #a6401a;
  font-size: 0.82rem;
  margin-top: 0.35rem;
  font-weight: 500;
}
.lw-field.invalid .field-error { display: block; }
.lw-field.invalid .lw-input { border-color: #c0532a !important; }

/* Stays in the accessibility tree so aria-live can announce it.
   display:none would remove it entirely and screen readers would never hear
   the success or error message. */
.form-status {
  display: block;
  height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  overflow: hidden;
  border-radius: 10px;
  font-size: var(--fs-sm);
  line-height: var(--lh-tight);
}
.form-status.show {
  height: auto;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  overflow: visible;
}
.form-status.success {
  background: rgba(14,74,80,0.08);
  border: 1px solid rgba(14,74,80,0.25);
  color: var(--teal);
}
.form-status.error {
  background: rgba(192,83,42,0.08);
  border: 1px solid rgba(192,83,42,0.3);
  color: #a6401a;
}

/* About brand panel */
.about-brand-panel {
  background: var(--teal);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-lg);
  padding: clamp(2rem, 4vw, 2.8rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.about-brand-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 3px;
  background: var(--amber-glow);
}
.about-brand-panel img { margin: 0 auto 1.4rem; height: 60px; width: auto; }
.about-brand-panel .abp-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--cream) !important;
  font-size: 1.05rem;
  margin: 0 0 0.35rem !important;
}
.about-brand-panel .abp-tag {
  color: var(--amber-glow) !important;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin: 0 !important;
}

/* About — founder bio + photo */
.founder-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.founder-photo {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line-light);
  box-shadow: 0 30px 60px -42px rgba(35, 32, 27, 0.55);
  background: var(--cream-2);
  aspect-ratio: 4 / 5;
}
.founder-photo::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--amber);
  z-index: 2;
}
.founder-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.founder-bio .role {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1rem;
}
.founder-bio h2 { color: var(--teal) !important; margin-bottom: 0.6rem !important; }
@media screen and (max-width: 760px) {
  .founder-grid { grid-template-columns: 1fr; }
  .founder-photo { max-width: 340px; margin: 0 auto; }
}

/* ============================================================
   14. Page hero (inner pages)
   ============================================================ */
.lw-pagehero {
  background: var(--teal);
  color: var(--cream);
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line-dark);
}
.lw-pagehero .lw-container { position: relative; z-index: 2; }
.lw-pagehero h1 { color: var(--cream) !important; max-width: 20ch; }
.lw-pagehero p { color: var(--cream-80); font-size: clamp(1.02rem, 2vw, 1.2rem); max-width: 56ch; }

/* ============================================================
   15. Work / coming soon
   ============================================================ */
.soon-box {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  border: 1px dashed var(--line-light);
  border-radius: var(--r-lg);
  padding: clamp(2.5rem, 6vw, 4rem) 2rem;
  background: var(--white);
}
.soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(208,105,31,0.35);
  border-radius: 30px;
  padding: 0.4rem 0.95rem;
  margin-bottom: 1.5rem;
}
.soon-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }

/* Work page — case study card */
.work-card {
  display: block;
  max-width: 780px;
  background: var(--teal);
  color: var(--cream);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-lg);
  padding: clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.work-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 3px;
  background: var(--amber-glow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.work-card:hover {
  transform: translateY(-4px);
  border-color: rgba(233,169,78,0.4);
  box-shadow: 0 30px 60px -34px rgba(0,0,0,0.6);
}
.work-card:hover::before { transform: scaleX(1); }
.work-card .wc-eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-glow);
  margin: 0 0 0.9rem;
}
.work-card h2 { color: var(--cream) !important; margin-bottom: 0.7rem !important; }
.work-card p { color: var(--cream-80); max-width: 60ch; }
.work-card .wc-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.3rem 0 0;
}
.work-card .wc-scope span {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.76rem;
  color: var(--cream-80);
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  padding: 0.32rem 0.8rem;
}
.work-card .wc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin: 1.5rem 0 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-dark);
}
.work-card .wc-stats span { font-size: 0.9rem; color: var(--cream-80); }
.work-card .wc-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--cream) !important;
  line-height: 1.1;
}
.work-card .wc-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--amber-glow) !important;
}
.work-card:hover .wc-cta .lw-arrow { transform: translateX(3px); }

/* ============================================================
   16. Case study
   ============================================================ */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 0.5rem;
}
.cs-stat {
  background: var(--surface-dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--r);
  padding: 1.5rem 1.3rem;
}
.cs-stat .n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  color: var(--cream) !important;
  line-height: 1;
  margin-bottom: 0.4rem;
}
.cs-stat .n .accent { color: var(--amber-glow); }
.cs-stat .l { font-size: 0.85rem; color: var(--cream-80); }

.cs-gate-banner {
  background: #402a12;
  color: #f4d9b5;
  border-bottom: 2px solid var(--amber);
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.65rem 1rem;
  letter-spacing: 0.02em;
}

/* Legal / privacy body */
.lw-legal h2 {
  font-size: 1.3rem !important;
  margin-top: 2.2rem !important;
  color: var(--teal) !important;
}
.lw-legal h2:first-child { margin-top: 0 !important; }
.lw-legal p { font-size: 1rem; }

/* ============================================================
   17. Footer
   ============================================================ */
#footer {
  background: var(--teal-deep);
  color: var(--cream);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
  border-top: 1px solid var(--line-dark);
}
#footer .footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line-dark);
}
#footer .footer-brand img { height: 30px; width: auto; margin-bottom: 1rem; }
#footer .footer-tag {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--cream);
  font-size: 1.05rem;
}
#footer .footer-nav { display: flex; flex-wrap: wrap; gap: 2.5rem; }
#footer .footer-col h3 {
  color: var(--amber-glow) !important;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600 !important;
  margin-bottom: 0.9rem !important;
}
#footer .footer-col a {
  display: block;
  color: var(--cream-80) !important;
  padding: 0.28rem 0;
  font-size: 0.95rem;
}
#footer .footer-col a:hover { color: var(--amber-glow) !important; }
.footer-social { display: flex; gap: 0.6rem; margin-top: 0.4rem; }
.footer-social a {
  width: 44px; height: 44px;
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cream) !important;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.footer-social a:hover { border-color: var(--amber-glow); color: var(--amber-glow) !important; }
.footer-social svg { width: 18px; height: 18px; }
#footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.8rem;
  font-size: 0.85rem;
  color: var(--cream-80);
}
#footer .footer-bottom a { color: var(--cream-60) !important; }
#footer .footer-bottom a:hover { color: var(--amber-glow) !important; }

/* ============================================================
   18. Reveal animation
   ============================================================ */
/* Scoped to .js so the page is fully readable when JavaScript is unavailable
   or fails. Without this the entire site renders blank at opacity 0. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .reveal:not(.visible) { will-change: opacity, transform; }
.js .reveal.visible { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }
.reveal.d5 { transition-delay: 0.4s; }

/* ============================================================
   19. Responsive
   ============================================================ */
@media screen and (max-width: 860px) {
  .lw-split { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .contact-aside { order: 2; }
}
@media screen and (max-width: 560px) {
  .lw-field.row { grid-template-columns: 1fr; }
  .hero-actions .lw-btn, .lw-cta .lw-btn { width: 100%; justify-content: center; }
  #footer .footer-grid { flex-direction: column; }
}

/* ============================================================
   19b. Touch targets (>=44px) + notch safe areas
   ============================================================ */
@media screen and (max-width: 760px) {
  /* Footer links get a comfortable 44px tap height on touch */
  #footer .footer-col a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.3rem 0;
  }
  #footer .footer-bottom a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  #footer .footer-bottom { align-items: center; }
}

/* Respect notch / rounded-corner safe areas on fixed, edge-anchored elements */
@media screen and (max-width: 980px) {
  #titleBar .title { padding-left: calc(var(--pad) + env(safe-area-inset-left)); }
  #titleBar .title a { display: inline-flex; align-items: center; min-height: 44px; }
  #titleBar .toggle { right: env(safe-area-inset-right); }
  #titleBar .toggle:focus-visible {
    outline: 3px solid var(--amber-glow);
    outline-offset: -4px;
    border-radius: 6px;
  }
  #navPanel {
    padding-left: calc(1.25rem + env(safe-area-inset-left));
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
  }
}

/* ============================================================
   19b. Signature elements
   Art direction that separates a designed page from a generated one.
   Amber appears only as stroke, glyph or low-alpha tint - never a filled block.
   ============================================================ */

/* --- S1. Hero stat strip ---------------------------------------------------
   The hero previously ended on ~112px of dead air, and the homepage carried no
   proof at all. This closes both. */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: clamp(2rem, 1.25rem + 3vw, 3rem);
  border-top: 1px solid var(--line-dark);
  max-width: 640px;
}
.hero-stat { padding: 1.4rem 1rem 0; border-right: 1px solid var(--line-dark); }
.hero-stat:first-child { padding-left: 0; }
.hero-stat:last-child  { padding-right: 0; border-right: none; }
.hs-n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1rem + 2.2vw, 2.1rem);
  color: var(--cream);
  line-height: 1;
  letter-spacing: -0.02em;
}
.hs-n .accent { color: var(--amber-glow); }
.hs-l {
  font-size: 0.72rem;
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
  color: var(--cream-60);
  margin-top: 0.5rem;
  line-height: 1.35;
}
/* Mandatory: three columns at 375px give ~110px per cell and "67,000" overflows */
@media screen and (max-width: 480px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat:nth-child(2) { border-right: none; padding-right: 0; }
  .hero-stat:nth-child(3) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line-dark);
    border-right: none;
    padding-left: 0;
    margin-top: 1.4rem;
  }
}

/* --- S2. Framed icon chips -------------------------------------------------
   A bare 1.6px stroke floating in dead space is the most recognisable tell of
   generated UI. A chip with mass reads as a deliberate object. */
.lw-card .card-icon {
  width: 46px; height: 46px; padding: 11px;
  margin-bottom: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--amber-glow);
  background: rgba(233,169,78,0.10);
  border: 1px solid rgba(233,169,78,0.32);
  border-radius: var(--r-md);
}
.lw-card .card-icon svg { width: 100%; height: 100%; stroke-width: 1.9; }
.lw-cream .lw-card .card-icon,
.lw-paper .lw-card .card-icon {
  color: var(--amber);
  background: rgba(208,105,31,0.08);
  border-color: rgba(208,105,31,0.30);
}

/* --- S3. Scanline texture on dark grounds ----------------------------------
   Every section was a flat colour fill - no gradient, image or texture anywhere
   in the stylesheet. A 3px scanline field reads as broadcast signal and carries
   the "longwave / make the market listen" idea. Built from the palette, no asset. */
#lw-hero, .lw-dark, .lw-pagehero { position: relative; }
#lw-hero::after,
.lw-dark::before,
.lw-cta::before,
.lw-pagehero::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(243,236,221,0.05) 0 1px, transparent 1px 3px);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black, transparent);
          mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black, transparent);
}
.lw-dark .lw-container,
.lw-pagehero .lw-container { position: relative; z-index: 2; }
/* Paper gets a fainter warm tooth so cream and paper no longer read as one slab */
.lw-paper { background-image: repeating-linear-gradient(0deg, rgba(35,32,27,0.022) 0 1px, transparent 1px 4px); }

/* --- S4. Sequence numerals -------------------------------------------------
   .card-num was fully styled in the original sheet but never wired into markup.
   Numbering the machine cards gives the 3+2 grid a reason to be 3+2. */
.lw-card .card-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-micro);
  color: var(--amber-glow);
  margin-bottom: 0.6rem;
}
.lw-cream .lw-card .card-num,
.lw-paper .lw-card .card-num { color: var(--teal); }

/* --- S5. Full-bleed hairline at every ground change ------------------------ */
.lw-cream + .lw-paper,
.lw-paper + .lw-cream,
.lw-cream + .lw-cream { border-top: 1px solid var(--line-light); }

/* --- Hero actions: one spacing value, works standalone --------------------- */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  margin-top: var(--s-6);
}

/* --- Touch devices: neutralise hover states ------------------------------- */
@media (hover: none) {
  .lw-card:hover { transform: none; }
  .lw-btn:hover  { transform: none; }
}

/* ============================================================
   20. Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
