/* ============================================================
   Hicks Recycling — styles.css
   Mobile-first, plain CSS. Organized top-to-bottom:
   tokens, base, utilities, buttons, header, hero, sections,
   footer, then responsive breakpoints.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Greens */
  --green-900: #0f2a1f; /* deepest — footer */
  --green-800: #16382a; /* dark — header, hero, contact */
  --green-700: #1c4a37;
  --green-600: #1f7a4d; /* primary button (AA with white text) */
  --green-bright: #34c75e; /* accent / highlights */
  --green-50: #eaf5ee; /* light tint backgrounds */

  /* Neutrals */
  --black: #111613;
  --ink: #16241d; /* body text on light */
  --ink-soft: #46544c; /* muted text */
  --white: #ffffff;
  --silver: #cdd3d8; /* metal accent / borders */
  --silver-dark: #aab1b8;

  /* Layout */
  --pad: 1.25rem; /* base side padding */
  --maxw: 1140px;
  --header-h: 68px;
  --header-h-scrolled: 60px;
  --header-h-mobile: 52px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(15, 42, 31, 0.10);
  --shadow-sm: 0 4px 14px rgba(15, 42, 31, 0.08);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--header-h) + 12px); /* offset sticky header on anchor jumps */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--green-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  font-weight: 800;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* Visible focus ring for keyboard users */
:focus-visible {
  outline: 3px solid var(--green-bright);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link — hidden until focused */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 100;
  background: var(--white);
  color: var(--green-800);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0.75rem;
  text-decoration: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px; /* comfortable tap target */
  padding: 0.7rem 1.3rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-lg {
  min-height: 54px;
  padding: 0.85rem 1.6rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

/* Filled green — main action */
.btn-primary {
  background: var(--green-600);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(31, 122, 77, 0.32);
}

.btn-primary:hover {
  background: #1a6a42;
}

/* Bright green — secondary action (e.g. Text Now) */
.btn-secondary {
  background: var(--green-bright);
  color: var(--green-900);
}

.btn-secondary:hover {
  background: #2bb653;
}

/* Outlined for dark backgrounds */
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--white);
}

/* Screen-reader only — keeps SEO h1 without visual duplication */
.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;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: transparent;
  color: var(--white);
  border-bottom: none;
  transform: translateY(-100%);
  opacity: 0;
  transition:
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.5s ease,
    background 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

/* Page-load animation — toggled by JS */
body.is-loaded .site-header {
  transform: translateY(0);
  opacity: 1;
}

/* Animated green accent — hidden at top so it doesn't cut across the hero */
.header-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  opacity: 0;
  background: linear-gradient(
    90deg,
    transparent,
    var(--green-bright) 20%,
    var(--green-600) 80%,
    transparent
  );
  transition:
    width 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.35s,
    opacity 0.3s ease;
}

body.is-loaded .site-header.is-scrolled .header-accent {
  width: 100%;
  opacity: 1;
}

/* Staggered slide-in from left for header items */
.header-item {
  opacity: 0;
  transform: translateX(-28px);
  transition:
    opacity 0.55s ease,
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(0.2s + var(--i, 0) * 0.08s);
}

body.is-loaded .header-item {
  opacity: 1;
  transform: translateY(0);
}

/* Compact + stronger shadow when scrolled */
.site-header.is-scrolled {
  background: rgba(15, 42, 31, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(205, 211, 216, 0.1);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.site-header.is-scrolled .header-inner {
  min-height: var(--header-h-scrolled);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  transition: min-height 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  color: var(--white);
  flex: 1 1 auto;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
  color: var(--white);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--white);
}

.brand-slogan {
  font-size: 0.72rem;
  color: var(--silver);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hamburger */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 0 11px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  cursor: pointer;
  flex: 0 0 auto;
}

.nav-toggle-bar {
  height: 2px;
  width: 100%;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Animate hamburger into an X when open */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav panel (drops down from header) */
.primary-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: flex;
  flex-direction: column;
  background: var(--green-800);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-inline: var(--pad);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

.primary-nav.is-open {
  max-height: 80vh;
  padding-block: 0.5rem 1.25rem;
}

.nav-list {
  display: flex;
  flex-direction: column;
}

.nav-link {
  display: block;
  padding: 0.85rem 0.25rem;
  color: var(--white);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.55rem;
  width: 0;
  height: 2px;
  background: var(--green-bright);
  border-radius: 2px;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--green-bright);
  text-decoration: none;
}

.nav-link.is-active {
  color: var(--green-bright);
}

.nav-cta {
  margin-top: 1rem;
  animation: navCtaPulse 2.8s ease-in-out infinite;
}

@keyframes navCtaPulse {
  0%,
  100% {
    box-shadow: 0 6px 16px rgba(31, 122, 77, 0.32);
  }
  50% {
    box-shadow: 0 6px 26px rgba(52, 199, 94, 0.48);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  --fade-h: 7rem;
  /* Same pattern as .section-faq — base under fade matches gradient start */
  background: var(--green-900);
  /* Pull hero bg behind transparent header — no seam under nav */
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(3rem + var(--header-h));
  padding-bottom: calc(3rem + var(--fade-h));
  z-index: 0;
}

/* Dark hero art — ends exactly where fade begins (uniform green-900 at bottom edge) */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--fade-h);
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(52, 199, 94, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 45% at 88% 65%, rgba(52, 199, 94, 0.08), transparent 50%),
    linear-gradient(to bottom, var(--green-800) 0%, var(--green-900) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Blend sits in bottom padding only — mirrors .section-faq::after (inverted colors) */
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--fade-h);
  background: linear-gradient(180deg, var(--green-900) 0%, var(--green-50) 100%);
  background: linear-gradient(180deg in oklab, var(--green-900) 0%, var(--green-50) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Hero: copy left, logo right on desktop */
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  min-height: clamp(360px, 55vh, 520px);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 620px;
  width: 100%;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-bright);
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(52, 199, 94, 0.35);
  border-radius: 999px;
  background: rgba(52, 199, 94, 0.1);
}

.hero-headline {
  font-size: clamp(2.4rem, 7vw, 3.75rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* Animated accent line — sweeps left to right on load */
.hero-line {
  display: block;
  height: 4px;
  width: 0;
  max-width: 140px;
  margin-top: 0.85rem;
  background: linear-gradient(90deg, var(--green-bright), var(--green-600));
  border-radius: 2px;
}

body.is-loaded .hero-line {
  animation: sweepRight 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
}

.hero-subline {
  margin-top: 0.85rem;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 700;
  color: var(--silver);
}

.hero-desc {
  margin-top: 1rem;
  max-width: 44ch;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.75rem;
  width: 100%;
}

/* Logo — tilts in from the left and settles straight (one-time on load) */
.hero-brand {
  display: flex;
  justify-content: center;
}

.hero-brand-frame {
  display: inline-block;
  padding: 0.85rem 1.25rem;
  background: #000;
  border-radius: 16px;
  border: 2px solid rgba(118, 184, 42, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 16px 48px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(52, 199, 94, 0.1);
}

.hero-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(360px, 92vw);
  margin-inline: auto;
}

/* Hero text slides in from left */
.hero-animate {
  opacity: 0;
  transform: translateX(-36px);
}

body.is-loaded .hero-animate {
  animation: slideInRight 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.3s + var(--i, 0) * 0.09s);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-36px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes sweepRight {
  from {
    width: 0;
    opacity: 0.6;
  }
  to {
    width: 140px;
    opacity: 1;
  }
}

/* ---------- Generic section ---------- */
.section {
  padding-block: 3.25rem;
  position: relative;
}

/* Mint sections — top matches hero fade end (mirrors .section-contact meeting FAQ) */
.section-take {
  background: var(--green-50);
  padding-top: 2.75rem;
  padding-bottom: 2.75rem;
}

.section-steps,
.section-area {
  background: var(--green-50);
  padding-block: 2.75rem;
}

.section-faq {
  background: var(--green-50);
  padding-block: 2.75rem;
  --fade-h: 7rem;
  padding-bottom: var(--fade-h);
}

/* Blend sits in bottom padding only — height always matches padding-bottom */
.section-faq::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--fade-h);
  background: linear-gradient(180deg, var(--green-50) 0%, var(--green-800) 100%);
  background: linear-gradient(180deg in oklab, var(--green-50) 0%, var(--green-800) 100%);
  pointer-events: none;
  z-index: 0;
}

.section-faq .container {
  position: relative;
  z-index: 1;
}

.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-head--center {
  text-align: center;
  margin-inline: auto;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 0.5rem;
}

.section-label--dark {
  color: var(--green-bright);
  background: var(--green-800);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}

.section-head--center .section-title::after {
  content: "";
  display: block;
  width: 52px;
  height: 4px;
  background: linear-gradient(90deg, var(--green-600), var(--green-bright));
  border-radius: 2px;
  margin: 0.85rem auto 0;
}

.section-title {
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  color: var(--green-800);
}

.section-title-light {
  color: var(--white);
}

.section-lead {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.section-lead-light {
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- What We Take ---------- */
/* background/padding set in generic mint section rules above */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--green-bright);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--green-50);
  color: var(--green-600);
  margin-bottom: 1rem;
}

.card-icon svg {
  width: 30px;
  height: 30px;
}

.card-title {
  font-size: 1.25rem;
  color: var(--green-800);
  margin-bottom: 0.5rem;
}

.card-text {
  color: var(--ink-soft);
}

.take-note {
  margin-top: 1.75rem;
  text-align: center;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- How It Works ---------- */
/* shares mint band with adjacent sections */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  counter-reset: step;
  position: relative;
}

.step {
  position: relative;
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.step-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  color: var(--white);
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 14px rgba(31, 122, 77, 0.35);
}

.step-title {
  font-size: 1.2rem;
  color: var(--green-800);
  margin-bottom: 0.35rem;
}

.step-text {
  color: var(--ink-soft);
}

/* ---------- Service Area ---------- */
/* shares mint band with adjacent sections */

.area-panel {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow);
}

.area-inner {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

.area-text p {
  margin-top: 0.75rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 52ch;
  line-height: 1.65;
}

.location-badge {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--green-50);
  border: 1px solid var(--silver);
  border-left: 5px solid var(--green-bright);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.location-pin {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--white);
  color: var(--green-600);
  flex: 0 0 auto;
}

.location-pin svg {
  width: 26px;
  height: 26px;
}

.location-label {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.location-label strong {
  font-size: 1.2rem;
  color: var(--green-800);
}

.location-label span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* ---------- Contact (strongest CTA) ---------- */
/* Top starts at green-800 to meet the FAQ fade; bottom reaches
   green-900 to meet the footer — no section overlap needed. */
.section-contact {
  position: relative;
  color: var(--white);
  padding-block: 4rem 4.5rem;
  background: linear-gradient(to bottom, var(--green-800) 0%, var(--green-900) 100%);
}

.section-contact .container {
  position: relative;
  z-index: 1;
}

.contact-card {
  display: grid;
  gap: 1.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(205, 211, 216, 0.22);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.contact-name {
  font-size: 1.5rem;
  font-weight: 800;
}

.contact-role {
  color: var(--green-bright);
  font-weight: 600;
  margin-bottom: 1rem;
}

.contact-list {
  display: grid;
  gap: 0.75rem;
}

.contact-list li {
  display: flex;
  flex-direction: column;
}

.contact-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--silver);
}

.contact-list a {
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 700;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ---------- FAQ — list styling (background in mint band rules above) */

.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 760px;
  margin-inline: auto;
}

/* Scroll-reveal for sections */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.faq-item {
  border: 1px solid var(--silver);
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  color: var(--green-800);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* Hide default disclosure triangle, add our own + / - */
.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green-600);
  line-height: 1;
}

.faq-item[open] summary::after {
  content: "\2212"; /* minus sign */
}

.faq-item p {
  padding: 0 1.25rem 1.2rem;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.85);
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
  padding-block: 2.5rem;
}

.footer-name {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
}

.footer-slogan {
  display: block;
  margin-top: 0.35rem;
  color: var(--green-bright);
  font-weight: 600;
}

.footer-contact {
  display: grid;
  gap: 0.5rem;
}

.footer-contact a {
  color: var(--white);
  font-weight: 600;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-block: 1.25rem;
  font-size: 0.9rem;
  color: var(--silver);
}

/* ============================================================
   Responsive breakpoints
   ============================================================ */

/* Small tablets / large phones */
@media (min-width: 600px) {
  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .area-inner {
    grid-template-columns: 1fr auto;
    gap: 2rem;
  }
}

/* Tablets */
@media (min-width: 760px) {
  .section {
    padding-block: 4rem;
  }

  /* Keep fade zones — .section rule above must not shrink these */
  .section-take {
    padding-top: 4rem;
    padding-bottom: 2.75rem;
  }

  .section-faq {
    --fade-h: 7rem;
    padding-bottom: var(--fade-h);
  }

  .hero {
    --fade-h: 7rem;
    padding-bottom: calc(3rem + var(--fade-h));
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  /* Connector line between step numbers */
  .steps::before {
    content: "";
    position: absolute;
    top: 26px;
    left: 18%;
    right: 18%;
    height: 2px;
    background: linear-gradient(
      90deg,
      var(--green-600),
      var(--green-bright),
      var(--green-600)
    );
    z-index: 0;
    opacity: 0.45;
  }

  .step {
    z-index: 1;
  }

  .contact-card {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    padding: 2.25rem;
  }

  .area-panel {
    padding: 2.5rem 2.75rem;
  }
}

/* Desktop: switch nav to a horizontal bar */
@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .primary-nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    background: transparent;
    border: 0;
    padding: 0;
    max-height: none;
    overflow: visible;
    flex: 0 0 auto;
  }

  .nav-list {
    flex-direction: row;
    gap: 1.5rem;
  }

  .nav-link {
    padding: 0.4rem 0;
    border: 0;
  }

  .nav-link::after {
    bottom: -2px;
  }

  .nav-cta {
    margin-top: 0;
  }

  .brand {
    flex: 0 0 auto;
  }

  .brand-slogan {
    max-width: 280px;
  }

  .hero {
    padding-top: calc(4.5rem + var(--header-h));
    padding-bottom: calc(4rem + var(--fade-h));
  }

  .hero-inner {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
  }

  .hero-brand {
    justify-content: flex-end;
  }

  .hero-logo {
    max-width: 400px;
  }

  .hero-content {
    max-width: 680px;
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-header,
  .header-item,
  .header-accent,
  .hero-animate,
  .hero-line,
  .hero-brand-frame,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
    width: auto !important;
  }

  .hero-line {
    width: 140px !important;
  }

  .nav-cta {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .chat-widget--pulse .chat-toggle {
    animation: none !important;
  }
}

/* ============================================================
   CHAT WIDGET — Assistant
   ============================================================ */

.chat-widget {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
}

.chat-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 0;
  border-radius: 50%;
  background: var(--green-600);
  color: #fff;
  box-shadow: 0 8px 24px rgba(15, 42, 31, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.chat-toggle svg {
  width: 1.45rem;
  height: 1.45rem;
}

.chat-toggle:hover {
  background: var(--green-700);
  transform: scale(1.04);
}

.chat-toggle:focus-visible {
  outline: 3px solid var(--green-bright);
  outline-offset: 3px;
}

.chat-widget--pulse .chat-toggle {
  animation: chat-pulse 2.4s ease-in-out 3;
}

@keyframes chat-pulse {
  0%,
  100% {
    box-shadow: 0 8px 24px rgba(15, 42, 31, 0.28);
  }

  50% {
    box-shadow:
      0 8px 24px rgba(15, 42, 31, 0.28),
      0 0 0 10px rgba(52, 199, 94, 0.22);
  }
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(3.5rem + 0.85rem);
  display: none;
  flex-direction: column;
  width: min(22.5rem, calc(100vw - 2rem));
  height: min(30rem, calc(100vh - 7rem));
  background: #fff;
  border: 1px solid rgba(22, 56, 42, 0.12);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(15, 42, 31, 0.22);
  overflow: hidden;
}

.chat-widget.is-open .chat-panel {
  display: flex;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  background: var(--green-800);
  color: #fff;
}

.chat-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.chat-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.78);
}

.chat-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.chat-close svg {
  width: 1rem;
  height: 1rem;
}

.chat-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.chat-close:focus-visible {
  outline: 3px solid var(--green-bright);
  outline-offset: 2px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: var(--green-50);
}

.chat-msg {
  display: flex;
  margin-bottom: 0.75rem;
}

.chat-msg--user {
  justify-content: flex-end;
}

.chat-msg--assistant {
  justify-content: flex-start;
}

.chat-bubble {
  max-width: 88%;
  padding: 0.7rem 0.85rem;
  border-radius: 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
  word-break: break-word;
}

.chat-bubble p {
  margin: 0;
}

.chat-bubble p + p {
  margin-top: 0.5rem;
}

.chat-msg--user .chat-bubble {
  background: var(--green-600);
  color: #fff;
  border-bottom-right-radius: 0.25rem;
}

.chat-msg--assistant .chat-bubble {
  background: #fff;
  color: var(--green-900);
  border: 1px solid rgba(22, 56, 42, 0.1);
  border-bottom-left-radius: 0.25rem;
}

.chat-bubble-image {
  display: block;
  width: 100%;
  max-width: 12rem;
  border-radius: 0.55rem;
  margin-bottom: 0.45rem;
}

.chat-bubble--typing {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 3.5rem;
  padding-block: 0.85rem;
}

.chat-bubble--streaming p::after {
  content: "|";
  display: inline-block;
  margin-left: 1px;
  color: var(--green-600);
  animation: chat-stream-cursor 0.8s step-end infinite;
}
@media (prefers-reduced-motion: reduce) {
  .chat-bubble--streaming p::after { animation: none; opacity: 0.6; }
}
@keyframes chat-stream-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.chat-typing-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--green-600);
  animation: chat-typing 1.2s infinite ease-in-out;
}

.chat-typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes chat-typing {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.chat-preview {
  padding: 0.55rem 0.75rem 0;
  background: #fff;
  border-top: 1px solid rgba(22, 56, 42, 0.08);
}

.chat-preview-item {
  position: relative;
  display: inline-block;
}

.chat-preview-item img {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid rgba(22, 56, 42, 0.12);
}

.chat-preview-remove {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 50%;
  background: var(--green-800);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.chat-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.75rem;
  background: #fff;
  border-top: 1px solid rgba(22, 56, 42, 0.08);
}

.chat-attach {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(22, 56, 42, 0.14);
  border-radius: 50%;
  background: var(--green-50);
  color: var(--green-800);
  cursor: pointer;
}

.chat-attach svg {
  width: 1.1rem;
  height: 1.1rem;
}

.chat-attach:hover {
  background: #fff;
  border-color: var(--green-bright);
}

.chat-attach:focus-visible,
.chat-send:focus-visible,
.chat-input:focus-visible {
  outline: 3px solid var(--green-bright);
  outline-offset: 2px;
}

.chat-input {
  flex: 1;
  min-width: 0;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(22, 56, 42, 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--green-900);
  font: inherit;
}

.chat-input::placeholder {
  color: rgba(15, 42, 31, 0.45);
}

.chat-send {
  flex: 0 0 auto;
  height: 2.5rem;
  padding: 0 0.95rem;
  border: 0;
  border-radius: 999px;
  background: var(--green-bright);
  color: var(--green-900);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.chat-send:hover {
  background: var(--green-600);
  color: #fff;
}

.chat-send:disabled,
.chat-attach:disabled,
.chat-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.chat-widget.is-open .chat-toggle {
  background: var(--green-800);
}

/* ============================================================
   Mobile — header & hero top
   ============================================================ */
@media (max-width: 899px) {
  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
    background: rgba(15, 42, 31, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .header-inner {
    min-height: var(--header-h-mobile);
    padding-block: 0.5rem;
  }

  .site-header.is-scrolled .header-inner {
    min-height: calc(var(--header-h-scrolled) - 4px);
  }

  /* Slogan is on the logo — keep header compact */
  .brand-slogan {
    display: none;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .nav-toggle {
    width: 42px;
    height: 42px;
  }

  .hero {
    margin-top: calc(-1 * (var(--header-h-mobile) + env(safe-area-inset-top, 0px)));
    padding-top: calc(1.25rem + var(--header-h-mobile) + env(safe-area-inset-top, 0px));
    padding-bottom: calc(2rem + var(--fade-h));
  }

  .hero-inner {
    min-height: auto;
    gap: 1.25rem;
  }

  /* Logo first, then copy — avoids name ×3 at the top */
  .hero-brand {
    order: -1;
  }

  .hero-brand-frame {
    padding: 0.55rem 0.85rem;
  }

  .hero-logo {
    max-width: min(240px, 78vw);
  }

  .hero-headline,
  .hero-line {
    display: none;
  }

  .hero-eyebrow {
    margin-bottom: 0.5rem;
    font-size: 0.72rem;
  }

  .hero-subline {
    font-size: clamp(1.35rem, 5.5vw, 1.65rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--white);
    margin-top: 0;
  }

  .hero-desc {
    font-size: 0.95rem;
    margin-top: 0.65rem;
  }

  .hero-actions {
    margin-top: 1.25rem;
  }
}

@media (max-width: 599px) {
  .chat-widget {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
  }

  .chat-panel {
    position: fixed;
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    height: min(78vh, 32rem);
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 0;
  }

  .chat-toggle {
    position: fixed;
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .chat-widget.is-open .chat-toggle {
    display: none;
  }
}
