/* ==========================================================================
   AB EcoPark — one stylesheet.
   Palette (5 colors): ink, forest, leaf, mint, white. Change them here only.
   ========================================================================== */

:root {
  /* Same greens as the original Tailwind site */
  --ink: #0f172a;      /* slate-900: body text */
  --dark: #14532d;     /* green-900: "AB Eco" */
  --forest: #166534;   /* green-800: headings, buttons, footer */
  --leaf: #15803d;     /* green-700: "Park", links */
  --accent: #16a34a;   /* green-600: icons, bullets */
  --mint: #dcfce7;     /* green-100: petition band */
  --page: #fafafa;     /* neutral-50: page background */
  --white: #ffffff;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --measure: 1200px;      /* content column */
  --measure-narrow: 800px;
  --radius: 16px;
  --gutter: 16px;
}

/* ---- Reset-ish ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; color: var(--forest); }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--leaf); font-weight: 700; text-underline-offset: 3px; }
a:hover { color: var(--forest); }
strong, b { font-weight: 700; } /* not "bolder": inside a 700 heading that becomes 900 */
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--leaf); color: var(--white); }
[id] { scroll-margin-top: 80px; }

/* ---- Type scale --------------------------------------------------------- */
.h1 { font-size: clamp(2.25rem, 4.5vw, 3rem); font-weight: 700; }
.h2 { font-size: clamp(1.9rem, 3vw, 2.25rem); font-weight: 700; }
.h3 { font-size: 1.5rem; font-weight: 700; }
.body { font-size: 1.125rem; line-height: 1.8; }
.small { font-size: 0.875rem; line-height: 1.5; }
.brand-name { font-weight: 700; }
.brand-name b { color: var(--dark); }
.brand-name i { color: var(--leaf); font-style: normal; }

/* ---- Layout ------------------------------------------------------------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--measure)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), var(--measure-narrow)); margin-inline: auto; }
.section { padding-block: 64px; }
.section--mint { background: var(--mint); }
.section-heading { margin-bottom: 40px; }
.section-heading::after {
  content: ""; display: block; width: 64px; height: 4px; border-radius: 999px;
  background: var(--accent); margin-top: 10px;
}
.section-heading--plain::after { display: none; }
.section-heading--center { text-align: center; }
.section-heading--center::after { margin-inline: auto; }
.stack > * + * { margin-top: 20px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ---- Wordmark ----------------------------------------------------------- */
.wordmark { font-weight: 700; font-size: 1.25rem; text-decoration: none; }
@media (min-width: 768px) { .wordmark { font-size: 1.5rem; } }
.wordmark b { color: var(--dark); font-weight: 700; }
.wordmark i { color: var(--leaf); font-style: normal; font-weight: 700; }
.wordmark:hover b, .wordmark:hover i { color: inherit; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; letter-spacing: 0.01em; text-decoration: none;
  border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  transition: background-color 150ms, color 150ms;
}
.btn--primary { background: var(--forest); color: var(--white); padding: 14px 32px; font-size: 1.125rem; }
.btn--primary:hover { background: var(--leaf); color: var(--white); }
.btn--primary:disabled { opacity: 0.6; cursor: default; }
.btn--secondary { background: #e5e5e5; color: var(--ink); padding: 12px 20px; font-size: 1rem; border-radius: 8px; border-color: rgba(15, 23, 42, 0.45); }
.btn--secondary:hover { background: #d4d4d4; color: var(--ink); }
.btn--outline { background: var(--white); color: var(--forest); border-color: var(--forest); padding: 8px 16px; font-size: 1rem; }
.btn--outline:hover { background: var(--mint); color: var(--forest); }
.btn--block { width: 100%; }

/* ---- Header ------------------------------------------------------------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 20; height: 64px;
  background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}
.header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.header-spacer { height: 64px; }

/* ---- Hero: render background, translucent card -------------------------- */
.hero {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  min-height: 30rem; background: url("/images/ab-ecopark-north-haven-ct-facility-rendering.webp") center 62% / cover no-repeat;
}
@media (min-width: 768px) { .hero { min-height: 42rem; padding-top: 56px; } }
@media (min-width: 1280px) { .hero { padding-top: 100px; } }
.hero__card {
  width: 100%; max-width: 800px; text-align: center; padding: 40px 16px;
  background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(4px);
}
@media (min-width: 768px) { .hero__card { border-radius: 12px; } }
.hero__title { font-size: 3rem; font-weight: 700; margin-bottom: 8px; }
.hero__title b { color: var(--dark); }
.hero__title i { color: var(--leaf); font-style: normal; font-weight: 700; }
.hero__tagline { font-size: 1.5rem; font-weight: 600; color: var(--dark); line-height: 1.3; }
.hero__address { margin-top: 16px; color: var(--leaf); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 1rem; }

/* ---- Signature progress ------------------------------------------------- */
.signatures p { font-weight: 700; font-size: 1.125rem; margin-bottom: 8px; }
.signatures .bar { height: 12px; border-radius: 999px; background: var(--white); border: 1px solid rgba(15, 23, 42, 0.4); overflow: hidden; }
.signatures .bar > div {
  position: relative; height: 100%; border-radius: 999px; width: 100%; overflow: hidden;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 600ms ease-out;
}
/* The moving highlight is a translated pseudo-element, so it stays on the compositor. */
.signatures .bar > div::after {
  content: ""; position: absolute; inset: 0; width: 200%;
  background: linear-gradient(90deg, #4ade80, var(--accent), #4ade80, var(--accent), #4ade80);
  animation: slide 2s linear infinite;
}
@keyframes slide { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ---- Form --------------------------------------------------------------- */
.form { display: flex; flex-direction: column; }
.form label { font-weight: 700; font-size: 0.875rem; letter-spacing: 0.02em; color: var(--dark); margin-bottom: 6px; }
.form input, .form select {
  font: inherit; font-size: 1.125rem; padding: 12px 16px; border-radius: 8px;
  border: 1.5px solid rgba(15, 23, 42, 0.45); background: var(--white); color: var(--ink);
  margin-bottom: 24px; width: 100%;
}
.form input::placeholder { color: rgba(15, 23, 42, 0.55); }
.form input:focus, .form select:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.2); }
.form input:disabled { background: var(--mint); color: rgba(15, 23, 42, 0.7); cursor: not-allowed; }
.form .row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .form .row { grid-template-columns: 1fr 1fr; } }
.form .row--zip { grid-template-columns: 1fr auto; align-items: start; }
.form .row--zip .btn { margin-bottom: 24px; white-space: nowrap; }
.form .consent {
  display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 8px;
  background: transparent; margin-bottom: 24px; padding: 8px 0;
}
.form .consent input { width: 24px; height: 24px; margin: 0; accent-color: var(--forest); flex-shrink: 0; cursor: pointer; }
.form .consent label { margin: 0; line-height: 1.5; font-size: 1.125rem; font-weight: 400; color: var(--ink); }
.form .fine-print { font-size: 1rem; line-height: 1.6; color: var(--forest); margin-top: 32px; }
.form .error { color: #ef4444; font-weight: 700; margin-top: 16px; }
.form .error:empty { display: none; }

/* ---- Carousel ----------------------------------------------------------- */
.carousel { margin: 24px 0 0; }
.carousel__stage { position: relative; }
.carousel img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-radius: 8px; background: #404040; }
.carousel__half {
  position: absolute; top: 0; bottom: 0; width: 50%; border: 0; padding: 0 20px; margin: 0;
  background: transparent; cursor: pointer; display: flex; align-items: center;
}
.carousel__half::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 200ms ease;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.35), transparent 60%);
}
.carousel__half--prev { left: 0; justify-content: flex-start; border-radius: 8px 0 0 8px; }
.carousel__half--next { right: 0; justify-content: flex-end; border-radius: 0 8px 8px 0; }
.carousel__half--next::before { background: linear-gradient(to left, rgba(0, 0, 0, 0.35), transparent 60%); }
.carousel__half:hover::before, .carousel__half:focus-visible::before { opacity: 1; }
.carousel__half::before { border-radius: inherit; }
.carousel__half:focus-visible { outline-offset: -4px; }
/* Arrow is always visible; on hover it grows and nudges in the travel direction. */
.carousel__arrow {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, 0.5); color: var(--white);
  font-size: 1rem; display: grid; place-items: center;
  transition: transform 200ms ease, background 200ms ease;
}
.carousel__half--prev:hover .carousel__arrow { transform: scale(1.15) translateX(-4px); background: rgba(0, 0, 0, 0.9); }
.carousel__half--next:hover .carousel__arrow { transform: scale(1.15) translateX(4px); background: rgba(0, 0, 0, 0.9); }
.carousel__dots { position: absolute; left: 50%; transform: translateX(-50%); bottom: 16px; display: flex; gap: 4px; }
/* 24px hit area, 8px visible dot. */
.carousel__dots button { width: 24px; height: 24px; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.carousel__dots button::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.5); }
.carousel__dots button[aria-current="true"]::before { background: var(--white); }
.carousel__caption { display: flex; align-items: center; gap: 20px; margin-top: 12px; font-size: 1.125rem; font-weight: 700; font-style: italic; color: var(--forest); line-height: 1.6; }
.carousel__caption::before { content: ""; flex-shrink: 0; width: 4px; height: 40px; border-radius: 999px; background: var(--accent); }

/* ---- Promise cards ------------------------------------------------------ */
.promise { display: grid; gap: 32px; }
@media (min-width: 768px) { .promise { grid-template-columns: 1fr 1fr; } }
.card { background: var(--white); border: 1px solid rgba(15, 23, 42, 0.12); border-radius: 8px; padding: 32px; }
.card__icon { display: block; text-align: center; font-size: 2.25rem; color: var(--accent); margin-bottom: 8px; }
.card h3 { text-align: center; font-weight: 600; margin-bottom: 16px; }
.card p { font-size: 1rem; line-height: 2; }
@media (min-width: 768px) { .card p { font-size: 1.125rem; line-height: 2.2; } }

/* ---- Process timeline --------------------------------------------------- */
.timeline { list-style: none; border-left: 2px solid rgba(21, 128, 61, 0.4); margin-left: 28px; }
.timeline li { position: relative; padding-left: 40px; padding-bottom: 56px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .num {
  position: absolute; left: -29px; top: 0; width: 56px; height: 56px; border-radius: 50%;
  background: var(--forest); color: var(--white); font-size: 1.5rem; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 0 0 8px var(--page);
}
@media (min-width: 768px) { .timeline { margin-left: 32px; } .timeline li { padding-left: 56px; } .timeline .num { left: -33px; width: 64px; height: 64px; } }
.timeline h3 { padding-top: 12px; margin-bottom: 4px; }
.timeline .sub { color: var(--leaf); font-weight: 700; font-size: 1.125rem; margin-bottom: 16px; }

/* ---- FAQ ---------------------------------------------------------------- */
.faq { display: flex; flex-direction: column; gap: 16px; }
.faq details { background: var(--white); border: 1px solid rgba(15, 23, 42, 0.1); border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); transition: box-shadow 150ms; }
.faq details[open] { border-color: rgba(21, 128, 61, 0.5); box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1); }
.faq summary {
  display: flex; align-items: center; gap: 16px; cursor: pointer; list-style: none;
  padding: 20px 24px; color: var(--forest); font-weight: 700; font-size: 1.25rem; border-radius: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary > span { flex: 1; }
.faq__icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--mint); color: var(--forest); font-size: 1rem;
}
.faq summary:hover { background: rgba(214, 255, 180, 0.4); }
.faq summary::after {
  content: ""; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--leaf);
  background: center / 12px no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  transition: transform 200ms;
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq .answer { padding: 16px 24px 24px; border-top: 1px solid rgba(15, 23, 42, 0.06); animation: fade 200ms ease-out; }
.faq .answer > * + * { margin-top: 16px; }
.faq .answer ul { padding-left: 20px; }
.faq .answer li::marker { color: var(--accent); }
.faq .answer img { border-radius: 8px; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } }

/* ---- Contact + footer --------------------------------------------------- */
.contact { padding-top: 0; }
.contact .spaced { margin-top: 16px; }
.footer { background: var(--forest); color: #bbf7d0; }
.footer .wrap { padding-block: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 0.95rem; }
@media (min-width: 768px) { .footer .wrap { flex-direction: row; justify-content: space-between; } }

/* ---- Sticky mobile CTA -------------------------------------------------- */
.sticky-cta {
  position: fixed; inset: auto 0 0 0; z-index: 10; padding: 12px;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(8px); border-top: 1px solid rgba(15, 23, 42, 0.15);
}
.sticky-cta[hidden] { display: none; }
@media (min-width: 768px) { .sticky-cta { display: none; } }
body.has-sticky { padding-bottom: 80px; }
@media (min-width: 768px) { body.has-sticky { padding-bottom: 0; } }

/* ---- Thank-you page ----------------------------------------------------- */
.thanks { padding-block: 64px 96px; min-height: 60vh; }
.thanks .signatures { margin-top: 16px; }
.thanks .btn { margin-top: 24px; }

/* ---- Motion preferences ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .faq .answer, .signatures .bar > div::after { animation: none; }
  .carousel__half::before, .carousel__arrow { transition: none; }
}
@media print { .header, .sticky-cta { display: none !important; } }
