/*
  Charity: water inspired landing page styles
  Beginner-friendly CSS only
*/

/* Self-hosted brand font (subset of weights you provided) */
@font-face {
  font-family: "Proxima Nova";
  src: url("Assests/Proxima Nova/proximanova_regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Proxima Nova";
  src: url("Assests/Proxima Nova/proximanova_bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Proxima Nova";
  src: url("Assests/Proxima Nova/proximanova_extrabold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand palette (verified via public references) */
  --yellow: #FFC907;      /* primary accent */
  --ink: #003366;         /* deep navy */
  --blue: #77A8BB;        /* supporting blue */
  --cream: #FFF7E1;       /* soft neutral background */
  --peach: #FED8C1;       /* warm tint */
  --brown: #BF6C46;       /* clay */
  --paper: #FFFFFF;       /* white */
  --text: #1A1A1A;        /* near-black */
  --muted: #6b7280;       /* gray */
  --gray-200: #CBCCD1;    /* light gray */

  --radius: 12px;
  --shadow-1: 0 6px 18px rgba(0,0,0,0.12);
  --shadow-2: 0 10px 28px rgba(0,0,0,0.16);
  --shadow-3: 0 18px 40px rgba(0,0,0,0.22);
  --notebook-line: rgba(0, 74, 173, 0.09);
  --notebook-margin: rgba(220, 66, 66, 0.55);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Proxima Nova", "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  line-height: 1.6;
  background: var(--cream);
}

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

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

/* Header */
.site-header {
  background: var(--paper);
  border-bottom: 4px solid var(--yellow);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-logo { height: 36px; width: auto; }
.brand-name { font-weight: 800; letter-spacing: 0.3px; }

.nav { display: flex; gap: 18px; align-items: center; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; }
.nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.nav .btn-primary { background: var(--yellow); padding: 8px 14px; border-radius: 999px; box-shadow: var(--shadow-1); transition: transform 160ms ease, box-shadow 160ms ease; }
.nav .btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }

/* Hero */
.hero {
  padding: 48px 0 24px;
  /* subtle vignette for depth */
  background:
    radial-gradient(900px 240px at 20% 4%, rgba(0,0,0,0.06), transparent 60%),
    radial-gradient(900px 240px at 80% 6%, rgba(0,0,0,0.04), transparent 60%);
  position: relative;
}
.hero::before {
  /* lined notebook sheet */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 8px; bottom: 0;
  border-radius: 18px;
  background:
    /* horizontal rules */
    repeating-linear-gradient(
      to bottom,
      var(--notebook-line) 0px,
      var(--notebook-line) 1px,
      transparent 1px,
      transparent 26px
    ),
    /* vertical margin line */
    linear-gradient(90deg, transparent 72px, var(--notebook-margin) 74px, transparent 76px),
    transparent;
  box-shadow: 0 30px 60px rgba(0,0,0,0.12);
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.hero-copy {
  background: var(--brown);
  color: var(--paper);
  padding: 28px;
  border-radius: var(--radius);
  position: relative;
  box-shadow: var(--shadow-1);
}
.tape { position: absolute; left: 16px; top: -10px; width: 90px; height: 22px; background: repeating-linear-gradient(45deg, var(--yellow), var(--yellow) 10px, var(--ink) 10px, var(--ink) 20px); border-radius: 3px; box-shadow: 0 6px 10px rgba(0,0,0,0.15); }

.headline { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.1; margin: 6px 0 8px; font-weight: 800; }
.subhead { margin: 0 0 16px; color: #f8fafc; opacity: 0.95; }

.cta-row { display: flex; gap: 12px; align-items: center; }
.btn { display: inline-block; text-decoration: none; border-radius: 12px; font-weight: 800; letter-spacing: 0.2px; }
.btn-cta { background: var(--yellow); color: #2a1d00; padding: 12px 18px; box-shadow: var(--shadow-2); transform: rotate(-1.2deg); transition: transform 200ms ease, box-shadow 200ms ease; }
.btn-cta:hover { transform: rotate(0deg) translateY(-2px) scale(1.02); box-shadow: 0 14px 30px rgba(0,0,0,0.22); }

/* Photo frame with playful tilt */
.hero-media { justify-self: center; position: relative; }
.hero-media .photo-frame { position: relative; z-index: 1; }
.photo-frame {
  position: relative;
  width: min(620px, 95%);
  margin: 0 auto;
  background: var(--paper);
  padding: 16px; /* thicker white mat */
  border-radius: 14px;
  box-shadow: var(--shadow-3);
  transform: rotate(3deg);
  transition: transform 240ms ease;
  overflow: hidden; /* keep corners clean */
}
.photo-frame:hover { transform: rotate(0deg) translateY(-4px); }
.photo-frame img { border-radius: 10px; }

/* Sections */
.section { background: var(--paper); }
.bg-warm { background: var(--peach); }
.bg-ink { background: var(--ink); color: #f5f9ff; }
.pad-large { padding: 52px 0; }

.section-intro { text-align: center; margin-bottom: 28px; }
.section-intro h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 6px; }
.section-intro p { margin: 0; color: var(--muted); }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.info-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-1);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.info-card h3 { margin: 0 0 6px; }
.info-card p { margin: 0; color: var(--muted); }

/* Impact Calculator */
.impact-calculator { background: var(--paper); }
.impact-calculator .calc { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 18px; }
.calc fieldset { border: 1px solid var(--gray-200); border-radius: 10px; padding: 12px; }
.calc legend { padding: 0 6px; font-weight: 800; }
.calc-options { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.calc-options input { position: absolute; opacity: 0; }
.calc-options label { cursor: pointer; background: #f3f5f7; border: 1px solid var(--gray-200); padding: 8px 12px; border-radius: 999px; font-weight: 700; transition: transform 140ms ease, background 140ms ease; }
.calc-options input:focus + label { outline: 3px solid var(--yellow); outline-offset: 2px; }
.calc-options input:checked + label { background: var(--yellow); color: #2a1d00; }
.calc-results { min-height: 44px; }
.calc-result { display: none; margin: 0; color: var(--muted); font-weight: 600; }
/* Show one result based on radio selection */
#amt10:checked ~ .calc-results .r10 { display: block; }
#amt20:checked ~ .calc-results .r20 { display: block; }
#amt50:checked ~ .calc-results .r50 { display: block; }
#amt100:checked ~ .calc-results .r100 { display: block; }

/* Progress Tracker */
.tracker { display: grid; gap: 18px; }
.progress-block { background: var(--paper); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-1); }
.progress-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-weight: 700; }
.progress { background: #eef2f6; border-radius: 999px; height: 12px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--yellow), #ffd84f); width: 0; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: center; }
.stat { background: var(--paper); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-1); }
.stat-number { font-weight: 800; font-size: clamp(1.4rem, 4.4vw, 2rem); color: var(--ink); }
.stat-label { color: var(--muted); font-weight: 600; }

/* Donate */
.donate-inner { display: grid; gap: 16px; align-items: center; }
.donate-copy h2 { margin: 0 0 4px; }
.donate-options { display: flex; flex-wrap: wrap; gap: 10px; }
.donate-pill { background: #0d3a66; color: #e5f1ff; padding: 10px 14px; border-radius: 999px; text-decoration: none; font-weight: 700; transition: transform 160ms ease, background 160ms ease; }
.donate-pill:hover { transform: translateY(-2px); background: #144a82; }
.donate-pill-accent { background: var(--yellow); color: #2a1d00; }
.btn-cta-dark { background: var(--yellow); color: #1a1a1a; }

/* Footer */
.site-footer { background: var(--paper); border-top: 1px solid #e5e7eb; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; }
.small { font-size: 0.9rem; color: var(--muted); }

/* Testimonial */
.testimonial { background: var(--paper); }
.testimonial .quote { background: var(--cream); border-left: 6px solid var(--yellow); padding: 18px; border-radius: 8px; box-shadow: var(--shadow-1); }
.quote-text { font-size: clamp(1.05rem, 2.6vw, 1.3rem); margin: 0; }
.quote-author { margin: 6px 0 0; color: var(--muted); font-weight: 700; }

/* Utilities & a11y */
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }

/* Simple spacing utilities to avoid inline styles */
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

/* Modal (CSS-only via :target) */
.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 200ms ease; z-index: 100; }
.modal:target { opacity: 1; pointer-events: auto; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.modal-content { position: relative; width: min(680px, 94%); background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 20px; }
.modal-close { position: absolute; top: 10px; right: 12px; text-decoration: none; font-size: 24px; color: var(--muted); line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-back { position: absolute; top: 12px; left: 14px; text-decoration: none; font-weight: 800; color: var(--ink); }
html:has(.modal:target) { overflow: hidden; }

/* Form basics */
.form { margin-top: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.field label { display: block; font-weight: 800; margin-bottom: 6px; }
.field input, .field select { width: 100%; padding: 10px 12px; border: 1px solid var(--gray-200); border-radius: 8px; background: #fff; font: inherit; color: inherit; }
.field input:focus, .field select:focus { outline: 3px solid var(--yellow); outline-offset: 2px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }

/* Custom amount reveal (CSS-only) */
.custom-amount { display: none; margin-top: 10px; }
fieldset:has(#dCustom:checked) .custom-amount { display: block; }

/* Currency prefix styling */
.currency-input { position: relative; }
.currency-input::before {
  content: "$";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 800;
}
.currency-input input { padding-left: 28px; }
.currency-input input[type=number]::-webkit-outer-spin-button,
.currency-input input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.currency-input input[type=number] { appearance: textfield; -moz-appearance: textfield; }

/* Responsive */
@media (min-width: 760px) {
  .hero { padding: 64px 0; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 26px; }
  .card-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .donate-inner { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid .field:nth-child(3) { grid-column: span 2; }
}

/* Mobile tweaks */
@media (max-width: 759px) {
  .photo-frame { padding: 14px; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
