/* KARRAN landing page. Grim-ink "Mad World" look: burnt paper over a world of ink.
   Colour semantics follow Docs/UI/00-Sistema-de-Design.md: ember = pain/industry, blood = primary action,
   lume gold = hope ONLY (Lume, Fenda, Coroa), soul teal = death / casca. Self-hosted fonts, no external requests. */

@font-face { font-family: "Grenze Gotisch"; src: url("../assets/fonts/GrenzeGotisch-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Grenze"; src: url("../assets/fonts/Grenze-Regular-LF.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Grenze"; src: url("../assets/fonts/Grenze-SemiBold-LF.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("../assets/fonts/Alegreya-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("../assets/fonts/Alegreya-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Alegreya"; src: url("../assets/fonts/Alegreya-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --ink: #1a1512;
  --soot: #0e0a08;
  --char: #241a15;
  --umber: #3a2620;
  --panel: #2a1d16;
  --parchment: #bda37f;
  --sepia: #8a7458;
  --bone: #d8c4a0;
  --bone-hi: #efe3c9;
  --ash: #6b6660;
  --ember: #ff8a2a;
  --ember-dim: #c4651c;
  --blood: #a3201e;
  --blood-dry: #5e1a1a;
  --lume: #ffc15e;
  --soul: #4fb3a9;

  --f-display: "Grenze Gotisch", "Grenze", Georgia, serif;
  --f-title: "Grenze", Georgia, serif;
  --f-body: "Alegreya", Georgia, "Times New Roman", serif;
  --f-mono: ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
  --radius: 2px;
  --shadow-ink: 0 18px 40px rgba(0, 0, 0, .55), 0 2px 0 rgba(0, 0, 0, .6);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--soot);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: clamp(17px, 1.05vw + 12px, 19.5px);
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
/* paper grain over everything, very faint */
body::before {
  content: "";
  position: fixed; inset: 0;
  background: url("../assets/ui/grain.webp") repeat;
  background-size: 256px;
  mix-blend-mode: overlay;
  opacity: .16;
  pointer-events: none;
  z-index: 100;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bone-hi); text-decoration-color: rgba(255, 138, 42, .55); text-underline-offset: 3px; }
a:hover { color: var(--ember); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
strong { color: var(--bone-hi); font-weight: 700; }
body { font-synthesis: none; }
code, kbd { font-family: var(--f-mono); font-size: .82em; }
code { color: var(--bone-hi); background: rgba(0, 0, 0, .35); padding: .08em .35em; border-radius: var(--radius); word-break: break-all; }
.lume { color: var(--lume); }
strong.lume, .lume strong { color: var(--lume); }
.ember, strong.ember { color: var(--ember); }
.soul, strong.soul { color: var(--soul); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 300; background: var(--blood); color: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; }

/* ------------------------------------------------------------------ nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--gutter);
  transition: background .35s, box-shadow .35s, padding .35s;
}
.nav.solid {
  background: rgba(14, 10, 8, .92);
  box-shadow: 0 1px 0 rgba(216, 196, 160, .08), 0 10px 30px rgba(0, 0, 0, .5);
  padding-top: 8px; padding-bottom: 8px;
}
@supports (backdrop-filter: blur(6px)) { .nav.solid { background: rgba(14, 10, 8, .78); backdrop-filter: blur(8px); } }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bone-hi); }
.nav-brand img { width: 36px; height: 36px; filter: brightness(1.5) drop-shadow(0 0 6px rgba(255, 138, 42, .35)); }
.nav-brand span { font-family: var(--f-display); font-size: 24px; letter-spacing: .06em; opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s; }
.nav.solid .nav-brand span { opacity: 1; transform: none; }
.nav nav { margin-left: auto; }
.nav-links { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.nav-links a { font-family: var(--f-title); font-size: 17px; letter-spacing: .04em; color: var(--bone); text-decoration: none; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--ember); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav-links a:hover, .nav-links a.on { color: var(--bone-hi); }
.nav-links a:hover::after, .nav-links a.on::after { transform: scaleX(1); }
.nav-cta {
  font-family: var(--f-title); font-weight: 600; font-size: 17px; letter-spacing: .05em; color: #fff; text-decoration: none;
  padding: 7px 26px;
  border-style: solid; border-width: 6px 22px;
  border-image: url("../assets/ui/button_primary_normal.webp") 24 64 fill / 6px 22px stretch;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .6));
}
.nav-cta:hover { color: #fff; border-image-source: url("../assets/ui/button_primary_hover.webp"); }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; min-height: min(100vh, 1040px); min-height: min(100svh, 1040px);
  display: grid; place-items: center;
  padding: 92px var(--gutter) 64px;
  overflow: hidden; isolation: isolate;
}
.hero-art { position: absolute; inset: 0; z-index: -1; }
.hero-art picture, .hero-art img, .hero-art canvas { position: absolute; }
.hero-art picture { inset: 0; }
.hero-sky { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; filter: sepia(.15) contrast(1.05) brightness(.82); animation: drift 48s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); } }
.hero-wheel {
  width: 1100px; height: auto; right: -260px; top: 50%; margin-top: -560px;
  opacity: .55; mix-blend-mode: multiply; animation: spin 220s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-ruins { left: 0; right: 0; bottom: 0; width: 100%; height: 62%; object-fit: cover; object-position: 50% 100%; opacity: .95; }
.embers { inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 48%, rgba(14, 10, 8, .55), rgba(14, 10, 8, 0) 70%),
    linear-gradient(to bottom, rgba(14, 10, 8, .75) 0, rgba(14, 10, 8, 0) 22%, rgba(14, 10, 8, 0) 60%, var(--soot) 100%);
}
.hero-inner { width: 100%; max-width: 900px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.eyebrow {
  font-family: var(--f-title); font-size: 15px; letter-spacing: .32em; text-transform: uppercase; color: var(--bone);
  margin: 0 0 6px; padding: 4px 16px; text-shadow: 0 2px 6px #000;
}
.eyebrow::before, .eyebrow::after { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--ember); transform: rotate(45deg) translateY(-3px); margin: 0 14px; box-shadow: 0 0 10px var(--ember); }
.hero-logo { margin: 0; width: min(620px, 90vw); }
.hero-logo img { width: 100%; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .85)) drop-shadow(0 0 40px rgba(255, 110, 20, .18)); }
.tagline {
  font-family: var(--f-display); font-size: clamp(30px, 4.2vw, 54px); line-height: 1.05; margin: -.25em 0 .35em; color: var(--bone-hi);
  text-shadow: 0 3px 0 var(--ink), 0 0 24px rgba(0, 0, 0, .9);
}
.lede { max-width: 640px; margin: 0 auto 22px; font-size: clamp(17px, 1.2vw + 10px, 21px); color: var(--bone); text-shadow: 0 2px 10px #000, 0 0 2px #000; }

.dl { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.btn-ribbon {
  display: inline-flex; align-items: center; gap: 16px; text-decoration: none; color: #fff;
  min-width: min(440px, 100%);
  padding: 8px 34px 10px 30px;
  border-style: solid; border-width: 12px 40px;
  border-image: url("../assets/ui/button_primary_normal.webp") 24 64 fill / 12px 40px stretch;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .7)) drop-shadow(0 0 0 rgba(255, 138, 42, 0));
  transition: transform .15s, filter .25s;
  position: relative;
}
.btn-ribbon:hover, .btn-ribbon:focus-visible {
  color: #fff; transform: translateY(-2px);
  border-image-source: url("../assets/ui/button_primary_hover.webp");
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .75)) drop-shadow(0 0 18px rgba(255, 138, 42, .45));
}
.btn-ribbon:active { transform: translateY(1px); }
.btn-ribbon .ico { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .6)); }
.btn-ribbon-text { display: flex; flex-direction: column; text-align: left; line-height: 1.12; }
.btn-ribbon-main { font-family: var(--f-title); font-weight: 600; font-size: clamp(22px, 2vw + 10px, 30px); letter-spacing: .03em; text-shadow: 0 2px 0 rgba(0, 0, 0, .55); }
.btn-ribbon-sub { font-family: var(--f-title); font-size: 15.5px; letter-spacing: .06em; color: #f3d9c0; opacity: .95; }
.dl-facts { margin: 4px 0 0; font-family: var(--f-title); font-size: 16px; letter-spacing: .12em; text-transform: uppercase; color: var(--bone); text-shadow: 0 2px 6px #000; }
.sha {
  display: flex; align-items: center; gap: 10px; max-width: 100%;
  background: rgba(14, 10, 8, .72); border: 1px solid rgba(216, 196, 160, .14);
  padding: 6px 8px 6px 12px; border-radius: var(--radius);
}
.sha-label { font-family: var(--f-title); font-size: 13px; letter-spacing: .14em; color: var(--sepia); flex: none; }
.sha-value { background: none; padding: 0; font-size: 12.5px; color: var(--bone); word-break: break-all; text-align: left; }
.sha-copy {
  flex: none; font-family: var(--f-title); font-size: 14px; letter-spacing: .05em; color: var(--bone-hi); cursor: pointer;
  background: var(--umber); border: 1px solid rgba(216, 196, 160, .25); padding: 3px 12px; border-radius: var(--radius);
}
.sha-copy:hover { background: var(--blood-dry); border-color: var(--ember-dim); }
.sha-copy.ok { background: #1f3b37; border-color: var(--soul); }
.dl-more { margin: 2px 0 0; font-size: 16px; color: var(--sepia); text-shadow: 0 2px 6px #000; }
.dl-more a { color: var(--bone); }
.dl-more span { margin: 0 8px; }

.scroll-cue { position: absolute; bottom: 22px; left: 50%; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(216, 196, 160, .45); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; background: var(--ember); border-radius: 2px; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ------------------------------------------------------------------ sections */
.section { position: relative; padding: clamp(56px, 7vw, 100px) var(--gutter); max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; }
.sec-head { text-align: center; max-width: 760px; margin: 0 auto clamp(40px, 6vw, 72px); }
.kicker { font-family: var(--f-title); font-size: 15px; letter-spacing: .3em; text-transform: uppercase; color: var(--sepia); margin: 0 0 4px; }
.kicker::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--blood); transform: rotate(45deg) translateY(-3px); margin-right: 12px; }
.sec-head h2, .h-small {
  font-family: var(--f-display); font-weight: 700; color: var(--bone-hi); margin: 0; line-height: 1;
  font-size: clamp(48px, 7vw, 92px); letter-spacing: .01em;
  text-shadow: 0 4px 0 var(--ink), 0 0 30px rgba(0, 0, 0, .8);
}
.sec-head h2::after {
  content: ""; display: block; width: min(360px, 70%); height: 14px; margin: 14px auto 0;
  background:
    linear-gradient(var(--blood), var(--blood)) center / 9px 9px no-repeat,
    linear-gradient(90deg, transparent, rgba(216, 196, 160, .5) 30%, rgba(216, 196, 160, .5) 70%, transparent) center / 100% 1px no-repeat;
  -webkit-mask: none;
}
.sec-lede { margin: 18px auto 0; font-size: clamp(18px, 1.1vw + 11px, 21px); color: var(--bone); }

/* torn-paper edge used for panels and shots */
.torn { clip-path: polygon(0 1.5%, 6% 0, 14% 1.2%, 23% .2%, 34% 1.4%, 45% 0, 58% 1%, 69% .1%, 80% 1.3%, 91% .3%, 100% 1.2%, 99.4% 14%, 100% 31%, 99.3% 48%, 100% 66%, 99.5% 83%, 100% 98.6%, 92% 100%, 81% 98.9%, 70% 100%, 57% 99%, 45% 100%, 33% 98.8%, 21% 100%, 10% 99%, 0 100%, .6% 84%, 0 67%, .7% 50%, 0 33%, .5% 16%); }

/* ------------------------------------------------------------------ world: story beats */
.story { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(48px, 6vw, 84px); }
.beat { display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; gap: clamp(28px, 4vw, 64px); }
.beat:nth-child(even) { grid-template-columns: 1fr 1.35fr; }
.beat:nth-child(even) .beat-art { order: 2; }
.beat-art { margin: 0; position: relative; box-shadow: var(--shadow-ink); background: var(--ink); }
.beat-art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; filter: contrast(1.04); transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.beat:hover .beat-art img { transform: scale(1.03); }
.beat-text { position: relative; }
.beat-n {
  position: absolute; top: -.62em; left: -.08em; z-index: -1;
  font-family: var(--f-title); font-weight: 600; font-size: clamp(100px, 11vw, 150px); line-height: 1; color: rgba(216, 196, 160, .08); letter-spacing: -.02em;
}
.beat-text h3 { font-family: var(--f-display); font-size: clamp(32px, 3.2vw, 46px); line-height: 1.05; margin: 0 0 14px; color: var(--bone-hi); text-shadow: 0 3px 0 var(--ink); }
.beat-text p { margin: 0; font-size: clamp(18px, .6vw + 14px, 21px); }

.fenda { position: relative; margin: clamp(56px, 7vw, 100px) calc(-1 * var(--gutter)) 0; }
.fenda img { width: 100%; height: clamp(320px, 52vw, 640px); object-fit: cover; object-position: 50% 40%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 78%, transparent), linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 78%, transparent), linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-composite: intersect; }
.fenda figcaption { position: absolute; inset: auto 0 12%; text-align: center; padding: 0 var(--gutter); }
.fenda blockquote { margin: 0; font-family: var(--f-display); font-size: clamp(30px, 4.4vw, 62px); line-height: 1.1; color: var(--bone-hi); text-shadow: 0 4px 0 var(--ink), 0 0 30px #000, 0 0 60px #000; }

/* ------------------------------------------------------------------ the Aro */
.aro-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; }
.map-frame { margin: 0; }
.map-frame a { display: block; padding: 10px; background: #1d140f; box-shadow: var(--shadow-ink), inset 0 0 0 1px rgba(216, 196, 160, .14); transform: rotate(-.6deg); transition: transform .4s; }
.map-frame a:hover { transform: rotate(0) scale(1.01); }
.map-frame figcaption { margin-top: 12px; text-align: center; font-size: 15px; color: var(--sepia); font-style: italic; }
.aro-side p { margin: 0 0 16px; }
.rings { list-style: none; margin: 22px 0 0; padding: 0; border-left: 2px solid rgba(216, 196, 160, .16); }
.rings li { position: relative; padding: 6px 0 6px 52px; font-family: var(--f-title); font-size: 19px; color: var(--sepia); }
.rings li span { position: absolute; left: 14px; top: 7px; width: 28px; text-align: right; font-weight: 600; color: var(--ash); }
.rings li em { font-style: normal; font-size: 15px; letter-spacing: .06em; margin-left: 10px; color: var(--lume); }
.rings li.here { color: var(--bone-hi); font-weight: 600; font-size: 22px; }
.rings li.here span { color: var(--lume); }
.rings li.here::before { content: ""; position: absolute; left: -7px; top: 15px; width: 12px; height: 12px; background: var(--lume); transform: rotate(45deg); box-shadow: 0 0 14px var(--lume); }

.areas-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: clamp(56px, 7vw, 90px) 0 20px; }
.areas-head h3 { font-family: var(--f-display); font-size: clamp(30px, 3vw, 42px); margin: 0; color: var(--bone-hi); }
.note { margin: 0; max-width: 640px; font-size: 16.5px; color: var(--sepia); border-left: 3px solid var(--ember-dim); padding: 2px 0 2px 14px; }
.areas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.areas a { display: block; position: relative; text-decoration: none; color: var(--bone); background: var(--char); box-shadow: 0 10px 24px rgba(0, 0, 0, .45); height: 100%; transition: transform .25s, box-shadow .25s; overflow: hidden; }
.areas a:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 138, 42, .35); color: var(--bone); }
.areas img { width: 100%; aspect-ratio: 7 / 4; object-fit: cover; filter: saturate(.92); }
.areas strong { display: block; font-family: var(--f-title); font-size: 19px; line-height: 1.15; padding: 10px 12px 2px; color: var(--bone-hi); }
.areas a > span:last-child { display: block; padding: 0 12px 12px; font-size: 15.5px; line-height: 1.4; color: var(--sepia); }
.area-g { position: absolute; top: 8px; right: 8px; font-family: var(--f-title); font-size: 13px; letter-spacing: .08em; color: var(--bone-hi); background: rgba(14, 10, 8, .8); padding: 2px 8px; border: 1px solid rgba(216, 196, 160, .2); }

/* ------------------------------------------------------------------ features */
.feat-list { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 3vw, 36px); }
.feat {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #2b1e17, #1d1510);
  box-shadow: var(--shadow-ink), inset 0 0 0 1px rgba(216, 196, 160, .1);
}
.feat::before { content: ""; position: absolute; inset: 0; background: url("../assets/ui/grain.webp"); background-size: 256px; opacity: .12; mix-blend-mode: soft-light; pointer-events: none; }
.feat-shot { display: block; overflow: hidden; background: var(--ink); position: relative; }
.feat-shot::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 -40px 40px -20px rgba(29, 21, 16, .95); pointer-events: none; }
.feat-shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.feat-shot:hover img { transform: scale(1.04); }
.feat-text { padding: 18px clamp(18px, 2.4vw, 30px) 26px; position: relative; }
.feat-tag { margin: 0 0 4px; font-family: var(--f-title); font-size: 14px; letter-spacing: .26em; text-transform: uppercase; color: var(--sepia); }
.feat-tag.ember { color: var(--ember); }
.feat-tag.soul { color: var(--soul); }
.feat h3 { font-family: var(--f-display); font-size: clamp(28px, 2.4vw, 38px); line-height: 1.08; margin: 0 0 10px; color: var(--bone-hi); }
.feat p { margin: 0; }
.feat-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.55fr 1fr; align-items: center; }
.feat-wide .feat-shot::after { box-shadow: inset -50px 0 40px -30px rgba(29, 21, 16, .9); }
.feat-wide.rev { grid-template-columns: 1fr 1.55fr; }
.feat-wide.rev .feat-shot { order: 2; }
.feat-wide.rev .feat-shot::after { box-shadow: inset 50px 0 40px -30px rgba(29, 21, 16, .9); }
.feat-wide .feat-text { align-self: center; padding: 28px clamp(20px, 3vw, 40px); }
.feat-points { margin: 16px 0 0; padding: 0; list-style: none; }
.feat-points li { position: relative; padding-left: 22px; margin: 6px 0; font-size: .92em; color: var(--bone); }
.feat-points li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; background: var(--ember); transform: rotate(45deg); }

/* ------------------------------------------------------------------ gallery */
.grid-gal { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(120px, 12vw, 170px); grid-auto-flow: dense; gap: 10px; }
.grid-gal li { position: relative; overflow: hidden; background: var(--ink); }
.grid-gal .g-wide { grid-column: span 2; grid-row: span 2; }
.grid-gal .g-tall { grid-row: span 2; }
.grid-gal a { display: block; height: 100%; }
.grid-gal img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s, filter .4s; filter: brightness(.88) saturate(.95); }
.grid-gal a:hover img, .grid-gal a:focus-visible img { transform: scale(1.06); filter: brightness(1.04); }
.grid-gal a::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(216, 196, 160, .12); pointer-events: none; transition: box-shadow .3s; }
.grid-gal a:hover::after { box-shadow: inset 0 0 0 2px rgba(255, 138, 42, .6); }

/* ------------------------------------------------------------------ play with a friend */
.friend { background: none; }
.sec-lede code { font-size: .86em; word-break: normal; white-space: nowrap; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step {
  position: relative; padding: 26px 24px 24px 24px;
  border-style: solid; border-width: 22px 18px;
  border-image: url("../assets/ui/card_light.webp") 40 34 fill / 22px 18px stretch;
  color: #2a1e16; min-height: 220px;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .5));
}
.step:nth-child(odd) { transform: rotate(-.5deg); }
.step:nth-child(even) { transform: rotate(.45deg); }
.step-n {
  position: absolute; top: -30px; left: -12px; width: 56px; height: 56px; display: grid; place-items: center;
  font-family: var(--f-display); font-size: 30px; line-height: 1; color: #fff; background: var(--blood);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.step::before { content: ""; position: absolute; inset: 2px 0; background: rgba(240, 226, 196, .55); border-radius: 6px; z-index: -1; }
.step h3 { font-family: var(--f-display); font-size: 29px; line-height: 1.05; margin: 8px 0 8px 28px; color: #140d09; }
.step p { margin: 0; font-size: 17px; line-height: 1.5; color: #24180f; }
.step strong { color: #1a1210; }
.step a { color: var(--blood); text-decoration-color: var(--blood); font-weight: 600; }
.step kbd { background: #e6d5b4; color: var(--ink); border: 1px solid #8a7458; border-bottom-width: 3px; padding: 0 6px; border-radius: 3px; }
.step-lume .lume { color: #7a3f00; font-weight: 700; }
.step-lume::after { content: ""; position: absolute; right: -6px; top: -6px; width: 14px; height: 14px; background: var(--lume); transform: rotate(45deg); box-shadow: 0 0 18px 4px rgba(255, 193, 94, .55); }

.friend-alt { margin-top: 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.friend-alt > div { background: rgba(36, 26, 21, .85); border: 1px solid rgba(216, 196, 160, .12); padding: 22px 26px; box-shadow: var(--shadow-ink); }
.friend-alt h3 { font-family: var(--f-title); font-weight: 600; font-size: 22px; margin: 0 0 8px; color: var(--bone-hi); }
.friend-alt p { margin: 0; font-size: 17px; }

/* ------------------------------------------------------------------ info */
.info { padding-top: clamp(40px, 6vw, 80px); }
.info-grid { display: grid; grid-template-columns: 1fr 1.1fr 1.2fr; gap: 20px; }
.info-card { background: linear-gradient(180deg, #261b15, #1b130f); border: 1px solid rgba(216, 196, 160, .1); box-shadow: var(--shadow-ink); padding: 24px 24px 26px; }
.h-small { font-size: clamp(34px, 3vw, 44px); margin-bottom: 14px; }
.ticks, .dashes { list-style: none; margin: 0; padding: 0; }
.ticks li, .dashes li { position: relative; padding-left: 22px; margin: 8px 0; font-size: 16.5px; line-height: 1.45; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 7px; height: 7px; background: var(--ember); transform: rotate(45deg); }
.dashes li::before { content: ""; position: absolute; left: 0; top: .72em; width: 11px; height: 2px; background: var(--sepia); }
.keys { margin: 0; display: grid; gap: 7px; }
.keys div { display: grid; grid-template-columns: 148px 1fr; gap: 12px; align-items: center; }
.keys dt { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; margin: 0; color: var(--sepia); font-size: 14px; }
.keys dd { margin: 0; font-size: 16px; line-height: 1.3; }
kbd {
  display: inline-block; min-width: 24px; text-align: center; padding: 1px 6px 2px; border-radius: 3px;
  font-family: var(--f-title); font-weight: 600; font-size: 14px; line-height: 1.3;
  color: var(--ink); background: linear-gradient(#e9d9b8, #c9b18a); border: 1px solid #6b553c; border-bottom-width: 3px;
}
.bug { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid rgba(216, 196, 160, .12); font-size: 15.5px; color: var(--sepia); }
.bug code { font-size: .8em; }
.bug .path { display: block; margin: 6px 0; padding: 6px 8px; font-size: 12.5px; word-break: break-all; }
.bug kbd { font-size: 12px; min-width: 0; padding: 0 5px; }

.final-cta { text-align: center; margin-top: clamp(70px, 9vw, 120px); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.final-line { font-family: var(--f-display); font-size: clamp(36px, 5vw, 66px); margin: 0; color: var(--lume); text-shadow: 0 4px 0 var(--ink), 0 0 40px rgba(255, 193, 94, .35); }

/* ------------------------------------------------------------------ footer */
.footer { margin-top: clamp(60px, 8vw, 100px); background: #0a0706; border-top: 1px solid rgba(216, 196, 160, .08); }
.footer-inner { max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 48px var(--gutter) 40px; text-align: center; }
.footer-logo { width: 220px; margin: 0 auto 10px; opacity: .85; }
.footer-build { font-family: var(--f-title); font-size: 15px; letter-spacing: .06em; color: var(--sepia); margin: 0 0 22px; }
.footer-build code { background: none; padding: 0; color: var(--sepia); word-break: normal; }
.credits { max-width: 820px; margin: 0 auto; font-size: 15px; line-height: 1.55; color: #9c8a70; }
.credits p { margin: 4px 0; }
.credits strong { color: var(--bone); font-weight: 600; }
.credits a { color: var(--bone); }
.footer-privacy { margin: 22px 0 0; font-size: 14px; color: var(--ash); font-style: italic; }

/* ------------------------------------------------------------------ lightbox */
.lb { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; background: rgba(8, 6, 5, .95); }
.lb[hidden] { display: none; }
.lb-fig { margin: 0; grid-column: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; max-height: 100vh; padding: 56px 0 20px; min-width: 0; }
.lb-img { max-width: 100%; max-height: calc(100vh - 130px); width: auto; height: auto; object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, .8); background: var(--ink); }
.lb-cap { margin-top: 14px; font-family: var(--f-title); font-size: 18px; color: var(--bone); text-align: center; padding: 0 12px; }
.lb button { background: none; border: 0; color: var(--bone); cursor: pointer; display: grid; place-items: center; }
.lb button svg { width: 34px; height: 34px; }
.lb button:hover { color: var(--ember); }
.lb-prev { grid-column: 1; height: 100%; }
.lb-next { grid-column: 3; height: 100%; }
.lb-close { position: absolute; top: 10px; right: 12px; width: 48px; height: 48px; }
body.lb-open { overflow: hidden; }

/* ------------------------------------------------------------------ reveal (only once JS is running) */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .step[data-reveal].in:nth-child(odd) { transform: rotate(-.5deg); }
.js .step[data-reveal].in:nth-child(even) { transform: rotate(.45deg); }
html.framed [data-reveal] { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-sky, .hero-wheel, .scroll-cue span { animation: none; }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 16px; }
  .areas { grid-template-columns: repeat(3, 1fr); }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .info-grid .info-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .nav nav { display: none; }
  .nav-cta { margin-left: auto; }
  .nav-brand span { opacity: 1; transform: none; }
  .beat, .beat:nth-child(even), .aro-grid, .feat-list, .feat-wide, .feat-wide.rev, .friend-alt { grid-template-columns: 1fr; }
  .beat:nth-child(even) .beat-art { order: 0; }
  .beat-n { font-size: 110px; top: -.5em; }
  .feat-wide.rev .feat-shot { order: 0; }
  .feat-wide .feat-shot::after, .feat-wide.rev .feat-shot::after { box-shadow: inset 0 -40px 40px -20px rgba(29, 21, 16, .95); }
  .steps { grid-template-columns: 1fr 1fr; gap: 34px 18px; }
  .grid-gal { grid-template-columns: repeat(3, 1fr); }
  .grid-gal .g-x3 { display: none; }
  .hero-wheel { width: 760px; right: -380px; margin-top: -380px; opacity: .45; }
}
@media (max-width: 760px) {
  .areas { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 16px; scrollbar-width: thin; }
  .areas li { flex: 0 0 74%; scroll-snap-align: start; }
  .info-grid { grid-template-columns: 1fr; }
  .grid-gal { grid-template-columns: 1fr 1fr; grid-auto-rows: 26vw; }
  .grid-gal .g-tall { grid-row: span 1; }
  .hero { padding-top: 92px; padding-bottom: 80px; }
  .hero-ruins { height: 46%; }
  .eyebrow { font-size: 12px; letter-spacing: .22em; }
  .eyebrow::before, .eyebrow::after { margin: 0 8px; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  .btn-ribbon { padding: 4px 18px 6px 12px; border-width: 10px 28px; gap: 12px; min-width: 0; width: 100%; justify-content: center; }
  .btn-ribbon .ico { width: 28px; height: 28px; }
  .btn-ribbon-sub { font-size: 13.5px; letter-spacing: .03em; }
  .sha { flex-wrap: wrap; justify-content: center; }
  .sha-value { font-size: 11.5px; text-align: center; }
  .dl-facts { font-size: 13.5px; letter-spacing: .08em; }
  .lb { grid-template-columns: 40px 1fr 40px; }
  .lb button svg { width: 26px; height: 26px; }
  .nav-cta { padding: 5px 16px; }
  .nav-brand img { width: 32px; height: 32px; }
  .keys div { grid-template-columns: 1fr; gap: 2px; }
}
.btn-ribbon-sub span { white-space: nowrap; }
