/* ==========================================================================
   The Shrine of the Avatar — Restoration Project
   Shared stylesheet
   --------------------------------------------------------------------------
   Palette is driven by the logo: New Mexico red + gold, shrine blue,
   on the dusty-rose adobe background from the original mockup.
   ========================================================================== */

:root {
  --rose:        #e0bda5;   /* page background (from the mockup)             */
  --rose-deep:   #d3ac92;   /* alternating band / card background            */
  --rose-line:   #b8907a;   /* hairline borders                              */
  --ink:         #191413;   /* headings + body text                          */
  --ink-soft:    #4a3b34;   /* secondary text                                */
  --red:         #b01f24;   /* logo red                                      */
  --red-dark:    #8c161b;
  --gold:        #f0c22e;   /* logo gold                                     */
  --blue:        #3e8fcc;   /* shrine blue, straight from the logo           */
  --blue-btn:    #2c72ad;   /* same blue, one shade down so white text reads */
  --blue-dark:   #256293;   /* button hover                                  */
  --white:       #fdf7f1;

  --shadow-sm: 0 2px 6px rgba(60, 30, 15, .13);
  --shadow-md: 0 8px 24px rgba(60, 30, 15, .16);
  --shadow-lg: 0 18px 46px rgba(60, 30, 15, .20);

  --radius: 4px;
  --wrap: 1140px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --------------------------------------------------------------- reset -- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--rose);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--red-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }

h1, h2, h3, h4 {
  line-height: 1.12;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  font-weight: 800;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }

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

.center { text-align: center; }
.muted  { color: var(--ink-soft); }
.lede   { font-size: 1.16rem; color: var(--ink-soft); }

/* Screen-reader-only text */
.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;
}

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

.site-header {
  padding: 2.1rem 0 0;
  text-align: center;
  border-bottom: 2px solid var(--ink);
}

.site-header .logo {
  width: 150px;
  height: auto;
  margin: 0 auto .9rem;
  transition: transform .5s var(--ease);
}
.site-header .logo:hover { transform: rotate(-4deg) scale(1.04); }

.wordmark { display: inline-block; text-decoration: none; color: inherit; }
.wordmark:hover { color: inherit; }

.wordmark .title {
  font-size: clamp(1.6rem, 5.2vw, 3.2rem);
  font-weight: 900;
  letter-spacing: .005em;
  margin: 0;
  text-transform: uppercase;
}

.wordmark .subtitle {
  font-size: clamp(1rem, 2.2vw, 1.45rem);
  font-weight: 700;
  margin: .1rem 0 0;
  color: var(--ink);
}

/* ----------------------------------------------------------------- nav -- */

.nav-toggle {
  display: none;
  margin: 1.2rem auto 1.4rem;
  padding: .6rem 1.1rem;
  font: inherit;
  font-weight: 700;
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: .35rem 1.4rem;
  margin: 1.4rem 0 0;
  padding: 0 0 .3rem;
}

.site-nav a {
  display: block;
  padding: .75rem .55rem 1.05rem;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.02rem;
  text-decoration: none;
  text-align: center;
  border-bottom: 4px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.site-nav a:hover        { color: var(--red); border-bottom-color: var(--gold); }
.site-nav a[aria-current="page"] { color: var(--red-dark); border-bottom-color: var(--red); }

.site-nav .nav-note {
  display: block;
  font-size: .74rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: 21ch;
  margin: .18rem auto 0;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: 0;
}

.site-nav .nav-donate a {
  background: var(--blue-btn);
  color: var(--white);
  border-radius: var(--radius);
  border-bottom-color: var(--blue-dark);
  padding-inline: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.site-nav .nav-donate a:hover { background: var(--blue-dark); color: var(--white); border-bottom-color: var(--gold); }
.site-nav .nav-donate .nav-note { color: rgba(255, 245, 235, .85); }

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

.hero {
  padding: 3.2rem 0 3rem;
  text-align: center;
}

.hero-portrait {
  width: min(240px, 62vw);
  height: auto;
  margin: 0 auto 1.5rem;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.hero-frame {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--rose-deep);
  min-height: 440px;
  display: grid;
  place-items: center;
  padding: 3rem 1.5rem;
  margin-top: 2rem;
  box-shadow: var(--shadow-md);
}

/* When the frame holds a real photograph it hugs the image instead of
   reserving empty space for a placeholder. */
.hero-frame.has-photo {
  min-height: 0;
  padding: 0;
  overflow: hidden;
  margin-inline: 0;
}
.hero-frame.has-photo img { width: 100%; height: auto; }
.hero-frame figcaption {
  padding: .8rem 1rem;
  font-size: .88rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--rose-line);
  background: var(--rose-deep);
}

/* Placeholder blocks — swap these out for real photographs */
.img-slot {
  display: grid;
  place-items: center;
  gap: .35rem;
  width: 100%;
  min-height: 220px;
  padding: 2rem 1rem;
  background:
    repeating-linear-gradient(45deg,
      rgba(25, 20, 19, .045) 0 12px,
      transparent 12px 24px),
    var(--rose-deep);
  border: 2px dashed var(--rose-line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-weight: 700;
  text-align: center;
}
.img-slot span { font-weight: 500; font-size: .86rem; max-width: 40ch; }

/* --------------------------------------------------------- components -- */

.section { padding: 3.4rem 0; }
.section + .section { border-top: 1px solid var(--rose-line); }

.band { background: var(--rose-deep); border-top: 1px solid var(--rose-line); border-bottom: 1px solid var(--rose-line); }

.page-head {
  padding: 3rem 0 2.2rem;
  text-align: center;
}
.page-head .lede { max-width: 62ch; margin-inline: auto; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--red-dark);
  margin-bottom: .7rem;
}

.grid { display: grid; gap: 1.6rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--rose-line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.card-media { padding: 0; overflow: hidden; }
.card-media .img-slot { border: 0; border-bottom: 1px dashed var(--rose-line); border-radius: 0; min-height: 190px; }
.card-media .card-body { padding: 1.4rem 1.5rem; }
.card-media .card-body > :last-child { margin-bottom: 0; }

/* Buttons */
.btn {
  display: inline-block;
  padding: .85rem 1.7rem;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid var(--blue-btn);
  background: var(--blue-btn);
  color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--rose); border-color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; justify-content: center; margin-top: 1.6rem; }

/* Captioned photographs */
.photo {
  margin: 0 0 1.6rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.photo img { width: 100%; height: auto; }
.photo figcaption {
  padding: .8rem 1rem;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--ink-soft);
  border-top: 1px solid var(--rose-line);
  background: var(--rose-deep);
}
.photo-stack > :last-child { margin-bottom: 0; }

.photo-grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
  margin-top: 1.8rem;
}
.photo-grid .photo { margin: 0; }
.photo-grid .photo img { height: 420px; object-fit: cover; }

@media (max-width: 820px) {
  .photo-grid .photo img { height: auto; }
}

.card-media > img { width: 100%; height: 260px; object-fit: cover; display: block; }

/* Responsive video embed */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 1.6rem 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow-md);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Pull quote */
.quote {
  border-left: 5px solid var(--gold);
  padding: .3rem 0 .3rem 1.5rem;
  margin: 2rem 0;
  font-size: 1.22rem;
  font-style: italic;
  color: var(--ink);
}
.quote cite { display: block; margin-top: .6rem; font-size: .95rem; font-style: normal; font-weight: 700; color: var(--ink-soft); }

/* Progress meter */
.meter {
  height: 22px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 99px;
  overflow: hidden;
  margin: 1rem 0 .6rem;
}
.meter > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--red));
  border-radius: 99px;
  transition: width 1.2s var(--ease);
}

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 9px; top: .5rem; bottom: .5rem;
  width: 2px;
  background: var(--rose-line);
}
.timeline li { position: relative; padding: 0 0 1.7rem 2.4rem; }
.timeline li::before {
  content: "";
  position: absolute; left: 3px; top: .5rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--rose);
  border: 3px solid var(--red);
}
.timeline li.done::before  { background: var(--red); }
.timeline li.now::before   { background: var(--gold); border-color: var(--red); box-shadow: 0 0 0 4px rgba(240, 194, 46, .35); }
.timeline .when { display: block; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--red-dark); }
.timeline h3 { margin: .15rem 0 .3rem; font-size: 1.08rem; }
.timeline p { margin: 0; color: var(--ink-soft); }

/* Team */
.person { text-align: center; }
.person .portrait {
  width: 150px; height: 150px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px dashed var(--rose-line);
  background: var(--rose-deep);
  display: grid; place-items: center;
  font-size: .78rem; font-weight: 700; color: var(--ink-soft);
  overflow: hidden;
}
.person .portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.person h3 { margin-bottom: .1rem; }
.person .role { font-size: .85rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--red-dark); margin: 0 0 .7rem; }

/* Forms */
.form-grid { display: grid; gap: 1.1rem; }
label { display: block; font-weight: 700; margin-bottom: .35rem; }
input, textarea, select {
  width: 100%;
  padding: .7rem .8rem;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--rose-line);
  border-radius: var(--radius);
}
input:focus, textarea:focus, select:focus { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--ink); }
textarea { min-height: 160px; resize: vertical; }

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

fieldset {
  border: 2px solid var(--rose-line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.2rem;
  margin: 0;
}
legend { font-weight: 700; padding: 0 .4rem; }

.checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .4rem 1.2rem;
}
.checks label {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 400;
  margin: 0;
  cursor: pointer;
}
.checks input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  accent-color: var(--blue-btn);
}

/* Definition-style FAQ */
.faq { margin: 0; }
.faq dt { font-weight: 800; margin-top: 1.3rem; }
.faq dd { margin: .3rem 0 0; color: var(--ink-soft); }

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

.site-footer {
  border-top: 2px solid var(--ink);
  margin-top: 3rem;
  padding: 2.2rem 0 2.6rem;
  text-align: center;
}

.site-footer .links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: .4rem 1rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.site-footer .links a { color: var(--ink); text-decoration: none; }
.site-footer .links a:hover { color: var(--red); text-decoration: underline; }
.site-footer .links .sep { color: var(--rose-line); }

.site-footer .fineprint { font-size: .85rem; color: var(--ink-soft); margin: 0; }

/* ------------------------------------------------------------- motion -- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------ mobile  -- */

@media (max-width: 820px) {
  body { font-size: 16px; }

  .nav-toggle { display: block; }

  .site-nav ul {
    display: none;
    flex-direction: column;
    gap: 0;
    margin-top: 0;
    border-top: 1px solid var(--rose-line);
  }
  .site-nav.open ul { display: flex; }
  .site-nav li { border-bottom: 1px solid var(--rose-line); }
  .site-nav a { padding: .95rem .5rem; border-bottom: 0; }
  .site-nav .nav-note { max-width: none; }
  .site-nav .nav-donate a { border-radius: 0; box-shadow: none; }

  .hero-frame { min-height: 320px; padding: 2rem 1rem; }
  .section { padding: 2.4rem 0; }
}

@media print {
  .site-nav, .nav-toggle, .btn-row { display: none; }
  body { background: #fff; color: #000; }
}
