:root {
  --void: #070605;
  --ink: #f6f0e6;
  --mute: #a89f92;
  --dim: #6f675c;
  --amber: #fe8019;
  --amber-deep: #c2410c;
  --line: rgba(246, 240, 230, 0.1);
  --display: "Cormorant Garamond", Georgia, serif;
  --body: "Manrope", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--void);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.05;
  margin: 0;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.03;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

.kicker {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber);
}

/* ── Header ── */
.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 3.5rem);
  mix-blend-mode: difference;
}

.top__mark {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
}

.top__nav {
  display: flex;
  gap: 1.75rem;
}

.top__nav a {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.3s var(--ease);
}

.top__nav a:hover {
  color: #fff;
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}

.hero__stage {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.04);
  filter: saturate(0.75) contrast(1.08) brightness(0.72);
  background: #1a1510;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__img {
    animation: drift 28s linear infinite alternate;
  }
}

.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 6, 5, 0.35) 0%, rgba(7, 6, 5, 0.15) 35%, rgba(7, 6, 5, 0.92) 100%),
    linear-gradient(90deg, rgba(7, 6, 5, 0.78) 0%, rgba(7, 6, 5, 0.25) 55%, rgba(7, 6, 5, 0.55) 100%);
}

.hero__heat {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: radial-gradient(80% 100% at 20% 100%, rgba(254, 128, 25, 0.22), transparent 70%);
  animation: heat 8s ease-in-out infinite;
}

.hero__frame {
  width: min(920px, 100%);
  padding: 0 clamp(1.25rem, 4vw, 3.5rem) clamp(3.5rem, 9vh, 6rem);
}

.hero__brand {
  margin: 0 0 1.1rem;
  font-family: var(--display);
  font-size: clamp(3.4rem, 11vw, 7.5rem);
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.02em;
  color: var(--amber);
  text-wrap: balance;
}

.hero__line {
  margin: 0 0 1.1rem;
  max-width: 14ch;
  font-size: clamp(1.45rem, 2.8vw, 2.15rem);
  font-weight: 500;
  font-style: italic;
  color: var(--ink);
}

.hero__lead {
  margin: 0 0 2rem;
  max-width: 34ch;
  font-size: 1.05rem;
  color: var(--mute);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  width: 22px;
  height: 34px;
  border: 1px solid rgba(246, 240, 230, 0.35);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 7px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.hero__scroll:hover {
  opacity: 1;
}

.hero__scroll span {
  width: 3px;
  height: 7px;
  border-radius: 2px;
  background: var(--amber);
  animation: tick 1.6s var(--ease) infinite;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  font-family: var(--body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.btn--solid {
  background: var(--amber);
  color: #140c06;
}

.btn--solid:hover {
  background: #ff922b;
  transform: translateY(-2px);
}

.btn--line {
  border-color: rgba(246, 240, 230, 0.35);
  color: var(--ink);
  background: rgba(7, 6, 5, 0.45);
}

.btn--line:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* ── Vista (world) ── */
.vista {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  min-height: 85vh;
  border-top: 1px solid var(--line);
}

.vista__media {
  position: relative;
  min-height: 420px;
  overflow: hidden;
}

.vista__media img {
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  filter: saturate(0.7) contrast(1.05);
  transform: scale(1.04);
  transition: transform 1.4s var(--ease);
}

.vista:hover .vista__media img {
  transform: scale(1.08);
}

.vista__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 55%, rgba(7, 6, 5, 0.55));
  pointer-events: none;
}

.vista__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 6vw, 5rem);
  background: linear-gradient(160deg, #0d0b09, #070605 70%);
}

.vista__copy h2 {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  margin-bottom: 1.25rem;
  max-width: 10ch;
}

.vista__copy p {
  margin: 0;
  max-width: 34ch;
  color: var(--mute);
  font-size: 1.05rem;
}

/* ── Ledger (life) ── */
.ledger {
  padding: clamp(4.5rem, 11vh, 7.5rem) clamp(1.25rem, 4vw, 3.5rem);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(700px 300px at 100% 0%, rgba(254, 128, 25, 0.07), transparent 60%),
    var(--void);
}

.ledger__head {
  margin-bottom: 2.5rem;
}

.ledger__head h2 {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
}

.ledger__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.ledger__rows li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.25rem 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.ledger__num {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--amber);
  letter-spacing: 0.04em;
  padding-top: 0.15rem;
}

.ledger__rows h3 {
  font-size: 1.85rem;
  margin-bottom: 0.45rem;
}

.ledger__rows p {
  margin: 0;
  max-width: 46ch;
  color: var(--mute);
}

/* ── Gate (join) ── */
.gate {
  position: relative;
  isolation: isolate;
  padding: clamp(5rem, 14vh, 9rem) clamp(1.25rem, 4vw, 3.5rem);
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.gate__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 80% at 70% 120%, rgba(254, 128, 25, 0.2), transparent 55%),
    linear-gradient(180deg, #0b0907, #070605);
  animation: heat 10s ease-in-out infinite;
}

.gate__inner {
  max-width: 720px;
}

.gate h2 {
  font-size: clamp(2.8rem, 6vw, 4.6rem);
  margin-bottom: 1rem;
  max-width: 10ch;
}

.gate__text {
  margin: 0 0 2.25rem;
  max-width: 36ch;
  color: var(--mute);
  font-size: 1.05rem;
}

.gate__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: stretch;
}

.ip {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(20, 16, 12, 0.85);
  color: var(--ink);
  text-align: left;
  min-width: min(100%, 340px);
  padding: 1rem 1.2rem;
  cursor: pointer;
  font-family: var(--body);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}

.ip:hover,
.ip.is-on {
  border-color: var(--amber);
  background: #17130f;
  transform: translateY(-1px);
}

.ip__key {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}

.ip__val {
  display: block;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 1.02rem;
  color: var(--ink);
}

.ip__tip {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--amber);
}

/* ── Footer ── */
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem) 2rem;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.88rem;
}

.foot strong {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--amber);
}

.foot a:hover {
  color: var(--amber);
}

/* Soft section entrance — only when JS is on; never hide without .is-in forever */
.js .soft-in {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  will-change: opacity, transform;
}

.js .soft-in.is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* ── Motion ── */
@keyframes drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1%, -0.6%, 0); }
}

@keyframes heat {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

@keyframes tick {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__img,
  .hero__heat,
  .gate__bg,
  .hero__scroll span {
    animation: none !important;
  }
  .js .soft-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 960px) {
  .vista {
    grid-template-columns: 1fr;
  }

  .vista__media::after {
    background: linear-gradient(180deg, transparent 40%, rgba(7, 6, 5, 0.85));
  }

  .vista__media img {
    max-height: 52vh;
  }
}

@media (max-width: 640px) {
  .top__nav {
    gap: 1rem;
  }

  .top__nav a {
    font-size: 0.72rem;
  }

  .hero__brand {
    font-size: clamp(3rem, 14vw, 4.2rem);
  }

  .ledger__rows li {
    grid-template-columns: 3.2rem 1fr;
    gap: 0.75rem;
  }

  .gate__actions {
    flex-direction: column;
  }

  .gate__actions .btn {
    width: 100%;
  }

  .hero__scroll {
    display: none;
  }
}
