/* ==============================================================
   THE VEIL — THRESHOLD PAGE
   Separate visual system for truth.html
   ============================================================== */

:root {
  --veil-black: #050a07;
  --veil-black-soft: #09100c;
  --veil-deep: #0d1710;
  --veil-panel: #111b14;
  --veil-green: #7e9762;
  --veil-green-bright: #9cb578;
  --veil-green-muted: #57684c;
  --veil-fog: #d4d7ca;
  --veil-text: #a9b0a0;
  --veil-line: rgba(144, 165, 121, 0.34);
  --veil-line-soft: rgba(144, 165, 121, 0.16);
  --veil-warning: #a64d39;
  --veil-max: 1440px;

  --veil-display: "Oswald", Arial, sans-serif;
  --veil-body: "IBM Plex Mono", monospace;
  --veil-sans: "Inter", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 68% 8%, rgba(68, 91, 61, 0.11), transparent 31%),
    linear-gradient(180deg, #050a07 0%, #071009 46%, #040805 100%);
  color: var(--veil-fog);
  font-family: var(--veil-body);
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 3px,
      rgba(255, 255, 255, 0.012) 4px
    );
  mix-blend-mode: screen;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

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

.veil-page {
  width: min(100%, var(--veil-max));
  margin: 0 auto;
  border-right: 1px solid var(--veil-line-soft);
  border-left: 1px solid var(--veil-line-soft);
  background:
    linear-gradient(rgba(4, 9, 6, 0.92), rgba(4, 9, 6, 0.96)),
    radial-gradient(circle at top, rgba(107, 133, 84, 0.08), transparent 45%);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

/* ==============================================================
   01. HEADER
   ============================================================== */

.veil-header {
  min-height: 72px;
  padding: 0 clamp(22px, 4vw, 54px);
  border-bottom: 1px solid var(--veil-line);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
  background: rgba(3, 8, 5, 0.94);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
}

.veil-brand {
  font-family: var(--veil-display);
  font-size: 1.45rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.veil-brand span {
  color: var(--veil-green-bright);
}

.veil-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  color: var(--veil-text);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.veil-nav a,
.veil-nav-trigger {
  transition: color 180ms ease;
}

.veil-nav a:hover,
.veil-nav-trigger:hover,
.veil-nav-dropdown:focus-within .veil-nav-trigger {
  color: var(--veil-green-bright);
}

.veil-nav-dropdown {
  position: relative;
}

.veil-nav-trigger {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-transform: inherit;
  letter-spacing: inherit;
}

.veil-dropdown-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + 20px);
  width: 260px;
  padding: 12px;
  border: 1px solid var(--veil-line);
  background: rgba(4, 11, 7, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  display: grid;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition:
    opacity 180ms ease,
    visibility 180ms ease,
    transform 180ms ease;
}

.veil-dropdown-menu a {
  padding: 11px 12px;
  border: 1px solid transparent;
  color: var(--veil-text);
}

.veil-dropdown-menu a:hover {
  border-color: var(--veil-line-soft);
  background: rgba(123, 151, 96, 0.07);
}

.veil-nav-dropdown:hover .veil-dropdown-menu,
.veil-nav-dropdown:focus-within .veil-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.veil-header-mark {
  color: var(--veil-green);
  font-size: 1.7rem;
}

/* ==============================================================
   02. HERO
   ============================================================== */

.veil-hero {
  min-height: 780px;
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(420px, 1.15fr) 96px;
  position: relative;
  border-bottom: 1px solid var(--veil-line);
  isolation: isolate;
}

.veil-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 25% 35%, rgba(97, 123, 75, 0.1), transparent 32%),
    linear-gradient(115deg, #071009 0%, #050a07 42%, #111c14 100%);
}

.veil-hero-copy {
  padding: clamp(44px, 6vw, 90px) clamp(28px, 5vw, 78px);
  align-self: center;
}

.veil-kicker {
  margin: 0 0 24px;
  color: var(--veil-green-bright);
  font-size: 0.76rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.veil-hero-layout {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 26px;
}

.veil-hero-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}

.veil-hero-line span {
  flex: 1;
  width: 1px;
  background: var(--veil-line);
}

.veil-hero-line i {
  width: 11px;
  height: 11px;
  margin: 10px 0;
  border: 1px solid var(--veil-green);
  border-radius: 50%;
  position: relative;
}

.veil-hero-line i::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--veil-green);
}

.veil-title,
.veil-panel-copy h2,
.veil-note-card h3,
.veil-tree-statement h2,
.veil-decision strong {
  font-family: var(--veil-display);
  text-transform: uppercase;
  font-weight: 500;
}

.veil-title {
  margin: 0;
  max-width: 560px;
  color: var(--veil-fog);
  font-size: clamp(4.5rem, 8vw, 8.8rem);
  line-height: 0.9;
  letter-spacing: 0.015em;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
}

.veil-intro {
  max-width: 500px;
  margin-top: 34px;
  color: var(--veil-text);
  font-size: clamp(0.82rem, 1.2vw, 1rem);
}

.veil-intro p {
  margin: 0 0 15px;
}

.veil-intro p:last-child {
  color: var(--veil-fog);
}

.veil-hero-image {
  min-height: 780px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(110, 136, 91, 0.16), transparent 38%),
    #0d1710;
}

.veil-hero-image::before,
.veil-hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.veil-hero-image::before {
  background:
    linear-gradient(90deg, rgba(5, 10, 7, 0.62) 0%, transparent 34%),
    linear-gradient(180deg, rgba(7, 14, 9, 0.08) 0%, rgba(4, 9, 6, 0.3) 100%),
    repeating-linear-gradient(
      102deg,
      transparent 0,
      transparent 64px,
      rgba(169, 188, 147, 0.025) 65px,
      transparent 67px
    );
}

.veil-hero-image::after {
  background:
    radial-gradient(circle at 84% 18%, rgba(178, 195, 156, 0.1), transparent 15%),
    linear-gradient(120deg, transparent 55%, rgba(4, 9, 6, 0.45) 100%);
  mix-blend-mode: screen;
}

.veil-hero-image img {
  height: 100%;
  min-height: 780px;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.68) sepia(0.12) hue-rotate(54deg) contrast(1.07) brightness(0.73);
}

.veil-status-rail {
  padding: 36px 20px;
  border-left: 1px solid var(--veil-line);
  background: rgba(5, 10, 7, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  color: var(--veil-text);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.veil-status-rail i {
  display: block;
  width: 40px;
  height: 1px;
  background: var(--veil-line);
}

.veil-status-rail b {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--veil-warning);
  box-shadow: 0 0 14px rgba(166, 77, 57, 0.8);
}

.veil-status-rail strong {
  margin-top: 2px;
  color: var(--veil-green);
  font-size: 1.6rem;
  font-weight: 400;
}

/* ==============================================================
   03. WARNING PANELS
   ============================================================== */

.veil-warning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--veil-line);
}

.veil-warning-card {
  min-height: 340px;
  padding: clamp(28px, 4vw, 52px);
  border-right: 1px solid var(--veil-line);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.veil-warning-card:last-child {
  border-right: 0;
}

.veil-warning-card::before,
.veil-warning-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
}

.veil-warning-card::before {
  background:
    linear-gradient(90deg, rgba(5, 10, 7, 0.94) 0%, rgba(5, 10, 7, 0.68) 56%, rgba(5, 10, 7, 0.38) 100%),
    var(--veil-panel-image) center / cover no-repeat;
  filter: saturate(0.58) hue-rotate(42deg);
}

.veil-warning-card::after {
  z-index: -1;
  background:
    radial-gradient(circle at 74% 50%, rgba(133, 160, 104, 0.09), transparent 27%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 48px,
      rgba(154, 177, 130, 0.025) 49px,
      transparent 50px
    );
}

.veil-panel-index,
.veil-note-number {
  color: var(--veil-green-bright);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
}

.veil-panel-copy {
  margin-top: 20px;
}

.veil-panel-copy h2 {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 5.7rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
}

.veil-short-rule {
  display: block;
  width: 44px;
  height: 1px;
  margin: 24px 0 18px;
  background: var(--veil-green);
}

.veil-panel-copy p {
  margin: 0;
  color: var(--veil-text);
  font-size: 0.88rem;
}

.veil-card-sigil {
  position: absolute;
  right: 10%;
  top: 38%;
  color: rgba(156, 181, 120, 0.45);
  font-size: clamp(3rem, 5vw, 5.4rem);
}

/* ==============================================================
   04. THRESHOLD NOTES
   ============================================================== */

.veil-notes-section {
  padding: 28px clamp(20px, 3vw, 42px) 34px;
  border-bottom: 1px solid var(--veil-line);
}

.veil-section-heading {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: center;
  color: var(--veil-green);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.veil-section-heading > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.veil-section-heading h2 {
  margin: 0;
  font: inherit;
}

.veil-section-heading a {
  color: var(--veil-text);
}

.veil-section-heading a:hover {
  color: var(--veil-green-bright);
}

.veil-notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.veil-note-card {
  min-height: 280px;
  padding: 20px;
  border: 1px solid var(--veil-line);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.veil-note-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(5, 10, 7, 0.32) 0%, rgba(5, 10, 7, 0.9) 82%),
    linear-gradient(90deg, rgba(5, 10, 7, 0.5), transparent),
    var(--veil-note-image) center / cover no-repeat;
  filter: saturate(0.58) hue-rotate(40deg) brightness(0.75);
  transform: scale(1.01);
  transition: transform 400ms ease, filter 400ms ease;
}

.veil-note-card:hover::before {
  transform: scale(1.045);
  filter: saturate(0.72) hue-rotate(34deg) brightness(0.88);
}

.veil-note-card h3 {
  margin: 8px 0 0;
  max-width: 82%;
  font-size: clamp(2rem, 3.6vw, 3.8rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
}

.veil-note-card p {
  position: absolute;
  left: 20px;
  bottom: 18px;
  margin: 0;
  color: var(--veil-text);
  font-size: 0.72rem;
}

.veil-note-plus {
  position: absolute;
  right: 14px;
  bottom: 11px;
  color: var(--veil-green-bright);
  font-size: 1.6rem;
  line-height: 1;
}

/* ==============================================================
   05. TREES NOTICED
   ============================================================== */

.veil-tree-statement {
  min-height: 250px;
  padding: 44px;
  border-bottom: 1px solid var(--veil-line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  position: relative;
  isolation: isolate;
  text-align: center;
}

.veil-tree-statement::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 10, 7, 0.72), rgba(5, 10, 7, 0.28), rgba(5, 10, 7, 0.72)),
    linear-gradient(180deg, rgba(5, 10, 7, 0.25), rgba(5, 10, 7, 0.58)),
    var(--veil-tree-image) center 58% / cover no-repeat;
  filter: saturate(0.52) hue-rotate(38deg) brightness(0.65);
}

.veil-tree-statement::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at center, rgba(153, 179, 118, 0.08), transparent 28%);
}

.veil-tree-sigil {
  color: var(--veil-green-bright);
  font-size: 1.4rem;
}

.veil-tree-statement h2 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 6.4rem);
  line-height: 1;
  letter-spacing: 0.035em;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.72);
}

.veil-tree-rule {
  width: 62px;
  height: 1px;
  background: var(--veil-green);
}

/* ==============================================================
   06. DECISION
   ============================================================== */

.veil-decision-section {
  padding: 22px clamp(20px, 3vw, 42px);
  display: grid;
  grid-template-columns: 1fr 0.94fr;
  gap: 26px;
  border-bottom: 1px solid var(--veil-line);
}

.veil-decision {
  min-height: 116px;
  padding: 22px 24px;
  border: 1px solid var(--veil-line);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  position: relative;
  overflow: hidden;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.veil-decision:hover {
  transform: translateY(-2px);
}

.veil-decision--return {
  background: rgba(112, 139, 87, 0.05);
}

.veil-decision--return:hover {
  border-color: rgba(156, 181, 120, 0.7);
  background: rgba(112, 139, 87, 0.09);
}

.veil-decision--continue {
  border-color: rgba(137, 97, 80, 0.34);
}

.veil-decision--continue:hover {
  border-color: rgba(166, 77, 57, 0.64);
  background: rgba(166, 77, 57, 0.035);
}

.veil-decision-icon {
  color: var(--veil-green-bright);
  font-size: 2.4rem;
}

.veil-decision-copy {
  display: grid;
  gap: 6px;
}

.veil-decision strong {
  font-size: clamp(1.8rem, 3.5vw, 3.7rem);
  line-height: 1;
  letter-spacing: 0.025em;
}

.veil-decision small {
  color: var(--veil-text);
  font-size: 0.68rem;
}

.veil-decision--continue small {
  color: var(--veil-warning);
}

.veil-decision-arrow {
  color: var(--veil-fog);
  font-size: 2.2rem;
}

.veil-warning-icon {
  color: var(--veil-warning);
  font-size: 2rem;
}

.veil-decision-divider {
  width: 1px;
  height: 68px;
  background: var(--veil-line-soft);
}

.veil-deeper-note {
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  text-align: center;
  color: var(--veil-warning);
  transition: max-height 300ms ease;
}

.veil-deeper-note:target {
  max-height: 140px;
  padding: 38px 20px;
  border-bottom: 1px solid var(--veil-line);
}

.veil-deeper-note p {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

/* ==============================================================
   07. FOOTER
   ============================================================== */

.veil-footer {
  min-height: 110px;
  padding: 26px clamp(22px, 4vw, 50px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  color: var(--veil-text);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
}

.veil-footer-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.veil-footer-brand > span {
  color: var(--veil-green);
  font-size: 2rem;
}

.veil-footer-brand div,
.veil-footer-status {
  display: grid;
  gap: 4px;
}

.veil-footer-brand strong,
.veil-footer-status span {
  color: var(--veil-green);
  font-weight: 500;
  text-transform: uppercase;
}

.veil-footer-brand small,
.veil-footer-status strong {
  font-size: inherit;
  font-weight: 400;
}

.veil-footer > p {
  margin: 0;
  text-align: center;
}

.veil-footer-status {
  justify-self: end;
  text-align: right;
  text-transform: uppercase;
}

.veil-footer-status b {
  color: var(--veil-warning);
  font-weight: 500;
}

/* ==============================================================
   RESPONSIVE
   ============================================================== */

@media (max-width: 1050px) {
  .veil-header {
    grid-template-columns: auto 1fr;
  }

  .veil-header-mark {
    display: none;
  }

  .veil-nav {
    justify-content: flex-end;
  }

  .veil-hero {
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr) 74px;
  }

  .veil-decision-section {
    grid-template-columns: 1fr;
  }

  .veil-footer {
    grid-template-columns: 1fr 1fr;
  }

  .veil-footer > p {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 820px) {
  .veil-header {
    padding: 18px 22px;
    align-items: flex-start;
  }

  .veil-nav {
    flex-wrap: wrap;
    gap: 12px 18px;
    font-size: 0.64rem;
  }

  .veil-dropdown-menu {
    left: 0;
    transform: translate(0, 8px);
  }

  .veil-nav-dropdown:hover .veil-dropdown-menu,
  .veil-nav-dropdown:focus-within .veil-dropdown-menu {
    transform: translate(0, 0);
  }

  .veil-hero {
    min-height: auto;
    grid-template-columns: 1fr 66px;
  }

  .veil-hero-copy {
    grid-column: 1 / -1;
    min-height: 620px;
    position: relative;
    z-index: 3;
    background:
      linear-gradient(90deg, rgba(5, 10, 7, 0.93) 0%, rgba(5, 10, 7, 0.73) 72%, rgba(5, 10, 7, 0.5) 100%);
  }

  .veil-hero-image {
    position: absolute;
    inset: 0 66px 0 0;
    min-height: 620px;
  }

  .veil-hero-image img {
    min-height: 620px;
  }

  .veil-status-rail {
    grid-column: 2;
    min-height: 620px;
    z-index: 5;
  }

  .veil-warning-grid {
    grid-template-columns: 1fr;
  }

  .veil-warning-card {
    border-right: 0;
    border-bottom: 1px solid var(--veil-line);
  }

  .veil-warning-card:last-child {
    border-bottom: 0;
  }

  .veil-notes-grid {
    grid-template-columns: 1fr;
  }

  .veil-note-card {
    min-height: 330px;
  }
}

@media (max-width: 620px) {
  .veil-header {
    grid-template-columns: 1fr;
  }

  .veil-nav {
    justify-content: flex-start;
  }

  .veil-hero {
    grid-template-columns: 1fr 52px;
  }

  .veil-hero-copy {
    padding: 42px 22px;
    min-height: 650px;
  }

  .veil-hero-layout {
    grid-template-columns: 16px 1fr;
    gap: 18px;
  }

  .veil-title {
    font-size: clamp(3.6rem, 19vw, 5.4rem);
  }

  .veil-status-rail {
    padding: 24px 8px;
    font-size: 0.52rem;
    gap: 20px;
  }

  .veil-status-rail i {
    width: 24px;
  }

  .veil-warning-card {
    min-height: 300px;
  }

  .veil-panel-copy h2 {
    font-size: clamp(2.7rem, 13vw, 4.3rem);
  }

  .veil-card-sigil {
    opacity: 0.38;
  }

  .veil-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .veil-tree-statement {
    min-height: 220px;
    padding: 34px 20px;
  }

  .veil-tree-statement h2 {
    font-size: clamp(2.5rem, 13vw, 4.2rem);
  }

  .veil-decision {
    grid-template-columns: auto 1fr;
  }

  .veil-decision-arrow,
  .veil-warning-icon {
    grid-column: 2;
    justify-self: end;
  }

  .veil-footer {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .veil-footer > p {
    grid-column: auto;
    grid-row: auto;
    text-align: left;
  }

  .veil-footer-status {
    justify-self: start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
