/* Muras Sanjyra */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond.ttf") format("truetype");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-italic.ttf") format("truetype");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1a1714;
  --ink-soft: #4e4942;
  --felt: #f3eee4;
  --felt-2: #e8e0d2;
  --paper: #faf7f1;
  --night: #121826;
  --night-2: #1a2438;
  --crimson: #9c1c2c;
  --crimson-deep: #6e121e;
  --gold: #c9a45c;
  --gold-bright: #e4c97a;
  --kul: #2a4f4e;
  --line: rgba(26, 23, 20, 0.14);
  --line-strong: rgba(26, 23, 20, 0.28);
  --serif: "Cormorant Garamond", "Times New Roman", "Noto Serif", serif;
  --sans: "Manrope", "Segoe UI", "Noto Sans", sans-serif;
  --rail: 16px;
  --header-h: 4.25rem;
  --max: 68rem;
  --read: 38rem;
  --focus: 0 0 0 3px var(--felt), 0 0 0 5px var(--crimson);
}

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

html {
  scroll-behavior: smooth;
  background: var(--felt);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--felt);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0.005em;
  padding-left: var(--rail);
  min-height: 100%;
}

body::before {
  content: "";
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rail);
  background: url("../img/shyrdak-rail.svg") repeat-y center / 16px 64px;
  z-index: 80;
  pointer-events: none;
}

@media (max-width: 52rem) {
  body { padding-left: 0; }
  body::before { display: none; }
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--crimson); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--crimson-deep); }
:focus-visible { outline: none; box-shadow: var(--focus); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--night);
  color: var(--felt);
  padding: 0.6rem 1rem;
  z-index: 200;
}
.skip:focus { left: var(--rail); top: 0.6rem; }


/* —— Sticky top chrome (header) —— */
.chrome {
  position: sticky;
  top: 0;
  z-index: 70;
}
@media (max-width: 52rem) {
  .chrome::before {
    content: "";
    display: block;
    height: 8px;
    background: url("../img/shyrdak-edge.svg") repeat-x center / 64px 8px;
  }
}


/* —— Header —— */
.site-header {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
  padding: 0.6rem 1.5rem 0.6rem 1.25rem;
  color: var(--felt);
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-solid,
.site-header.is-open {
  background: var(--felt);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-solid a.wordmark,
.site-header.is-open a.wordmark { color: inherit; }
.site-header.is-solid .nav a,
.site-header.is-open .nav a { color: inherit; }
.site-header.is-solid .menu-btn,
.site-header.is-open .menu-btn { color: inherit; border-color: var(--line-strong); }

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.wordmark:hover { color: inherit; }
.wordmark .mark {
  width: 1.7rem;
  height: 1.7rem;
  color: var(--gold);
  flex-shrink: 0;
}
.site-header.is-solid .wordmark .mark,
.site-header.is-open .wordmark .mark { color: var(--crimson); }
.wordmark .name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.nav {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem 1.05rem;
}
.nav a {
  color: var(--felt);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.nav a:hover { color: var(--gold-bright); }
.site-header.is-solid .nav a:hover,
.site-header.is-open .nav a:hover { color: var(--crimson); }

.lang {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 0.5rem;
  border-left: 1px solid rgba(243, 238, 228, 0.25);
  padding-left: 0.85rem;
}
.site-header.is-solid .lang,
.site-header.is-open .lang { border-left-color: var(--line); }

.lang button {
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
  opacity: 0.55;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.3rem;
  border-radius: 2px;
}
.lang button[aria-pressed="true"] { opacity: 1; color: var(--gold-bright); }
.site-header.is-solid .lang button[aria-pressed="true"],
.site-header.is-open .lang button[aria-pressed="true"] { color: var(--crimson); }
.lang button:hover { opacity: 1; }

.menu-btn {
  display: none;
  appearance: none;
  background: none;
  border: 1px solid rgba(243, 238, 228, 0.35);
  color: inherit;
  padding: 0.35rem 0.55rem;
  border-radius: 2px;
  cursor: pointer;
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

@media (max-width: 72rem) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .site-header.is-open .nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--felt);
    color: var(--ink);
    padding: 0.75rem 1.5rem 1.25rem;
    box-shadow: 0 12px 24px rgba(18, 24, 38, 0.12);
    gap: 0.65rem;
  }
  .site-header.is-open .nav a { color: var(--ink); }
  .lang { border-left: 0; padding-left: 0; }
}

/* —— Hero —— */
.hero {
  position: relative;
  /* Fill the first screen; the header overlays the top of this block. */
  min-height: 100vh;
  min-height: 100svh;
  background: var(--night);
  color: var(--felt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem 5rem;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(var(--header-h) + 3rem);
}

.hero-tunduk {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: var(--gold);
  opacity: 0.17;
}
.hero-tunduk svg {
  width: min(80vmin, 42rem);
  height: auto;
}

.hero-inner {
  position: relative;
  max-width: 46rem;
  text-align: center;
}

.kicker {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin: 0 0 1.6rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.85rem, 4.2vw, 3.05rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 1.5rem;
  color: var(--snow, var(--felt));
  font-feature-settings: "kern", "liga", "onum";
}

.lede {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.1vw, 1.45rem);
  line-height: 1.45;
  font-weight: 400;
  color: rgba(243, 238, 228, 0.82);
  margin: 0 auto 2.25rem;
  max-width: 36rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.25rem;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-bright);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.03em;
  border-radius: 1px;
}
.btn:hover { background: var(--gold); color: var(--night); }
.btn-solid {
  background: var(--gold);
  color: var(--night);
  border-color: var(--gold);
}
.btn-solid:hover { background: var(--gold-bright); color: var(--night); }

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

.btn-crimson {
  background: var(--crimson);
  color: var(--felt);
  border-color: var(--crimson);
}
.btn-crimson:hover { background: var(--crimson-deep); color: var(--felt); }

/* —— Shared section chrome —— */
.section {
  padding: 4.5rem 1.5rem;
}
.section-narrow { max-width: var(--read); margin: 0 auto; }
.section-wide { max-width: var(--max); margin: 0 auto; }

.ornament {
  width: 13.5rem;
  height: auto;
  margin: 0 auto 1.6rem;
  color: var(--crimson);
  opacity: 0.9;
}

.section h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 3.5vw, 2.85rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-align: center;
  margin: 0 0 0.75rem;
}
.deck {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 2.75rem;
  color: var(--ink-soft);
}

.section h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.65rem;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.prose p { margin: 0 0 1rem; }
.prose p:last-child { margin-bottom: 0; }

/* —— Why —— */
.why { background: var(--paper); }

.why-grid {
  display: grid;
  gap: 2.5rem 3rem;
  max-width: var(--max);
  margin: 0 auto;
}
@media (min-width: 58rem) {
  .why-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

.story { max-width: 36rem; }
.story + .story { margin-top: 2.25rem; }
@media (min-width: 58rem) {
  .story + .story { margin-top: 2.5rem; }
}

/* —— Numbers band —— */
.numbers {
  background: var(--night);
  color: var(--felt);
  padding: 4.25rem 1.5rem 4.5rem;
  text-align: center;
}
.fraction {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin: 0 0 1.25rem;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum", "lnum";
  font-variant-numeric: lining-nums;
}
.fraction .num {
  font-size: clamp(3.4rem, 10vw, 7rem);
  color: var(--gold-bright);
}
.fraction .bar {
  width: min(22rem, 70%);
  height: 1px;
  background: rgba(201, 164, 92, 0.55);
  margin: 0.55rem 0 0.7rem;
}
.fraction .den {
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  color: var(--felt);
}
.pct {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  margin: 0 0 1rem;
  color: var(--felt);
}
.numbers .note,
.numbers .source,
.holdings {
  margin: 0 auto;
  max-width: 36rem;
  text-align: left;
  color: rgba(243, 238, 228, 0.86);
  font-size: 1rem;
  line-height: 1.7;
  word-spacing: 0.04em;
}
.numbers .source { margin-top: 1rem; font-size: 0.92rem; color: rgba(243, 238, 228, 0.72); }
.holdings { margin-top: 1.5rem; }

/* —— What / How —— */
.work { background: var(--felt); }
.triad {
  display: grid;
  gap: 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
}
@media (min-width: 58rem) {
  .triad { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.6rem 1.4rem 1.7rem;
  border-top: 3px solid var(--crimson);
}
.card .step {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--crimson);
  margin: 0 0 0.55rem;
}

.how { background: var(--paper); }
.how-grid {
  display: grid;
  gap: 2.25rem 3rem;
  max-width: var(--max);
  margin: 0 auto;
}
@media (min-width: 58rem) {
  .how-grid { grid-template-columns: repeat(3, 1fr); }
}
.disclaimer {
  max-width: var(--max);
  margin: 2.5rem auto 0;
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--gold);
  background: var(--felt-2);
  font-size: 0.98rem;
}

/* —— Sanjyra —— */
.sanjyra {
  background: var(--night);
  color: var(--felt);
}
.sanjyra .ornament { color: var(--gold); }
.sanjyra .deck { color: rgba(243, 238, 228, 0.75); }
.sanjyra-wrap {
  display: grid;
  gap: 2.5rem 3.5rem;
  max-width: var(--max);
  margin: 0 auto;
  align-items: center;
}
@media (min-width: 58rem) {
  .sanjyra-wrap { grid-template-columns: 16rem 1fr; }
}
.jeti {
  border: 1px solid rgba(201, 164, 92, 0.35);
  padding: 1.25rem 1.1rem;
  background: var(--night-2);
}
.jeti h3 {
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--gold);
  font-weight: 700;
  text-align: center;
  margin: 0 0 1rem;
}
.jeti ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: gen 8;
}
.jeti li {
  counter-increment: gen -1;
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.55rem;
  align-items: baseline;
  padding: 0.38rem 0;
  border-bottom: 1px solid rgba(243, 238, 228, 0.1);
  font-family: var(--serif);
  font-size: 1.15rem;
}
.jeti li:last-child { border-bottom: 0; }
.jeti li::before {
  content: counter(gen);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold);
  padding-top: 0.3rem;
}
.jeti li.is-you {
  color: var(--gold-bright);
  font-weight: 600;
}
.jeti li.is-you::before { content: ""; }
.sanjyra .prose a { color: var(--gold-bright); }
.sanjyra .prose a:hover { color: var(--gold); }

/* —— Archives / Families —— */
.archives { background: var(--felt); }
.offer, .people-list {
  max-width: var(--max);
  margin: 0 auto;
}
.offer ul, .people-list ul, .invite ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.offer li, .people-list li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.4rem;
  border-bottom: 1px solid var(--line);
}
.offer li::before, .people-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25rem;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--crimson);
  transform: rotate(45deg);
}
.invite {
  max-width: var(--max);
  margin: 2.5rem auto 0;
}
.invite h3 { margin-bottom: 0.85rem; }
.invite li { padding: 0.3rem 0; }
.names { font-family: var(--serif); font-size: 1.2rem; }

.families { background: var(--paper); }

/* —— RootsTech —— */
.rootstech {
  background:
    linear-gradient(180deg, rgba(18, 24, 38, 0.04), rgba(18, 24, 38, 0.04)),
    var(--felt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.rt-panel {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}
.rt-when {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--crimson);
  margin: 0 0 1rem;
}
.rt-panel .prose { text-align: left; margin-top: 1.75rem; }

/* —— Join / Contact —— */
.join { background: var(--paper); }
.form-note {
  max-width: var(--read);
  margin: 0 auto 1.5rem;
  color: var(--ink-soft);
  text-align: center;
}
form.crew {
  max-width: 34rem;
  margin: 0 auto;
  display: grid;
  gap: 0.95rem;
}
.field { display: grid; gap: 0.3rem; }
.field label {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--felt);
  border: 1px solid var(--line-strong);
  border-radius: 1px;
  padding: 0.65rem 0.7rem;
  min-height: 2.7rem;
}
.field textarea { min-height: 6.5rem; resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { border-color: var(--crimson); }
.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.92rem;
}
.check input { margin-top: 0.3rem; accent-color: var(--crimson); }
.form-status {
  margin: 0.5rem 0 0;
  padding: 0.75rem 0.9rem;
  background: #efe6c8;
  border-left: 3px solid var(--gold);
  font-size: 0.95rem;
}
.form-status[hidden] { display: none; }
.join-ph {
  max-width: var(--read);
  margin: 1.75rem auto 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-align: center;
}

.contact { background: var(--night); color: var(--felt); }
.contact .ornament { color: var(--gold); }
.contact .deck { color: rgba(243, 238, 228, 0.75); }
.contact-card {
  max-width: 30rem;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
}
.contact-card p { margin: 0 0 0.45rem; }
.contact-card a { color: var(--gold-bright); }
.contact-card a:hover { color: var(--gold); }
.contact .close {
  margin: 2rem auto 0;
  max-width: 30rem;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--gold-bright);
}

.ph {
  display: inline;
  font-style: italic;
  background: rgba(201, 164, 92, 0.18);
  padding: 0 0.2em;
  border-radius: 1px;
  color: inherit;
}
.contact .ph { background: rgba(201, 164, 92, 0.2); color: var(--gold-bright); }

/* —— Footer —— */
.site-footer {
  background: #0d121c;
  color: rgba(243, 238, 228, 0.65);
  padding: 1.5rem 1.5rem 2rem;
  font-size: 0.8rem;
  text-align: center;
}
.site-footer p { margin: 0.25rem 0; }

/* —— Utilities —— */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

@media print {
  .site-header, .menu-btn, .actions, form.crew, body::before { display: none !important; }
  body { padding: 0; background: #fff; color: #000; }
  .hero, .numbers, .sanjyra, .contact, .site-footer {
    background: #fff !important;
    color: #000 !important;
  }
  .section { padding: 1.5rem 0; }
}
