/* The Horses of Dunston Rose
   Colors come from the logo: rose red, leaf green, charcoal lettering and
   the grey dashed arc, on a warm cream background. */

:root {
  color-scheme: light;

  --rose: #c1272d;
  --rose-dark: #9e1f24;
  --rose-tint: #f6e3df;
  --leaf: #1f6b3a;
  --leaf-dark: #15502b;
  --charcoal: #1f1d1b;
  --ink: #2b2825;
  --muted: #615b54;
  --dash: #b7b2ab;

  --cream: #f7f1e8;
  --paper: #fffdf9;
  --sand: #efe6d8;
  --line: #e2d8c9;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius: 14px;
  --radius-small: 10px;
  --shadow: 0 1px 2px rgba(31, 29, 27, 0.06), 0 12px 32px -12px rgba(31, 29, 27, 0.18);
  --header-height: 4rem;
}

/* --- base ------------------------------------------------------------------ */

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  -webkit-text-size-adjust: 100%;
}

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

  *, *::before, *::after {
    transition: none !important;
  }
}

body {
  background-color: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

a {
  color: var(--rose);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--rose-dark);
}

:focus-visible {
  outline: 3px solid var(--leaf);
  outline-offset: 3px;
}

::selection {
  background-color: var(--rose-tint);
  color: var(--charcoal);
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--charcoal);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
}

h3 {
  font-size: 1.375rem;
}

p {
  text-wrap: pretty;
}

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 48rem) {
  .container {
    padding: 0 2rem;
  }
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--charcoal);
  color: var(--paper);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-small);
}

.skip-link:focus {
  top: 1rem;
  color: var(--paper);
}

.nowrap {
  white-space: nowrap;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose);
}

/* --- buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--rose);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(193, 39, 45, 0.55);
}

.btn-primary:hover {
  background-color: var(--rose-dark);
  color: #fff;
}

.btn-ghost {
  border-color: var(--charcoal);
  color: var(--charcoal);
}

.btn-ghost:hover {
  background-color: var(--charcoal);
  color: var(--paper);
}

.btn-light {
  background-color: var(--paper);
  color: var(--leaf-dark);
}

.btn-light:hover {
  background-color: #fff;
  color: var(--leaf-dark);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45);
}

.btn-small {
  min-height: 2.5rem;
  padding: 0.5rem 1.125rem;
  font-size: 0.9375rem;
}

.btn-icon {
  width: 1.125rem;
  height: 1.125rem;
  fill: currentColor;
}

/* --- header ----------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(247, 241, 232, 0.88);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--header-height);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--charcoal);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
}

.nav-brand:hover {
  color: var(--charcoal);
}

.nav-brand img {
  width: 1.75rem;
}

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

.nav-links a:not(.btn) {
  display: none;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:not(.btn):hover {
  color: var(--rose);
}

@media (min-width: 40rem) {
  .nav-links a:not(.btn) {
    display: inline;
  }
}

/* --- hero --------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 4rem;
  text-align: center;
  background:
    radial-gradient(60rem 30rem at 50% -10%, var(--rose-tint), transparent 70%),
    var(--cream);
}

/* The logo's dashed arc, echoed under the hero. */
.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -38rem;
  width: 80rem;
  height: 40rem;
  transform: translateX(-50%);
  border: 3px dashed var(--dash);
  border-radius: 50%;
  opacity: 0.6;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo {
  width: min(100%, 26rem);
  margin-bottom: 1.75rem;
}

.hero-title {
  max-width: 18ch;
  margin-top: 0.75rem;
  font-size: clamp(2.25rem, 1.5rem + 3.5vw, 4rem);
  font-weight: 700;
}

.hero-lead {
  max-width: 38rem;
  margin-top: 1.25rem;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 20rem;
  margin-top: 2rem;
}

@media (min-width: 30rem) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
    width: auto;
    max-width: none;
  }
}

@media (min-width: 64rem) {
  .hero {
    padding: 4rem 0 6rem;
  }
}

/* --- sections --------------------------------------------------------------- */

.section {
  padding: 4.5rem 0;
}

@media (min-width: 64rem) {
  .section {
    padding: 6.5rem 0;
  }
}

.section-heading {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
}

.section-heading h2 {
  margin-top: 0.5rem;
}

.section-heading p:last-child {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 1.125rem;
}

/* --- mission ------------------------------------------------------------------ */

#mission {
  background-color: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pillars {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
}

@media (min-width: 48rem) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.pillar {
  background-color: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.pillar h3 {
  margin-top: 1.25rem;
}

.pillar p {
  margin-top: 0.5rem;
  color: var(--muted);
}

.pillar-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--rose-tint);
}

.pillar-icon svg {
  width: 1.375rem;
  height: 1.375rem;
  fill: var(--rose);
}

.pillar:nth-child(2) .pillar-icon {
  background-color: #dcebe0;
}

.pillar:nth-child(2) .pillar-icon svg {
  fill: var(--leaf);
}

/* --- donate ------------------------------------------------------------------- */

.donate-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 2rem;
  padding: 2.5rem 1.5rem;
  border-radius: calc(var(--radius) * 1.5);
  background:
    radial-gradient(40rem 20rem at 100% 0%, rgba(255, 255, 255, 0.12), transparent 60%),
    linear-gradient(135deg, var(--leaf) 0%, var(--leaf-dark) 100%);
  color: #e8f1ea;
  box-shadow: var(--shadow);
  text-align: center;
}

.donate-rose {
  width: 8rem;
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto;
  padding: 1.25rem;
  background-color: var(--paper);
  border-radius: 50%;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.5);
}

.donate-body h2 {
  margin-top: 0.5rem;
  color: #fff;
}

.donate-body > p:not(.eyebrow) {
  max-width: 36rem;
  margin: 1rem auto 0;
  font-size: 1.125rem;
}

.donate-body .btn {
  margin-top: 2rem;
}

.eyebrow-light {
  color: #f3c9c2;
}

.donate-note {
  font-size: 0.875rem !important;
  opacity: 0.8;
}

@media (min-width: 48rem) {
  .donate-card {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 3rem;
    padding: 3.5rem;
    text-align: left;
  }

  .donate-rose {
    width: 12rem;
    padding: 2rem;
  }

  .donate-body > p:not(.eyebrow) {
    margin-left: 0;
  }
}

/* --- contact ------------------------------------------------------------------ */

#contact {
  padding-top: 0;
}

.contact-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 56rem) {
  .contact-grid {
    grid-template-columns: 5fr 7fr;
    gap: 4rem;
    align-items: start;
  }
}

.contact-intro h2 {
  margin-top: 0.5rem;
}

.contact-intro > p:not(.eyebrow) {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.contact-details {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px dashed var(--dash);
}

.contact-details dt {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-details dd {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--charcoal);
  overflow-wrap: anywhere;
}

.contact-form {
  position: relative;
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem;
  background-color: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.25);
  box-shadow: var(--shadow);
}

@media (min-width: 48rem) {
  .contact-form {
    padding: 2.25rem;
  }
}

.form-row {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 36rem) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: 0.375rem;
}

.field label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--charcoal);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  background-color: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-small);
  color: var(--charcoal);
  /* 16px or more stops iOS from zooming into the field. */
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  resize: vertical;
  min-height: 9rem;
}

.field input:hover,
.field textarea:hover {
  border-color: var(--dash);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--leaf);
  box-shadow: 0 0 0 4px rgba(31, 107, 58, 0.15);
}

.btn-submit {
  width: 100%;
}

@media (min-width: 36rem) {
  .btn-submit {
    justify-self: start;
    width: auto;
    padding-left: 2.25rem;
    padding-right: 2.25rem;
  }
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  font-weight: 600;
  color: var(--muted);
}

.form-status:empty {
  display: none;
}

.form-status[data-kind="success"] {
  color: var(--leaf);
}

.form-status[data-kind="error"] {
  color: var(--rose-dark);
}

/* --- footer ------------------------------------------------------------------- */

.site-footer {
  padding: 3.5rem 0;
  background-color: var(--charcoal);
  color: #bdb6ad;
  text-align: center;
  font-size: 0.9375rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.footer-rose {
  width: 2.5rem;
  margin-bottom: 0.75rem;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.footer-copy {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: #8f877d;
}
