:root {
  --ink: #17100a;
  --cream: #fff2d2;
  --gold: #f2b64e;
  --amber: #e5791e;
  --leaf: #263022;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: var(--cream);
  background: var(--ink);
  font-family: Consolas, "Courier New", ui-monospace, monospace;
}

a,
button { -webkit-tap-highlight-color: transparent; }

.page {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: max(20px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left));
  background: url("assets/forest-sunset.png") center 48% / cover no-repeat;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(16,10,5,.84) 0%, rgba(16,10,5,.67) 31%, rgba(16,10,5,.18) 58%, rgba(16,10,5,.28) 100%),
    linear-gradient(180deg, rgba(15,9,4,.3) 0%, transparent 49%, rgba(11,9,5,.45) 100%);
}

.page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: .15;
  background:
    radial-gradient(ellipse at center, transparent 43%, rgba(12,8,4,.55) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.topbar {
  position: relative;
  z-index: 12;
  width: min(100%, 1400px);
  height: 54px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  text-decoration: none;
  font: 900 15px/1 "Arial Black", Impact, sans-serif;
  letter-spacing: -.04em;
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  color: var(--ink);
  background: var(--gold);
  font-size: 20px;
  box-shadow: 3px 3px 0 rgba(255,242,210,.45);
}

.socials { display: flex; align-items: center; gap: 18px; }

.social {
  min-width: 28px;
  height: 34px;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--cream);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,242,210,.5);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0,0,0,.55);
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease;
}

.social svg { width: 15px; height: 15px; fill: currentColor; }

.social:hover,
.social:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
  transform: translateY(-2px);
  outline: none;
}

.hero {
  position: relative;
  z-index: 2;
  width: min(100%, 1400px);
  height: calc(100% - 54px);
  min-height: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(430px, .98fr);
  align-items: center;
  gap: clamp(38px, 5vw, 88px);
}

.copy { position: relative; z-index: 4; padding-left: clamp(0px, 2vw, 30px); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-bottom: clamp(14px, 2vh, 22px);
  color: rgba(255,242,210,.78);
  font-size: clamp(9px, .76vw, 12px);
  font-weight: 700;
  letter-spacing: .14em;
  text-shadow: 0 2px 13px rgba(0,0,0,.65);
}

.eyebrow span { width: 24px; height: 1px; background: currentColor; }
.title-wrap { position: relative; width: fit-content; }

h1 {
  margin: 0;
  color: var(--cream);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(74px, 8.5vw, 140px);
  line-height: .77;
  letter-spacing: -.105em;
  text-shadow: 0 8px 34px rgba(0,0,0,.48);
}

h1 span {
  display: block;
  color: var(--gold);
}

.ticker {
  position: absolute;
  right: -47px;
  top: 29%;
  padding: 7px 10px;
  color: var(--cream);
  background: rgba(32,19,9,.76);
  border: 1px solid rgba(255,242,210,.34);
  font-size: clamp(10px, .95vw, 15px);
  font-weight: 700;
  transform: rotate(-4deg);
  box-shadow: 4px 4px 0 rgba(229,121,30,.62);
  backdrop-filter: blur(7px);
}

.intro {
  max-width: 570px;
  margin: clamp(20px, 3vh, 31px) 0 clamp(16px, 2.4vh, 25px);
  font: 900 clamp(17px, 1.48vw, 23px)/1.12 "Arial Black", Impact, sans-serif;
  letter-spacing: -.04em;
  text-shadow: 0 3px 18px rgba(0,0,0,.75);
}

.manifesto {
  max-width: 630px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,242,210,.28);
  border-bottom: 1px solid rgba(255,242,210,.28);
  background: linear-gradient(90deg, rgba(10,7,4,.2), transparent);
}

.lore-step {
  min-height: 66px;
  padding: 12px 10px 10px 0;
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.lore-step + .lore-step { padding-left: 12px; border-left: 1px solid rgba(255,242,210,.2); }
.lore-number { color: var(--gold); font-size: 9px; }

.lore-step p {
  max-width: 135px;
  margin: 0;
  font-size: clamp(10px, .82vw, 13px);
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
}

.ca {
  width: min(100%, 630px);
  height: 56px;
  margin-top: clamp(18px, 3vh, 28px);
  padding: 0 8px 0 18px;
  display: grid;
  grid-template-columns: 46px 1fr 40px;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  background: rgba(17,11,6,.67);
  border: 1px solid rgba(255,242,210,.24);
  border-radius: 5px;
  box-shadow: 0 18px 45px rgba(0,0,0,.2);
  backdrop-filter: blur(13px);
  font-family: inherit;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease;
}

.ca:hover { transform: translateY(-2px); background: rgba(17,11,6,.8); }
.ca:active { transform: translateY(0); }
.ca:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.ca-label { text-align: left; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .1em; }

.ca-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font: 900 clamp(14px, 1.2vw, 18px)/1 "Arial Black", Impact, sans-serif;
  letter-spacing: -.035em;
}

.copy-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--gold);
  border-radius: 3px;
}

.copy-icon svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.visual {
  position: relative;
  z-index: 2;
  width: 100%;
  height: min(74vh, 680px);
  display: grid;
  place-items: center;
}

.visual::before {
  content: "";
  position: absolute;
  width: min(35vw, 520px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255,230,150,.28) 0 22%, transparent 68%);
  filter: blur(13px);
}

.visual-index {
  position: absolute;
  z-index: 4;
  top: 7%;
  right: 5%;
  color: rgba(255,242,210,.72);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-shadow: 0 2px 10px rgba(0,0,0,.75);
}

.coin-frame {
  position: relative;
  z-index: 2;
  width: min(37vw, 540px);
  aspect-ratio: 1;
  margin: 0;
  filter: drop-shadow(0 32px 26px rgba(27,13,4,.48));
  animation: coin-in 900ms cubic-bezier(.2,.86,.32,1) both;
}

.coin-frame img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: contrast(1.08) saturate(1.16) sepia(.08);
}

.photo-line {
  position: absolute;
  z-index: 5;
  margin: 0;
  color: rgba(255,242,210,.78);
  font-size: clamp(8px, .72vw, 11px);
  font-weight: 700;
  letter-spacing: .08em;
  text-shadow: 0 2px 10px rgba(0,0,0,.75);
}

.photo-line::before { content: ""; display: inline-block; width: 30px; height: 1px; margin: 0 9px 3px 0; background: currentColor; }
.photo-line-top { top: 15%; left: 0; }
.photo-line-bottom { right: 0; bottom: 12%; }

.horizon-mark {
  position: absolute;
  z-index: 4;
  left: 5%;
  bottom: 18%;
  width: 112px;
  color: rgba(255,242,210,.58);
  text-shadow: 0 2px 8px rgba(0,0,0,.75);
}

.horizon-mark span { display: block; width: 100%; height: 1px; margin-bottom: 6px; background: currentColor; }
.horizon-mark small { font-size: 7px; font-weight: 700; letter-spacing: .1em; }

.toast {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  padding: 12px 17px;
  color: var(--ink);
  background: var(--gold);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  transform: translate(-50%, 150%);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.toast.show { transform: translate(-50%, 0); opacity: 1; }

@keyframes coin-in {
  from { opacity: 0; transform: translateY(24px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0,1fr) minmax(330px,.82fr); gap: 28px; }
  .social-pump span { display: none; }
  .social-pump { padding: 0; }
  .manifesto { grid-template-columns: 1fr; }
  .lore-step { min-height: auto; padding: 7px 9px 7px 0; }
  .lore-step + .lore-step { padding-left: 0; border-left: 0; border-top: 1px solid rgba(255,242,210,.2); }
  .lore-step p { max-width: none; }
}

@media (max-width: 720px) {
  .page {
    padding: max(13px, env(safe-area-inset-top)) max(15px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(15px, env(safe-area-inset-left));
    background-position: 50% center;
  }

  .page::before {
    background:
      linear-gradient(180deg, rgba(14,8,4,.58) 0%, rgba(14,8,4,.32) 28%, rgba(14,8,4,.08) 53%, rgba(10,8,4,.7) 100%),
      linear-gradient(90deg, rgba(14,8,4,.22), transparent 55%, rgba(14,8,4,.15));
  }

  .topbar { height: 43px; }
  .brand { gap: 7px; font-size: 13px; }
  .brand-mark { width: 31px; height: 31px; font-size: 17px; box-shadow: 3px 3px 0 rgba(255,242,210,.42); }
  .socials { gap: 11px; }
  .social { width: 27px; min-width: 27px; height: 30px; padding: 0; }
  .social span { display: none; }
  .social svg { width: 13px; height: 13px; }

  .hero { height: calc(100% - 43px); display: flex; flex-direction: column; justify-content: space-evenly; gap: 0; padding-top: 3px; }
  .copy { width: 100%; padding: 0 2px; display: contents; }
  .eyebrow { order: 0; align-self: flex-start; margin: 1px 0 5px; font-size: 8px; }
  .eyebrow span { width: 17px; }
  .title-wrap { order: 1; align-self: flex-start; }
  h1 { font-size: clamp(53px,18.8vw,80px); line-height: .77; }
  h1 span { display: inline; }
  .ticker { right: 0; top: 79%; padding: 4px 7px; font-size: 9px; box-shadow: 3px 3px 0 rgba(229,121,30,.62); }
  .intro { order: 2; width: 100%; max-width: 370px; margin: 5px 0 2px; font-size: clamp(13px,3.8vw,16px); line-height: 1.08; }
  .manifesto { display: none; }

  .visual { order: 3; flex: 1 1 auto; height: auto; min-height: 180px; max-height: 340px; }
  .visual::before { width: min(85vw,325px); }
  .visual-index { top: 5%; right: 1%; font-size: 7px; }
  .coin-frame { width: min(70vw,285px); filter: drop-shadow(0 24px 20px rgba(27,13,4,.42)); }
  .photo-line { font-size: 7px; }
  .photo-line::before { width: 18px; margin-right: 6px; }
  .photo-line-top { top: 10%; left: 0; }
  .photo-line-bottom { right: 0; bottom: 7%; }
  .horizon-mark { left: 0; bottom: 15%; width: 72px; }
  .horizon-mark small { font-size: 5px; }

  .ca { order: 4; width: 100%; height: 46px; margin: 4px 0 2px; padding: 0 5px 0 13px; grid-template-columns: 34px 1fr 32px; }
  .copy-icon { width: 30px; height: 30px; }
  .copy-icon svg { width: 14px; }
  .ca-value { font-size: 14px; }
}

@media (max-height: 720px) and (max-width: 720px) {
  .brand-name { display: none; }
  .eyebrow { margin: 0; }
  h1 { font-size: clamp(48px,16.7vw,66px); }
  .intro { font-size: 12px; }
  .visual { min-height: 145px; }
  .coin-frame { width: min(49vw,205px); }
  .visual::before { width: min(62vw,245px); }
  .horizon-mark { display: none; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .page { padding-top: 9px; padding-bottom: 9px; }
  .topbar { height: 39px; }
  .hero { height: calc(100% - 39px); display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; }
  .copy { display: block; }
  .eyebrow { margin-bottom: 8px; }
  h1 { font-size: clamp(54px,10.5vw,86px); }
  .intro { margin: 12px 0; }
  .manifesto { display: none; }
  .ca { height: 45px; margin-top: 11px; }
  .visual { height: 100%; max-height: none; min-height: 0; }
  .coin-frame { width: min(32vw,255px); }
  .visual::before { width: min(36vw,290px); }
}

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