/* =========================================================
   Aurelion RTS – strona gry
   Kolory i fonty: sekcja :root
   ========================================================= */
:root {
  --bg: #0e0b08;
  --bg-2: #15110c;
  --panel: #1c1611;
  --line: #3b2f21;
  --gold: #e2c172;
  --gold-2: #f6e3a6;
  --gold-3: #9c7a36;
  --ember: #ff8a3c;
  --text: #ece0c5;
  --muted: #b3a283;
  --dark-side: #8a3b3b;
  --gold-grad: linear-gradient(100deg, #9c7a36 0%, #e2c172 30%, #fff1c4 50%, #e2c172 70%, #9c7a36 100%);
  --f-display: "Cinzel", "Times New Roman", serif;
  --f-body: "Alegreya", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --nav-h: 72px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 19px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--f-display); font-weight: 700; line-height: 1.12; letter-spacing: .04em; }
h2 { font-size: clamp(1.9rem, 4.4vw, 3.2rem); text-wrap: balance; }
h2 em { font-style: normal; background: var(--gold-grad); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
h3 { font-size: 1.2rem; letter-spacing: .08em; }
p { margin: 0; }
::selection { background: var(--gold); color: #120e0a; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--gold); color: #120e0a; padding: 10px 16px; }
.skip:focus { top: 16px; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
@media (min-width: 720px) { .wrap { width: min(100% - 64px, var(--wrap)); } }
@keyframes shine { to { background-position: -220% 0; } }

.eyebrow { display: inline-flex; align-items: center; gap: 14px; font: 600 .78rem/1 var(--f-display); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.eyebrow::before, .center .eyebrow::after { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.center .eyebrow::after { background: linear-gradient(90deg, var(--gold), transparent); }

/* Przyciski */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; padding: 0 28px; font: 700 .82rem/1 var(--f-display); letter-spacing: .18em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--line); clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); transition: transform .3s var(--ease), filter .3s, background .3s; white-space: nowrap; }
.btn--gold { background: var(--gold-grad); background-size: 220% 100%; color: #1a1209; border-color: transparent; animation: shine 5s linear infinite; }
.btn--gold:hover { filter: brightness(1.12); transform: translateY(-2px); }
.btn--ghost { background: rgba(226,193,114,.06); color: var(--gold); border-color: rgba(226,193,114,.4); }
.btn--ghost:hover { background: rgba(226,193,114,.14); }
.btn--steam { background: rgba(255,255,255,.04); color: var(--muted); border-color: var(--line); cursor: default; }
.tri { width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }

/* Nawigacja */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); transition: background .4s, border-color .4s; border-bottom: 1px solid transparent; }
@media (min-width: 720px) { .nav { padding-inline: 32px; } }
.nav.scrolled { background: rgba(14,11,8,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 700 1.05rem/1 var(--f-display); letter-spacing: .26em; text-transform: uppercase; color: var(--gold); min-height: 44px; }
.crest { width: 30px; height: 34px; fill: none; stroke: var(--gold); stroke-width: 2; }
.crest .inner { fill: var(--gold); stroke: none; }
.links { display: flex; gap: 26px; }
.links a { position: relative; text-decoration: none; font: 500 .82rem/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 12px 0; transition: color .3s; }
.links a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: 4px; height: 1px; background: var(--gold); transition: left .35s var(--ease), right .35s var(--ease); }
.links a:hover { color: var(--gold-2); }
.links a:hover::after { left: 0; right: 0; }
.nav-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid rgba(226,193,114,.45); color: var(--gold); text-decoration: none; font: 700 .72rem/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase; transition: background .3s; }
.nav-cta:hover { background: rgba(226,193,114,.12); }
@media (max-width: 899px) { .links { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; justify-content: center; text-align: center; padding: calc(var(--nav-h) + 30px) 0 90px; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: -6%; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); filter: saturate(1.05) contrast(1.05); animation: kenburns 24s ease-in-out infinite alternate; }
@keyframes kenburns { to { transform: scale(1.22) translate(-2%, -1%); } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 45%, rgba(14,11,8,.35) 0%, rgba(14,11,8,.82) 60%, var(--bg) 100%), linear-gradient(to bottom, rgba(14,11,8,.6), transparent 30%, transparent 60%, var(--bg)); }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.title { font-size: clamp(3rem, 13vw, 9.5rem); font-weight: 900; letter-spacing: .14em; line-height: 1; margin: 6px 0 22px; padding-left: .14em; }
.title-letters { display: inline-block; background: var(--gold-grad); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 30px rgba(226,193,114,.35)); animation: shine 7s linear infinite; }
.js .title-letters { clip-path: inset(0 100% 0 0); transition: clip-path 1.8s var(--ease) .2s; }
.js .hero.ready .title-letters { clip-path: inset(0 0 0 0); }
.lead { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--text); max-width: 46ch; margin-bottom: 34px; text-shadow: 0 2px 20px rgba(0,0,0,.6); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 22px; }
.meta { font: 500 .78rem/1 var(--f-display); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ember { position: absolute; bottom: -10px; width: var(--s); height: var(--s); border-radius: 50%; background: radial-gradient(circle, #ffd28a, var(--ember) 45%, transparent 70%); opacity: 0; animation: rise var(--t) linear var(--dl) infinite; }
@keyframes rise { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(var(--dx), -105vh); opacity: 0; } }
.scroll { position: absolute; left: 50%; bottom: 26px; width: 24px; height: 40px; margin-left: -12px; border: 1px solid rgba(226,193,114,.5); border-radius: 12px; }
.scroll span { position: absolute; left: 50%; top: 8px; width: 2px; height: 8px; margin-left: -1px; background: var(--gold); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* Sekcje */
.section { padding: clamp(80px, 11vw, 140px) 0; position: relative; }
.head { margin-bottom: clamp(36px, 5vw, 60px); max-width: 760px; }
.head.center { text-align: center; margin-inline: auto; }
.head-lead { color: var(--muted); margin-top: 18px; max-width: 58ch; }
.head.center .head-lead { margin-inline: auto; }

/* Trailer */
.trailer { background: linear-gradient(var(--bg), var(--bg-2)); }
.frame { position: relative; padding: 10px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 40px 100px -40px rgba(226,193,114,.3); }
.frame video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.corner { position: absolute; width: 26px; height: 26px; border: 2px solid var(--gold); }
.tl { top: -6px; left: -6px; border-right: 0; border-bottom: 0; } .tr { top: -6px; right: -6px; border-left: 0; border-bottom: 0; }
.bl { bottom: -6px; left: -6px; border-right: 0; border-top: 0; } .br { bottom: -6px; right: -6px; border-left: 0; border-top: 0; }

/* O grze */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { position: relative; padding: 34px 30px; background: var(--bg); transition: background .4s; overflow: hidden; }
.feature::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(226,193,114,.12), transparent 50%); opacity: 0; transition: opacity .4s; }
.feature:hover::before { opacity: 1; }
.feature svg { width: 46px; height: 46px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 20px; transition: transform .5s var(--ease); }
.feature:hover svg { transform: translateY(-4px) scale(1.06); }
.feature h3 { margin-bottom: 10px; color: var(--gold-2); }
.feature p { color: var(--muted); }

/* Świat */
.world { background: radial-gradient(70% 60% at 85% 50%, rgba(138,59,59,.18), transparent 70%), radial-gradient(60% 60% at 10% 40%, rgba(226,193,114,.08), transparent 70%), var(--bg-2); border-block: 1px solid var(--line); }
.world-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .world-grid { grid-template-columns: .9fr 1.1fr; gap: 70px; } }
.world-copy p:not(.eyebrow) { color: var(--muted); margin-top: 20px; max-width: 48ch; }
.sides { display: grid; gap: 16px; }
@media (min-width: 640px) { .sides { grid-template-columns: 1fr 1fr; } }
.side { position: relative; padding: 30px 26px; border: 1px solid var(--line); background: rgba(14,11,8,.6); transition: transform .5s var(--ease), border-color .4s; }
.side:hover { transform: translateY(-6px); }
.side--light:hover { border-color: rgba(226,193,114,.6); }
.side--dark:hover { border-color: rgba(200,80,80,.6); }
.side-tag { font: 600 .72rem/1 var(--f-display); letter-spacing: .26em; text-transform: uppercase; margin-bottom: 14px; }
.side--light .side-tag { color: var(--gold); }
.side--dark .side-tag { color: #e08a7a; }
.side h3 { font-size: 1.15rem; margin-bottom: 12px; }
.side p:not(.side-tag) { color: var(--muted); font-size: 1rem; }

/* Galeria */
.shots { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .shots { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1100px) { .shots { grid-template-columns: repeat(4, 1fr); } .shots li:nth-child(1) { grid-column: span 2; grid-row: span 2; } .shots li:nth-child(8) { grid-column: span 2; } .shots li:nth-child(8) .shot { min-height: 100%; } .shots li:nth-child(8) img { position: absolute; inset: 0; aspect-ratio: auto; } }
.shot { all: unset; box-sizing: border-box; display: block; width: 100%; height: 100%; cursor: zoom-in; position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.shot img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; filter: saturate(.9) brightness(.9); }
.shot:hover img, .shot:focus-visible img { transform: scale(1.06); filter: none; }
.shot:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.shot-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 16px 12px; background: linear-gradient(transparent, rgba(8,6,4,.92)); display: grid; gap: 2px; transition: padding .5s var(--ease); }
.shot:hover .shot-cap, .shot:focus-visible .shot-cap { padding-bottom: 16px; }
.shot-cap b { font: 700 .9rem/1.2 var(--f-display); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-2); }
.shot-cap span { font-size: .92rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Rozwój */
.roadmap { background: var(--bg-2); border-top: 1px solid var(--line); }
.road { --p: 0; list-style: none; margin: 0; padding: 0; display: grid; gap: 34px; position: relative; }
.road::before, .road::after { content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.road::after { background: var(--gold-grad); transform-origin: top; transform: scaleY(var(--p)); box-shadow: 0 0 14px rgba(226,193,114,.6); }
.road-item { position: relative; padding-left: 44px; }
.road-dot { position: absolute; left: 0; top: 6px; width: 18px; height: 18px; transform: rotate(45deg); border: 2px solid var(--gold); background: var(--bg-2); z-index: 1; }
.road-item.done .road-dot { background: var(--gold); }
.road-item.now .road-dot { background: var(--ember); border-color: var(--ember); box-shadow: 0 0 0 0 rgba(255,138,60,.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 12px rgba(255,138,60,0); } 100% { box-shadow: 0 0 0 0 rgba(255,138,60,0); } }
.road-item b { display: block; font: 600 .72rem/1 var(--f-display); letter-spacing: .26em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.road-item.now b { color: var(--ember); }
.road-item h3 { margin-bottom: 8px; }
.road-item p { color: var(--muted); max-width: 40ch; }
@media (min-width: 960px) {
  .road { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .road::before, .road::after { left: 0; right: 0; top: 8px; bottom: auto; width: auto; height: 2px; }
  .road::after { transform-origin: left; transform: scaleX(var(--p)); }
  .road-item { padding: 44px 0 0; }
}

/* Na koniec */
.final { text-align: center; background: radial-gradient(60% 80% at 50% 100%, rgba(255,138,60,.14), transparent 70%), var(--bg); }
.final-inner { display: flex; flex-direction: column; align-items: center; }
.final p { color: var(--muted); margin: 18px 0 30px; }
.final-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* Stopka */
.footer { border-top: 1px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: .95rem; }
.footer-inner a { color: var(--gold); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.brand--small { font-size: .9rem; }

/* Powiększenie zrzutu */
.lightbox { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 56px 16px; background: rgba(6,4,2,.95); }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; gap: 10px; max-width: min(100%, 1600px); }
.lightbox img { max-height: 82vh; width: auto; margin-inline: auto; border: 1px solid var(--line); animation: lb .45s var(--ease); }
@keyframes lb { from { opacity: 0; transform: scale(.97); } }
.lightbox figcaption { text-align: center; color: var(--muted); }
.lightbox figcaption b { color: var(--gold-2); font-family: var(--f-display); letter-spacing: .1em; margin-right: 8px; }
.lb-btn { position: absolute; width: 50px; height: 50px; background: rgba(28,22,17,.8); border: 1px solid var(--line); color: var(--gold); font: 400 1.8rem/1 var(--f-body); cursor: pointer; }
.lb-btn:hover { border-color: var(--gold); }
.lb-close { top: 14px; right: 14px; } .lb-prev { left: 14px; top: 50%; margin-top: -25px; } .lb-next { right: 14px; top: 50%; margin-top: -25px; }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: 14px; margin: 0; } .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); } }

/* Wejście elementów */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: calc(var(--d, 0) * 110ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
[data-delay="1"] { --d: 1; } [data-delay="2"] { --d: 2; } [data-delay="3"] { --d: 3; } [data-delay="4"] { --d: 4; }

/* Telefon */
@media (max-width: 599px) {
  body { font-size: 18px; }
  .hero-cta { flex-direction: column; width: 100%; }
  .hero-cta .btn { width: 100%; }
  .nav-cta { display: none; }
  .feature { padding: 28px 22px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .title-letters { clip-path: none; }
  .embers { display: none; }
}
