/* ============================================================
   DARTMOUTH CASTLETON RESIDENTS ASSOCIATION — main.css
   Deep teal / slate palette, Source Serif 4 + Inter
   ============================================================ */

/* ── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  --black:    #070d0e;
  --dark:     #0c1a1d;
  --mid:      #132428;
  --teal:     #2a9baa;
  --teal-lt:  #45bdcc;
  --teal-dk:  #1a6978;
  --cream:    #dfeef1;
  --muted:    #5e8d97;
  --white:    #ffffff;
  --alert:    #e07060;
  --alert-lt: #ff9080;
  --mid-hover: #1a3135;
  --radius:   3px;
  --nav-h:    68px;
}

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── SKIP LINK (WCAG 2.4.1) ─────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--teal);
  color: var(--black);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: 0.75rem; outline: 2px solid var(--black); outline-offset: 2px; }

/* ── GLOBAL FOCUS STYLES ────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: var(--radius);
}
:focus:not(:focus-visible) { outline: none; }

/* ── BASE ──────────────────────────────────────────────────── */
body {
  background: var(--black);
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  line-height: 1.75;
}

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: 'Source Serif 4', serif;
  font-weight: 700;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; font-weight: 600; }

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: 0.6rem;
}

p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-lt); text-decoration: underline; }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.container       { max-width: 860px;  margin: 0 auto; padding: 0 1.5rem; }
.container--wide { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

section { padding: 5rem 0; }
.page-hero + section { padding-top: 1.75rem; }

.divider {
  width: 48px;
  height: 2px;
  background: var(--teal);
  margin: 1rem 0 2rem;
}

.section-lead {
  font-size: 1.05rem;
  max-width: 680px;
  margin-bottom: 2.5rem;
}

/* ── NAV ────────────────────────────────────────────────────── */
#site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(7, 13, 14, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(42, 155, 170, 0.15);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 0.5rem;
}
.nav-logo:hover { text-decoration: none; }

.nav-logo-badge {
  width: 36px;
  height: 36px;
  background: var(--teal);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-logo-badge span {
  font-family: 'Source Serif 4', serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em;
}
.nav-logo-text {
  font-family: 'Source Serif 4', serif;
  font-size: 0.9rem;
  color: var(--cream);
  line-height: 1.2;
}
.nav-logo-text small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.57rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  font-style: normal;
}

/* Menu links */
.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
}
.nav-menu li { display: flex; }

.nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.4rem 0.9rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--cream);
  text-decoration: none;
  border-bottom-color: rgba(42, 155, 170, 0.4);
}
.nav-link.active {
  color: var(--teal-lt);
  border-bottom-color: var(--teal);
}

/* CTA button */
.nav-cta {
  flex-shrink: 0;
  background: var(--teal);
  color: var(--black);
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--teal-lt); color: var(--black); text-decoration: none; }
.nav-cta--active { background: var(--teal-dk); color: var(--cream); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cream);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-toggle:focus-visible, .nav-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: var(--radius);
}
.nav-cta:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 2px;
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn--teal { background: var(--teal); color: var(--black); }
.btn--teal:hover { background: var(--teal-lt); color: var(--black); text-decoration: none; }
.btn--outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(42, 155, 170, 0.4);
}
.btn--outline:hover { border-color: var(--teal); color: var(--teal-lt); text-decoration: none; }

.page-nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(42, 155, 170, 0.12);
}

/* ── HERO (HOME) ────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  padding-top: var(--nav-h);
  background:
    linear-gradient(to bottom, rgba(7, 13, 14, 0.62) 0%, rgba(7, 13, 14, 0.82) 60%, var(--black) 100%),
    url('https://sxxweb7cdn.cachefly.net/img/thumbnail.aspx?w=1920&h=1080&q=71&p=/common/uploads/client/1210/media/68424155-b33a-483e-9a77-f42cec401008.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(42, 155, 170, 0.12);
}
.hero-inner { max-width: 720px; }
.hero h1 { margin: 0.6rem 0 1.2rem; color: var(--white); }
.hero h1 em { font-style: italic; color: var(--teal-lt); }
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--cream);
  opacity: 0.9;
  max-width: 600px;
  margin-bottom: 2.2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── HOME NAV CARDS ─────────────────────────────────────────── */
.home-nav-section {
  background: var(--dark);
  padding: 5rem 0;
  border-top: 1px solid rgba(42, 155, 170, 0.08);
}
.home-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.home-nav-card {
  background: var(--mid);
  border: 1px solid rgba(42, 155, 170, 0.1);
  border-top: 3px solid var(--teal-dk);
  padding: 2rem;
  border-radius: var(--radius);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-top-color 0.2s, background 0.2s;
}
.home-nav-card:hover {
  border-top-color: var(--teal);
  background: var(--mid-hover);
  text-decoration: none;
}
.home-nav-card .eyebrow { margin-bottom: 0; }
.home-nav-card h3 { color: var(--cream); margin-top: 0.2rem; }
.home-nav-card p { font-size: 0.9rem; color: var(--muted); flex: 1; margin: 0; }
.home-nav-arrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 1rem;
}
.home-nav-card--cta { border-top-color: var(--teal); }
.home-nav-card--cta:hover { border-top-color: var(--teal-lt); }

/* ── PAGE HERO (INNER PAGES) ───────────────────────────────── */
.page-hero {
  background: var(--dark);
  padding: calc(var(--nav-h) + 2.5rem) 1.5rem 1.25rem;
}
.page-hero h1 { color: var(--white); margin-top: 0.4rem; }
.page-hero .divider { margin-bottom: 0; }

/* ── WHY ORGANIZE ───────────────────────────────────────────── */
.why { background: var(--dark); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}
.why-card {
  background: var(--mid);
  border: 1px solid rgba(42, 155, 170, 0.1);
  border-top: 3px solid var(--teal);
  padding: 1.75rem;
  border-radius: var(--radius);
}
.why-card h3 { margin-bottom: 0.65rem; color: var(--teal-lt); }
.why-card p  { font-size: 0.93rem; color: rgba(223, 238, 241, 0.88); margin: 0; }

/* ── THE ISSUES ─────────────────────────────────────────────── */
.comms { background: var(--black); }

.issue-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2.5rem;
}

.issue-card {
  background: var(--mid);
  border: 1px solid rgba(42, 155, 170, 0.1);
  border-left: 3px solid var(--teal-dk);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
}

.issue-card__header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.issue-number {
  font-family: 'Source Serif 4', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--teal-dk);
  flex-shrink: 0;
}

.issue-card h3 { color: var(--teal-lt); margin: 0; }

.issue-card > p {
  font-size: 0.95rem;
  color: rgba(223, 238, 241, 0.88);
  margin-bottom: 1.5rem;
}

.issue-solutions {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(42, 155, 170, 0.1);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.solutions-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: 0.75rem;
}

.issue-solutions ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
}

.issue-solutions li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.issue-solutions li::before {
  content: '→';
  color: var(--teal);
  flex-shrink: 0;
  font-size: 0.85rem;
  margin-top: 0.15em;
}

.solution-body { display: flex; flex-direction: column; gap: 0.3rem; }
.solution-body strong { display: block; color: var(--cream); font-size: 0.95rem; }
.solution-body span { font-size: 0.9rem; color: rgba(223, 238, 241, 0.75); line-height: 1.65; }

@media (max-width: 600px) {
  .issue-card { padding: 1.5rem 1.25rem; }
  .issue-solutions { padding: 1rem 1.1rem; }
}

/* ── YOUR RIGHTS ────────────────────────────────────────────── */
.legal { background: var(--dark); }

.legal-box {
  background: var(--mid);
  border: 1px solid rgba(42, 155, 170, 0.2);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  margin-top: 2rem;
}
.legal-box h3 { color: var(--teal-lt); margin-bottom: 0.6rem; }
.legal-box-sub { font-size: 0.88rem; color: var(--muted); margin: 0; }

.steps-list {
  counter-reset: steps;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.steps-list li {
  counter-increment: steps;
  position: relative;
  padding-left: 3rem;
  font-size: 0.92rem;
  color: rgba(223, 238, 241, 0.92);
}
.steps-list li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: -0.05rem;
  width: 2rem;
  height: 2rem;
  background: var(--teal-dk);
  color: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Source Serif 4', serif;
  font-size: 0.88rem;
  font-weight: 700;
}
.steps-list li strong { display: block; color: var(--teal-lt); margin-bottom: 0.25rem; }

/* ── INTEREST FORM ──────────────────────────────────────────── */
#interest { background: var(--dark); }

.form-wrapper {
  background: var(--mid);
  border: 1px solid rgba(42, 155, 170, 0.15);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-top: 2rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.form-field { display: flex; flex-direction: column; }
.form-full { grid-column: 1 / -1; }

label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.45rem;
}
input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(42, 155, 170, 0.4);
  border-radius: var(--radius);
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  outline: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px var(--teal);
  outline: none;
}
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--alert);
  box-shadow: 0 0 0 1px var(--alert);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
select option { background: var(--dark); color: var(--cream); }
textarea { min-height: 110px; resize: vertical; }

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.55rem;
  margin-top: 0.4rem;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.checkbox-item input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--teal);
  flex-shrink: 0;
}
.btn--submit { width: 100%; padding: 0.95rem; margin-top: 1.75rem; font-size: 0.8rem; }

.form-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1.25rem;
  text-align: center;
}

.field-error {
  font-size: 0.78rem;
  color: var(--alert-lt);
  margin-top: 0.35rem;
  display: block;
}

#form-error-summary {
  background: rgba(224, 112, 96, 0.1);
  border: 1px solid rgba(224, 112, 96, 0.4);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  color: var(--alert-lt);
}

/* ── THANK YOU PAGE ─────────────────────────────────────────── */
.thankyou {
  background: var(--dark);
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
}
.thankyou-inner {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 4rem 0;
}
.thankyou-icon {
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(42, 155, 170, 0.12);
  border: 2px solid var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--teal);
  margin: 0 auto 1.75rem;
}
.thankyou-inner h1 { color: var(--teal-lt); margin-bottom: 1rem; }
.thankyou-inner p { color: var(--cream); font-size: 1.05rem; margin-bottom: 2rem; opacity: 0.88; }

/* ── PROSE (PRIVACY) ────────────────────────────────────────── */
.prose h2 {
  font-size: 1.25rem;
  color: var(--teal-lt);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}
.prose h2:first-child { margin-top: 0; }

/* ── FOOTER ─────────────────────────────────────────────────── */
footer {
  background: var(--dark);
  border-top: 1px solid rgba(42, 155, 170, 0.1);
  padding: 1.5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  text-decoration: none;
}
.footer-logo:hover { text-decoration: none; }
.footer-logo-badge {
  width: 28px;
  height: 28px;
  background: var(--teal-dk);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.footer-logo-badge span {
  font-family: 'Source Serif 4', serif;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: -0.02em;
}
.footer-logo-text {
  font-family: 'Source Serif 4', serif;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.2;
}
.footer-logo-text small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dk);
}
.footer-meta {
  flex: 1;
  border-left: 1px solid rgba(42, 155, 170, 0.1);
  padding-left: 1.5rem;
}
.footer-meta p { font-size: 0.75rem; color: var(--muted); margin: 0 0 0.25rem; line-height: 1.5; }
.footer-meta p:last-child { margin-bottom: 0; }
footer a { color: var(--muted); }
footer a:hover { color: var(--teal); }

@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .footer-meta { border-left: none; padding-left: 0; border-top: 1px solid rgba(42, 155, 170, 0.1); padding-top: 1rem; }
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(7, 13, 14, 0.98);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(42, 155, 170, 0.15);
    gap: 0;
  }
  .nav-menu.open { display: flex; }
  .nav-menu li { border-bottom: 1px solid rgba(42, 155, 170, 0.08); }
  .nav-link { display: block; padding: 0.9rem 0; border-bottom: none; font-size: 0.8rem; }
  .nav-menu li:last-child { border-bottom: none; padding-top: 1rem; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .form-grid { grid-template-columns: 1fr; }
  .form-full { grid-column: 1; }
  .form-wrapper { padding: 1.5rem 1.1rem; }
  .hero { min-height: 90svh; }
  .page-nav-links { flex-direction: column; }
  .page-nav-links .btn { text-align: center; }
}

@media (max-width: 480px) {
  .home-nav-grid { grid-template-columns: 1fr; }
  .steps-list { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
}
