@font-face {
  font-display: swap;
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  src: url('/assets/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
}

:root {
  --color-brand: 30 58 47;
  --color-accent: 166 83 37;
  --color-accent-on-brand: 240 180 137;
  --color-surface: 245 243 238;
  --color-surface-alt: 255 255 255;
  --color-text-default: 26 26 26;
  --color-text-muted: 90 90 82;
  --color-text-inverse: 245 243 238;
}

html[data-theme="dark"] {
  --color-brand: 168 196 180;
  --color-accent: 226 149 102;
  --color-accent-on-brand: 75 36 16;
  --color-surface: 18 20 19;
  --color-surface-alt: 26 29 28;
  --color-text-default: 234 234 232;
  --color-text-muted: 160 160 154;
  --color-text-inverse: 18 20 19;
}

html, body {
  background-color: rgb(var(--color-surface));
  color: rgb(var(--color-text-default));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgb(var(--color-accent));
  outline-offset: 3px;
}

.skip-link {
  background: rgb(var(--color-surface-alt));
  border: 2px solid rgb(var(--color-brand));
  color: rgb(var(--color-brand));
  font-weight: 700;
  left: 1rem;
  padding: 0.75rem 1rem;
  position: fixed;
  top: 1rem;
  transform: translateY(-200%);
  z-index: 100;
}

.skip-link:focus {
  transform: translateY(0);
}

.bg-brand .text-accent {
  color: rgb(var(--color-accent-on-brand));
}

.bg-brand a:focus-visible,
.bg-brand button:focus-visible,
.bg-brand select:focus-visible {
  box-shadow: 0 0 0 3px rgb(var(--color-accent-on-brand));
  outline-color: rgb(var(--color-text-inverse));
}

/* Subtle global noise texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
}

html[data-theme="dark"] body::before {
  opacity: 0.05;
}

/* Micro-interactions: Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 1rem;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 15px -3px rgba(var(--color-brand), 0.15), 0 4px 6px -2px rgba(var(--color-brand), 0.1);
}

html[data-theme="dark"] .btn:hover {
  box-shadow: 0 10px 15px -3px rgba(var(--color-brand), 0.3), 0 4px 6px -2px rgba(var(--color-brand), 0.2);
}

.btn-primary {
  background-color: rgb(var(--color-brand));
  color: rgb(var(--color-text-inverse));
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background-color: rgb(var(--color-accent));
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 0;
}
.btn-primary:hover::before {
  left: 0;
}
.btn-primary span {
  position: relative;
  z-index: 1;
}

.btn-secondary {
  background-color: transparent;
  color: rgb(var(--color-brand));
  border: 2px solid rgb(var(--color-brand));
}
.btn-secondary:hover {
  background-color: rgb(var(--color-brand));
  color: rgb(var(--color-text-inverse));
}

/* Card Micro-interactions */
.hover-lift {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: rgba(var(--color-brand), 0.3);
}

html[data-theme="dark"] .hover-lift:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Scroll-in reveals */
.js .reveal,
.js .reveal-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.js .reveal.active,
.js .reveal-item.active {
  opacity: 1;
  transform: translateY(0);
}

/* Shared section labels */
.eyebrow {
  color: rgb(var(--color-accent));
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.policy-content h2 {
  color: rgb(var(--color-brand));
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
}

.policy-content h3 {
  color: rgb(var(--color-brand));
  font-size: 1.125rem;
  font-weight: 700;
  margin-top: 1.75rem;
}

.policy-content p,
.policy-content li {
  color: rgb(var(--color-text-muted));
  line-height: 1.75;
}

.policy-content p,
.policy-content ul {
  margin-top: 1rem;
}

.policy-content ul {
  list-style: disc;
  padding-left: 1.5rem;
}

.policy-content a {
  color: rgb(var(--color-brand));
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgb(var(--color-accent));
  text-underline-offset: 0.2em;
}

/* Contact form */
.form-label {
  color: rgb(var(--color-brand));
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.form-control {
  appearance: none;
  background: rgb(var(--color-surface));
  border: 1px solid rgba(var(--color-brand), 0.24);
  border-radius: 0.85rem;
  color: rgb(var(--color-text-default));
  display: block;
  font: inherit;
  padding: 0.8rem 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  width: 100%;
}

.form-control:hover {
  border-color: rgba(var(--color-brand), 0.48);
}

.form-control:focus {
  border-color: rgb(var(--color-accent));
  box-shadow: 0 0 0 4px rgba(var(--color-accent), 0.15);
}

.form-control[aria-invalid="true"] {
  border-color: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

html[data-theme="dark"] .form-control[aria-invalid="true"] {
  border-color: #ffb4ab;
}

.form-help {
  color: rgb(var(--color-text-muted));
  font-size: 0.8rem;
  line-height: 1.5;
  margin-top: 0.45rem;
}

.form-error {
  color: #9f1c14;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
  margin-top: 0.45rem;
}

html[data-theme="dark"] .form-error {
  color: #ffb4ab;
}

.form-status {
  border: 1px solid rgba(var(--color-brand), 0.2);
  border-left-width: 5px;
  border-radius: 0.9rem;
  color: rgb(var(--color-text-default));
  line-height: 1.55;
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
}

.form-status[data-state="pending"] {
  background: rgba(var(--color-brand), 0.06);
  border-left-color: rgb(var(--color-brand));
}

.form-status[data-state="success"] {
  background: rgba(31, 122, 73, 0.09);
  border-left-color: #1f7a49;
}

.form-status[data-state="error"] {
  background: rgba(180, 35, 24, 0.08);
  border-left-color: #b42318;
}

.form-honeypot {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

.lead-submit[disabled] {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

form[aria-busy="true"] .lead-submit[disabled] {
  cursor: wait;
}

/* Homepage hero */
.hero-section {
  padding-bottom: 6rem;
  padding-top: 6rem;
  overflow: hidden;
}

.hero-visual {
  isolation: isolate;
  margin: 0 auto;
  max-width: 42rem;
  position: relative;
  width: 100%;
}

.hero-visual::before {
  border: 1px solid rgba(var(--color-accent), 0.35);
  border-radius: 2rem;
  content: '';
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  position: absolute;
  transform: rotate(2deg);
  z-index: -1;
}

.hero-image-frame {
  aspect-ratio: 3 / 2;
  background: rgb(var(--color-surface-alt));
  border: 1px solid rgba(var(--color-brand), 0.15);
  border-radius: 2rem;
  box-shadow: 0 28px 60px -32px rgba(var(--color-brand), 0.55);
  overflow: hidden;
}

.hero-note,
.hero-stamp {
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(var(--color-surface-alt), 0.92);
  border: 1px solid rgba(var(--color-brand), 0.15);
  box-shadow: 0 14px 30px -20px rgba(0, 0, 0, 0.45);
  display: flex;
  position: absolute;
}

.hero-note {
  border-radius: 999px;
  bottom: -1.1rem;
  color: rgb(var(--color-text-default));
  font-size: 0.78rem;
  font-weight: 700;
  gap: 0.6rem;
  left: 1.5rem;
  letter-spacing: 0.04em;
  padding: 0.8rem 1.1rem;
}

.hero-note-dot {
  background: rgb(var(--color-accent));
  border-radius: 999px;
  box-shadow: 0 0 0 5px rgba(var(--color-accent), 0.14);
  height: 0.45rem;
  width: 0.45rem;
}

.hero-stamp {
  border-radius: 1.1rem;
  flex-direction: column;
  line-height: 1.2;
  padding: 0.85rem 1rem;
  right: -1rem;
  text-align: center;
  top: 1.5rem;
}

@media (min-width: 1024px) {
  .hero-section {
    padding-bottom: 8rem;
    padding-top: 8rem;
  }
}

@media (max-width: 639px) {
  .hero-section {
    padding-bottom: 5.5rem;
    padding-top: 4.5rem;
  }

  .hero-visual::before {
    inset: 0.75rem -0.5rem -0.75rem 0.5rem;
  }

  .hero-image-frame {
    border-radius: 1.4rem;
  }

  .hero-note {
    bottom: -1rem;
    font-size: 0.68rem;
    left: 0.75rem;
  }

  .hero-stamp {
    right: 0.75rem;
    top: 0.75rem;
  }
}

@media (max-width: 420px) {
  .mobile-header-actions > .btn {
    display: none;
  }

  header > div:first-child {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  header > div:first-child > a {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal,
  .js .reveal-item {
    opacity: 1;
    transform: none;
  }
}

@media (forced-colors: active) {
  .btn,
  .form-control,
  .hero-image-frame,
  .hover-lift {
    border: 1px solid CanvasText;
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline: 3px solid Highlight;
  }
}
