/* Lethal Earth Atlas: living engraving */
:root {
  --ink: #060608;
  --ink-2: #0d0d12;
  --ink-3: #15151c;
  --line: rgba(217, 214, 207, .14);
  --silver: #e7e3da;
  --silver-2: #b9b5ad;
  --dim: #8f8b94;
  --violet: #b48cff;
  --violet-2: #7c4dff;
  --violet-glow: rgba(150, 100, 255, .55);
  --amber: #ffb54a;
  --serif: "Cinzel", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--silver);
  font: 400 17px/1.65 var(--sans); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
em { font-style: normal; color: var(--violet); text-shadow: 0 0 28px var(--violet-glow); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  margin: 0 0 14px; font: 600 12px/1 var(--sans); letter-spacing: .32em; text-transform: uppercase;
  color: var(--dim);
}
.eyebrow::before { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--violet); vertical-align: middle; margin-right: 12px; box-shadow: 0 0 10px var(--violet); }

/* Buttons */
.btn {
  --b: var(--line);
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 15px 26px; border-radius: 999px; border: 1px solid var(--b);
  background: rgba(255, 255, 255, .03); color: var(--silver);
  font: 600 14px/1 var(--sans); letter-spacing: .06em; text-decoration: none;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .4s, border-color .4s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .35); }
.btn--glow {
  --b: rgba(180, 140, 255, .6);
  background: linear-gradient(180deg, rgba(150, 100, 255, .32), rgba(90, 50, 200, .22));
  box-shadow: 0 0 0 1px rgba(180, 140, 255, .15) inset, 0 10px 40px -10px var(--violet-glow);
}
.btn--glow:hover { box-shadow: 0 0 0 1px rgba(180, 140, 255, .3) inset, 0 16px 60px -8px var(--violet-glow); }
.btn--ghost { background: transparent; }
.btn--small { padding: 11px 18px; font-size: 13px; }
.btn--big { padding: 19px 34px; font-size: 15px; }
.btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); animation: pulse 2s infinite; }
.link { color: var(--silver-2); font: 500 14px/1 var(--sans); letter-spacing: .06em; text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.link:hover { color: var(--silver); border-color: var(--violet); }
.chip { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font: 500 12px/1 var(--sans); letter-spacing: .08em; color: var(--dim); }
.chip--amber { color: var(--amber); border-color: rgba(255, 181, 74, .35); }
@keyframes pulse { 50% { opacity: .35; } }

/* Gate */
.gate {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; text-align: center;
  background: radial-gradient(60% 50% at 50% 55%, rgba(120, 80, 255, .16), transparent 70%), var(--ink);
  transition: opacity 1.4s var(--ease), visibility 1.4s;
  padding: 24px;
}
.gate.gone { opacity: 0; visibility: hidden; }
.gate__title { margin: 6px 0 18px; font: 900 clamp(54px, 13vw, 150px)/.9 var(--serif); letter-spacing: .06em; }
.gate__title span { display: block; background: linear-gradient(180deg, #fff, #a8a39b 70%, #5c5862); -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise 1.6s var(--ease) both; }
.gate__title span + span { animation-delay: .18s; }
.gate__sub { max-width: 30ch; margin: 0 auto 34px; color: var(--silver-2); animation: rise 1.6s .35s var(--ease) both; }
.gate__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; animation: rise 1.6s .5s var(--ease) both; }
.gate__hint { margin-top: 22px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #5f5b66; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 24px;
  padding: 18px var(--gutter);
  background: linear-gradient(180deg, rgba(6, 6, 8, .85), rgba(6, 6, 8, 0));
}
.brand { font: 700 15px/1 var(--serif); letter-spacing: .32em; text-decoration: none; color: var(--silver); }
.nav__links { margin-left: auto; display: flex; gap: 28px; }
.nav__links a { font: 500 13px/1 var(--sans); letter-spacing: .08em; color: var(--silver-2); text-decoration: none; }
.nav__links a:hover { color: var(--silver); }
.sound { display: flex; align-items: center; gap: 10px; background: none; border: 1px solid var(--line); color: var(--silver-2); border-radius: 999px; padding: 9px 14px; cursor: pointer; font: 500 12px/1 var(--sans); letter-spacing: .08em; }
.bars { display: flex; gap: 2px; align-items: flex-end; height: 12px; }
.bars i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; transition: height .3s; }
.sound[aria-pressed="true"] { color: var(--amber); border-color: rgba(255, 181, 74, .35); }
.sound[aria-pressed="true"] .bars i { animation: eq 1.1s ease-in-out infinite; }
.sound[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -.3s; }
.sound[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed="true"] .bars i:nth-child(4) { animation-delay: -.9s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

/* Hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; }
#globe { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
#globe.dragging { cursor: grabbing; }
.hero__copy { position: relative; z-index: 2; max-width: 720px; padding: 120px var(--gutter) 80px; pointer-events: none; }
.hero__copy a { pointer-events: auto; }
.hero__title { margin: 0 0 22px; font: 700 clamp(34px, 4.4vw, 64px)/1.06 var(--serif); letter-spacing: .01em; text-shadow: 0 2px 30px rgba(0, 0, 0, .9); }
.hero__sub { max-width: 44ch; margin: 0 0 34px; color: var(--silver-2); text-shadow: 0 1px 16px #000; }
.hero__cta { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.hero__drag { position: absolute; z-index: 2; bottom: 28px; right: var(--gutter); margin: 0; font: 500 11px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: #6c6873; }
.mist { position: absolute; inset: auto 0 0; height: 30%; z-index: 1; pointer-events: none;
  background: radial-gradient(70% 100% at 30% 100%, rgba(140, 90, 255, .18), transparent 70%), linear-gradient(0deg, var(--ink), transparent);
  animation: drift 16s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(4%); opacity: .7; } }

/* Globe tooltip */
.tip { position: absolute; z-index: 3; display: flex; gap: 14px; align-items: center; width: 300px; padding: 10px; border-radius: 14px;
  background: rgba(13, 13, 18, .82); border: 1px solid rgba(180, 140, 255, .3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px -20px #000, 0 0 40px -10px var(--violet-glow);
  opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; pointer-events: none; }
.tip.on { opacity: 1; transform: none; }
.tip img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; }
.tip p { margin: 0; }
.tip__no { font: 600 10px/1 var(--sans); letter-spacing: .2em; color: var(--dim); text-transform: uppercase; }
.tip__name { margin-top: 6px !important; font: 700 18px/1.1 var(--serif); }
.tip__hook { margin-top: 4px !important; font-size: 13px; line-height: 1.35; color: var(--silver-2); }

/* Sections */
section { position: relative; }
.section-head { padding: 0 var(--gutter); margin: 0 auto 70px; max-width: 1240px; }
h2 { margin: 0; font: 700 clamp(32px, 4.4vw, 58px)/1.08 var(--serif); }
.atlas { padding: 140px 0 60px; }

.place { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; max-width: 1240px; margin: 0 auto 140px; padding: 0 var(--gutter); }
.place--flip .place__art { order: 2; }
.place__art { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--ink-2);
  box-shadow: 0 40px 100px -40px #000, 0 0 0 1px var(--line); }
.place__art img { width: 100%; height: 115%; object-fit: cover; transform: translateY(var(--py, 0)) scale(1.02); transition: transform .2s linear; will-change: transform; }
.place__art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 80% at 50% 50%, transparent 55%, rgba(6, 6, 8, .65)); pointer-events: none; }
.place:hover .place__art { box-shadow: 0 40px 100px -40px #000, 0 0 0 1px rgba(180, 140, 255, .35), 0 0 80px -30px var(--violet-glow); }
.place__no { margin: 0 0 12px; font: 600 12px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--dim); }
.place h3 { margin: 0; font: 700 clamp(34px, 4vw, 54px)/1 var(--serif); }
.place__hook { margin: 12px 0 18px; font: 500 20px/1.3 var(--serif); color: var(--violet); text-shadow: 0 0 24px var(--violet-glow); }
.place__body > p:not([class]) { color: var(--silver-2); margin: 0 0 26px; }
.place__actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* Test */
.test { padding: 160px var(--gutter); overflow: hidden; text-align: center; }
.test__bg { position: absolute; inset: -10%; background-size: cover; background-position: center 40%; opacity: .5; filter: saturate(1.1); transform: scale(1.05) translateY(var(--py, 0)); }
.test::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 80% at 50% 50%, rgba(6, 6, 8, .45), rgba(6, 6, 8, .8) 70%, var(--ink) 100%); }
.test__inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.test .eyebrow::before { display: none; }
.test__sub { color: var(--silver-2); max-width: 52ch; margin: 22px auto 34px; }
.test__steps { list-style: none; display: flex; justify-content: center; gap: 30px; padding: 0; margin: 0 0 40px; flex-wrap: wrap; font-size: 14px; color: var(--silver-2); }
.test__steps span { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 10px; border-radius: 50%; border: 1px solid rgba(255, 181, 74, .5); color: var(--amber); font: 700 12px/1 var(--sans); }

/* Dispatch */
.dispatch { padding: 120px var(--gutter) 140px; }
.dispatch__card { max-width: 760px; margin: 0 auto; padding: clamp(32px, 6vw, 64px); border-radius: 24px; text-align: center;
  background: radial-gradient(90% 120% at 50% 0%, rgba(140, 90, 255, .14), transparent 60%), var(--ink-2);
  border: 1px solid var(--line); box-shadow: 0 40px 120px -50px #000; }
.dispatch__card > p:not(.eyebrow) { color: var(--silver-2); max-width: 46ch; margin: 18px auto 30px; }
.dispatch .eyebrow::before { display: none; }
.form { display: grid; grid-template-columns: 1fr auto; gap: 12px; max-width: 520px; margin: 0 auto; text-align: left; }
.form input[type=email] { min-width: 0; padding: 15px 20px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, .4); color: var(--silver); font: 400 16px/1 var(--sans); }
.form input[type=email]:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(150, 100, 255, .15); }
.consent { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: var(--dim); }
.consent input { margin-top: 3px; accent-color: var(--violet-2); }
.form__msg { grid-column: 1 / -1; margin: 0; min-height: 1.4em; font-size: 14px; color: var(--amber); text-align: center; }

/* Footer */
.foot { padding: 60px var(--gutter) 50px; border-top: 1px solid var(--line); text-align: center; color: var(--dim); }
.foot .brand { display: block; margin-bottom: 18px; }
.foot__links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; font-size: 14px; }
.foot__links a { text-decoration: none; color: var(--silver-2); }
.foot__small { max-width: 70ch; margin: 22px auto 0; font-size: 12px; color: #66626c; }

/* Film grain */
.grain { position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .06;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite; }
@keyframes grain { 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } }

/* Reveal */
.reveal { opacity: 0; transform: translateY(34px); filter: blur(6px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: none; }
.hero .reveal:nth-child(2) { transition-delay: .12s; } .hero .reveal:nth-child(3) { transition-delay: .24s; } .hero .reveal:nth-child(4) { transition-delay: .36s; }

/* Phone */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .sound { margin-left: auto; }
  .hero { align-items: end; }
  .hero__copy { padding: 0 var(--gutter) 70px; }
  .hero__drag { left: var(--gutter); right: auto; bottom: 22px; }
  .place, .place--flip { grid-template-columns: 1fr; margin-bottom: 96px; }
  .place--flip .place__art { order: 0; }
  .form { grid-template-columns: 1fr; }
  .tip { width: 260px; }
  .test { padding: 120px var(--gutter); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
}
