/* Zion Nexus — Discourse shell + mobile-first celestial About
   Dove & atmosphere are separate assets; integration = shared light + scale + placement */

:root {
  --primary: #D8E7F7;
  --secondary: #000000;
  --tertiary: #1FA9FF;
  --header_background: #040B14;
  --header_primary: #D3E8FF;
  --primary-low: rgb(17, 50, 85);
  --primary-medium: rgb(82, 148, 219);

  --text: #eef6ff;
  --muted: #9bb6cc;
  --blue-bright: #5ce1ff;
  --warm: #e0b56a;
  --warm-soft: rgba(255, 196, 120, 0.22);
  --font-display: "Cinzel", "Palatino Linotype", Palatino, serif;
  --font-body: "Outfit", "Helvetica Neue", Helvetica, sans-serif;
  --header-h: 56px;
  --wrapper-max: 1110px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --view-ms: 260ms;
  --radius-panel: 12px;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--primary);
  font-family: var(--font-body);
  line-height: 1.5;
  background-color: #000;
  /* Quiet Sixguns-style tile — dim cousin of the hero dove */
  background-image: url("assets/dove-tile.png");
  background-repeat: repeat;
  background-size: 160px 160px;
  background-attachment: scroll;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* ——— Discourse / Sixguns shell ——— */

.sg-wrapper {
  height: 100dvh;
  max-width: var(--wrapper-max);
  margin: 0 auto;
  padding: 8px;
  padding-top: calc(var(--header-h) + 8px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sg-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 3000;
  background: rgba(4, 11, 20, 0.88);
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
  border-bottom: 1px solid rgba(90, 180, 255, 0.12);
}

.sg-header-inner {
  max-width: var(--wrapper-max);
  margin: 0 auto;
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sg-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.sg-brand img {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px rgba(31, 169, 255, 0.3));
}

.sg-brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--header_primary);
  line-height: 1.1;
}

.sg-brand small {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tertiary);
}

.sg-header-actions {
  display: none;
}

.sg-shell-signin {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(31, 169, 255, 0.28);
  background: rgba(10, 37, 61, 0.78);
  color: var(--tertiary);
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.sg-shell-signin:hover {
  background: rgba(12, 45, 74, 0.96);
  color: var(--primary);
}

.nav-toggle {
  display: inline-flex;
  width: 40px;
  height: 34px;
  margin-left: auto;
  border-radius: 6px;
  border: 1px solid rgba(31, 169, 255, 0.28);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--tertiary);
}

.sg-panel {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-panel);
  background: rgba(0, 0, 0, 0.62);
  border: 2px solid rgba(31, 169, 255, 0.38);
  box-shadow:
    inset 2px 2px 8px rgba(17, 50, 85, 0.75),
    inset -1px -1px 6px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(140, 210, 255, 0.12),
    0 0 0 1px rgba(31, 169, 255, 0.12),
    0 0 28px rgba(31, 169, 255, 0.18),
    0 0 56px rgba(0, 120, 200, 0.1),
    0 12px 36px rgba(0, 0, 0, 0.55);
  padding: 8px;
}

.sg-nav {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 4000;
  padding: 0.4rem;
  border-radius: 10px;
  border: 1px solid rgba(31, 169, 255, 0.28);
  background: rgba(4, 11, 20, 0.97);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
}

.sg-nav.is-open {
  display: flex;
}

.sg-shell-nav-button {
  min-height: 42px;
  padding: 0 12px;
  text-align: left;
  color: var(--primary-medium);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
}

.sg-shell-nav-button:hover,
.sg-shell-nav-button.is-active {
  color: var(--tertiary);
  background: rgba(31, 169, 255, 0.08);
}

.sg-content {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ——— Views ——— */

.view {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--view-ms) var(--ease);
  overflow: hidden;
}

.view.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  position: relative;
  height: 100%;
}

.view:not(#view-about) {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 169, 255, 0.35) transparent;
}

/* ——— About: mobile-first celestial stage ——— */

.hero-stage {
  position: relative;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
}

.hero-stage .hero-layout {
  flex: 1;
}

.hero-stage__sky {
  position: absolute;
  inset: 0;
  background:
    url("assets/atmosphere.png") center 35% / cover no-repeat,
    #020812;
  pointer-events: none;
}

/* Soft vignette so type stays readable without killing the sky */
.hero-stage__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 6, 14, 0.15) 0%, transparent 28%, rgba(0, 4, 12, 0.45) 72%, rgba(0, 2, 8, 0.78) 100%),
    linear-gradient(90deg, rgba(0, 8, 18, 0.55) 0%, transparent 42%, transparent 100%);
}

.hero-layout {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.7rem 0.35rem;
  overflow: hidden;
}

/* ——— Dove zone (shared light, not sticker glow) ——— */

.hero-visual {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 0;
  /* Mobile: dove owns the upper stage — large impact (no bottom pillar strip) */
  height: clamp(42vh, 48dvh, 52vh);
  max-height: 56%;
}

.light-well {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Warm well matches god-rays — this is what “seats” the dove in the scene */
.light-well--warm {
  width: 95%;
  height: 85%;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at 50% 55%,
    rgba(255, 200, 120, 0.34) 0%,
    rgba(255, 170, 80, 0.12) 38%,
    transparent 70%
  );
  filter: blur(22px);
}

.light-well--cool {
  width: 70%;
  height: 65%;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at 48% 48%,
    rgba(80, 190, 255, 0.16) 0%,
    transparent 68%
  );
  filter: blur(18px);
}

.dove-hero {
  position: relative;
  z-index: 1;
  width: min(92%, 420px);
  height: auto;
  max-height: 88%;
  object-fit: contain;
  background: transparent;
  /* Drops residual black so the bird joins the sky; light-wells do the bloom */
  mix-blend-mode: screen;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.28));
}

.scripture {
  position: relative;
  z-index: 1;
  margin-top: 0.15rem;
  text-align: center;
}

.scripture p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  color: rgba(255, 248, 235, 0.94);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.scripture cite {
  display: block;
  margin-top: 0.25rem;
  font-style: normal;
  font-size: clamp(0.72rem, 1.6vw, 0.85rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200, 220, 235, 0.8);
}

.scripture::after {
  content: "†";
  display: block;
  margin-top: 0.2rem;
  color: var(--warm);
  font-size: 0.95rem;
  opacity: 0.9;
}

/* ——— Copy ——— */

.hero-copy {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 0.35rem;
}

.eyebrow {
  font-size: clamp(0.78rem, 1.8vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-bright);
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.hero-copy h1,
.panel-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #f7fbff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55), 0 0 24px rgba(0, 160, 255, 0.18);
}

.hero-copy h1 {
  font-size: clamp(2.15rem, 8vw, 2.75rem);
  line-height: 1.05;
}

.tagline {
  margin-top: 0.45rem;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero-verse {
  margin-top: 1.15rem;
  max-width: 38rem;
}

.hero-verse p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  line-height: 1.55;
  color: rgba(245, 250, 255, 0.95);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero-verse cite {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: clamp(0.78rem, 1.5vw, 0.92rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200, 220, 235, 0.85);
}

.lede,
.panel-card p {
  margin-top: 0.85rem;
  color: rgba(230, 240, 250, 0.94);
  font-weight: 400;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.65;
  max-width: 38rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.panel-card p strong {
  color: var(--text);
  font-weight: 500;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.12rem;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.8rem;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.btn span {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: none;
  opacity: 0.85;
}

.btn--solid {
  background: linear-gradient(180deg, #2bb4ff, #0d6fad);
  color: #041018;
  border: 1px solid rgba(180, 230, 255, 0.4);
  box-shadow: 0 4px 18px rgba(31, 169, 255, 0.28);
}

.btn--ghost {
  background: rgba(4, 14, 30, 0.5);
  border: 1px solid rgba(31, 169, 255, 0.4);
  color: var(--primary);
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(10, 37, 61, 0.75);
}

.btn--wide {
  width: min(100%, 22rem);
}

/* Vision document — full-width, large type, easy reading for older viewers */
.vision-doc {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.15rem 1.1rem 2.5rem;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(4, 14, 28, 0.94), rgba(2, 8, 18, 0.97)),
    rgba(0, 0, 0, 0.88);
  border: 1px solid rgba(31, 169, 255, 0.14);
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 169, 255, 0.4) transparent;
}

.vision-doc__header {
  margin-bottom: 1.6rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid rgba(31, 169, 255, 0.2);
}

.vision-doc__header .eyebrow {
  font-size: 0.78rem;
}

.vision-doc__header h2 {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.2vw, 2.35rem);
  font-weight: 600;
  line-height: 1.2;
  color: #f7fbff;
  letter-spacing: 0.02em;
}

.vision-doc__lead {
  margin-top: 1rem;
  font-size: clamp(1.12rem, 2.2vw, 1.28rem);
  line-height: 1.7;
  color: rgba(230, 242, 252, 0.95);
  max-width: none;
}

.vision-doc section {
  margin-top: 1.75rem;
  max-width: none;
  width: 100%;
}

.vision-doc h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.4rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--blue-bright);
  margin-bottom: 0.75rem;
}

.vision-doc p,
.vision-doc li {
  color: rgba(210, 228, 242, 0.92);
  font-size: clamp(1.08rem, 2vw, 1.22rem);
  line-height: 1.75;
  font-weight: 400;
}

.vision-doc p + p {
  margin-top: 1rem;
}

.vision-doc p strong {
  color: #ffffff;
  font-weight: 600;
}

.vision-doc em {
  color: rgba(240, 248, 255, 0.95);
  font-style: italic;
}

.vision-doc ul {
  margin: 0.85rem 0 1.1rem 1.35rem;
  display: grid;
  gap: 0.55rem;
}

.vision-doc li {
  padding-left: 0.15rem;
}

.vision-doc blockquote {
  margin: 1.15rem 0 0;
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--tertiary);
  background: rgba(31, 169, 255, 0.1);
  border-radius: 0 10px 10px 0;
  color: #f2f8ff;
  font-family: var(--font-display);
  font-size: clamp(1.12rem, 2.2vw, 1.28rem);
  line-height: 1.65;
  font-style: italic;
}

/* Compact views (forum / support / contact) */
.panel-card {
  margin: 0.75rem auto;
  width: min(100%, 40rem);
  padding: 1.15rem 1.2rem;
  border-radius: 12px;
  border: 1px solid rgba(31, 169, 255, 0.2);
  background: rgba(4, 14, 30, 0.82);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.panel-card--center {
  text-align: center;
}

.panel-card--center p {
  margin-left: auto;
  margin-right: auto;
}

.panel-card h2 {
  margin-top: 0.3rem;
  font-size: clamp(1.4rem, 5vw, 2rem);
  line-height: 1.15;
}

.panel-card .btn {
  margin-top: 1rem;
}

/* ——— Tablet+ ——— */

@media screen and (min-width: 700px) {
  :root {
    --header-h: 60px;
  }

  body {
    background-attachment: fixed;
    background-size: 150px 150px;
  }

  .sg-wrapper {
    padding: 12px;
    padding-top: calc(var(--header-h) + 12px);
  }

  .sg-header-inner {
    padding: 0 20px;
  }

  .sg-header-actions {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .sg-nav {
    display: flex;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-height: 40px;
    padding: 0 6px 8px;
    margin: 0 0 6px;
    border: 0;
    border-bottom: 1px solid rgba(17, 50, 85, 0.88);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .sg-shell-nav-button {
    min-height: 36px;
    padding: 0 10px;
    box-shadow: inset 0 -2px 0 transparent;
    background: none;
  }

  .sg-shell-nav-button.is-active {
    box-shadow: inset 0 -2px 0 var(--tertiary);
    background: none;
  }

  .sg-panel {
    padding: 10px 12px 12px;
  }

  .hero-stage__veil {
    background:
      linear-gradient(90deg, rgba(0, 8, 18, 0.62) 0%, rgba(0, 8, 18, 0.28) 38%, transparent 58%),
      linear-gradient(180deg, transparent 55%, rgba(0, 4, 12, 0.55) 100%);
  }

  .hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.1fr);
    grid-template-areas: "copy visual";
    align-items: center;
    gap: 0.5rem 1.25rem;
    padding: 1rem 1.15rem 0.5rem;
  }

  .hero-copy {
    grid-area: copy;
    padding-top: 0;
    justify-content: center;
  }

  .hero-visual {
    grid-area: visual;
    height: 100%;
    max-height: none;
    justify-content: center;
  }

  .light-well--warm {
    width: 100%;
    height: 90%;
    top: 5%;
    /* Bias into the warm right of the atmosphere */
    left: 55%;
    transform: translateX(-50%);
    background: radial-gradient(
      ellipse at 48% 52%,
      rgba(255, 205, 130, 0.4) 0%,
      rgba(255, 170, 80, 0.14) 42%,
      transparent 72%
    );
  }

  .light-well--cool {
    left: 52%;
    background: radial-gradient(
      ellipse at 50% 48%,
      rgba(90, 200, 255, 0.14) 0%,
      transparent 70%
    );
  }

  .dove-hero {
    width: min(100%, 560px);
    max-height: min(58vh, 520px);
  }

  .hero-copy h1 {
    font-size: clamp(2.8rem, 5vw, 3.75rem);
  }

  .tagline {
    font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  }

  .lede {
    font-size: clamp(1.18rem, 1.7vw, 1.35rem);
    line-height: 1.7;
    max-width: 40rem;
  }

  .hero-verse p {
    font-size: clamp(1.25rem, 1.9vw, 1.45rem);
  }

  .eyebrow {
    font-size: 1rem;
  }

  .scripture p {
    font-size: 1.2rem;
  }

  .scripture cite {
    font-size: 0.9rem;
  }

  .actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .btn {
    width: auto;
    min-width: 11rem;
    align-items: flex-start;
    text-align: left;
  }

  .vision-doc {
    padding: 1.5rem 1.85rem 2.75rem;
  }

  .sg-panel {
    border-width: 2.5px;
  }

}

@media screen and (min-width: 700px) and (max-height: 720px) {
  .dove-hero {
    max-height: min(52vh, 420px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
