/* ============================================================
   Morally Open — global stylesheet
   Palette: #000000 black · #FFFFFF white · #FFCC20 yellow
            #A88D37 gold · #515356 grey · #C9252C red
   ============================================================ */

:root {
  --black: #000000;
  --ink: #0a0a0b;
  --panel: #101012;
  --panel-2: #141416;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --white: #ffffff;
  --text: #e8e9ea;
  --muted: #a3a6aa;
  --subtle: #94979c; /* dimmest tone that still clears WCAG AA on the panel bg */
  --grey: #515356;   /* decorative use only — fails contrast as text on black */
  --yellow: #ffcc20;
  --gold: #a88d37;
  --red: #c9252c;
  --gold-grad: linear-gradient(135deg, #ffcc20 0%, #d9b13d 45%, #a88d37 100%);
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

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

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

a { color: inherit; text-decoration: none; }

::selection { background: rgba(255, 204, 32, 0.85); color: #000; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--white);
  line-height: 1.12;
  letter-spacing: 0.01em;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- skip link ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--yellow);
  color: #000;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* ---------- top bar (minimal, 222-style) ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.1rem, 3vw, 1.8rem) clamp(1.2rem, 3.5vw, 2.4rem);
}
.topbar.floating {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
}

.topbar .brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.topbar .brand img { height: clamp(38px, 5vw, 48px); width: auto; }

.pill-nav { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; justify-content: flex-end; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 44px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 1.2rem;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}
.pill:hover { border-color: var(--gold); color: var(--yellow); transform: translateY(-1px); }
.pill.icon-pill { width: 44px; padding: 0; flex-shrink: 0; }
.pill.icon-pill svg { width: 19px; height: 19px; }

/* ---------- minimal hero (homepage) ---------- */

.hero-min {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(48rem 30rem at 50% 46%, rgba(255, 204, 32, 0.06), transparent 62%),
    radial-gradient(60rem 34rem at 50% 115%, rgba(168, 141, 55, 0.07), transparent 65%);
}

.hero-min-center {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6.5rem 24px 3rem;
}

.match-line {
  max-width: 20em;
  margin-inline: auto;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.2vw, 2.9rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--muted);
}

.word-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: baseline;
  min-width: 5.2em;
  padding: 0.02em 0.55em 0.1em;
  margin-inline: 0.08em;
  border: 1px solid rgba(255, 204, 32, 0.35);
  border-radius: 999px;
  background: rgba(255, 204, 32, 0.05);
  color: var(--white);
  font-weight: 600;
}
.word-pill .word {
  display: inline-block;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.word-pill .word.swap { opacity: 0; transform: translateY(8px); }

.hero-min-cta {
  position: relative;
  display: flex;
  justify-content: center;
  padding-bottom: clamp(5rem, 13vh, 8.5rem);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 0.9rem 2.4rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--gold-grad);
  color: #000;
  box-shadow: 0 4px 22px rgba(255, 204, 32, 0.18);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 204, 32, 0.32);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--white);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--yellow); transform: translateY(-2px); }

.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- about modal (222-style pop-up) ---------- */

.about-modal {
  width: min(680px, 92vw);
  max-height: min(84svh, 900px);
  margin: auto;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}
.about-modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.about-scroll {
  max-height: inherit;
  overflow-y: auto;
  padding: clamp(1.8rem, 5vw, 2.8rem);
}

.about-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.6rem;
}
.about-head h2 {
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
}

.modal-close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.modal-close:hover { border-color: var(--gold); color: var(--yellow); }
.modal-close svg { width: 17px; height: 17px; }

.about-mission {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  line-height: 1.6;
  color: var(--white);
}
.about-mission em { color: var(--yellow); font-style: normal; }

.about-label {
  margin: 2rem 0 1.1rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--yellow);
}

.principles { list-style: none; display: grid; gap: 1.15rem; }
.principles li { display: flex; gap: 0.9rem; align-items: baseline; }
.principles .rn {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: italic;
  font-size: 1.15rem;
  min-width: 2.1rem;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.principles p {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.5;
}
.principles strong { color: var(--white); font-weight: 600; }
.principles .arrow,
.definitions .arrow { color: var(--gold); }
.principles .follow,
.definitions .follow { color: var(--muted); }

.definitions { list-style: none; display: grid; gap: 0.6rem; }
.definitions li {
  font-family: var(--font-display);
  font-size: 1.18rem;
  line-height: 1.5;
}
.definitions strong { color: var(--white); font-weight: 600; }

/* ---------- interior page headings ---------- */

.page-head {
  text-align: center;
  padding: clamp(2.5rem, 7vw, 4.5rem) 24px clamp(1.6rem, 4vw, 2.6rem);
}
.page-head h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  font-weight: 600;
}
.page-head h1 .gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-head .lead {
  margin: 0.9rem auto 0;
  max-width: 36em;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.section { padding-bottom: clamp(4rem, 9vw, 6.5rem); }

/* ---------- forms ---------- */

fieldset { border: none; min-width: 0; }

.form-shell {
  max-width: 720px;
  margin-inline: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(1.8rem, 5vw, 3rem);
}

.field { margin-bottom: 1.6rem; }
.field:last-of-type { margin-bottom: 0; }

.field > label,
.field > .group-label {
  display: block;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--white);
  margin-bottom: 0.45rem;
}
.field .hint { font-size: 0.85rem; color: var(--subtle); margin-bottom: 0.6rem; margin-top: -0.2rem; }
.req { color: var(--yellow); }

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
input::placeholder, textarea::placeholder { color: var(--subtle); }
input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 204, 32, 0.16);
  background: rgba(255, 255, 255, 0.06);
}
input[type="radio"]:focus-visible,
input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}
textarea { min-height: 120px; resize: vertical; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a3a6aa' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.6rem;
}
select option { background: #141416; color: var(--white); }

.choices { display: flex; flex-direction: column; gap: 0.55rem; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  font-size: 0.96rem;
  color: var(--text);
}
.choice:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.03); }
.choice input {
  accent-color: var(--yellow);
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.22rem;
  flex-shrink: 0;
}
.choice:has(input:checked) {
  border-color: var(--gold);
  background: rgba(255, 204, 32, 0.06);
}
.choice:has(input:focus-visible) {
  border-color: var(--yellow);
  background: rgba(255, 204, 32, 0.06);
}

/* ---------- survey sheets ---------- */

.progress-label {
  margin-bottom: 1.6rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--yellow);
}

.sheet-title {
  font-size: clamp(1.5rem, 3.5vw, 1.9rem);
  margin-bottom: 1.4rem;
  outline: none;
}
.sheet-copy {
  color: var(--muted);
  font-size: 0.98rem;
  margin-top: -0.8rem;
  margin-bottom: 1.8rem;
}

.choice.pledge { align-items: flex-start; line-height: 1.55; }

.choice.else { flex-wrap: wrap; }
.choice .else-text {
  flex: 1;
  min-width: 6.5rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--white);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 0 2px;
}
.choice .else-text:focus {
  outline: none;
  border-bottom-color: var(--yellow);
  box-shadow: none;
  background: transparent;
}
.choice.capped { opacity: 0.45; cursor: not-allowed; }

.field-follow { margin-top: 0.9rem; }
.field-follow label {
  display: block;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--white);
  margin-bottom: 0.45rem;
}

/* ---------- thank-you page ---------- */

.page-head .thanks-mark { width: clamp(120px, 20vh, 180px); margin: 0 auto 1.6rem; }
.page-head .lead .arrow-gold { color: var(--gold); }
.page-head .lead a {
  color: var(--yellow);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 204, 32, 0.5);
}
.page-head .lead a:hover { text-decoration-color: var(--yellow); }
.thanks-form { max-width: 560px; }
.thanks-sent {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
}

.form-footer {
  margin-top: 2.2rem;
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}
.form-footer .btn { flex: 1 1 200px; }

/* honeypot */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

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

.contact-intro {
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
  color: var(--white);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.7;
}
.contact-intro a {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.45);
}
.contact-intro a:hover { color: var(--yellow); text-decoration-color: var(--yellow); }

/* ---------- thanks / 404 / placeholder pages ---------- */

.center-page {
  min-height: 72svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 24px;
}
.center-page .mark { width: clamp(140px, 24vh, 220px); margin-inline: auto; }
.center-page h1 { margin-top: 1.8rem; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.center-page h1 .gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.center-page p { margin-top: 1rem; color: var(--muted); max-width: 34em; margin-inline: auto; }
.center-page .btn { margin-top: 2.2rem; }

/* ---------- bottom bar ---------- */

.site-footer {
  padding: 1.4rem 24px 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  color: var(--subtle);
}
.site-footer.floating {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
}
.site-footer a { color: var(--subtle); transition: color 0.2s ease; }
.site-footer a:hover { color: var(--yellow); }
.site-footer .sep { opacity: 0.5; }

/* ---------- reveal on scroll ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}
html.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .word-pill .word { transition: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 560px) {
  .topbar { flex-wrap: wrap; }
  .pill { font-size: 0.98rem; height: 40px; padding: 0 1rem; }
  .pill.icon-pill { width: 40px; padding: 0; }
  .match-line { line-height: 1.7; }
  .word-pill { min-width: 4.6em; }
  .hero-min-center { padding-top: 7.5rem; }
  .form-footer .btn { flex-basis: 100%; }
}

/* ---------- legal pages (privacy / terms) ---------- */

.legal { max-width: 46em; margin-inline: auto; }
.legal .updated {
  color: var(--subtle);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.legal h2 {
  margin-top: 2.6rem;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
}
.legal h2 + p, .legal p + p, .legal ul + p { margin-top: 0.9rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { margin: 0.9rem 0 0 1.25rem; }
.legal li { margin-top: 0.5rem; padding-left: 0.25rem; }
.legal li::marker { color: var(--gold); }
.legal a {
  color: var(--yellow);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 204, 32, 0.5);
}
.legal a:hover { text-decoration-color: var(--yellow); }
.legal strong { color: var(--text); font-weight: 600; }
