@layer reset, base, components, utilities;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { color-scheme: light dark; scroll-behavior: smooth; }
  body, h1, h2, h3, p, ul, ol, figure { margin: 0; }
  ul, ol { padding: 0; }
  img { display: block; max-width: 100%; }
  button, input, textarea, select { font: inherit; }
}

@layer base {
  :root {
    --paper: #f3f3ef;
    --surface: #e8e8e2;
    --surface-strong: #d8d8d1;
    --ink: #171918;
    --muted: #555a57;
    --line: #a9aca7;
    --accent: #c44b24;
    --accent-ink: #fff8f3;
    --success: #1f6747;
    --danger: #a82d28;
    --header: color-mix(in srgb, var(--paper) 93%, transparent);
    --shadow: 0 22px 55px color-mix(in srgb, var(--ink) 12%, transparent);
    --max: 88rem;
    --header-height: 4.5rem;
    font-family: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
    background: var(--paper);
    color: var(--ink);
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --paper: #161917;
      --surface: #222624;
      --surface-strong: #303531;
      --ink: #eff0eb;
      --muted: #b7bcb7;
      --line: #555b56;
      --accent: #e06a42;
      --accent-ink: #171918;
      --success: #79c99f;
      --danger: #ff9890;
      --header: color-mix(in srgb, var(--paper) 92%, transparent);
      --shadow: 0 22px 55px rgb(0 0 0 / .28);
    }
  }

  :root[data-theme="dark"] {
    --paper: #161917;
    --surface: #222624;
    --surface-strong: #303531;
    --ink: #eff0eb;
    --muted: #b7bcb7;
    --line: #555b56;
    --accent: #e06a42;
    --accent-ink: #171918;
    --success: #79c99f;
    --danger: #ff9890;
    --header: color-mix(in srgb, var(--paper) 92%, transparent);
    --shadow: 0 22px 55px rgb(0 0 0 / .28);
  }

  :root[data-theme="light"] {
    --paper: #f3f3ef;
    --surface: #e8e8e2;
    --surface-strong: #d8d8d1;
    --ink: #171918;
    --muted: #555a57;
    --line: #a9aca7;
    --accent: #c44b24;
    --accent-ink: #fff8f3;
    --success: #1f6747;
    --danger: #a82d28;
  }

  body { min-width: 20rem; min-height: 100dvh; background: var(--paper); color: var(--ink); line-height: 1.55; }
  a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .22em; }
  a:hover { color: var(--accent); }
  :focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
  ::selection { background: var(--accent); color: var(--accent-ink); }
  .skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; padding: .75rem 1rem; background: var(--accent); color: var(--accent-ink); }
  .skip-link:focus { top: 1rem; }
}

@layer components {
  .shell { width: min(calc(100% - 3rem), var(--max)); margin-inline: auto; }
  .site-header { position: sticky; top: 0; z-index: 10; height: var(--header-height); border-bottom: 1px solid var(--line); background: var(--header); backdrop-filter: blur(14px); }
  .header-inner { height: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem; }
  .brand { display: grid; gap: .05rem; text-decoration: none; line-height: 1; white-space: nowrap; }
  .brand strong { font-size: 1.05rem; letter-spacing: -.03em; }
  .brand small { color: var(--muted); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
  .site-nav { justify-self: end; }
  .nav-list { display: flex; align-items: center; gap: clamp(.7rem, 1.35vw, 1.35rem); list-style: none; }
  .nav-list a { font-size: .82rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
  .nav-list a[aria-current="page"] { color: var(--accent); }
  .header-actions { display: flex; gap: .5rem; }
  .icon-button, .menu-button { min-width: 2.5rem; height: 2.5rem; border: 1px solid var(--line); border-radius: 2px; padding-inline: .65rem; background: transparent; color: var(--ink); cursor: pointer; }
  .icon-button:active, .menu-button:active, .button:active { transform: translateY(1px); }
  .menu-button { display: none; }

  .hero { min-height: calc(100dvh - var(--header-height)); display: grid; align-items: center; padding-block: clamp(3rem, 7vw, 6rem); border-bottom: 1px solid var(--line); }
  .hero-grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(20rem, .86fr); gap: clamp(2rem, 7vw, 7rem); align-items: center; }
  .hero-copy { max-width: 49rem; }
  .kicker { margin-bottom: 1rem; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
  h1 { max-width: 18ch; font-size: clamp(2.65rem, 5.5vw, 5.8rem); font-weight: 800; line-height: .93; letter-spacing: -.065em; text-wrap: balance; }
  .hero-lede { max-width: 58ch; margin-top: 1.5rem; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.25rem); }
  .hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
  .button { display: inline-flex; min-height: 3rem; align-items: center; justify-content: center; border: 1px solid var(--ink); border-radius: 2px; padding: .7rem 1.15rem; background: var(--ink); color: var(--paper); font-weight: 800; text-decoration: none; white-space: nowrap; transition: transform .18s ease, background-color .18s ease, color .18s ease; }
  .button:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .button.secondary { background: transparent; color: var(--ink); }
  .button.secondary:hover { color: var(--accent-ink); }
  .visual-slot { position: relative; min-height: clamp(20rem, 47vw, 40rem); overflow: hidden; border: 1px solid var(--line); background: linear-gradient(145deg, var(--surface-strong), var(--surface)); box-shadow: var(--shadow); }
  .visual-slot::before { content: ""; position: absolute; inset: 8%; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
  .visual-slot::after { content: ""; position: absolute; width: 55%; aspect-ratio: 1; right: -12%; top: 18%; border: clamp(2rem, 6vw, 6rem) solid color-mix(in srgb, var(--accent) 72%, transparent); border-radius: 50%; opacity: .64; }
  .visual-slot-label { position: absolute; left: 1.25rem; bottom: 1.25rem; z-index: 1; max-width: 18rem; padding: .6rem .75rem; background: var(--paper); color: var(--ink); border-left: .32rem solid var(--accent); font-size: .78rem; font-weight: 800; }
  .visual-slot.has-asset::before, .visual-slot.has-asset::after { z-index: 1; pointer-events: none; }
  .visual-slot.has-asset img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.78) contrast(1.04); }
  .visual-slot.has-asset .visual-slot-label { background: color-mix(in srgb, var(--paper) 92%, transparent); }

  .trust-rail { border-bottom: 1px solid var(--line); }
  .trust-inner { min-height: 5.5rem; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2rem; }
  .trust-inner strong { color: var(--accent); font-size: 1.7rem; }
  .trust-inner p { color: var(--muted); font-weight: 700; }

  .content-section { padding-block: clamp(4rem, 8vw, 8rem); border-bottom: 1px solid var(--line); }
  .section-grid { display: grid; grid-template-columns: minmax(13rem, .58fr) minmax(0, 1.42fr); gap: clamp(2rem, 7vw, 7rem); }
  .content-section:nth-of-type(even) .section-grid { grid-template-columns: minmax(0, 1.35fr) minmax(14rem, .65fr); }
  .content-section:nth-of-type(even) .section-head { order: 2; }
  .section-index { display: block; margin-bottom: 1.25rem; color: var(--accent); font-variant-numeric: tabular-nums; font-weight: 800; }
  h2 { max-width: 18ch; font-size: clamp(2rem, 4.2vw, 4.6rem); line-height: .98; letter-spacing: -.05em; text-wrap: balance; }
  h3 { font-size: clamp(1.1rem, 1.8vw, 1.45rem); line-height: 1.15; letter-spacing: -.025em; }
  .section-summary { max-width: 62ch; color: var(--muted); font-size: 1.02rem; }
  .section-body { display: grid; gap: 2rem; align-content: start; }
  .placeholder-copy { max-width: 66ch; padding: 1rem 0 1rem 1.25rem; border-left: .32rem solid var(--accent); color: var(--muted); }
  .placeholder-copy strong { display: block; color: var(--ink); }
  .contract-note { color: var(--muted); font-size: .78rem; }

  .service-list, .price-list, .link-grid, .contact-grid, .fact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; list-style: none; background: var(--line); border: 1px solid var(--line); }
  .service-item, .price-item, .link-item, .contact-card, .fact-item { min-width: 0; padding: clamp(1.1rem, 2.5vw, 2rem); background: var(--paper); }
  .service-item { display: grid; grid-template-columns: auto 1fr; gap: 1rem; }
  .service-id, .price-id { color: var(--accent); font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums; }
  .service-item p, .price-item p { margin-top: .35rem; color: var(--muted); font-size: .88rem; }
  .price-item strong { display: block; margin-top: .8rem; color: var(--accent); font-size: 1.35rem; }
  .family-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
  .family-link { min-height: 9rem; padding: 1.5rem; background: var(--paper); text-decoration: none; }
  .family-link:nth-child(4n + 1), .family-link:nth-child(4n + 4) { background: var(--surface); }
  .family-link strong { display: block; font-size: 1.35rem; }
  .family-link span { display: block; margin-top: .5rem; color: var(--muted); }
  .family-link:hover { background: var(--accent); color: var(--accent-ink); }
  .family-link:hover span { color: inherit; }

  .contact-card a { font-weight: 800; overflow-wrap: anywhere; }
  .hours-panel { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
  .hours-panel > div { padding: 1.5rem; }
  .hours-panel > div + div { border-left: 1px solid var(--line); background: var(--surface); }
  .hours-panel strong { display: block; color: var(--accent); font-size: 1.4rem; }
  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .field { display: grid; gap: .45rem; }
  .field.full { grid-column: 1 / -1; }
  .field label { font-weight: 800; }
  .field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 2px; padding: .8rem; background: var(--paper); color: var(--ink); }
  .field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
  .field small { color: var(--muted); }
  .form-status { min-height: 1.6rem; color: var(--muted); }
  .form-status[data-state="error"] { color: var(--danger); }
  .form-status[data-state="success"] { color: var(--success); }

  .site-footer { padding-block: 3rem; background: var(--surface); }
  .footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; }
  .footer-grid h2 { font-size: 1rem; letter-spacing: 0; }
  .footer-grid p { margin-top: .6rem; color: var(--muted); }
  .footer-grid a { overflow-wrap: anywhere; }
  .footer-legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }

  template.slot-marker { display: none; }
  [data-reveal] { animation: reveal .62s cubic-bezier(.16, 1, .3, 1) both; }
  [data-reveal="2"] { animation-delay: .1s; }
  @keyframes reveal { from { opacity: 0; transform: translateY(1rem); } to { opacity: 1; transform: translateY(0); } }
}

@layer utilities {
  .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; }
}

@media (max-width: 74rem) {
  .shell { width: min(calc(100% - 2rem), var(--max)); }
  .header-inner { grid-template-columns: auto 1fr auto; }
  .menu-button { display: inline-grid; place-items: center; }
  .site-nav { position: absolute; left: 0; right: 0; top: var(--header-height); display: none; padding: 1rem; border-bottom: 1px solid var(--line); background: var(--paper); }
  .site-nav[data-open="true"] { display: block; }
  .nav-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
  .nav-list a { display: block; padding: .9rem; background: var(--paper); }
}

@media (min-width: 74.01rem) {
  h1 { max-width: none; font-size: clamp(3rem, 3.7vw, 4rem); }
}

@media (max-width: 48rem) {
  .shell { width: min(calc(100% - 2rem), var(--max)); }
  .brand small { display: none; }
  .hero { min-height: auto; }
  .hero-grid, .section-grid, .content-section:nth-of-type(even) .section-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .content-section:nth-of-type(even) .section-head { order: initial; }
  h1 { font-size: clamp(2.7rem, 14vw, 4.7rem); }
  .visual-slot { min-height: 20rem; }
  .trust-inner { grid-template-columns: 1fr; gap: .2rem; padding-block: 1.3rem; }
  .service-list, .price-list, .link-grid, .contact-grid, .fact-grid, .family-grid, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .hours-panel { grid-template-columns: 1fr; }
  .hours-panel > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .field.full { grid-column: auto; }
}

@media (max-width: 28rem) {
  .nav-list { grid-template-columns: 1fr; }
  .hero-actions { display: grid; }
  .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--paper); backdrop-filter: none; }
}
