/* Save Our Swifts — Wenhaston
   Palette: late-summer Suffolk sky — cool blues, soft gold light, ink */

:root {
  --ink: #152028;
  --ink-soft: #3a4a54;
  --sky-deep: #1a3d52;
  --sky: #4a7a92;
  --sky-pale: #c9dde8;
  --mist: #e6f0f4;
  --sun: #c9a35a;
  --sun-soft: #e8d4a8;
  --paper: #f2f6f8;
  --white: #ffffff;
  --line: rgba(21, 32, 40, 0.12);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 4.5rem;
  --space-2xl: 6rem;
  --section-pad: 3.5rem;

  --max: 68rem;
  --narrow: 40rem;
  --header-h: 4rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, var(--sky-pale) 0%, transparent 55%),
    linear-gradient(180deg, var(--mist) 0%, var(--paper) 35%, #eef4f2 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--sky-deep);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--ink);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-sm);
}

h2 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  max-width: 18ch;
}

h3 {
  font-size: 1.35rem;
}

p {
  margin: 0 0 var(--space-sm);
}

ul {
  margin: 0;
  padding: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -100%;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  border-radius: 2px;
}

.skip-link:focus {
  top: var(--space-sm);
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(242, 246, 248, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--white);
  transition: color 0.3s var(--ease);
}

.site-header.is-scrolled .logo {
  color: var(--ink);
}

.logo__mark {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  object-fit: cover;
  object-position: center 32%;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.site-header.is-scrolled .logo__mark {
  box-shadow: 0 0 0 1px var(--line);
}

.logo__text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.6rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.site-header:not(.is-scrolled) .nav-toggle {
  color: var(--white);
}

.site-header.is-scrolled .nav-toggle {
  color: var(--ink);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.25s var(--ease);
}

.site-header.is-scrolled .site-nav a {
  color: var(--ink-soft);
}

.site-nav a:hover {
  color: var(--white);
}

.site-header.is-scrolled .site-nav a:hover {
  color: var(--ink);
}

.nav-cta {
  padding: 0.45rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 2px;
}

.site-header.is-scrolled .nav-cta {
  border-color: var(--sky);
  color: var(--sky-deep) !important;
}

.site-header.is-scrolled .nav-cta:hover {
  background: var(--sky-deep);
  color: var(--white) !important;
  border-color: var(--sky-deep);
}

/* Hero — one composition, brand first, full-bleed */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.04);
  animation: hero-drift 28s var(--ease) infinite alternate;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(10, 28, 40, 0.35) 0%,
      rgba(10, 28, 40, 0.15) 40%,
      rgba(10, 28, 40, 0.72) 78%,
      rgba(10, 28, 40, 0.9) 100%
    );
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--header-h) + 2rem) clamp(1.25rem, 4vw, 2rem) clamp(3rem, 8vh, 5rem);
  animation: rise-in 1s var(--ease) both;
}

.hero__place {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sun-soft);
  margin-bottom: 0.75rem;
}

.hero__brand {
  font-size: clamp(2.75rem, 8vw, 5.25rem);
  font-weight: 500;
  max-width: none;
  margin-bottom: 1rem;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.25);
}

.hero__lede {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  max-width: 34ch;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.75rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--sun);
  color: var(--ink);
}

.btn--primary:hover {
  background: var(--sun-soft);
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

/* Sections */

.section {
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--line);
}

.section:first-of-type {
  border-top: 0;
}

.section__inner > .eyebrow + h2 {
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--line);
}

.section__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 0.85rem;
}

.lead {
  font-size: 1.15rem;
  max-width: 42ch;
  color: var(--ink-soft);
}

.section__intro {
  max-width: 40ch;
  color: var(--ink-soft);
  margin-bottom: var(--space-md);
}

.mission {
  padding-top: var(--space-xl);
  padding-bottom: 0;
  border-top: 0;
}

.aims,
.advice {
  background: rgba(255, 255, 255, 0.6);
}

.achievements,
.events {
  background: rgba(26, 61, 82, 0.035);
}

.join {
  background: rgba(201, 221, 232, 0.35);
}

.section:has(.photo-band) {
  padding-bottom: 0;
}

.section:has(.photo-band) + .section {
  padding-top: var(--space-md);
  border-top: 0;
}

.mission .lead,
.mission__measure,
.quote {
  width: 100%;
  max-width: 48ch;
}

.mission__copy {
  max-width: 48rem;
}

.quote {
  margin: var(--space-md) 0;
  padding: 0 0 0 var(--space-md);
  border-left: 3px solid var(--sun);
}

.quote p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
}

.quote cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-style: normal;
  color: var(--ink-soft);
}

.chart {
  margin: var(--space-md) 0 0;
}

.chart img {
  display: block;
  width: auto;
  max-width: 18rem;
  height: auto;
  image-rendering: auto;
}

.mission__measure {
  margin-top: 0.55rem;
}

.chart-caption {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.chart-update {
  margin: 0.85rem 0 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* Full-width photo bands — editorial, not cards */

.photo-band {
  margin: var(--space-md) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.photo-band img {
  width: 100%;
  max-height: min(52vh, 28rem);
  object-fit: cover;
  object-position: center 45%;
}

.photo-band figcaption {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem clamp(1.25rem, 4vw, 2rem) var(--space-md);
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
}

.photo-band--events {
  margin-top: var(--space-md);
}

.photo-band--events img {
  max-height: min(58vh, 32rem);
  object-position: center 35%;
}

/* Aims */

.aims-list {
  list-style: none;
  border-top: 1px solid var(--line);
  max-width: 48rem;
}

.aims-list li {
  padding: 0.85rem 0 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  position: relative;
}

.aims-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--sky);
}

/* Achievements */

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin: 0 0 var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }
}

.stats dt {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 500;
  color: var(--sky-deep);
  line-height: 1;
  margin: 0 0 0.35rem;
}

.stats dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 16ch;
}

.achieve-list {
  list-style: none;
  margin: 0 0 var(--space-lg);
  max-width: 50rem;
}

.achieve-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.achieve-list li:first-child {
  border-top: 1px solid var(--line);
}

.photo-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin: 0;
}

@media (min-width: 720px) {
  .photo-row {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }
}

.photo-row figure {
  margin: 0;
}

.photo-row img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.photo-row figcaption {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* What we do — list, not cards (legacy helpers) */

.action-list {
  list-style: none;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.action-list > li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--line);
}

.action-list h3 {
  color: var(--sky-deep);
}

.action-list p {
  margin: 0;
  max-width: 48ch;
  color: var(--ink-soft);
}

/* Events */

.events {
  padding-bottom: 0;
}

.event-stack {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 800px) {
  .event-stack {
    grid-template-columns: 1fr 1.15fr;
    gap: var(--space-xl);
    align-items: start;
  }
}

.event__when,
.event__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 0.5rem;
}

.event p {
  color: var(--ink-soft);
  max-width: 38ch;
}

.event--featured {
  padding: var(--space-md) 0 var(--space-md) var(--space-md);
  border-left: 3px solid var(--sun);
}

.event__note {
  font-size: 0.95rem;
  margin-top: var(--space-sm);
  font-style: italic;
}

.dates-block {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}

.dates-block h3 {
  color: var(--sky-deep);
}

.dates-block > p {
  color: var(--ink-soft);
  max-width: 48ch;
}

.dates-scroll {
  overflow-x: auto;
  margin-top: var(--space-sm);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  max-width: 16rem;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-top: var(--space-sm);
}

.data-table--wide {
  max-width: 28rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.4rem 0.75rem 0.4rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.data-table thead th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky);
  font-weight: 600;
}

.data-table tbody th {
  font-weight: 600;
  color: var(--ink);
}

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

/* Advice */

.advice__callout {
  margin: 0 0 var(--space-lg);
  padding: var(--space-md) clamp(1.25rem, 4vw, 2rem);
  background:
    linear-gradient(135deg, rgba(201, 163, 90, 0.14) 0%, rgba(201, 221, 232, 0.45) 100%);
  border: 1px solid rgba(201, 163, 90, 0.45);
  border-left: 4px solid var(--sun);
  box-shadow: 0 12px 32px rgba(21, 32, 40, 0.08);
}

.advice__callout-label {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.25rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--sun-soft);
  border-radius: 2px;
}

.advice__callout h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--sky-deep);
  max-width: 20ch;
  margin-bottom: var(--space-md);
}

.advice__callout-body {
  display: grid;
  gap: var(--space-md);
}

@media (min-width: 800px) {
  .advice__callout-body {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-lg);
    align-items: center;
  }
}

.advice__callout-list {
  list-style: none;
  margin: 0;
}

.advice__callout-list li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.5rem;
  border-bottom: 1px solid rgba(21, 32, 40, 0.1);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
}

.advice__callout-list li:last-child {
  border-bottom: 0;
}

.advice__callout-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 3px rgba(201, 163, 90, 0.25);
}

.advice__callout-cta {
  margin: var(--space-md) 0 0;
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(21, 32, 40, 0.12);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
}

.advice__callout-cta a {
  font-weight: 700;
}

.advice__grounded {
  max-width: 48rem;
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}

.advice__grounded h3 {
  color: var(--sky-deep);
}

.advice__photo {
  margin: 0;
}

.advice__photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid rgba(21, 32, 40, 0.08);
}

.advice__photo figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
}

.resources {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--line);
}

.resources h3 {
  color: var(--sky-deep);
}

.link-list {
  list-style: none;
  max-width: 40rem;
}

.link-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.link-list a {
  font-weight: 500;
}

/* Join */

.join {
  padding-bottom: var(--section-pad);
}

.join__layout {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 800px) {
  .join__layout {
    grid-template-columns: minmax(10rem, 14rem) 1fr;
    gap: var(--space-xl);
  }
}

.join__plaque {
  margin: 0 auto;
  max-width: 12rem;
}

.join__plaque img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(21, 32, 40, 0.18));
}

.join__panel {
  max-width: 36rem;
}

.join__panel h2 {
  max-width: none;
}

.join__contact {
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin-bottom: var(--space-md);
}

.join__contact a {
  font-weight: 600;
  text-decoration-thickness: 1px;
}

.members h3 {
  font-size: 1.05rem;
  color: var(--sky-deep);
  margin-bottom: 0.5rem;
}

.members ul {
  list-style: none;
  columns: 1;
  gap: var(--space-md);
}

@media (min-width: 520px) {
  .members ul {
    columns: 2;
  }
}

.members li {
  padding: 0.25rem 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  break-inside: avoid;
}

/* Footer */

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-lg) 0;
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
  display: grid;
  gap: var(--space-sm);
}

@media (min-width: 640px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1.2fr auto;
    align-items: end;
    gap: var(--space-md);
  }
}

.site-footer a {
  color: var(--sun-soft);
}

.site-footer a:hover {
  color: var(--white);
}

.site-footer__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: 0.15rem;
}

.site-footer__brand p:last-child {
  margin: 0;
  font-size: 0.9rem;
}

.site-footer__tag {
  margin: 0;
  font-size: 0.95rem;
  max-width: 28ch;
}

.site-footer__copy {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.65;
}

/* Reveal on scroll */

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Motion */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-drift {
  from {
    transform: scale(1.04) translate(0, 0);
  }
  to {
    transform: scale(1.08) translate(-1.5%, -1%);
  }
}

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

  .hero__media img,
  .hero__content,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Mobile nav */

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-sm) clamp(1.25rem, 4vw, 2rem) var(--space-md);
    background: rgba(242, 246, 248, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  }

  .site-nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    color: var(--ink) !important;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-cta {
    border: 0 !important;
    margin-top: 0.35rem;
    padding-left: 0 !important;
  }

  .nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(3px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-3px) rotate(-45deg);
  }
}
