/* ============================================================
   DeMitis Donations — stylesheet
   Palette drawn from the actual logo: cream background,
   deep navy (hands/wordmark), warm red (shirt) for CTAs,
   with a leaf green reserved for the environmental section.
   ============================================================ */

:root {
  --cream: #faf6ee;
  --cream-2: #f2ecdf;
  --navy-900: #143249;
  --navy-700: #1f4e74;
  --navy-600: #2a5f8a;
  --red-600: #b23a34;   /* deepened logo red — 4.5:1+ with white text */
  --red-700: #9c312c;
  --green-800: #2f5a41;
  --green-100: #e7efe6;
  --charcoal: #2e3338;
  --muted: #5b6570;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(20, 50, 73, 0.12);
  --radius: 14px;
  --font-head: "Avenir Next", "Avenir", "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy-900);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 0.5em; }
h3 { font-size: 1.2rem; margin-bottom: 0.4em; }

p { margin-bottom: 1em; }

a { color: var(--navy-700); }
a:hover { color: var(--red-600); }

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

section { padding: 72px 0; }

.section-kicker {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-600);
  margin-bottom: 10px;
}

.section-lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 720px;
}

/* Visually hidden (screen-reader-only) content */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-900);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 238, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--cream-2);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy-900);
  line-height: 1.1;
}
.brand-name small {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--red-600);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.header-contact {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.88rem;
  font-weight: 700;
}

.header-contact a {
  color: var(--navy-700);
  text-decoration: none;
}

.header-contact a:hover { color: var(--red-600); }

/* ---------- Hamburger button (all screen sizes) ---------- */
.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 44px;
  background: none;
  border: 2px solid var(--navy-700);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.header-contact + .nav-toggle { margin-left: 0; }
.nav-toggle .hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}
.nav-toggle .hamburger span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--navy-700);
  border-radius: 2px;
  transition: background 0.15s ease;
}
.nav-toggle:hover { background: var(--navy-700); }
.nav-toggle:hover .hamburger span { background: #fff; }

/* ---------- Slide-in sidebar navigation ---------- */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 45, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 150;
}
.nav-backdrop.open { opacity: 1; visibility: visible; }

.sidebar-nav {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(340px, 86vw);
  background: var(--cream);
  box-shadow: -14px 0 44px rgba(15, 30, 45, 0.22);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0.3s ease;
  z-index: 160;
  display: flex;
  flex-direction: column;
  padding: 0 26px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sidebar-nav.open { transform: translateX(0); visibility: visible; }

.sidebar-contact {
  display: grid;
  gap: 4px;
  margin: 14px 0 4px;
  padding-top: 14px;
  border-top: 1px solid var(--cream-2);
}

.sidebar-contact a {
  padding-block: 6px;
  font-size: 0.9rem;
  color: var(--navy-700);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--cream-2);
}
.sidebar-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-600);
}
.sidebar-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--cream-2);
  color: var(--navy-900);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.sidebar-close:hover { background: var(--red-600); color: #fff; }

.sidebar-nav > a {
  display: block;
  padding: 14px 4px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--navy-900);
  text-decoration: none;
  border-bottom: 1px solid var(--cream-2);
}
.sidebar-nav > a:hover { color: var(--red-600); }
.sidebar-nav > a[aria-current="page"] { color: var(--red-600); }

.sidebar-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.sidebar-cta .btn { width: 100%; }

body.nav-open { overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.btn-red { background: var(--red-600); color: #fff; }
.btn-red:hover { background: var(--red-700); color: #fff; }

.btn-navy { background: var(--navy-700); color: #fff; }
.btn-navy:hover { background: var(--navy-900); color: #fff; }

.btn-outline {
  background: transparent;
  border-color: var(--navy-700);
  color: var(--navy-700);
}
.btn-outline:hover { background: var(--navy-700); color: #fff; }

.btn-sm { padding: 9px 18px; font-size: 0.9rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 72px;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(178, 58, 52, 0.07), transparent 60%),
    radial-gradient(900px 420px at -10% 110%, rgba(31, 78, 116, 0.08), transparent 60%),
    var(--cream);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero h1 { margin-bottom: 18px; }

.hero .tagline {
  font-size: 1.22rem;
  color: var(--muted);
  margin-bottom: 26px;
  max-width: 560px;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }

.trust-chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
  background: var(--white);
  border: 1px solid var(--cream-2);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-700);
  box-shadow: 0 2px 8px rgba(20, 50, 73, 0.06);
}

.hero-photo img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- How it works ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--navy-700);
}
.card.card-accent { border-top-color: var(--red-600); }

.card .step-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: var(--cream);
  margin-bottom: 16px;
}

.card p { color: var(--muted); font-size: 0.98rem; margin-bottom: 12px; }

.card .card-link { font-weight: 700; text-decoration: none; }

/* ---------- Story / Where donations go ---------- */
.story { background: var(--white); }

.story-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: stretch;
  margin: 36px 0;
}

.story-box {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 26px;
  border-left: 5px solid var(--navy-700);
}
.story-box.overflow-box { border-left-color: var(--red-600); }

.story-box h3 { display: flex; align-items: center; gap: 8px; }

.story-box .where {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red-600);
}

.story-arrow {
  align-self: center;
  font-size: 1.8rem;
  color: var(--muted);
  font-weight: 700;
}

.partners-note {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 0.98rem;
  color: var(--muted);
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 34px;
}

.gallery-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-grid button {
  border: 0;
  padding: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-grid img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.gallery-grid-two img { height: 360px; }
.gallery-grid button:hover img,
.gallery-grid button:focus-visible img { transform: scale(1.04); }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 45, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 4vh 4vw;
}
.lightbox.open { display: flex; }

.lightbox img {
  max-width: 100%;
  max-height: 86vh;
  border-radius: 10px;
}

.lightbox .lb-close,
.lightbox .lb-prev,
.lightbox .lb-next {
  position: absolute;
  background: rgba(250, 246, 238, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.25rem;
  cursor: pointer;
}
.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-caption {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #f3ecdf;
  font-size: 0.9rem;
  text-align: center;
  max-width: 80%;
}

/* ---------- Environmental impact ---------- */
.impact {
  background: linear-gradient(160deg, var(--green-100), #f2f7f0 70%);
}

.impact-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 44px;
  align-items: center;
}

.impact h2, .impact h3 { color: var(--green-800); }

.stat-badge {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 44px 36px;
  text-align: center;
  border: 3px solid var(--green-800);
}

.impact-visual {
  position: relative;
  min-height: 500px;
}

.impact-visual > img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.impact-visual .stat-badge {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
}

.stat-badge .stat-number {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 6vw, 3.8rem);
  font-weight: 800;
  color: var(--green-800);
  line-height: 1;
}

.stat-badge .stat-label {
  font-size: 1.05rem;
  color: var(--charcoal);
  margin-top: 10px;
}

.stat-badge .stat-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 8px;
}

.leaf-list { list-style: none; margin: 18px 0; }
.leaf-list li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 12px;
  color: var(--charcoal);
}
.leaf-list li::before {
  content: "🌱";
  position: absolute;
  left: 0;
}

/* ---------- Forms ---------- */
.form-section { background: var(--white); }

.form-wrap {
  max-width: 680px;
  margin: 36px auto 0;
  background: var(--cream);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

.form-row { margin-bottom: 18px; }

.form-row label {
  display: block;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--navy-900);
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.form-row .optional { font-weight: 400; color: var(--muted); font-size: 0.85rem; }

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #8b8574;
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--white);
  color: var(--charcoal);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: 3px solid rgba(42, 95, 138, 0.35);
  border-color: var(--navy-600);
}

.form-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(31, 78, 116, 0.08);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.95rem;
  color: var(--navy-900);
  margin-bottom: 20px;
}

.zip-message {
  display: none;
  background: var(--green-100);
  border: 2px solid var(--green-800);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 20px;
  font-size: 0.98rem;
}
.zip-message.show { display: block; }
.zip-message strong { color: var(--green-800); }
.zip-message address { font-style: normal; font-weight: 700; margin-top: 6px; }

.form-success {
  display: none;
  text-align: center;
  padding: 30px 10px;
}
.form-success.show { display: block; }
.form-success .big-check { font-size: 3rem; }

.error-text { color: var(--red-700); font-size: 0.85rem; display: none; margin-top: 4px; }
.error-text.show { display: block; }

/* ---------- Drop-off ---------- */
.dropoff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 30px;
}

.dropoff-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
  border-top: 5px solid var(--green-800);
}
.dropoff-card address { font-style: normal; font-size: 1.15rem; font-weight: 700; color: var(--navy-900); margin: 10px 0; }

/* ---------- Junk removal ---------- */
.junk {
  background:
    radial-gradient(900px 400px at 110% 10%, rgba(178, 58, 52, 0.18), transparent 55%),
    var(--navy-900);
  color: #e9eef3;
}

.junk h2, .junk h3 { color: #fff; }
.junk .section-kicker { color: #f0b9b5; }

.junk-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: start;
}

.junk p { color: #ccd8e2; }

.junk .money-flow {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 22px 0;
  font-size: 0.98rem;
}

.junk .money-flow strong { color: #fff; }

.junk-contact-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; }

.junk .form-wrap { background: rgba(255, 255, 255, 0.06); box-shadow: none; margin-top: 0; }
.junk .form-row label { color: #fff; }
.junk .form-row input, .junk .form-row textarea { border-color: transparent; }
.junk .form-row input:focus, .junk .form-row textarea:focus {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  border-color: var(--navy-600);
}
.junk .form-note { background: rgba(255, 255, 255, 0.1); color: #e9eef3; }
.junk .form-success { color: #fff; }

/* ---------- About preview / About page ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}

.about-grid img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: 380px;
  object-fit: cover;
}

/* ---------- Contact ---------- */
.contact { background: var(--white); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 34px;
}

.contact-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
}

.contact-card .icon { font-size: 2rem; margin-bottom: 10px; }
.contact-card a { font-weight: 700; font-size: 1.05rem; text-decoration: none; word-break: break-word; }
.contact-card address { font-style: normal; font-weight: 700; color: var(--navy-900); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: #c6d2dd;
  padding: 56px 0 30px;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}

.site-footer h3, .site-footer h4 { color: #fff; margin-bottom: 14px; font-size: 1rem; }

.site-footer a { color: #c6d2dd; text-decoration: none; }
.site-footer a:hover { color: #fff; }

.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { width: 54px; height: 54px; border-radius: 50%; }
.footer-brand span { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 1.1rem; }

.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 22px;
  text-align: center;
  font-size: 0.85rem;
  color: #93a6b6;
}

/* ---------- Popup modal ---------- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 45, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 400;
  padding: 20px;
}
.popup-overlay.open { display: flex; }

.popup {
  background: var(--cream);
  border-radius: 18px;
  max-width: 440px;
  width: 100%;
  padding: 36px 32px 30px;
  position: relative;
  box-shadow: 0 24px 60px rgba(10, 25, 40, 0.35);
  text-align: center;
}

.popup .popup-logo { width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 14px; }

.popup h2 { font-size: 1.45rem; margin-bottom: 8px; }
.popup p { color: var(--muted); font-size: 0.98rem; margin-bottom: 18px; }

.popup .form-row { text-align: left; margin-bottom: 12px; }

.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--cream-2);
  color: var(--navy-900);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.popup-close:hover { background: var(--red-600); color: #fff; }

.popup .dismiss-link {
  display: inline-block;
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Page hero (about/contact) ---------- */
.page-hero {
  padding: 64px 0 48px;
  background:
    radial-gradient(900px 400px at 90% -20%, rgba(178, 58, 52, 0.08), transparent 60%),
    var(--cream);
}
.page-hero p { max-width: 700px; color: var(--muted); font-size: 1.12rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .header-contact { display: none; }
  .nav-toggle { margin-left: auto; }
  .hero-grid, .impact-grid, .junk-grid, .about-grid, .dropoff-grid { grid-template-columns: 1fr; }
  .cards-3, .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

  .story-flow { grid-template-columns: 1fr; }
  .story-arrow { transform: rotate(90deg); justify-self: center; }
}

@media (max-width: 560px) {
  section { padding: 52px 0; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid img { height: 260px; }
  .gallery-grid-two { grid-template-columns: 1fr; }
  .impact-visual,
  .impact-visual > img { min-height: 420px; height: 420px; }
  .impact-visual .stat-badge { left: 14px; right: 14px; bottom: 14px; }
  .hero { padding: 56px 0 48px; }
  .hero-photo img { height: 240px; }
  .form-wrap { padding: 26px 20px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .gallery-grid img { transition: none; }
}
