/* Spiritual Assembly of the Bahá'ís of Burien — site styles */

@font-face { font-family: "Marcellus"; src: url("../fonts/marcellus-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --night: #0d1129;
  --indigo: #171c3f;
  --ink: #ece7f5;
  --muted: #bdb6d2;
  --gold: #d9b25c;
  --gold-soft: #f1d894;
  --dusk: #e3a978;
  --panel: rgba(18, 23, 54, 0.72);
  --line: rgba(217, 178, 92, 0.28);
  --display: "Marcellus", "Trajan Pro", Georgia, serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 40rem;
}

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

html { background: var(--night); scroll-padding-top: 5rem; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--night);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold-soft); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--gold-soft); color: var(--night); padding: .5rem 1rem; border-radius: 4px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---------- Site navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 13, 34, 0.86);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-nav .inner {
  max-width: 1140px; margin: 0 auto; padding: .7rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.15rem; line-height: 1.2; }
.brand img { width: 30px; height: 30px; }
.brand:hover { color: var(--gold-soft); }

.nav-links { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: .45rem .8rem; color: var(--muted); text-decoration: none;
  font-size: 1rem; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--gold-soft); border-bottom-color: var(--gold); }

.nav-toggle {
  display: none; background: transparent; color: var(--ink); border: 1px solid var(--line);
  border-radius: 6px; padding: .4rem .75rem; font: inherit; font-size: 1rem; cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-block; margin-left: auto; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; padding: .5rem 1rem 1rem;
    background: rgba(10, 13, 34, 0.97); border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .75rem .5rem; border-bottom: 1px solid rgba(217,178,92,.12); }
  .nav-links a[aria-current="page"] { border-bottom-color: rgba(217,178,92,.12); }
}

/* ---------- Scene backgrounds (Rainier over SeaTac) ---------- */
.scene { position: relative; isolation: isolate; overflow: hidden; }
.scene::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("../images/rainier-seatac-background.svg") center bottom / cover no-repeat;
  opacity: .62;
}
.scene::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(13,17,41,.9) 0%, rgba(13,17,41,.55) 30%, rgba(13,17,41,.3) 52%, rgba(13,17,41,.3) 70%, rgba(13,17,41,.85) 90%, var(--night) 100%);
}

/* Phones: tower and plane sit closer to the center so they aren't cut off */
@media (max-width: 700px) {
  .scene::before { background-image: url("../images/rainier-seatac-background-mobile.svg"); }
}

/* Home hero */
.hero { min-height: calc(max(84vh, 580px) - 96px); }
/* 1-inch crop: the scene extends below the hero so the runway is trimmed off */
.hero::before { bottom: -96px; }
.hero::after { background: linear-gradient(to bottom, rgba(13,17,41,.9) 0%, rgba(13,17,41,.55) 30%, rgba(13,17,41,.3) 52%, rgba(13,17,41,.25) 82%, rgba(13,17,41,.7) 95%, var(--night) 100%); }
.masthead {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  column-gap: clamp(1rem, 4vw, 3rem); row-gap: .6rem;
  width: 100%; max-width: 1100px; margin: 0 auto; padding: clamp(2.25rem, 5vw, 3.75rem) 1.5rem .4rem;
}
.masthead > img { width: clamp(60px, 11vw, 132px); filter: drop-shadow(0 0 18px rgba(217,178,92,.35)); }
.masthead h1, .masthead .site-title {
  margin: 0; text-align: center; font-family: var(--display); font-weight: 400;
  font-size: clamp(1.6rem, 4.6vw, 3.3rem); line-height: 1.2; letter-spacing: .02em;
  color: var(--gold-soft); text-shadow: 0 2px 20px rgba(0,0,0,.6);
}
.masthead .cities {
  grid-column: 1 / -1; margin: 0; text-align: center;
  font-size: clamp(.95rem, 1.6vw, 1.2rem); line-height: 1.6; letter-spacing: .04em;
  text-shadow: 0 2px 14px rgba(0,0,0,.6);
}
.hero .rule { width: min(420px, 60%); height: 1px; margin: .35rem auto 0; background: linear-gradient(to right, transparent, var(--gold), transparent); }
.intro-band { padding: .5rem 1.5rem 1rem; text-align: center; }
.intro-band .tagline { max-width: 36rem; margin: 0 auto; font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.55; color: var(--ink); }
.intro-band .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 1.5rem auto 0; }

/* Page title below the scene on subpages */
.page-title h1 {
  margin: 0 0 .5rem; font-family: var(--display); font-weight: 400; color: var(--gold-soft);
  font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.15; letter-spacing: .02em;
}
.page-title + .section { padding-top: clamp(2rem, 5vw, 3.5rem); }

/* Subpage banner (no longer used) */
.banner { padding: clamp(3rem, 8vw, 5.5rem) 1.5rem clamp(3.5rem, 9vw, 6.5rem); text-align: center; }
.banner::before { background-position: center 52%; }
.banner::after { background: linear-gradient(to bottom, rgba(13,17,41,.82), rgba(13,17,41,.5) 55%, var(--night)); }
.banner h1 {
  margin: 0; font-family: var(--display); font-weight: 400; color: var(--gold-soft);
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; letter-spacing: .02em; text-shadow: 0 2px 18px rgba(0,0,0,.6);
}
.banner p { max-width: 36rem; margin: .9rem auto 0; color: var(--ink); font-size: 1.15rem; text-shadow: 0 2px 14px rgba(0,0,0,.7); }

/* ---------- Buttons ---------- */
.button {
  display: inline-block; padding: .7rem 1.4rem; border-radius: 999px;
  font-family: var(--body); font-size: 1.05rem; font-weight: 600; line-height: 1.3; text-decoration: none; cursor: pointer;
  border: 1px solid var(--gold); transition: background-color .15s, color .15s;
}
.button.primary { background: var(--gold); color: #1b1630; }
.button.primary:hover { background: var(--gold-soft); color: #1b1630; }
.button.secondary { background: rgba(13,17,41,.5); color: var(--gold-soft); }
.button.secondary:hover { background: rgba(217,178,92,.15); color: #fff; }

/* ---------- Content ---------- */
main { display: block; }
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; }
.section + .section { padding-top: 0; }
.prose { max-width: var(--measure); margin: 0 auto; }
.wide { max-width: 1040px; margin: 0 auto; }

h2 {
  font-family: var(--display); font-weight: 400; color: var(--gold-soft);
  font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.25; margin: 0 0 1rem;
}
h3 { font-family: var(--display); font-weight: 400; color: var(--gold-soft); font-size: 1.35rem; line-height: 1.3; margin: 0 0 .4rem; }
p { margin: 0 0 1.15rem; }
.prose > :last-child, .wide > :last-child { margin-bottom: 0; }
.lede { font-size: 1.25rem; line-height: 1.65; color: var(--ink); }
.muted { color: var(--muted); }

/* The one emphatic statement on the mission page */
.statement {
  max-width: 46rem; margin: 0 auto; padding: 0 0 0 1.5rem; border-left: 3px solid var(--gold);
  font-family: var(--display); font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.5; color: var(--ink);
}

blockquote.quote { margin: 2.5rem auto 0; max-width: var(--measure); text-align: center; font-style: italic; color: var(--muted); }
blockquote.quote cite { display: block; margin-top: .3rem; font-style: normal; font-size: 1rem; }

/* Star-marked list (programs, principles) */
.star-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.75rem 3rem; }
.star-list.two-col { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.star-list li { position: relative; padding-left: 2.25rem; }
.star-list li::before {
  content: ""; position: absolute; left: 0; top: .3rem; width: 1.3rem; height: 1.3rem;
  background: url("../images/nine-pointed-star.svg") center / contain no-repeat;
}
.star-list p { margin: 0; color: var(--muted); }
.star-list.compact { gap: .9rem; }
.star-list.compact li::before { top: .35rem; width: 1.05rem; height: 1.05rem; }
.star-list.compact li { padding-left: 1.9rem; color: var(--ink); }

/* Program detail blocks */
.program { max-width: var(--measure); margin: 0 auto; padding: 2rem 0; border-top: 1px solid var(--line); }
.program:first-of-type { border-top: 0; padding-top: 0; }
.program .facts { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; margin: 1rem 0 0; font-size: 1rem; }
.program .facts dt { color: var(--gold-soft); }
.program .facts dd { margin: 0; color: var(--muted); }

/* Invitation band */
.invite { text-align: center; background: linear-gradient(to bottom, var(--night), var(--indigo) 50%, var(--night)); }
.invite .prose { text-align: center; }
.invite .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.5rem; }

/* Organization details */
.details {
  max-width: var(--measure); margin: 0 auto; padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
}
.details dl { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1.5rem; margin: 0; }
.details dt { color: var(--gold-soft); }
.details dd { margin: 0; }
@media (max-width: 560px) {
  .details dl, .program .facts { grid-template-columns: 1fr; }
  .details dd { margin-bottom: .6rem; }
  .program .facts dd { margin-bottom: .4rem; }
}

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.form-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: clamp(1.5rem, 4vw, 2.5rem); }
.field { margin-bottom: 1.25rem; }
.field label { display: block; margin-bottom: .35rem; font-size: 1rem; color: var(--ink); }
.field .optional { color: var(--muted); font-size: .9rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .7rem .85rem; border-radius: 6px;
  border: 1px solid rgba(189,182,210,.35); background: rgba(8,10,26,.6); color: var(--ink);
  font: inherit; font-size: 1rem; line-height: 1.5;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 1.1rem) 55%, calc(100% - .8rem) 55%; background-size: .3rem .3rem; background-repeat: no-repeat; padding-right: 2.25rem; }
.field select option { background: var(--night); color: var(--ink); }
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .95rem; color: var(--muted); margin: 0 0 1.25rem; }
.form-status { margin: 1rem 0 0; font-size: 1rem; min-height: 1.5em; }
.form-status.success { color: #b9e4c4; }
.form-status.error { color: #ffc2b8; }
button[disabled] { opacity: .6; cursor: progress; }

.contact-aside h2 { font-size: 1.5rem; }
.contact-aside address { font-style: normal; margin-bottom: 1.25rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #080a1a; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.site-footer .inner {
  max-width: 1140px; margin: 0 auto; padding: 3rem 1.5rem 2rem;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem;
}
@media (max-width: 760px) { .site-footer .inner { grid-template-columns: 1fr; text-align: center; } }
.site-footer h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.site-footer address { font-style: normal; }
.site-footer strong { color: var(--ink); font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .15rem 0; }
.site-footer .legal {
  max-width: 1140px; margin: 0 auto; padding: 1.5rem 1.5rem 1.75rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; font-size: .9rem;
}
@media (max-width: 760px) { .site-footer .legal { justify-content: center; text-align: center; } }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  body { font-size: 1.0625rem; }
  .masthead { column-gap: .75rem; padding-inline: 1rem; }
  .brand span { font-size: 1rem; }
}

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

/* Microsoft Forms contact form */
.ms-form { margin: 0 0 1.25rem; }
.ms-form iframe { display: block; width: 100%; height: 980px; border: 0; border-radius: 6px; background: transparent; }
@media (max-width: 560px) { .ms-form iframe { height: 1120px; } }
.form-fallback { margin: 0; padding: 1.25rem; border: 1px dashed var(--line); border-radius: 6px; color: var(--ink); }
.form-after { margin-bottom: 0; }
