/* ==========================================================================
   Olami Long Island — site styles

   This layer sits ON TOP of css/olami-design-system.css (load that first).
   It reuses the design-system tokens for every colour, font, and spacing
   value, and follows the Olami Brand Guidelines v4 rules the system encodes:
     · one family (Founders Grotesk), served locally
     · letter-spacing / kerning is always 0
     · line-height stays within 1.0–1.4
     · text is left-aligned, never centred (except inside a circle)
     · hard-edged blocks; pills only for buttons and tag chips; circles for "O"
     · one chapter accent — Olami Long Island's is #3E19E0 (the "Long Island"
       wordmark blue), exposed by the system as --color-accent
   ========================================================================== */

:root {
  /* Legacy aliases kept so existing class names resolve — every value now
     comes from the design system. */
  --navy:         var(--olami-black);      /* #1E1E1E — Olami Black, not pure black */
  --navy-light:   #262626;
  --navy-lighter: #333333;
  --gold:         var(--color-accent);     /* #3E19E0 — chapter accent */
  --gold-light:   #6b47ea;
  --cream:        var(--color-surface);    /* #FFFFFF */
  --cream-dark:   var(--color-surface-alt);/* #F4F4F3 — ~4% Olami Black tint */
  --text:         var(--olami-black);
  --text-light:   var(--olami-gray);       /* #626063 */
  --white:        #ffffff;

  --radius: 0;                             /* Olami geometry is hard-edged */
  --radius-pill: 999px;
  --shadow:    var(--elevation-1);
  --shadow-lg: var(--elevation-2);

  --grotesk: var(--font-display);
  --sans:    var(--font-text);
}

/* box-sizing, smoothing, ::selection, focus, reduced-motion all come from the
   design system's reset. */

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--cream);
  line-height: var(--leading-loose);       /* 1.4 — brand maximum */
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--grotesk);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);        /* 1.1 */
  margin: 0 0 0.4em;
  color: var(--navy);
  /* No forced text-transform — headlines may be ALL CAPS or Title Case per
     the content author (Guidelines p.11, p.79). */
}
h1 { line-height: var(--leading-tight); }

p { margin: 0 0 1em; color: var(--text-light); }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--layout-margin);
}

section { padding: var(--space-8) 0; }

.section-tag {
  display: inline-block;
  font-family: var(--grotesk);
  font-weight: var(--weight-semibold);
  font-size: 0.8125rem;
  text-transform: uppercase;
  color: var(--color-accent-contrast);
  background: var(--gold);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

/* Section intros are left-aligned (Guidelines p.19, p.122). */
.section-head {
  max-width: 640px;
  margin: 0 0 var(--space-6);
  text-align: left;
}
.section-head h2 { font-size: var(--text-h2); }
.section-head p { font-size: 1.05rem; }

.bg-navy { background: var(--navy); color: var(--white); }
.bg-navy h2, .bg-navy h3, .bg-navy h4 { color: var(--white); }
.bg-navy p { color: rgba(255,255,255,0.75); }
.bg-cream-dark { background: var(--cream-dark); }

/* Buttons — pill shape, condensed display face, uppercase, tracking 0. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.85em 1.75em;
  border-radius: var(--radius-pill);
  font-family: var(--grotesk);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  font-size: 1rem;
  line-height: 1;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease-standard), box-shadow 0.15s var(--ease-standard),
              background 0.15s var(--ease-standard), color 0.15s var(--ease-standard);
}
.btn:hover { transform: translateY(-2px); }
/* Keep the label visible on hover/focus — beats the global `a:hover` colour
   that otherwise repaints the text to match .btn-accent's hover background. */
.btn:hover,
.btn:focus,
.btn:active { color: var(--white); }

.btn-accent { background: var(--gold); color: var(--white); border-color: var(--gold); }
.btn-accent:hover { background: var(--color-accent-strong); border-color: var(--color-accent-strong); box-shadow: 0 8px 20px rgba(62,25,224,0.32); }

.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); }

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

.btn-block { width: 100%; }
.btn-lg { padding: 1em 2em; font-size: 1.125rem; }
.btn-sm { padding: 0.5em 1.1em; font-size: 0.78rem; }

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--layout-margin);
  max-width: 1160px;
  margin: 0 auto;
}

/* Wordmark — mirrors the real logo lockup: black "OLAMI" + "LONG ISLAND" in
   the chapter accent, set in Founders Grotesk X-Condensed. */
.brand {
  display: flex;
  align-items: baseline;
  gap: 0.35em;
  font-family: var(--grotesk);
  font-weight: var(--weight-semibold);
  font-size: 1.4rem;
  text-transform: uppercase;
  white-space: nowrap;
  flex: none;
}
.brand-olami { color: var(--navy); }
.brand-city { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: var(--weight-medium);
  font-size: 0.95rem;
  color: var(--navy);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s var(--ease-standard), color 0.15s var(--ease-standard);
}
.nav-links a:hover, .nav-links a.active { border-color: var(--gold); }

.nav-cta { display: flex; align-items: center; gap: 18px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
}

/* Hero — artistic Long Island skyline behind an Olami-blue wash, in the manner
   of the Olami Manhattan / St. Louis heroes. */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--olami-black);
  color: var(--white);
  padding: 150px 0 190px;   /* deep base padding lets the skyline read below the copy */
  overflow: hidden;
}
.hero::before {                 /* the hero photograph */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--olami-black) url("../images/hero-boardroom-web.jpg") 50% 42% / cover no-repeat;
}
.hero::after {                  /* Olami-blue overlay + text-contrast darkening */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(102deg, rgba(13,9,58,0.90) 0%, rgba(13,9,58,0.55) 42%, rgba(13,9,58,0.12) 66%, rgba(13,9,58,0) 82%),
    linear-gradient(0deg, rgba(13,9,58,0.62) 0%, rgba(13,9,58,0) 52%),
    linear-gradient(0deg, rgba(62,25,224,0.84), rgba(62,25,224,0.66));
  mix-blend-mode: multiply;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero .container > div { max-width: 640px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  color: var(--blue-neon);
  margin-bottom: 20px;
}
.hero h1 { color: var(--white); font-size: var(--text-h1); margin-bottom: 20px; }
.hero p.lead { color: rgba(255,255,255,0.82); font-size: var(--text-lead); max-width: 520px; }
.hero-actions { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }

/* Stat strip */
.stat-strip {
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: var(--space-6) var(--layout-margin);
  text-align: left;
}
.stat-grid .num { font-family: var(--grotesk); font-size: 2.4rem; color: var(--navy); font-weight: var(--weight-semibold); }
.stat-grid .label { font-size: 0.85rem; color: var(--text-light); text-transform: uppercase; }

/* Cards — hard edges, hairline border, flat. */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.donate-layout { grid-template-columns: 1fr 1.15fr; align-items: flex-start; gap: 48px; }

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--olami-black);
}

.program-card { text-align: left; transition: transform 0.2s var(--ease-standard), box-shadow 0.2s var(--ease-standard); }
.program-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.program-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  background: var(--color-accent-tint);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.program-icon svg { width: 26px; height: 26px; }

.tag-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  background: var(--cream-dark);
  color: var(--navy);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

/* About / split sections */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.photo-placeholder {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--cream-dark), #d9d9d9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  border: 1px solid rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
}
.photo-placeholder .ph-label {
  font-size: 0.75rem;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  color: rgba(0,0,0,0.45);
  text-align: center;
  padding: 0 20px;
}
.photo-placeholder.round { border-radius: 50%; aspect-ratio: 1/1; }  /* circle — allowed */

/* Testimonials */
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--olami-black);
}
.testimonial-card .testimonial-quote { font-family: var(--grotesk); font-size: 1.25rem; color: var(--navy); font-weight: var(--weight-semibold); }
.testimonial-name { font-weight: var(--weight-medium); color: var(--navy); }
.testimonial-role { font-size: 0.85rem; color: var(--text-light); }
.avatar-dot {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--grotesk); font-weight: var(--weight-semibold); color: var(--white);
}

/* Event card */
.event-card {
  display: flex;
  gap: 20px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--olami-black);
}
.event-date {
  flex: 0 0 76px;
  height: 76px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.event-date .mon { font-size: 0.72rem; text-transform: uppercase; color: var(--blue-neon); }
.event-date .day { font-family: var(--grotesk); font-size: 1.6rem; font-weight: var(--weight-semibold); }
.event-rsvp { margin-top: 14px; }

/* Donate CTA banner — dark block. */
.donate-banner {
  background: var(--olami-black);
  color: var(--white);
  border-radius: var(--radius);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
  align-items: center;
}
.donate-banner h2 { color: var(--white); }
.donate-banner p { color: rgba(255,255,255,0.8); }

/* Forms */
.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-family: var(--sans);
  font-weight: var(--weight-medium);
  font-size: 0.8125rem;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--navy);
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 0.65em 0.85em;
  border-radius: var(--radius);
  border: 1px solid var(--olami-black);
  font-family: var(--sans);
  font-size: 1rem;
  background: var(--white);
  color: var(--text);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: var(--focus-ring);
  outline-offset: 0;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Donate page specific */
.donate-panel {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  border: 1px solid var(--olami-black);
}
.freq-toggle {
  display: flex;
  background: var(--cream-dark);
  border-radius: var(--radius-pill);
  padding: 6px;
  margin-bottom: 28px;
}
.freq-toggle button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--grotesk);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--navy);
  transition: background 0.15s var(--ease-standard), color 0.15s var(--ease-standard);
}
.freq-toggle button.active { background: var(--navy); color: var(--white); }

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.amount-btn {
  border: 2px solid rgba(0,0,0,0.15);
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 10px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s var(--ease-standard), background 0.15s var(--ease-standard);
}
.amount-btn .amt { font-family: var(--grotesk); font-weight: var(--weight-semibold); font-size: 1.25rem; color: var(--navy); }
.amount-btn .impact { font-size: 0.72rem; color: var(--text-light); margin-top: 4px; }
.amount-btn.selected { border-color: var(--gold); background: var(--color-accent-tint); }
.amount-btn.custom-btn.selected { border-color: var(--gold); }

#donate-continue.is-busy { opacity: 0.7; cursor: progress; }

.donate-status {
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.85rem;
  margin-bottom: 18px;
  line-height: 1.45;
}
.donate-status.is-success { background: #e7f6ec; color: #1b5e34; }
.donate-status.is-info    { background: var(--cream-dark); color: var(--text); }
.donate-status.is-error   { background: #fdecec; color: #96262b; }

.custom-amount-wrap { position: relative; margin-bottom: 16px; }
.custom-amount-wrap span {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-family: var(--grotesk); font-weight: var(--weight-semibold);
  font-size: 1.25rem; color: var(--navy); pointer-events: none;
}
.custom-amount-wrap input {
  width: 100%;
  border: 2px solid rgba(0,0,0,0.15);
  border-radius: var(--radius);
  background: var(--white);
  padding: 18px 12px 18px 32px;
  font-family: var(--grotesk);
  font-weight: var(--weight-semibold);
  font-size: 1.25rem;
  color: var(--navy);
  transition: border-color 0.15s var(--ease-standard);
}
.custom-amount-wrap input::placeholder {
  font-family: var(--sans); font-weight: 400; font-size: 0.95rem;
  color: var(--text-light);
}
.custom-amount-wrap input:focus { outline: none; border-color: var(--gold); }
.custom-amount-wrap.is-active input { border-color: var(--gold); background: var(--color-accent-tint); }
.custom-amount-wrap input::-webkit-outer-spin-button,
.custom-amount-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.security-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; color: var(--text-light); margin-top: 16px;
}

.ways-to-give-card { display: flex; gap: 16px; align-items: flex-start; }
.ways-to-give-card .program-icon { flex: none; }

.impact-strip .card { text-align: left; }

/* Homepage events feed — while events-feed.js resolves, hide the static
   fallback cards and hold a little space with a thin progress bar, so real
   (or "check back soon") content doesn't visibly pop in over them. */
.is-gcal-loading { position: relative; min-height: 132px; }
.is-gcal-loading > .event-card { display: none; }
.is-gcal-loading::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--color-accent);
  animation: gcal-bar 0.9s ease-in-out infinite alternate;
  transform-origin: left;
}
@keyframes gcal-bar { from { transform: scaleX(0.15); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .is-gcal-loading::after { animation: none; transform: scaleX(0.4); }
}

/* Embedded calendar (events page) — framed like a card: hard edge, hairline. */
.cal-embed {
  border: 1px solid var(--olami-black);
  background: var(--white);
  padding: 8px;
}
.cal-embed iframe {
  display: block;
  width: 100%;
  height: 720px;          /* month grid needs the room */
  border: 0;
}
@media (max-width: 720px) {
  .cal-embed iframe { height: 560px; }
}

/* FAQ */
.faq-item { border-bottom: 1px solid rgba(0,0,0,0.1); padding: 22px 0; }
.faq-item h4 { margin-bottom: 8px; font-size: 1.05rem; text-transform: uppercase; font-family: var(--grotesk); }
.faq-item p { margin: 0; }

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand { display: flex; align-items: baseline; gap: 0.35em; font-family: var(--grotesk); font-size: 1.3rem; font-weight: var(--weight-semibold); text-transform: uppercase; margin-bottom: 14px; }
.footer-brand .brand-olami { color: var(--white); }
/* The wordmark's chapter name is ALWAYS the chapter accent (#3E19E0), header
   and footer alike — "Olami Long Island" must read the same everywhere. Only
   the neutral "OLAMI" flips to white for the dark footer, which is the logo's
   standard dark-background form. */
.footer-brand .brand-city { color: var(--gold); }
.footer-col h5 { color: var(--white); font-family: var(--sans); font-size: 0.8rem; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; font-size: 0.92rem; }
.footer-col a:hover { color: var(--blue-neon); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: 0.8rem; flex-wrap: wrap; gap: 12px;
}
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.social-row a:hover { background: var(--gold); color: var(--white); }

.placeholder-flag {
  display: inline-block;
  background: var(--yellow-pastel);
  color: var(--rust-dark);
  border: 1px dashed var(--orange-light);
  border-radius: var(--radius);
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: var(--weight-semibold);
}

/* Utility */
.text-center { text-align: center; }  /* retained for circle/idiomatic use only */
.mt-32 { margin-top: 32px; }
.small-print { font-size: 0.8rem; color: var(--text-light); }

/* Page hero (interior pages) — left-aligned. */
.page-hero {
  background: var(--olami-black);
  color: var(--white);
  padding: 80px 0 64px;
  text-align: left;
}
.page-hero h1 { color: var(--white); font-size: var(--text-h1); margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,0.78); max-width: 620px; margin: 0; }

/* Responsive */
@media (max-width: 960px) {
  .hero { padding: 120px 0 150px; }
  .split, .donate-layout { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .donate-banner { grid-template-columns: 1fr; }
  .nav-links, .nav-cta .btn-navy-outline { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 20px var(--layout-margin);
    gap: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
  }
}

@media (max-width: 720px) {
  section { padding: var(--space-6) 0; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .amount-grid { grid-template-columns: repeat(3, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    font-size: 1.05rem;
    line-height: var(--leading-snug);
  }
}
