/* ============================================
   The Sydney Loofe Foundation — Draft Site
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #FFFFFF;
  --bg-alt: #F8F5FB;
  --ink: #221E2A;
  --ink-soft: #5C5566;
  --purple: #63298C;
  --purple-deep: #431A5E;
  --purple-soft: #F1E9F7;
  --gold: #BE8F3E;
  --gold-soft: #FBF3E4;
  --green: #3F6B4E;
  --green-soft: #E9F1EB;
  --line: #E7E2EC;
  --max-w: 1100px;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--purple); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

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

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Nav ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: var(--max-w);
  margin: 0 auto;
  gap: 24px;
}

.nav-mark {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-mark img {
  height: 46px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links > li {
  position: relative;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--purple);
}

.nav-links a[aria-current="page"] {
  border-bottom: 2px solid var(--gold);
  padding-bottom: 4px;
}

.nav-item-label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--sans);
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0;
}

.nav-item-label:hover { color: var(--purple); }

.nav-item-label svg {
  width: 12px;
  height: 12px;
  transition: transform 0.15s ease;
}

.has-dropdown.open .nav-item-label svg,
.has-dropdown:hover .nav-item-label svg {
  transform: rotate(180deg);
}

/* Extend the <li>'s hoverable box down through the visual gap so the
   mouse never "leaves" the item while moving from the link to the menu
   below it — otherwise :hover drops before the pointer reaches the menu. */
.has-dropdown {
  padding-bottom: 18px;
  margin-bottom: -18px;
}

.dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 10px;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(69, 26, 94, 0.12);
  min-width: 220px;
  display: none;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu li a {
  display: block;
  padding: 9px 12px;
  border-radius: 4px;
  font-size: 0.92rem;
  white-space: nowrap;
}

.dropdown-menu li a:hover {
  background: var(--purple-soft);
  color: var(--purple-deep);
}

.btn-donate {
  background: var(--purple);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: var(--sans);
  white-space: nowrap;
}

.btn-donate:hover { background: var(--purple-deep); }

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

/* ---------- Hero ---------- */

.hero {
  padding: 76px 0 0;
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: end;
}

.hero-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  line-height: 1.03;
  margin: 0 0 18px;
  color: var(--purple-deep);
}

.hero-dates {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin: 0 0 10px;
  font-weight: 600;
}

.hero-lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 18px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 26px 0 44px;
}

.btn-outline {
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 3px;
  font-weight: 500;
  font-size: 0.95rem;
}

.hero-figure { align-self: end; }

.wind-scene {
  position: relative;
  width: 100%;
  height: 90px;
  margin-top: 40px;
  overflow: hidden;
}

.wind-lines {
  width: 100%;
  height: 100%;
  display: block;
}

.wind-line {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
}

.wind-scene.in-view .wl-1 { animation: draw-line 1.6s ease-out 0.05s forwards; }
.wind-scene.in-view .wl-2 { animation: draw-line 1.6s ease-out 0.25s forwards; }
.wind-scene.in-view .wl-3 { animation: draw-line 1.6s ease-out 0.45s forwards; }

@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .wind-line { stroke-dasharray: none; stroke-dashoffset: 0; animation: none !important; }
}

@media (max-width: 640px) {
  .wind-scene { height: 70px; }
}

/* ---------- Placeholder photo blocks ---------- */

.ph {
  background: var(--bg-alt);
  border: 1px dashed var(--line);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  text-align: center;
  gap: 10px;
  padding: 24px;
}

.ph svg { width: 34px; height: 34px; opacity: 0.5; }
.ph span { font-size: 0.82rem; letter-spacing: 0.01em; }

.ph.tall { aspect-ratio: 4 / 5; }
.ph.wide { aspect-ratio: 16 / 10; }
.ph.square { aspect-ratio: 1 / 1; }

/* ---------- Sections ---------- */

section { padding: 80px 0; scroll-margin-top: 90px; }

section.alt { background: var(--bg-alt); }

.section-head { max-width: 62ch; margin: 0 0 40px; }

.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  margin: 0 0 14px;
  color: var(--purple-deep);
}

.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin: 0; }

.stat-progress {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.stat-progress-track {
  width: 220px;
  max-width: 100%;
  height: 10px;
  background: var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.stat-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--purple), var(--gold));
  transition: width 1.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-progress-fill.green {
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.stat-progress-label {
  font-weight: 600;
  color: var(--purple-deep);
  font-size: 1.05rem;
}

.stat-progress-label .num { font-family: var(--serif); }

.eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}

.two-col {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.two-col.reverse { grid-template-columns: 1.1fr 0.9fr; }
.two-col.reverse .two-col-figure { order: 2; }

.two-col-text p { color: var(--ink-soft); margin: 0 0 16px; }
.two-col-text p:last-child { margin-bottom: 0; }

.note {
  border-left: 3px solid var(--purple);
  padding: 4px 0 4px 18px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-top: 22px;
}

/* ---------- Stat row ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 44px;
}

.stat-card {
  background: var(--purple-soft);
  border-radius: 6px;
  padding: 30px 28px;
  text-align: center;
}

.stat-card .num {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--purple-deep);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

.stat-card .label {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.stat-card.green { background: var(--green-soft); }
.stat-card.green .num { color: var(--green); }

/* ---------- Mission / cause cards ---------- */

.mission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 44px;
}

.mission-card { border-top: 2px solid var(--purple); padding-top: 18px; }
.mission-card:nth-child(2) { border-top-color: var(--green); }
.mission-card:nth-child(3) { border-top-color: var(--gold); }

.mission-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  margin: 0 0 10px;
  color: var(--purple-deep);
}

.mission-card p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }

/* ---------- Donate panel ---------- */

.donate-panel {
  margin-top: 56px;
  background: var(--purple-deep);
  color: #fff;
  border-radius: 6px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.3fr auto;
  gap: 32px;
  align-items: center;
}

.donate-panel h3 { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; margin: 0 0 10px; }
.donate-panel p { color: #E4D9EE; margin: 0; max-width: 48ch; }

.btn-gold {
  background: var(--gold);
  color: #2B2410 !important;
  text-decoration: none;
  padding: 15px 30px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
}

/* ---------- Pull quote ---------- */

.pull-quote {
  max-width: 62ch;
  margin: 56px 0;
  text-align: left;
  background: var(--purple-soft);
  border-radius: 6px;
  padding: 36px 40px;
}

.pull-quote p {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--purple-deep);
  margin: 0 0 12px;
}

.pull-quote cite { font-style: normal; font-size: 0.9rem; color: var(--ink-soft); }

.story-quote-row {
  display: flex;
  align-items: stretch;
  gap: 28px;
  margin: 56px 0;
}

.story-quote-row .pull-quote { margin: 0; flex: 1 1 auto; }

.quote-photo-circle {
  flex-shrink: 0;
  align-self: center;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
}

.quote-photo-circle svg { width: 32px; height: 32px; opacity: 0.5; }

@media (max-width: 640px) {
  .story-quote-row { flex-direction: column; }
  .quote-photo-circle { align-self: flex-start; }
}

/* ---------- Story blocks (About) ---------- */

.story-block { max-width: 68ch; }
.story-block p { color: var(--ink-soft); margin: 0 0 20px; }

.story-figs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 40px 0;
}

/* ---------- Impact page: tabs/anchors within page ---------- */

.impact-subnav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.impact-subnav a {
  border: 1px solid var(--line);
  color: var(--ink-soft);
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.impact-subnav a:hover { border-color: var(--purple); color: var(--purple); }

/* Community cause cards */

.cause-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.cause-card { }

.cause-card .ph { margin-bottom: 16px; }

.cause-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--purple-deep);
  margin: 0 0 6px;
}

.cause-card .year {
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.cause-card p.desc { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* Scholarship list */

.scholar-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 40px;
}

.scholar-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.scholar-item:first-child { padding-top: 0; }

.scholar-photo {
  aspect-ratio: 1/1;
  border-radius: 6px;
  overflow: hidden;
}

.scholar-year {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--purple);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.scholar-name {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
  font-weight: 500;
  margin: 0 0 6px;
}

.scholar-meta {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 10px;
  font-style: italic;
}

.scholar-quote {
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin: 0;
  border-left: 2px solid var(--gold);
  padding-left: 14px;
}

/* Scholarship ceremony gallery */

.scholar-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 44px;
}

.scholar-gallery figure {
  margin: 0;
}

.scholar-gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-alt);
}

.scholar-gallery figcaption {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 8px;
  text-align: center;
}

/* Golf tournament banner */

.tourney-banner {
  background: var(--green);
  color: #fff;
  border-radius: 6px;
  padding: 56px 48px;
  text-align: center;
  margin-top: 40px;
}

.tourney-banner h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  margin: 0 0 14px;
}

.tourney-banner p {
  color: #DCEBE1;
  max-width: 52ch;
  margin: 0 auto 28px;
  font-size: 1.05rem;
}

/* ---------- Get Involved page ---------- */

.involve-block {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.involve-block.reverse { grid-template-columns: 1.1fr 0.9fr; }
.involve-block.reverse .involve-figure { order: 2; }

.involve-icon {
  width: 46px;
  height: 46px;
  color: var(--purple);
  margin-bottom: 16px;
}

.involve-block h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  color: var(--purple-deep);
  margin: 0 0 14px;
}

.involve-block p { color: var(--ink-soft); margin: 0 0 16px; }
.involve-block p:last-of-type { margin-bottom: 22px; }

.share-icons {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}

.share-icons a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--purple-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-icons a:hover { background: var(--purple); color: #fff; }
.share-icons svg { width: 19px; height: 19px; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; }

.contact-info h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--purple-deep);
  margin: 0 0 12px;
}

.contact-info p { color: var(--ink-soft); margin: 0 0 28px; }

form.contact-form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.9rem; font-weight: 600; color: var(--ink); }

.field input, .field textarea {
  border: 1px solid var(--line);
  background: #fff;
  padding: 13px 14px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  border-radius: 3px;
}

.field textarea { resize: vertical; min-height: 140px; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 36px;
  background: var(--bg-alt);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.footer-brand img { height: 34px; width: auto; margin-top: 2px; }

.footer-mark {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--purple-deep);
  margin: 0 0 6px;
}

.footer-tag { color: var(--ink-soft); font-size: 0.9rem; max-width: 40ch; margin: 0; }

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.footer-links a { color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; }

.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.footer-fine { font-size: 0.8rem; color: var(--ink-soft); margin: 0; }

/* ---------- Donate modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(34, 30, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: #fff;
  border-radius: 6px;
  max-width: 420px;
  width: 100%;
  padding: 36px;
  position: relative;
}

.modal h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--purple-deep);
  margin: 0 0 12px;
  font-size: 1.4rem;
}

.modal p { color: var(--ink-soft); margin: 0 0 8px; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--ink-soft);
  line-height: 1;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .stat-row { grid-template-columns: 1fr; }
  .cause-grid { grid-template-columns: 1fr 1fr; }
  .scholar-gallery { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-figure { display: none; }
  .two-col, .two-col.reverse,
  .involve-block, .involve-block.reverse { grid-template-columns: 1fr; }
  .two-col.reverse .two-col-figure,
  .involve-block.reverse .involve-figure { order: 0; }
  .mission-grid { grid-template-columns: 1fr; gap: 28px; }
  .donate-panel { grid-template-columns: 1fr; text-align: left; padding: 34px; }
  .story-figs { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .scholar-item { grid-template-columns: 90px 1fr; gap: 20px; }
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 28px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links > li { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links > li:last-child { border-bottom: none; }
  .nav-toggle { display: block; }
  section { padding: 52px 0; }
  .story-figs { grid-template-columns: 1fr; }
  .cause-grid { grid-template-columns: 1fr; }

  .dropdown-menu {
    display: none;
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 4px 0 4px 14px;
    margin-top: 8px;
    min-width: 0;
  }
  .has-dropdown.open .dropdown-menu { display: block; }
  .nav-item-label { width: 100%; justify-content: space-between; padding: 4px 0; }
  .scholar-item { grid-template-columns: 72px 1fr; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
