:root {
  --ink: #0b100e;
  --forest: #142019;
  --moss: #1e3328;
  --leaf: #3d6b4f;
  --gold: #d4af37;
  --gold-2: #f0d78c;
  --gold-dim: #8a7340;
  --parchment: #e6d9c3;
  --parchment-dim: #cbb89a;
  --fog: #9aab9c;
  --line: rgba(212, 175, 55, 0.28);
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-ui: "Manrope", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--parchment);
  background: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.container {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Header — thin bar, gold underline active, no pills */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(11, 16, 14, 0.92);
  border-bottom-color: var(--line);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 0.95rem;
  color: var(--gold-2);
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

.nav {
  display: flex;
  gap: 1.4rem;
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav a {
  color: var(--fog);
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav a:hover,
.nav a.is-active {
  color: var(--gold-2);
  border-bottom-color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-ui);
}

.header-actions a.discord {
  color: var(--fog);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-actions a.discord:hover { color: var(--gold-2); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.82rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid var(--gold);
  border-radius: 10px;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  background-size: 100% 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 10px 30px rgba(212, 175, 55, 0.2);
}

.btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.06);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 16px 40px rgba(212, 175, 55, 0.4);
}

.btn:active {
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--gold-2);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(212, 175, 55, 0.08);
  box-shadow: none;
}

.hero__actions .btn--hero,
.hero__actions .btn--ghost {
  animation: btnGlow 2.8s ease-in-out infinite;
}

.hero__actions .btn--ghost {
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.22), 0 0 40px rgba(212, 175, 55, 0.12);
}

.hero__actions .btn--hero:hover,
.hero__actions .btn--ghost:hover {
  animation: none;
}

.hero__actions .btn--ghost:hover {
  box-shadow: 0 0 26px rgba(212, 175, 55, 0.38), 0 0 50px rgba(212, 175, 55, 0.18);
  background: rgba(212, 175, 55, 0.08);
}

@keyframes btnGlow {
  0%, 100% {
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.2), 0 0 32px rgba(212, 175, 55, 0.1);
  }
  50% {
    box-shadow: 0 0 26px rgba(212, 175, 55, 0.42), 0 0 52px rgba(212, 175, 55, 0.22);
  }
}

.menu-toggle {
  display: none;
  font-size: 1.25rem;
  color: var(--gold-2);
  padding: 0.4rem;
}

/* Hero — asymmetric chronicle, not centered Litness stack */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: 7.5rem 0 7rem;
  overflow: hidden;
  z-index: 1;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(11, 16, 14, 0.78) 0%, rgba(11, 16, 14, 0.45) 48%, rgba(11, 16, 14, 0.28) 72%, rgba(11, 16, 14, 0.45) 100%),
    linear-gradient(180deg, transparent 42%, rgba(11, 16, 14, 0.55) 68%, var(--forest) 100%),
    url("../assets/hero.jpg") center 45% / cover no-repeat;
  will-change: auto;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: end;
  max-width: 40rem;
}

.hero__eyebrow {
  margin: 0 0 1rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  animation: fadeUp 0.8s ease both;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.4rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 0.95;
  color: var(--gold-2);
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.55);
  animation: fadeUp 0.9s 0.06s ease both;
}

.hero__title span {
  display: block;
  font-size: 0.28em;
  letter-spacing: 0.35em;
  margin-top: 0.85rem;
  color: var(--parchment);
  font-weight: 500;
  opacity: 0.85;
}

.hero__lead {
  margin: 1.35rem 0 2rem;
  max-width: 28rem;
  font-size: 1.15rem;
  color: var(--parchment-dim);
  animation: fadeUp 0.9s 0.1s ease both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: stretch;
  animation: fadeUp 0.9s 0.18s ease both;
}

.btn--hero {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.95rem 1.45rem;
  text-align: left;
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.28), 0 10px 30px rgba(212, 175, 55, 0.22);
}

.btn__main {
  display: block;
  line-height: 1.2;
}

.btn__sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.78;
}

.hero__seal {
  justify-self: end;
  width: min(280px, 70vw);
  border: 1px solid var(--line);
  padding: 0.65rem;
  background: rgba(11, 16, 14, 0.45);
  animation: fadeUp 0.9s 0.15s ease both, sealFloat 5s ease-in-out infinite;
}

.hero__seal img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

@keyframes sealFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Chapters */
.chapter {
  padding: 5rem 0;
  position: relative;
}

.chapter--forest {
  background:
    linear-gradient(180deg, var(--forest) 0%, var(--forest) 100%);
  margin-top: -3.5rem;
  padding-top: 7rem;
}

.chapter--forest::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8rem;
  background: linear-gradient(180deg, rgba(11, 16, 14, 0.85) 0%, rgba(11, 16, 14, 0.35) 45%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.chapter--forest > * {
  position: relative;
  z-index: 1;
}

.chapter--ink {
  background: var(--ink);
  margin-top: -2rem;
  padding-top: 6rem;
}

.chapter--ink::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7rem;
  background: linear-gradient(180deg, rgba(20, 32, 25, 0.95) 0%, rgba(20, 32, 25, 0.4) 50%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.chapter--ink > * {
  position: relative;
  z-index: 1;
}

.chapter__label {
  margin: 0 0 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.chapter h2 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: 0.06em;
  color: var(--gold-2);
  line-height: 1.15;
}

.split {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2.5rem;
  align-items: center;
}

.split__visual {
  position: relative;
}

.split__visual img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border: 1px solid var(--line);
  filter: saturate(0.9) contrast(1.05);
}

.split__visual::after {
  content: "";
  position: absolute;
  inset: 0.85rem -0.85rem -0.85rem 0.85rem;
  border: 1px solid rgba(212, 175, 55, 0.18);
  pointer-events: none;
  z-index: -1;
}

.split__copy p {
  margin: 0 0 1rem;
  color: var(--parchment-dim);
  font-size: 1.05rem;
}

.ornament {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  color: var(--gold-dim);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ornament::before,
.ornament::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.pillar {
  padding: 1.35rem 1.2rem;
  border: 1px solid var(--line);
  background: rgba(11, 16, 14, 0.35);
}

.pillar h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--gold-2);
}

.pillar p {
  margin: 0;
  color: var(--fog);
  font-size: 0.98rem;
}

/* Chronicle news */
.chronicle {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.chronicle__item {
  display: grid;
  grid-template-columns: 140px minmax(12rem, 34rem) auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease, transform 0.25s ease, opacity 0.45s ease;
}

.chronicle__item:hover {
  background: rgba(212, 175, 55, 0.04);
  transform: translateX(6px);
}

.chronicle__item time {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dim);
}

.chronicle__item h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--parchment);
}

.chronicle__item p {
  margin: 0;
  color: var(--fog);
  font-size: 0.95rem;
}

.chronicle__item .tag {
  margin-left: 0.25rem;
}

.tag {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--line);
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
}

.page-hero {
  padding: 8rem 0 3rem;
  background:
    linear-gradient(180deg, rgba(11, 16, 14, 0.7), var(--ink)),
    url("../assets/about.jpg") center 60% / cover;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: 0.08em;
  color: var(--gold-2);
}

.page-hero p {
  margin: 0;
  max-width: 34rem;
  color: var(--parchment-dim);
}

.panel {
  border: 1px solid var(--line);
  background: rgba(20, 32, 25, 0.55);
  padding: 1.5rem;
}

.prose h2 {
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  color: var(--gold-2);
  margin: 1.75rem 0 0.65rem;
}

.prose ul {
  padding-left: 1.15rem;
  color: var(--parchment-dim);
}

.prose li { margin: 0.4rem 0; }

.form {
  display: grid;
  gap: 0.9rem;
}

.form label {
  display: grid;
  gap: 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.form input,
.form select,
.form textarea {
  font: inherit;
  font-family: var(--font-body);
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  background: rgba(11, 16, 14, 0.65);
  color: var(--parchment);
  text-transform: none;
  letter-spacing: normal;
  font-size: 1rem;
}

.form textarea { min-height: 130px; resize: vertical; }

.toast {
  position: fixed;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--moss);
  border: 1px solid var(--line);
  color: var(--gold-2);
  padding: 0.8rem 1.2rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 80;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.site-footer {
  position: relative;
  background: #080c0a;
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 0;
  color: var(--fog);
  font-family: var(--font-ui);
}

.site-footer a {
  color: var(--parchment-dim);
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--gold-2);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.5rem;
  padding-bottom: 2.5rem;
}

.footer__col h3 {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment);
}

.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.footer__col a {
  font-size: 0.9rem;
}

.footer__bottom {
  border-top: 1px solid rgba(212, 175, 55, 0.14);
  padding: 1.25rem 0 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: space-between;
  align-items: flex-end;
}

.footer__legal {
  max-width: 42rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgba(154, 171, 156, 0.75);
}

.footer__legal p {
  margin: 0 0 0.35rem;
}

.footer__social {
  display: flex;
  gap: 0.55rem;
}

.footer__social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--gold-2);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.footer__social a:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.45);
}

.footer__social svg {
  width: 18px;
  height: 18px;
}

.back-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 60;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.65rem 0.55rem;
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-top.is-on {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.back-top svg {
  width: 14px;
  height: 14px;
}

.apply-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.pillar {
  padding: 1.35rem 1.2rem;
  border: 1px solid var(--line);
  background: rgba(11, 16, 14, 0.35);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.pillar:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* Scroll reveals */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: calc(var(--reveal-delay, 0) * 90ms);
}

[data-reveal="left"] {
  transform: translateX(-32px);
}

[data-reveal="right"] {
  transform: translateX(32px);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.chronicle__item.is-in {
  /* no entrance animation — list loads once */
}

.split__visual img {
  transition: transform 0.7s ease, filter 0.7s ease;
}

.split__visual.is-in img {
  transform: scale(1.02);
}

.ornament::before,
.ornament::after {
  transform: scaleX(0.4);
  transition: transform 0.8s ease;
}

[data-reveal].is-in .ornament::before,
[data-reveal].is-in .ornament::after {
  transform: scaleX(1);
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero__actions .btn--hero,
  .hero__actions .btn--ghost {
    animation: none;
  }
}

@media (max-width: 900px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.75rem 1rem 1rem;
    background: rgba(11, 16, 14, 0.96);
    border-bottom: 1px solid var(--line);
  }

  .nav.is-open { display: flex; }
  .nav a { padding: 0.75rem 0; border-bottom: 1px solid rgba(212, 175, 55, 0.12); }
  .menu-toggle { display: block; }

  .hero__grid,
  .split,
  .pillars,
  .apply-grid {
    grid-template-columns: 1fr;
  }

  .hero__seal {
    justify-self: start;
    width: min(180px, 50vw);
    order: -1;
  }

  .chronicle__item {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .chronicle__item .tag {
    margin-left: 0;
    justify-self: start;
  }

  [data-reveal="left"],
  [data-reveal="right"] {
    transform: translateY(24px);
  }
}
