:root {
  --ink: #17211f;
  --muted: #5d6964;
  --paper: #fbfbf7;
  --white: #ffffff;
  --line: #d9ded8;
  --soft: #edf3ee;
  --sun: #f6dfd7;
  --sky: #e5eef1;
  --mint: #e8eee2;
  --cream: #fff5df;
  --blue: #315f73;
  --coral: #c95f49;
  --gold: #d7a642;
  --green: #3d735f;
  --shadow: 0 18px 42px rgba(23, 33, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 251, 247, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: var(--white);
  font-weight: 850;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.menu-button {
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--soft);
  color: var(--ink);
}

.menu-button {
  display: none;
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  font-weight: 800;
}

.hero {
  min-height: calc(100vh - 67px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: stretch;
  background: linear-gradient(135deg, rgba(49, 95, 115, 0.96), rgba(23, 33, 31, 0.98) 52%, rgba(201, 95, 73, 0.86));
}

.hero-image {
  min-height: 460px;
  background-image: linear-gradient(rgba(23, 33, 31, 0.05), rgba(23, 33, 31, 0.18)), url("assets/community-support.png");
  background-position: center;
  background-size: cover;
}

.hero-copy {
  display: grid;
  align-content: center;
  max-width: 760px;
  padding: clamp(42px, 7vw, 92px);
  color: var(--white);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(2.5rem, 7vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
}

.hero-copy p:not(.eyebrow) {
  max-width: 620px;
  color: #f1eee7;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  background: var(--coral);
  color: var(--white);
}

.button.secondary {
  background: var(--blue);
  color: var(--white);
}

.button.ghost {
  border-color: var(--line);
  background: var(--white);
  color: var(--ink);
}

.section {
  padding: clamp(46px, 7vw, 86px) clamp(16px, 4vw, 48px);
}

.section-title,
.dashboard-head {
  max-width: 880px;
  margin-bottom: 24px;
}

.quick-stats,
.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.quick-stats {
  padding-top: 18px;
  padding-bottom: 18px;
  background: linear-gradient(90deg, var(--sun), var(--sky), var(--mint));
}

.quick-stats article,
.metric-row article,
.card,
.service-card,
.steps article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.quick-stats article,
.metric-row article {
  padding: 18px;
}

.quick-stats article:nth-child(1),
.metric-row article:nth-child(1) {
  border-color: #efc8bd;
  background: var(--sun);
}

.quick-stats article:nth-child(2),
.metric-row article:nth-child(2) {
  border-color: #c8dbe2;
  background: var(--sky);
}

.quick-stats article:nth-child(3),
.metric-row article:nth-child(3) {
  border-color: #d7dfca;
  background: var(--mint);
}

.quick-stats strong,
.metric-row strong {
  display: block;
  color: var(--blue);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.quick-stats span,
.metric-row span,
.muted,
.item p {
  color: var(--muted);
}

.service-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: var(--coral);
}

.service-card:nth-child(2n)::before {
  background: var(--blue);
}

.service-card:nth-child(3n)::before {
  background: var(--gold);
}

.service-card:nth-child(4n)::before {
  background: var(--green);
}

.service-card b {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 8px;
  background: #e5eef1;
  color: var(--blue);
}

.service-card:nth-child(2n) b {
  background: var(--sun);
  color: var(--coral);
}

.service-card:nth-child(3n) b {
  background: var(--cream);
  color: #9a6b16;
}

.service-card:nth-child(4n) b {
  background: var(--mint);
  color: var(--green);
}

.how,
.alt {
  background: var(--soft);
}

.alt {
  background: linear-gradient(135deg, var(--sky), var(--mint));
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.steps article {
  padding: 22px;
}

.steps b {
  display: inline-grid;
  width: 36px;
  height: 36px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 8px;
  background: #f6dfd7;
  color: var(--coral);
}

.photo-strip,
.support-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.photo-card,
.support-photo {
  min-height: 320px;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-radius: 8px;
  background-size: cover;
  box-shadow: var(--shadow);
}

.photo-card {
  background-image: linear-gradient(0deg, rgba(23, 33, 31, 0.78), rgba(23, 33, 31, 0.08)), url("assets/community-support.png");
}

.photo-one {
  background-position: left center;
}

.photo-two {
  background-position: center;
}

.photo-three {
  background-position: right center;
}

.photo-card div,
.support-photo div {
  padding: 22px;
  color: var(--white);
}

.photo-card span,
.support-photo span {
  display: inline-flex;
  margin-bottom: 10px;
  border-radius: 8px;
  padding: 5px 9px;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.photo-card h3,
.support-photo h3 {
  max-width: 320px;
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.05;
}

.support-gallery-section {
  background: var(--white);
}

.support-photo {
  min-height: 360px;
}

.support-photo.one {
  background-image: linear-gradient(0deg, rgba(23, 33, 31, 0.72), rgba(23, 33, 31, 0.08)), url("https://images.unsplash.com/photo-1521791136064-7986c2920216?auto=format&fit=crop&w=1400&q=85");
  background-position: center;
}

.support-photo.two {
  background-image: linear-gradient(0deg, rgba(23, 33, 31, 0.72), rgba(23, 33, 31, 0.08)), url("https://images.unsplash.com/photo-1573164713714-d95e436ab8d6?auto=format&fit=crop&w=1400&q=85");
  background-position: center;
}

.support-photo.three {
  background-image: linear-gradient(0deg, rgba(23, 33, 31, 0.72), rgba(23, 33, 31, 0.08)), url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=1400&q=85");
  background-position: center;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(24px, 6vw, 72px);
  align-items: start;
}

.card {
  padding: clamp(18px, 4vw, 30px);
  box-shadow: 0 1px 0 rgba(23, 33, 31, 0.04);
}

.compact {
  padding: 22px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 760;
}

.form-choice-group {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfbf7;
}

.form-choice-group legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 760;
}

.form-choice-group label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
}

.form-choice-group input[type="radio"] {
  width: 18px;
  min-height: 18px;
}

.account-tools {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.account-tools details {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.account-tools summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 850;
}

.account-tools form {
  margin-top: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c9d0ca;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

.dashboard-head {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

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

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

.item h4 {
  margin: 0 0 4px;
}

.item p {
  margin-bottom: 6px;
}

.tag {
  display: inline-flex;
  border-radius: 8px;
  padding: 5px 8px;
  background: #e8eee2;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 850;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(380px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 940px) {
  .menu-button {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 67px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .hero,
  .split,
  .service-list,
  .steps,
  .photo-strip,
  .support-gallery,
  .list-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-image {
    min-height: 360px;
  }
}

@media (max-width: 620px) {
  .brand small {
    display: none;
  }

  .section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .quick-stats,
  .metric-row {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 36px 18px 42px;
  }

  .hero-image {
    min-height: 300px;
  }

  .actions,
  .dashboard-head {
    display: grid;
  }

  .button,
  .actions a {
    width: 100%;
  }
}
