/* ============================================================
   Saved X Grace Construction LLC — design system
   Art direction: Montana craft. Cream paper, charcoal timber,
   copper accent (#A26624 brand color). Sturdy, honest, warm.
   ============================================================ */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 4.5rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.625rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 680px;
  --content-default: 1000px;
  --content-wide: 1240px;

  --font-display: 'Cabinet Grotesk', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Helvetica Neue', sans-serif;
}

:root,
[data-theme='light'] {
  --color-bg: #faf7f1;
  --color-surface: #fffdf9;
  --color-surface-2: #f5f1e9;
  --color-surface-offset: #ece6da;
  --color-ink: #0a0806; /* brand black */
  --color-ink-soft: #16120c;

  --color-text: #221f1b;
  --color-text-muted: #6b645a;
  --color-text-faint: #a09889;
  --color-text-inverse: #faf7f1;

  --color-border: #ded7c8;
  --color-divider: #eae4d8;

  --color-primary: #a2743a; /* brand gold, sampled from the business card */
  --color-primary-hover: #8a6130;
  --color-primary-deep: #6d4c25;
  --color-primary-tint: #f2e8d9;

  --color-success: #3f6b32;

  --shadow-sm: 0 1px 2px rgb(40 30 15 / 0.07);
  --shadow-md: 0 6px 18px rgb(40 30 15 / 0.09);
  --shadow-lg: 0 18px 44px rgb(40 30 15 / 0.16);
}

[data-theme='dark'] {
  --color-bg: #16140f;
  --color-surface: #1d1a14;
  --color-surface-2: #232019;
  --color-surface-offset: #2b271f;
  --color-ink: #050403;
  --color-ink-soft: #100d09;

  --color-text: #ece6da;
  --color-text-muted: #a49c8c;
  --color-text-faint: #6f685c;
  --color-text-inverse: #16140f;

  --color-border: #3a352b;
  --color-divider: #2b271f;

  --color-primary: #c99a58; /* brand gold, lifted for dark surfaces */
  --color-primary-hover: #dcb173;
  --color-primary-deep: #a2743a;
  --color-primary-tint: #2e2416;

  --color-success: #7fa869;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow-md: 0 6px 18px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 18px 44px rgb(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #16140f;
    --color-surface: #1d1a14;
    --color-surface-2: #232019;
    --color-surface-offset: #2b271f;
    --color-text: #ece6da;
    --color-text-muted: #a49c8c;
    --color-text-faint: #6f685c;
    --color-text-inverse: #16140f;
    --color-border: #3a352b;
    --color-divider: #2b271f;
    --color-primary: #c99a58;
    --color-primary-hover: #dcb173;
    --color-primary-tint: #2e2416;
    --color-ink: #050403;
    --color-ink-soft: #100d09;
  }
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}
body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}
img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}
ul[role='list'] {
  list-style: none;
}
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3,
h4 {
  text-wrap: balance;
  line-height: 1.12;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.015em;
}
p,
li {
  text-wrap: pretty;
}
a {
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: none;
}
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
::selection {
  background: var(--color-primary-tint);
  color: var(--color-text);
}
a,
button,
input,
textarea,
select,
.card {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ---------- layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.wrap--default {
  max-width: var(--content-default);
}
.wrap--narrow {
  max-width: var(--content-narrow);
}
section {
  padding-block: clamp(var(--space-12), 7vw, var(--space-24));
}
.section--tight {
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
}
.surface-2 {
  background: var(--color-surface-2);
}
.eyebrow {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.eyebrow--onDark {
  color: #d9a55f;
}
h2.section-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}
.lede {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 60ch;
}
.rule {
  height: 1px;
  background: var(--color-divider);
  border: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  border: 1.5px solid transparent;
  min-height: 48px;
}
.btn--primary {
  background: var(--color-primary);
  color: #fffdf9;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
[data-theme='dark'] .btn--primary {
  color: #1a1409;
}
.btn--ghost {
  border-color: var(--color-border);
  color: var(--color-text);
  background: var(--color-surface);
}
.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn--onDark {
  border-color: rgb(255 255 255 / 0.35);
  color: #f7f2e8;
  background: rgb(255 255 255 / 0.06);
}
.btn--onDark:hover {
  background: rgb(255 255 255 / 0.14);
  border-color: #f7f2e8;
}
.btn--wide {
  width: 100%;
}

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
}
.header__bar {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}
.brand__mark {
  color: var(--color-primary);
  flex-shrink: 0;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand__tag {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-left: auto;
}
.nav a {
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--color-primary);
}
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.header__phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  text-decoration: none;
  white-space: nowrap;
}
.header__phone:hover {
  color: var(--color-primary);
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: var(--color-surface);
}
.icon-btn:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.nav-toggle {
  display: none;
}
@media (max-width: 1040px) {
  .nav {
    position: fixed;
    inset: 72px 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-2) var(--space-5) var(--space-6);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
  }
  .nav[data-open='true'] {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav a {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-divider);
    font-size: var(--text-base);
  }
  .nav-toggle {
    display: grid;
  }
  .header__actions .btn--primary {
    display: none;
  }
}
@media (max-width: 560px) {
  .header__phone span {
    display: none;
  }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: var(--color-ink);
  color: #f6f1e7;
  overflow: hidden;
  padding-block: clamp(var(--space-12), 6vw, var(--space-20));
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 120% at 88% 88%, rgb(64 44 18 / 0.55) 0%, transparent 58%),
    linear-gradient(112deg, #050403 0%, #0a0806 42%, #120d06 100%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}
.hero h1 {
  font-size: var(--text-2xl);
  color: #fffdf8;
  margin-bottom: var(--space-5);
}
.hero__sub {
  font-size: var(--text-base);
  color: #d8d0c2;
  max-width: 46ch;
  margin-bottom: var(--space-6);
}
.hero__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}
.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  color: #cfc7b8;
}
.hero__proof li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.hero__proof svg {
  color: #d9a55f;
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }
}

/* ---------- quote form card ---------- */
.quote-card {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-5), 3vw, var(--space-8));
  box-shadow: var(--shadow-lg);
}
.quote-card h2,
.quote-card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.quote-card__note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}
.field {
  margin-bottom: var(--space-4);
}
.field label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  min-height: 48px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}
.field textarea {
  min-height: 96px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-tint);
}
.field--row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
@media (max-width: 480px) {
  .field--row {
    grid-template-columns: 1fr;
  }
}
.field [aria-invalid='true'],
.field--row [aria-invalid='true'] {
  border-color: #b3261e;
  background: color-mix(in srgb, #b3261e 5%, var(--color-bg));
}
.field-error {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: #b3261e;
}
[data-theme='dark'] .field [aria-invalid='true'],
[data-theme='dark'] .field--row [aria-invalid='true'] {
  border-color: #f2857c;
}
[data-theme='dark'] .field-error {
  color: #f2857c;
}
.form-fineprint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}
.form-success {
  display: none;
  background: var(--color-primary-tint);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}
.form-success[data-visible='true'] {
  display: block;
}
.form-success h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.form-success p {
  font-size: var(--text-sm);
  color: var(--color-text);
}

/* ---------- trust strip ---------- */
.trust {
  background: var(--color-surface-2);
  border-block: 1px solid var(--color-divider);
  padding-block: var(--space-5);
}
.trust__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.trust__item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}
.trust__item svg {
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.trust__item strong {
  display: block;
  font-size: var(--text-sm);
  font-family: var(--font-display);
  font-weight: 800;
}
.trust__item span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
@media (max-width: 860px) {
  .trust__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- service cards ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-10);
}
@media (max-width: 1080px) {
  .svc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 780px) {
  .svc-grid {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
a.card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.card__img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}
.card__body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}
.card__body h3 {
  font-size: var(--text-lg);
}
.card__body p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.card__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}
.card__list li {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  color: var(--color-text-muted);
}
.card__link {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* ---------- split feature ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}
.split--reverse .split__media {
  order: 2;
}
.split__media img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
@media (max-width: 820px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split--reverse .split__media {
    order: 0;
  }
}

/* ---------- process ---------- */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-10);
}
.step {
  border-top: 2px solid var(--color-primary);
  padding-top: var(--space-4);
}
.step::before {
  counter-increment: step;
  content: '0' counter(step);
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}
.step h3 {
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-10);
}
.gallery figure {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-2);
}
.gallery figure:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
.gallery figure:first-child img {
  aspect-ratio: auto;
  min-height: 100%;
}
.gallery figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: var(--space-5) var(--space-4) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgb(15 12 8 / 0.85));
}
@media (max-width: 780px) {
  .gallery {
    grid-template-columns: 1fr 1fr;
  }
  .gallery figure:first-child {
    grid-column: span 2;
    grid-row: auto;
  }
}

/* ---------- testimonials ---------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-10);
}
.quote {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.stars {
  display: flex;
  gap: 2px;
  color: var(--color-primary);
}
.quote blockquote {
  font-size: var(--text-sm);
  line-height: 1.65;
}
.quote figcaption {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: auto;
}
.quote figcaption strong {
  display: block;
  color: var(--color-text);
  font-size: var(--text-sm);
}
@media (max-width: 860px) {
  .quotes {
    grid-template-columns: 1fr;
  }
}

/* ---------- FAQ ---------- */
.faq {
  margin-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
}
.faq details {
  border-bottom: 1px solid var(--color-divider);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-5) var(--space-8) var(--space-5) 0;
  font-weight: 700;
  font-size: var(--text-base);
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-primary);
  line-height: 1;
}
.faq details[open] summary::after {
  content: '–';
}
.faq summary:hover {
  color: var(--color-primary);
}
.faq details p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-bottom: var(--space-5);
  max-width: 72ch;
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  background: var(--color-ink);
  color: #f6f1e7;
  overflow: hidden;
}
.cta-band__bg {
  position: absolute;
  inset: 0;
}
.cta-band__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}
.cta-band__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgb(18 15 10 / 0.72);
}
.cta-band__inner {
  z-index: 1;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}
.cta-band h2 {
  font-size: var(--text-xl);
  color: #fffdf8;
  margin-bottom: var(--space-3);
}
.cta-band p {
  font-size: var(--text-sm);
  color: #d3cbbc;
  max-width: 48ch;
}
.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ---------- service area ---------- */
.areas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-6);
  list-style: none;
}
.areas li {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  background: var(--color-surface);
}

/* ---------- page hero (interior) ---------- */
.page-head {
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-divider);
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
}
.page-head h1 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
  max-width: 24ch;
}
.crumbs {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}
.crumbs a {
  text-decoration: none;
  font-weight: 600;
}
.crumbs a:hover {
  color: var(--color-primary);
}

/* ---------- prose ---------- */
.prose h2 {
  font-size: var(--text-lg);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}
.prose h3 {
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: 700;
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}
.prose p,
.prose li {
  font-size: var(--text-base);
  color: var(--color-text);
  max-width: 68ch;
}
.prose p {
  margin-bottom: var(--space-4);
}
.prose ul,
.prose ol {
  margin: 0 0 var(--space-5) var(--space-5);
  display: grid;
  gap: var(--space-2);
}
.prose strong {
  font-weight: 700;
}
.prose > :first-child {
  margin-top: 0;
}
.tbl-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--text-sm);
}
th,
td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-divider);
}
th {
  background: var(--color-surface-2);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
tr:last-child td {
  border-bottom: 0;
}

/* sidebar layout */
.with-aside {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: clamp(var(--space-8), 4vw, var(--space-16));
  align-items: start;
}
.aside-sticky {
  position: sticky;
  top: 6rem;
}
@media (max-width: 900px) {
  .with-aside {
    grid-template-columns: 1fr;
  }
  .aside-sticky {
    position: static;
  }
}

/* ---------- footer ---------- */
.footer {
  background: var(--color-ink);
  color: #cfc7b8;
  padding-block: var(--space-16) var(--space-8);
  font-size: var(--text-sm);
}
.footer__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-8);
}
.footer h3 {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #f6f1e7;
  margin-bottom: var(--space-4);
  font-family: var(--font-body);
  font-weight: 700;
}
.footer ul {
  list-style: none;
  display: grid;
  gap: var(--space-2);
}
.footer a {
  text-decoration: none;
}
.footer a:hover {
  color: #d9a55f;
}
.footer .brand__name {
  color: #f6f1e7;
}
.footer__legal {
  position: relative;
  z-index: 1;
  margin-top: var(--space-12);
  padding-top: var(--space-5);
  border-top: 1px solid rgb(255 255 255 / 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  font-size: var(--text-xs);
  color: #9a9285;
}
@media (max-width: 860px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- mobile sticky action bar ---------- */
.mobile-bar {
  display: none;
  position: fixed;
  inset: auto 0 0;
  z-index: 70;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3) calc(var(--space-2) + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--color-surface) 94%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border);
}
.mobile-bar .btn {
  flex: 1;
  min-height: 50px;
}
@media (max-width: 720px) {
  .mobile-bar {
    display: flex;
  }
  body {
    padding-bottom: 76px;
  }
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal[data-shown='true'] {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- before / after pairs ---------- */
.ba {
  display: grid;
  gap: var(--space-8);
  margin-top: var(--space-8);
}
.ba__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  align-items: start;
}
.ba__fig {
  margin: 0;
  position: relative;
}
.ba__fig img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
}
.ba__tag {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(28, 25, 22, 0.82);
  color: #faf7f1;
  backdrop-filter: blur(4px);
}
.ba__tag--after {
  background: var(--color-primary);
  color: #fff;
}
.ba__cap {
  grid-column: 1 / -1;
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
}
.ba__cap strong {
  color: var(--color-text);
  font-family: var(--font-display);
}
@media (max-width: 640px) {
  .ba__row {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }
}
.scope-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--space-3);
  margin: var(--space-6) 0 0;
  padding: 0;
  list-style: none;
}
.scope-list li {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.scope-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-base);
  margin-bottom: 0.2rem;
}

/* ---------- brand: isometric cube field (from the business card) ---------- */
.cubes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url('../img/brand-cubes.svg');
  background-repeat: repeat;
  background-size: 112px 194px;
  background-position: right top;
}
/* the card's own fade: pure black upper-left, cubes strongest lower-right */
.cubes--hero {
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(
    108deg,
    transparent 10%,
    rgb(0 0 0 / 0.1) 34%,
    rgb(0 0 0 / 0.34) 58%,
    rgb(0 0 0 / 0.7) 80%,
    #000 100%
  );
  mask-image: linear-gradient(
    108deg,
    transparent 10%,
    rgb(0 0 0 / 0.1) 34%,
    rgb(0 0 0 / 0.34) 58%,
    rgb(0 0 0 / 0.7) 80%,
    #000 100%
  );
}
/* fades in from the right edge, exactly like the card */
.cubes--right {
  opacity: 0.42;
  -webkit-mask-image: linear-gradient(90deg, transparent 52%, rgb(0 0 0 / 0.28) 74%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 52%, rgb(0 0 0 / 0.28) 74%, #000 100%);
}
.cubes--soft {
  opacity: 0.3;
  -webkit-mask-image: radial-gradient(120% 140% at 100% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(120% 140% at 100% 0%, #000 0%, transparent 70%);
}
.cubes--band {
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 42%, transparent 58%, #000 100%);
  mask-image: linear-gradient(90deg, #000 0%, transparent 42%, transparent 58%, #000 100%);
  opacity: 0.1;
}
@media (max-width: 700px) {
  .cubes {
    background-size: 76px 132px;
  }
  .cubes--right,
  .cubes--hero {
    -webkit-mask-image: linear-gradient(166deg, transparent 18%, rgb(0 0 0 / 0.5) 55%, #000 100%);
    mask-image: linear-gradient(166deg, transparent 18%, rgb(0 0 0 / 0.5) 55%, #000 100%);
  }
}
@media (prefers-reduced-motion: no-preference) {
  .cubes {
    will-change: auto;
  }
}

/* the brand tagline, set the way the card sets it */
.brand-tag {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  color: var(--color-primary);
  line-height: 1.35;
}
.hero__tag {
  position: relative;
  margin-top: var(--space-8);
  margin-bottom: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid rgb(201 154 88 / 0.28);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: #c99a58;
  max-width: 26ch;
}
@media (max-width: 900px) {
  .hero__tag {
    display: none;
  }
}

/* thin gold rule used as a section divider, echoing the card's brushed band */
.brand-rule {
  height: 3px;
  border: 0;
  margin: 0;
  background: linear-gradient(
    90deg,
    var(--color-primary) 0%,
    var(--color-primary) 18%,
    rgb(162 116 58 / 0.35) 34%,
    rgb(162 116 58 / 0.12) 60%,
    transparent 100%
  );
}

/* caption note directly under a service-page hero photo */
.photo-note {
  margin-top: calc(var(--space-8) * -1 + var(--space-3));
  margin-bottom: var(--space-8);
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-style: normal;
}
