/* =========================================================
   ZENRAX — Portfolio
   Design system: tokens, layout, components, responsive
   Light theme: white + gold dragon
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* Ink */
  --ink: #1b1714;
  --ink-2: #352e27;
  --muted: #675e55;      /* 5.9:1 on white  */
  --muted-2: #857b70;    /* decorative only */

  /* Gold — text-safe vs decorative */
  --gold-ink: #77570c;   /* 7.0:1 on white, safe for text/links */
  --gold-ink-2: #8d6a17;
  --gold: #c9a227;       /* decorative */
  --gold-soft: #e2c56a;
  --gold-pale: #f2e4b4;
  --gold-wash: #fbf6e9;

  /* Surfaces */
  --bg: #ffffff;
  --bg-ivory: #fbf8f2;
  --surface: #ffffff;
  --surface-2: #fdfbf7;
  --surface-sunk: #f6f1e6;

  --line: rgba(27, 23, 20, 0.10);
  --line-2: rgba(27, 23, 20, 0.16);
  --line-gold: rgba(201, 162, 39, 0.36);
  --line-gold-soft: rgba(201, 162, 39, 0.20);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --pill: 999px;

  --shadow-sm: 0 1px 2px rgba(27, 23, 20, 0.06);
  --shadow-1: 0 2px 10px -2px rgba(27, 23, 20, 0.10);
  --shadow-2: 0 16px 38px -16px rgba(27, 23, 20, 0.22);
  --shadow-3: 0 34px 70px -26px rgba(27, 23, 20, 0.30);
  --shadow-gold: 0 18px 46px -20px rgba(201, 162, 39, 0.55);

  --foil: linear-gradient(100deg, #8d6a17 0%, #c9a227 32%, #f0d98f 50%, #c9a227 68%, #8d6a17 100%);

  --container: 1160px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --header-h: 74px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "Marcellus", "Trajan Pro", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- 2. Reset & base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

/* The UA rule `[hidden]{display:none}` loses to any author declaration such as
   .tag{display:inline-flex}, so hidden badges would still render without this. */
[hidden] { display: none !important; }

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Soft gold wash + arc rings */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(52rem 34rem at 82% -8%, rgba(201, 162, 39, 0.13), transparent 62%),
    radial-gradient(40rem 30rem at 4% 4%, rgba(226, 197, 106, 0.10), transparent 64%);
  pointer-events: none;
}

img, svg, video { display: block; max-width: 100%; }
svg { flex: none; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

ul, ol { list-style: none; }

::selection {
  background: var(--gold-pale);
  color: var(--ink);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 999;
  padding: 0.7rem 1.1rem;
  background: var(--gold-ink);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.display-xl { font-size: clamp(2.5rem, 6.6vw, 4.6rem); line-height: 1.06; }
.display-lg { font-size: clamp(2rem, 4.6vw, 3.3rem); }
.display-md { font-size: clamp(1.6rem, 3.2vw, 2.35rem); }
.display-sm { font-size: clamp(1.25rem, 2.2vw, 1.5rem); }

.lead {
  font-size: clamp(1.02rem, 1.85vw, 1.16rem);
  color: var(--muted);
  line-height: 1.72;
  max-width: 62ch;
}
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.78rem; }

/* Gold foil reserved for display sizes only — never body copy */
.foil {
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.95rem 0.4rem 0.8rem;
  margin-bottom: 1.15rem;
  background: rgba(201, 162, 39, 0.10);
  border: 1px solid var(--line-gold);
  border-radius: var(--pill);
  color: var(--gold-ink);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.22);
}

.gold-diamond {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0.5rem 0;
  color: var(--gold);
}
.gold-diamond::before,
.gold-diamond::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 190px;
  background: linear-gradient(90deg, transparent, var(--line-gold));
}
.gold-diamond::after { background: linear-gradient(270deg, transparent, var(--line-gold)); }
.gold-diamond svg { width: 12px; height: 12px; }

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

.section {
  padding-block: clamp(3.75rem, 8vw, 7rem);
  position: relative;
}
.section--tight { padding-block: clamp(2.75rem, 5.5vw, 4.25rem); }
.section--ivory { background: var(--bg-ivory); }
.section--sunk { background: var(--surface-sunk); }
.section--edge { border-top: 1px solid var(--line); }

.section-head { max-width: 62ch; margin-bottom: clamp(2.1rem, 4.5vw, 3.5rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head .lead { margin-top: 1rem; }

/* Every single-column grid uses minmax(0, 1fr): a bare 1fr floors at
   min-content, and nowrap children would push the track past a 320px viewport. */
.grid { display: grid; gap: clamp(1rem, 2vw, 1.4rem); grid-template-columns: minmax(0, 1fr); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.grid-plans { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.25rem);
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split--reverse .split__media { order: 2; }
  .split--wide { grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); }
}

/* ---------- 5. Buttons ---------- */
.btn {
  --btn-bg: var(--gold-ink);
  --btn-ink: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--pill);
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
  box-shadow: var(--shadow-gold);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -18px rgba(201, 162, 39, 0.7); }
.btn:active { transform: translateY(0); }

.btn--lg { padding: 1rem 2rem; font-size: 1rem; }
.btn--sm { padding: 0.6rem 1.1rem; font-size: 0.86rem; }
.btn--block { width: 100%; }

.btn--ghost {
  --btn-bg: transparent;
  --btn-ink: var(--ink);
  border: 1px solid var(--line-2);
  box-shadow: none;
}
.btn--ghost:hover {
  --btn-bg: #fff;
  border-color: var(--gold);
  color: var(--gold-ink);
  box-shadow: var(--shadow-2);
}

.btn--soft {
  --btn-bg: var(--surface-sunk);
  --btn-ink: var(--ink);
  box-shadow: none;
}
.btn--soft:hover { --btn-bg: var(--gold-wash); color: var(--gold-ink); box-shadow: var(--shadow-1); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}
.btn-row--center { justify-content: center; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--gold-ink);
}
.link-arrow svg { transition: transform 0.25s var(--ease); }
.link-arrow:hover svg { transform: translateX(5px); }

/* ---------- 6. Header & nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(27, 23, 20, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.16rem;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.brand__mark {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gold-wash);
  box-shadow: inset 0 0 0 1px var(--line-gold-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.brand:hover .brand__mark {
  transform: rotate(6deg) scale(1.05);
  box-shadow: inset 0 0 0 1px var(--line-gold), var(--shadow-gold);
}
/* The logo art ships on a cream field; multiply drops that onto the page */
.brand__mark img,
.crest img,
.footer-crest img { mix-blend-mode: multiply; }

.brand__name { line-height: 1.1; }
.brand__name small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-top: 2px;
}

.nav { display: flex; align-items: center; gap: 0.3rem; }
.nav__link {
  position: relative;
  padding: 0.5rem 0.85rem;
  font-size: 0.91rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--pill);
  transition: color 0.22s var(--ease), background 0.22s var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--gold-wash); }
.nav__link[aria-current="page"] { color: var(--gold-ink); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transform: translateX(-50%);
}

.nav__actions { display: flex; align-items: center; gap: 0.55rem; margin-left: 0.5rem; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #fff;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: grid; }
  .nav {
    /* absolute, not fixed: .site-header could gain a filter/transform and become
       the containing block, detaching the drawer from the viewport */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 1rem var(--gutter) 1.5rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-3);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav__link {
    padding: 0.85rem 1rem;
    font-size: 1.04rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
  }
  .nav__link[aria-current="page"] {
    background: var(--gold-wash);
    border-color: var(--line-gold-soft);
  }
  .nav__link[aria-current="page"]::after { display: none; }
  .nav__actions {
    flex-direction: column;
    align-items: stretch;
    margin: 0.7rem 0 0;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
  }
  .nav__actions .btn { width: 100%; }
}

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5.75rem) clamp(2.75rem, 6vw, 5rem);
  overflow: hidden;
}
/* gold arc rings, echoing the emblem */
.hero::before {
  content: "";
  position: absolute;
  top: -34%;
  right: -14%;
  width: 62vw;
  max-width: 780px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line-gold-soft);
  box-shadow:
    inset 0 0 0 46px rgba(255, 255, 255, 0.55),
    inset 0 0 0 47px var(--line-gold-soft);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 5.5vw, 4rem);
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr); }
}

.hero__title { margin-block: 0.2rem 1.3rem; }

.crest {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.crest img {
  position: relative;
  z-index: 1;
  width: min(100%, 340px);
  height: auto;
  border-radius: var(--radius-xl);
  filter: drop-shadow(0 26px 50px rgba(140, 105, 20, 0.22));
}
.crest__halo {
  position: absolute;
  width: min(100%, 380px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.20), transparent 68%);
  filter: blur(8px);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  margin-top: 2.1rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.hero__meta-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.86rem; color: var(--muted); }
.hero__meta-item svg { width: 16px; height: 16px; color: var(--gold-ink); }

/* ---------- 8. Cards ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.65rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(150deg, rgba(201, 162, 39, 0.32), transparent 46%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--line-gold);
  box-shadow: var(--shadow-2);
}
.card:hover::after { opacity: 1; }

.card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1.15rem;
  border-radius: 13px;
  background: linear-gradient(150deg, var(--gold-wash), rgba(255, 255, 255, 0.6));
  border: 1px solid var(--line-gold-soft);
  color: var(--gold-ink);
}
.card__icon svg { width: 22px; height: 22px; }
.card__title { font-size: 1.22rem; margin-bottom: 0.5rem; }
.card__text { font-size: 0.93rem; color: var(--muted); }
.card__list {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.card__list li { display: flex; gap: 0.55rem; font-size: 0.88rem; color: var(--muted); }
.card__list svg { width: 16px; height: 16px; color: var(--gold-ink); margin-top: 3px; }
.card__foot { margin-top: auto; padding-top: 1.25rem; }

.check-list {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(0, 1fr);
}
.check-list li { display: flex; gap: 0.6rem; font-size: 0.92rem; color: var(--muted); }
.check-list svg { width: 17px; height: 17px; color: var(--gold-ink); margin-top: 3px; flex: none; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  background: var(--gold-wash);
  border: 1px solid var(--line-gold-soft);
  border-radius: var(--pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-ink);
  white-space: nowrap;
}
.tag--plain { background: var(--surface-sunk); border-color: var(--line); color: var(--muted); }
.tag--accent {
  background: var(--gold-ink);
  border-color: var(--gold-ink);
  color: #fff;
}
/* Marks concept demos and blank templates so nothing reads as client work */
.tag--demo {
  background: #fdf2f2;
  border-color: rgba(179, 38, 30, 0.28);
  color: #a8271f;
}

.step { position: relative; }
.step__num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-gold);
  color: var(--gold-ink);
  font-size: 0.82rem;
  font-weight: 700;
}
.step__title { font-size: 1.15rem; margin-bottom: 0.4rem; }
.step__text { font-size: 0.92rem; color: var(--muted); }

/* ---------- 9. Stats ---------- */
.stats {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  padding: clamp(1.6rem, 3.5vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.stat { min-width: 0; }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  line-height: 1.05;
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label { margin-top: 0.4rem; font-size: 0.84rem; color: var(--muted); }

/* ---------- 10. Media panels ---------- */
.panel {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2rem);
  background: linear-gradient(170deg, var(--surface-2), var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.panel--gold { background: linear-gradient(170deg, var(--gold-wash), var(--bg) 62%); border-color: var(--line-gold-soft); }

.rows { display: grid; gap: 0.65rem; grid-template-columns: minmax(0, 1fr); }
.row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 0.95rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.row:hover { transform: translateX(4px); border-color: var(--line-gold); box-shadow: var(--shadow-sm); }
.row__art {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--gold-soft), var(--gold-ink-2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.row:nth-child(2) .row__art { background: linear-gradient(140deg, #2b2622, #6b5f52); }
.row:nth-child(3) .row__art { background: linear-gradient(140deg, var(--gold-pale), var(--gold)); }
.row:nth-child(4) .row__art { background: linear-gradient(140deg, #efe7d5, #cdb98d); }
.row__body { min-width: 0; flex: 1; }
.row__t { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__s { font-size: 0.8rem; color: var(--muted); }
.row__tick { color: var(--gold-ink); display: grid; place-items: center; flex: none; }
.row__tick svg { width: 17px; height: 17px; }

.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  font-size: 0.84rem;
  font-weight: 500;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.pill:hover { border-color: var(--gold); transform: translateY(-2px); }
.pill svg { width: 15px; height: 15px; color: var(--gold-ink); }

/* ---------- 11. Work gallery ---------- */
.work {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.work:hover { transform: translateY(-5px); border-color: var(--line-gold); box-shadow: var(--shadow-2); }

.work__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, var(--gold-wash), var(--surface-sunk));
  border-bottom: 1px solid var(--line);
}
.work__thumb::before {
  content: "";
  position: absolute;
  inset: 12% 16%;
  border-radius: var(--radius);
  border: 1px solid var(--line-gold-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.35));
  box-shadow: var(--shadow-1);
}
.work__glyph { position: relative; color: var(--gold-ink); opacity: 0.85; }
.work__glyph svg { width: 42px; height: 42px; }
.work__kind {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 1;
}
.work__body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.work__title { font-size: 1.14rem; margin-bottom: 0.4rem; }
.work__text { font-size: 0.9rem; color: var(--muted); }
.work__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.1rem; }
.work__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- 12. Case studies ---------- */
.doc {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.doc:hover { transform: translateY(-4px); border-color: var(--line-gold); box-shadow: var(--shadow-2); }
@media (max-width: 560px) {
  .doc { grid-template-columns: 92px minmax(0, 1fr); }
}

.doc__cover {
  position: relative;
  display: block;
  aspect-ratio: 892 / 934;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--surface-sunk);
  box-shadow: var(--shadow-1);
  transition: transform 0.3s var(--ease);
}
.doc__cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.doc__cover:hover img { transform: scale(1.03); }

.doc__ext {
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  padding: 0.18rem 0.45rem;
  background: rgba(7, 6, 5, 0.82);
  border: 1px solid var(--line-gold-soft);
  border-radius: var(--pill);
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.doc__body { min-width: 0; }
.doc__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.doc__note {
  margin-top: 0.9rem;
  padding-left: 0.7rem;
  border-left: 2px solid var(--line-gold);
  font-size: 0.8rem;
  color: var(--muted-2);
}
.doc__title { font-size: clamp(1.15rem, 2.2vw, 1.4rem); margin: 0.6rem 0 0.5rem; }
.doc__text { font-size: 0.9rem; color: var(--muted); }
.doc__facts {
  display: grid;
  gap: 0.4rem 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}
.doc__facts b { color: var(--ink); font-weight: 600; }
.doc__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.15rem; }

/* ---------- 13. Brief templates ---------- */
.tpl {
  display: flex;
  flex-direction: column;
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.tpl:hover { transform: translateY(-5px); border-color: var(--line-gold); box-shadow: var(--shadow-2); }
.tpl__title { font-size: 1.18rem; }
.tpl__for { margin-top: 0.4rem; font-size: 0.87rem; color: var(--muted); }

.tpl__cols {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 480px) {
  .tpl__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tpl__h {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.tpl__cols > div:first-child .tpl__h { color: var(--gold-ink); }
.tpl__cols > div:last-child .tpl__h { color: var(--muted); }

.tpl__list { display: grid; gap: 0.4rem; grid-template-columns: minmax(0, 1fr); }
.tpl__list li {
  position: relative;
  padding-left: 0.95rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.tpl__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* The brief itself is clipboard-only, never shown inline */
.brief-text { display: none; }

.tpl .btn-row { margin-top: auto; padding-top: 1.4rem; }
.btn.is-copied,
.btn--soft.is-copied {
  --btn-bg: #1f7a2d;
  --btn-ink: #fff;
  box-shadow: none;
}
.btn.is-failed,
.btn--soft.is-failed {
  --btn-bg: #b3261e;
  --btn-ink: #fff;
  box-shadow: none;
}

/* ---------- 14. Pricing + estimator ---------- */
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.plan:hover { transform: translateY(-5px); border-color: var(--line-gold); box-shadow: var(--shadow-2); }
.plan--featured {
  border-color: var(--line-gold);
  background: linear-gradient(172deg, var(--gold-wash), #fff 58%);
  box-shadow: var(--shadow-gold);
}
.plan__badge-row {
  position: absolute;
  top: -12px;
  left: 1.8rem;
  right: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 1.6rem;
}
.plan__name { font-size: 1.24rem; }
.plan__for { font-size: 0.84rem; color: var(--muted); margin-top: 0.25rem; }
.plan__price {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  margin-top: 1.25rem;
}
.plan__amount {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.plan__amount::before { content: "$"; }
.plan__unit { font-size: 0.84rem; color: var(--muted); }
.plan__note { font-size: 0.78rem; color: var(--muted); margin-top: 0.4rem; min-height: 1.4em; }
.plan .btn { margin-top: 1.4rem; }
.plan__list {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.plan__list li { display: flex; gap: 0.6rem; font-size: 0.89rem; color: var(--muted); }
.plan__list svg { width: 16px; height: 16px; color: var(--gold-ink); margin-top: 3px; flex: none; }

/* Estimator */
.estimator {
  padding: clamp(1.5rem, 3.5vw, 2.4rem);
  background: var(--surface);
  border: 1px solid var(--line-gold-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.estimator__group { margin-bottom: 1.75rem; }
.estimator__group:last-of-type { margin-bottom: 0; }
.estimator__legend {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.segmented {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}
.segmented__btn {
  padding: 0.8rem 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease), color 0.22s var(--ease);
}
.segmented__btn:hover { border-color: var(--line-gold); color: var(--ink); }
.segmented__btn[aria-pressed="true"] {
  background: var(--gold-wash);
  border-color: var(--gold);
  color: var(--gold-ink);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.4);
}
.segmented__btn small { display: block; font-weight: 400; font-size: 0.76rem; color: var(--muted); margin-top: 2px; }

.checks { display: grid; gap: 0.55rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease);
}
.check:hover { border-color: var(--line-gold); }
.check input { margin: 2px 0 0; width: 17px; height: 17px; accent-color: var(--gold-ink); flex: none; }
.check:has(input:checked) { background: var(--gold-wash); border-color: var(--line-gold); }
.check small { display: block; font-size: 0.76rem; color: var(--muted); }

.estimator__out {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 1.75rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 620px) {
  .estimator__out { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
}
.estimator__price {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3rem);
  line-height: 1;
  background: var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.estimator__meta { font-size: 0.88rem; color: var(--muted); }
.estimator__meta strong { color: var(--ink); font-weight: 600; }

/* ---------- 15. FAQ ---------- */
.faq { display: grid; gap: 0.75rem; grid-template-columns: minmax(0, 1fr); max-width: 820px; margin-inline: auto; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.faq-item[open] { border-color: var(--line-gold); box-shadow: var(--shadow-sm); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.3rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
  cursor: pointer;
  list-style: none;
  transition: color 0.25s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--gold-ink); }
.faq-item__chev {
  flex: none;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line-gold-soft);
  border-radius: 50%;
  color: var(--gold-ink);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.faq-item__chev svg { width: 14px; height: 14px; }
.faq-item[open] .faq-item__chev { transform: rotate(180deg); background: var(--gold-wash); }
.faq-item__body { padding: 0 1.3rem 1.3rem; color: var(--muted); font-size: 0.94rem; }

/* ---------- 16. Contact ---------- */
.contact-grid {
  display: grid;
  gap: clamp(1.5rem, 3.5vw, 2.5rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: start; }
}

.form {
  position: relative;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.field { margin-bottom: 1.1rem; }
.field__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.field__label .req { color: #b3261e; }
.field__control {
  width: 100%;
  padding: 0.75rem 0.95rem;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field__control:hover { border-color: var(--gold); }
.field__control:focus {
  outline: none;
  border-color: var(--gold-ink);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.22);
}
textarea.field__control { resize: vertical; min-height: 130px; }
.field__error {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #b3261e;
  font-weight: 500;
}
.field__control[aria-invalid="true"] { border-color: #b3261e; }

.form__note { margin-top: 1rem; font-size: 0.8rem; color: var(--muted); }
.form__status {
  margin-top: 1rem;
  padding: 0.85rem 1.05rem;
  background: var(--gold-wash);
  border: 1px solid var(--line-gold-soft);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--ink-2);
}
.form__status[hidden] { display: none !important; }
.form__status[data-kind="ok"] {
  background: #f1f8f2;
  border-color: rgba(31, 122, 45, 0.28);
  border-left-color: #1f7a2d;
  color: #14521f;
}
.form__status[data-kind="warn"] {
  background: #fdf6ec;
  border-color: rgba(201, 140, 20, 0.3);
  border-left-color: #b8791a;
  color: #6f4a10;
}
.form__status[data-kind="error"] {
  background: #fdf2f2;
  border-color: rgba(179, 38, 30, 0.26);
  border-left-color: #b3261e;
  color: #8c1f19;
}
.btn:disabled { opacity: 0.62; cursor: progress; transform: none; }

/* Spam trap. Hidden with clipping rather than an off-screen offset: a
   `left: -9999px` element extends the scrollable area and causes horizontal
   overflow. Clipped at zero offset it stays in the layout with no offset, and
   bots still find the input (they skip display:none / hidden inputs). */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.contact-list { display: grid; gap: 0.75rem; grid-template-columns: minmax(0, 1fr); }
.contact-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
a.contact-item:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.contact-item__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  background: var(--gold-wash);
  border: 1px solid var(--line-gold-soft);
  color: var(--gold-ink);
}
.contact-item__icon svg { width: 19px; height: 19px; }
.contact-item__label { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact-item__value { font-weight: 600; font-size: 0.94rem; word-break: break-word; }

/* ---------- 17. CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(2.25rem, 5vw, 3.5rem);
  background: linear-gradient(150deg, var(--gold-wash), rgba(255, 255, 255, 0.9) 62%);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-xl);
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  top: -70%;
  left: 50%;
  width: 120%;
  aspect-ratio: 2;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.85), transparent 62%);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band .lead { margin: 1rem auto 0; }

/* ---------- 18. Footer ---------- */
.site-footer {
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: clamp(2.75rem, 5.5vw, 4rem);
  background: var(--bg-ivory);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  gap: 2.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  padding-bottom: 2.75rem;
}
.footer-brand { max-width: 32ch; display: grid; gap: 1rem; }
.footer-crest { width: 74px; }
.footer-brand p { font-size: 0.88rem; color: var(--muted); }

.footer-col__t {
  font-family: var(--font-display);
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
}
.footer-col li + li { margin-top: 0.55rem; }
.footer-col a { font-size: 0.89rem; color: var(--muted); transition: color 0.22s var(--ease); }
.footer-col a:hover { color: var(--gold-ink); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-bottom__links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-bottom a:hover { color: var(--gold-ink); }

.notice {
  display: flex;
  gap: 0.8rem;
  padding: 1rem 1.15rem;
  margin-bottom: 2.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--muted);
}
.notice svg { width: 17px; height: 17px; color: var(--gold-ink); margin-top: 3px; flex: none; }

/* ---------- 19. Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 20. 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;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 21. Print ---------- */
@media print {
  .site-header, .nav-toggle, .btn, .estimator, .form { display: none; }
  body { background: #fff; color: #000; }
  .card, .panel, .plan { break-inside: avoid; box-shadow: none; }
}