:root {
  --navy: #0f1e33;
  --navy-soft: #3d4b61;
  --navy-deep: #0a1524;
  --mist: #f1f4f8;
  --line: #d9e0ea;
  --paper: #ffffff;
  --green: #6cc94f;
  --green-hover: #83d96a;
  --green-ink: #2e6f1c;
  --on-navy: #c9d4e3;
  --shadow: 0 18px 40px -18px rgba(15, 30, 51, 0.35);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--navy);
  font-family: 'Hanken Grotesk', Arial, Helvetica, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

::selection { background: var(--green); color: var(--navy); }

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

a { color: inherit; text-underline-offset: 0.2em; }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.closer :focus-visible, .site-footer :focus-visible { outline-color: var(--green); }
main:focus { outline: none; }

h1, h2 {
  margin: 0;
  font-family: 'Bricolage Grotesque', 'Hanken Grotesk', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1.1; }

.wrap { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 46rem); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--navy);
  color: var(--paper);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 4.5rem; }
.wordmark {
  font-family: 'Bricolage Grotesque', 'Hanken Grotesk', Arial, sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark span { color: var(--green-ink); }
.header-cta {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.15rem;
  border: 2px solid var(--navy);
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.header-cta:hover { background: var(--navy); color: var(--paper); }

/* Hero */
.hero {
  padding: clamp(2rem, 4vw, 3.25rem) 0 clamp(3rem, 7vw, 5rem);
  background: linear-gradient(180deg, var(--paper) 0%, var(--mist) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
h1 {
  font-size: clamp(2.6rem, 5vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.lede {
  max-width: 36rem;
  margin: 1rem 0 1.5rem;
  color: var(--navy-soft);
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  line-height: 1.55;
}

.join-card {
  max-width: 32rem;
  padding: 1.25rem 1.5rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
  scroll-margin-top: 1.5rem;
}
.join-title {
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.signup-frame { display: block; min-height: 300px; background: transparent; }
.join-note { margin: 0.5rem 0 0; color: var(--navy-soft); font-size: 0.95rem; }

.hero-photo { position: relative; margin: 0; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: var(--shadow);
}
.hero-photo figcaption {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1.1rem;
  border-radius: 14px;
  background: var(--paper);
  color: var(--navy-soft);
  font-size: 0.95rem;
  line-height: 1.35;
  box-shadow: 0 10px 24px -12px rgba(15, 30, 51, 0.45);
}
.hero-photo figcaption strong { color: var(--navy); font-size: 1.05rem; }

/* Inbox */
.inbox { padding: clamp(4rem, 9vw, 7rem) 0; }
.inbox-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.inbox-copy p { max-width: 30rem; margin: 1rem 0 0; color: var(--navy-soft); }

.email { margin: 0; }
.email-head, .email-body {
  border: 1px solid var(--line);
  background: var(--paper);
}
.email-head {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 1.1rem 1.4rem;
  border-radius: 18px 18px 0 0;
  border-bottom: 0;
  background: var(--mist);
}
.email-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 700;
}
.email-from { margin: 0; color: var(--navy-soft); font-size: 0.95rem; }
.email-subject { margin: 0; font-weight: 700; line-height: 1.3; }
.email-body {
  padding: 1.4rem 1.4rem 0.5rem;
  border-radius: 0 0 18px 18px;
  box-shadow: var(--shadow);
}
.email-hello { margin: 0 0 0.75rem; font-weight: 600; }
.email dl { margin: 0; }
.email dl > div { padding: 0.9rem 0; border-top: 1px solid var(--line); }
.email dt {
  color: var(--green-ink);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.email dd { margin: 0.15rem 0 0; color: var(--navy-soft); font-size: 1.02rem; line-height: 1.5; }
.email figcaption { margin-top: 0.85rem; color: var(--navy-soft); font-size: 0.95rem; text-align: center; }

/* Topics */
.topics { padding: clamp(4rem, 9vw, 7rem) 0; background: var(--mist); }
.section-lede { max-width: 40rem; margin: 1rem 0 2.5rem; color: var(--navy-soft); }
.topic-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 2rem;
  margin: 0;
}
.topic-list > div { padding-top: 1.25rem; border-top: 3px solid var(--navy); }
.topic-list dt {
  font-family: 'Bricolage Grotesque', 'Hanken Grotesk', Arial, sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.topic-list dd { margin: 0.4rem 0 0; color: var(--navy-soft); }

/* About */
.about { padding: clamp(4rem, 9vw, 7rem) 0; }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.about-photo {
  width: 100%;
  max-width: 22rem;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.about-copy p { max-width: 36rem; margin: 1rem 0 0; color: var(--navy-soft); }
.about-copy .signoff {
  margin-top: 1.5rem;
  color: var(--navy);
  font-family: 'Bricolage Grotesque', 'Hanken Grotesk', Arial, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

/* FAQ */
.faq { padding: clamp(4rem, 9vw, 6rem) 0; border-top: 1px solid var(--line); }
.faq h2 { margin-bottom: 1.5rem; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 2.5px solid var(--navy);
  border-bottom: 2.5px solid var(--navy);
  transform: translateY(-25%) rotate(45deg);
  transition: transform 180ms ease-out;
}
details[open] summary::after { transform: translateY(25%) rotate(-135deg); }
details p { margin: 0 0 1.25rem; color: var(--navy-soft); }

/* Closer */
.closer { padding: clamp(3rem, 7vw, 4.5rem) 0; background: var(--navy); color: var(--paper); }
.closer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.closer h2 { max-width: 30rem; }
.closer-cta {
  display: inline-flex;
  align-items: center;
  min-height: 3.5rem;
  padding: 0 2rem;
  border-radius: 12px;
  background: var(--green);
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease-out;
}
.closer-cta:hover { background: var(--green-hover); }

/* Footer */
.site-footer { padding: 1.5rem 0; background: var(--navy-deep); color: var(--on-navy); font-size: 1rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; }
.site-footer p { margin: 0; }
.site-footer a { display: inline-block; padding: 0.25rem 0; margin-left: 1rem; }
.site-footer a:first-child { margin-left: 0; }

/* Legal pages */
.legal { padding: clamp(2.5rem, 7vw, 4.5rem) 0; }
.legal .wrap { width: min(100% - 2.5rem, 46rem); }
.legal h1 { font-size: clamp(2.25rem, 7vw, 3.25rem); }
.legal h2 { margin-top: 2.25rem; margin-bottom: 0.5rem; font-size: 1.35rem; }
.legal p, .legal li { max-width: 68ch; color: var(--navy-soft); }
.legal .home { display: inline-block; margin-bottom: 1.5rem; padding: 0.25rem 0; font-weight: 700; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .inbox-grid, .about-grid { grid-template-columns: 1fr; }
  .hero-photo { max-width: 30rem; }
  .join-card { max-width: none; }
  .topic-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
  .about-photo { max-width: 18rem; }
}

@media (max-width: 560px) {
  .header-cta { min-height: 2.5rem; padding: 0 0.9rem; }
  .join-card { padding: 1.25rem 1rem 1rem; }
  .topic-list { grid-template-columns: 1fr; gap: 1.5rem; }
  .closer-cta { width: 100%; justify-content: center; }
}

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