/* style.css — Tim Morse Construction, Inc. */

/* ============ DESIGN TOKENS ============ */
:root,
[data-theme='light'] {
  /* Type scale (fluid clamp) */
  --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, 5rem);
  --text-hero: clamp(2.75rem, 1rem + 6vw, 6.5rem);

  /* Spacing (4px system) */
  --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;

  /* Surfaces — warm cream / charcoal craftsman palette */
  --color-bg: #f7f3ec;
  --color-surface: #fbf8f2;
  --color-surface-2: #ffffff;
  --color-surface-offset: #efe8db;
  --color-surface-offset-2: #e6ddca;
  --color-surface-dynamic: #ddd2ba;
  --color-divider: #ddd3bf;
  --color-border: #cbbea3;

  /* Text — deep charcoal-brown */
  --color-text: #241f1a;
  --color-text-muted: #6b6155;
  --color-text-faint: #a89c88;
  --color-text-inverse: #f7f3ec;

  /* Primary accent — burnt rust/terracotta (framing square color) */
  --color-primary: #b5502c;
  --color-primary-hover: #973f21;
  --color-primary-active: #7a331c;
  --color-primary-highlight: #ecd3c4;

  /* Deep charcoal (secondary neutral-dark, used for hero/footer surfaces) */
  --color-charcoal: #221d19;
  --color-charcoal-2: #2c2521;

  /* Success / Error kept minimal for form validation only */
  --color-success: #3f6b2e;
  --color-error: #a3352b;
  --color-error-highlight: #ecd3ce;

  --radius-sm: 0.25rem;
  --radius-md: 0.4rem;
  --radius-lg: 0.6rem;
  --radius-xl: 0.9rem;
  --radius-full: 9999px;

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

  --shadow-sm: 0 1px 2px oklch(0.2 0.02 40 / 0.08);
  --shadow-md: 0 4px 14px oklch(0.2 0.02 40 / 0.12);
  --shadow-lg: 0 16px 40px oklch(0.2 0.02 40 / 0.18);

  --content-narrow: 640px;
  --content-default: 1000px;
  --content-wide: 1240px;
  --content-full: 100%;

  --font-display: 'Cabinet Grotesk', 'Arial Black', sans-serif;
  --font-body: 'General Sans', 'Segoe UI', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #191510;
  --color-surface: #201b16;
  --color-surface-2: #26201a;
  --color-surface-offset: #2b241d;
  --color-surface-offset-2: #322b22;
  --color-surface-dynamic: #3a3128;
  --color-divider: #3a3128;
  --color-border: #493e31;
  --color-text: #ece5d8;
  --color-text-muted: #a99d8a;
  --color-text-faint: #766c5c;
  --color-text-inverse: #201b16;
  --color-primary: #d97b4f;
  --color-primary-hover: #e69368;
  --color-primary-active: #f0aa85;
  --color-primary-highlight: #4a3226;
  --color-charcoal: #100d0a;
  --color-charcoal-2: #1a1512;
  --color-success: #7fae61;
  --color-error: #d97165;
  --color-error-highlight: #4a2a26;
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 4px 14px oklch(0 0 0 / 0.4);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #191510;
    --color-surface: #201b16;
    --color-surface-2: #26201a;
    --color-surface-offset: #2b241d;
    --color-surface-offset-2: #322b22;
    --color-surface-dynamic: #3a3128;
    --color-divider: #3a3128;
    --color-border: #493e31;
    --color-text: #ece5d8;
    --color-text-muted: #a99d8a;
    --color-text-faint: #766c5c;
    --color-text-inverse: #201b16;
    --color-primary: #d97b4f;
    --color-primary-hover: #e69368;
    --color-primary-active: #f0aa85;
    --color-primary-highlight: #4a3226;
    --color-charcoal: #100d0a;
    --color-charcoal-2: #1a1512;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
    --shadow-md: 0 4px 14px oklch(0 0 0 / 0.4);
    --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.5);
  }
}

/* ============ LAYOUT PRIMITIVES ============ */
.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.container--narrow {
  max-width: var(--content-default);
}

section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
}
.eyebrow::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--color-primary);
  display: inline-block;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-top: var(--space-3);
  max-width: 24ch;
}

.section-head {
  margin-bottom: var(--space-10);
}

.section-lede {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-top: var(--space-4);
}

/* ============ HEADER / NAV ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition:
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}
.header--hidden {
  transform: translateY(-100%);
}
.header--scrolled {
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  gap: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand-mark {
  height: 34px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}
.brand-mark--ondark {
  display: none;
}
[data-theme="dark"] .brand-mark--onlight {
  display: none;
}
[data-theme="dark"] .brand-mark--ondark {
  display: block;
}
.brand-name-full {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  white-space: nowrap;
}
.brand-name-full small {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
@media (max-width: 480px) {
  .brand-name-full small {
    display: none;
  }
}

.nav {
  display: none;
  align-items: center;
  gap: var(--space-8);
}
.nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  position: relative;
}
.nav a:hover,
.nav a:focus-visible {
  color: var(--color-text);
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-interactive);
}
.nav a:hover::after,
.nav a:focus-visible::after {
  width: 100%;
}

@media (min-width: 900px) {
  .nav {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

a.header-cta {
  display: none;
}
@media (min-width: 900px) {
  a.header-cta {
    display: inline-flex;
  }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--color-text);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  top: 0;
  background: var(--color-bg);
  z-index: 60;
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transform: translateX(100%);
  transition: transform 0.32s var(--ease-out);
}
.mobile-menu.is-open {
  transform: translateX(0);
}
.mobile-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
}
.mobile-menu-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}
.mobile-menu a {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--color-divider);
}
.mobile-menu-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  min-height: 44px;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff8f2;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-primary:active {
  background: var(--color-primary-active);
  transform: translateY(0);
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid oklch(from var(--color-text) l c h / 0.25);
}
.btn-secondary:hover {
  border-color: var(--color-text);
  background: oklch(from var(--color-text) l c h / 0.05);
}
.btn-ghost-inverse {
  background: oklch(1 0 0 / 0.08);
  color: #fff8f2;
  border: 1.5px solid oklch(1 0 0 / 0.3);
}
.btn-ghost-inverse:hover {
  background: oklch(1 0 0 / 0.16);
  border-color: oklch(1 0 0 / 0.5);
}
.btn-lg {
  padding: var(--space-5) var(--space-8);
  font-size: var(--text-base);
}
.btn-block {
  width: 100%;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  color: #fff8f2;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}
.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, oklch(0.08 0.02 40 / 0.92) 0%, oklch(0.1 0.02 40 / 0.55) 42%, oklch(0.12 0.03 40 / 0.25) 68%, oklch(0.14 0.03 40 / 0.35) 100%),
    linear-gradient(to right, oklch(0.08 0.02 40 / 0.5) 0%, transparent 55%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: var(--space-16) var(--space-20);
}
.hero-tagline {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.02;
  max-width: 16ch;
  text-shadow: 0 2px 24px oklch(0.05 0.02 40 / 0.4);
}
.hero-tagline em {
  font-style: normal;
  color: var(--color-primary-hover);
}
.hero-sub {
  margin-top: var(--space-6);
  font-size: var(--text-lg);
  font-weight: 400;
  max-width: 46ch;
  color: oklch(0.97 0.01 60);
  text-shadow: 0 1px 12px oklch(0.05 0.02 40 / 0.5);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}
.hero-meta {
  margin-top: var(--space-10);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6) var(--space-8);
  font-size: var(--text-sm);
  color: oklch(0.92 0.01 60);
}
.hero-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.hero-meta-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary-hover);
  flex-shrink: 0;
}

.scroll-cue {
  position: absolute;
  bottom: var(--space-6);
  right: var(--space-5);
  z-index: 1;
  display: none;
  align-items: center;
  gap: var(--space-2);
  color: oklch(0.9 0.01 60 / 0.75);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (min-width: 700px) {
  .scroll-cue {
    display: flex;
  }
}
.scroll-cue svg {
  width: 16px;
  height: 16px;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

/* ============ ABOUT ============ */
.about {
  background: var(--color-surface);
}
.about-grid {
  display: grid;
  gap: var(--space-10);
  align-items: start;
}
@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-16);
  }
}
.about-copy p {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--color-text);
  max-width: 54ch;
}
.trust-line {
  margin-top: var(--space-8);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
}
.trust-badge svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
}
.about-figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.about-figure img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}
.about-figure figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, oklch(0.08 0.02 40 / 0.75), transparent);
  color: #fff8f2;
  font-size: var(--text-xs);
  padding: var(--space-6) var(--space-5) var(--space-4);
  max-width: none;
}

/* ============ SERVICES ============ */
.services {
  background: var(--color-charcoal);
  color: var(--color-text-inverse);
}
[data-theme='light'] .services,
:root:not([data-theme]) .services {
  color: #f2ece0;
}
.services .eyebrow {
  color: var(--color-primary-hover, var(--color-primary));
}
.services .section-title {
  color: #fff8f2;
}
.services .section-lede {
  color: oklch(0.85 0.02 60);
}
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: oklch(1 0 0 / 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid oklch(1 0 0 / 0.08);
}
@media (min-width: 640px) {
  .service-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1000px) {
  .service-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
.service-card {
  background: var(--color-charcoal-2, #2c2521);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.service-card svg {
  width: 30px;
  height: 30px;
  color: var(--color-primary-hover, var(--color-primary));
}
.service-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: #fff8f2;
}
.service-card p {
  font-size: var(--text-sm);
  color: oklch(0.82 0.02 60);
  max-width: 34ch;
}

/* ============ GALLERY ============ */
.gallery {
  background: var(--color-bg);
}
.gallery-grid {
  columns: 1;
  column-gap: var(--space-4);
}
@media (min-width: 640px) {
  .gallery-grid {
    columns: 2;
  }
}
@media (min-width: 1000px) {
  .gallery-grid {
    columns: 3;
  }
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: var(--space-4);
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  border: none;
  display: block;
  width: 100%;
}
.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.045);
}
.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(to top, oklch(0.08 0.02 40 / 0.82), transparent);
  color: #fff8f2;
  font-size: var(--text-xs);
  text-align: left;
  padding: var(--space-8) var(--space-4) var(--space-3);
  opacity: 0;
  transition: opacity var(--transition-interactive);
}
.gallery-item:hover .gallery-caption,
.gallery-item:focus-visible .gallery-caption {
  opacity: 1;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: oklch(0.05 0.01 40 / 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.lightbox.is-open {
  display: flex;
}
.lightbox-inner {
  position: relative;
  max-width: min(1100px, 92vw);
  max-height: 88vh;
}
.lightbox-inner img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  margin-inline: auto;
}
.lightbox-caption {
  color: oklch(0.9 0.01 60);
  font-size: var(--text-sm);
  text-align: center;
  margin-top: var(--space-4);
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #fff8f2;
  background: oklch(1 0 0 / 0.1);
  border-radius: var(--radius-full);
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: oklch(1 0 0 / 0.2);
}
.lightbox-close {
  top: calc(-1 * var(--space-12));
  right: 0;
}
@media (max-width: 640px) {
  .lightbox-close {
    top: calc(-1 * var(--space-10));
    right: 0;
  }
}
.lightbox-prev {
  left: calc(-1 * var(--space-16));
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-next {
  right: calc(-1 * var(--space-16));
  top: 50%;
  transform: translateY(-50%);
}
@media (max-width: 900px) {
  .lightbox-prev {
    left: var(--space-2);
  }
  .lightbox-next {
    right: var(--space-2);
  }
}

/* ============ SERVICE AREA ============ */
.area {
  background: var(--color-surface-offset);
}
.area-grid {
  display: grid;
  gap: var(--space-10);
}
@media (min-width: 860px) {
  .area-grid {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: center;
  }
}
.area-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  list-style: none;
}
@media (min-width: 480px) {
  .area-list {
    grid-template-columns: repeat(3, 1fr);
  }
}
.area-list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: 500;
  padding: var(--space-3) var(--space-2);
  border-bottom: 1px solid var(--color-border);
}
.area-list svg {
  width: 16px;
  height: 16px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.area-map-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}
.area-map-card svg {
  width: 100%;
  height: auto;
  color: var(--color-primary);
}

/* ============ CONTACT ============ */
.contact {
  background: var(--color-charcoal);
  color: #f2ece0;
}
.contact-grid {
  display: grid;
  gap: var(--space-12);
}
@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 0.85fr 1.15fr;
  }
}
.contact-primary h2 {
  color: #fff8f2;
}
.contact-primary .section-lede {
  color: oklch(0.82 0.02 60);
}
.contact-cta-stack {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 360px;
}
.contact-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-10) 0 var(--space-6);
  color: oklch(0.7 0.02 60);
  font-size: var(--text-sm);
  max-width: 360px;
}
.contact-divider::before,
.contact-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: oklch(1 0 0 / 0.15);
}

.contact-phone-big {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: #fff8f2;
  text-decoration: none;
  margin-top: var(--space-2);
}
.contact-phone-big:hover {
  color: var(--color-primary-hover);
}

.form-card {
  background: var(--color-surface);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}
.form-row {
  display: grid;
  gap: var(--space-5);
}
@media (min-width: 560px) {
  .form-row--2 {
    grid-template-columns: 1fr 1fr;
  }
}
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-5);
}
.field:first-child {
  margin-top: 0;
}
.field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}
.field input,
.field select,
.field textarea {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  background: var(--color-surface-2);
  color: var(--color-text);
  min-height: 44px;
}
.field textarea {
  min-height: 110px;
  resize: vertical;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
  border-color: var(--color-primary);
}
.field-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  display: none;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--color-error);
}
.field.has-error .field-error {
  display: block;
}
.form-note {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
}
.form-success {
  display: none;
  align-items: flex-start;
  gap: var(--space-3);
  background: oklch(from var(--color-success) l c h / 0.12);
  border: 1px solid oklch(from var(--color-success) l c h / 0.3);
  color: var(--color-text);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-size: var(--text-sm);
  margin-top: var(--space-5);
}
.form-success.is-visible {
  display: flex;
}
.form-success svg {
  width: 20px;
  height: 20px;
  color: var(--color-success);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--color-charcoal-2, #100d0a);
  color: oklch(0.75 0.02 60);
  padding-block: var(--space-12) var(--space-8);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
@media (min-width: 760px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.footer-brand svg {
  width: 32px;
  height: 32px;
  color: var(--color-primary-hover, var(--color-primary));
}
.footer-brand-text {
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff8f2;
  font-size: var(--text-sm);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  font-size: var(--text-sm);
}
.footer-links a {
  color: oklch(0.75 0.02 60);
  text-decoration: none;
}
.footer-links a:hover {
  color: #fff8f2;
}
.footer-bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid oklch(1 0 0 / 0.08);
  font-size: var(--text-xs);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  justify-content: space-between;
}

/* ============ THEME TOGGLE ============ */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: oklch(from var(--color-text) l c h / 0.08);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* ============ MISC ============ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  z-index: 200;
  border-radius: var(--radius-md);
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}

.reveal {
  opacity: 1;
}
@supports (animation-timeline: view()) {
  .reveal {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }
}
@keyframes reveal-fade {
  to {
    opacity: 1;
  }
}

/* ============ REVIEWS ============ */
.reviews {
  background: var(--color-surface);
}
.review-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 700px) {
  .review-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.review-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.review-card p {
  font-size: var(--text-base);
  color: var(--color-text);
  max-width: none;
}
.review-card footer {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary-hover, var(--color-primary));
}
.reviews-cta {
  margin-top: var(--space-8);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.reviews-cta a {
  color: var(--color-primary-hover, var(--color-primary));
  font-weight: 600;
}

/* ============ FAQ ============ */
.faq {
  background: var(--color-bg);
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.faq-item {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: var(--text-base);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  font-size: var(--text-lg);
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform 0.2s var(--ease-out, ease);
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item p {
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  max-width: none;
}
