/* Chess Ascendant website: midnight and gold, like the game's menus. */
@font-face { font-family: "Cinzel"; src: url("fonts/Cinzel-Variable.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --night: #070b1c;
  --navy: #0d1430;
  --panel: #121a3a;
  --edge: rgba(232, 178, 74, 0.28);
  --gold: #e8b24a;
  --gold-hi: #f6d58a;
  --ink: #efe8d8;
  --ink-2: #b9b3a4;
  --muted: #8a8577;
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; }
html { background: var(--night); scroll-behavior: smooth; }
body { font: 17px/1.6 "Inter", system-ui, sans-serif; color: var(--ink); background: var(--night); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold-hi); text-underline-offset: 3px; }
a:hover { color: #fff3cf; }
h1, h2, h3 { font-family: "Cinzel", serif; font-weight: 700; line-height: 1.2; color: var(--gold-hi); letter-spacing: 0.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.15rem; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--panel); padding: 8px 12px; }

/* Header */
.top { position: absolute; inset: 0 0 auto; z-index: 5; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand img { width: 46px; height: 46px; border-radius: 10px; box-shadow: 0 0 0 1px var(--edge); }
.nav { display: flex; gap: clamp(14px, 3vw, 28px); font-size: 0.95rem; }
.nav a { color: var(--ink); text-decoration: none; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); }
.nav a:hover { color: var(--gold-hi); }

/* Hero */
.hero { position: relative; min-height: min(92vh, 860px); display: grid; place-items: center; text-align: center; overflow: hidden; isolation: isolate; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7, 11, 28, 0.55) 0%, rgba(7, 11, 28, 0.15) 35%, rgba(7, 11, 28, 0.35) 70%, var(--night) 100%); }
.hero .wrap { padding-block: 120px 80px; }
.hero .logo { width: min(860px, 100%); margin-inline: auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7)); }
.hero .logo-stacked { display: none; }
.tagline { font-family: "Cinzel", serif; font-size: clamp(1.15rem, 2.6vw, 1.6rem); margin-top: 18px; color: var(--ink); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9); }
.soon { margin-top: 28px; display: inline-flex; flex-direction: column; align-items: center; gap: 12px; }
.soon .badge { font-family: "Cinzel", serif; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.9rem; color: #1a1205; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); padding: 10px 22px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5); }
.platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.platforms span { font-size: 0.85rem; padding: 4px 12px; border: 1px solid var(--edge); border-radius: 999px; background: rgba(7, 11, 28, 0.6); color: var(--ink); }

/* Sections */
section { padding-block: clamp(56px, 9vw, 96px); }
.lead { max-width: 720px; margin-inline: auto; text-align: center; }
.lead p { color: var(--ink-2); margin-top: 16px; font-size: 1.08rem; }
.story p { font-size: 1.15rem; color: var(--ink); }
.story p + p { margin-top: 14px; color: var(--ink-2); }
.divider { width: 120px; height: 1px; margin: 28px auto 0; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 40px; }
.card { background: linear-gradient(180deg, var(--panel), var(--navy)); border: 1px solid var(--edge); border-radius: 14px; padding: 22px 20px; }
.card p { color: var(--ink-2); margin-top: 8px; font-size: 0.98rem; }

.bosses { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 40px; }
.boss { text-align: center; }
.boss img { width: 100%; aspect-ratio: 1; border-radius: 14px; border: 1px solid var(--edge); background: var(--panel); }
.boss h3 { margin-top: 12px; font-size: 1rem; }
.boss p { color: var(--ink-2); font-size: 0.9rem; margin-top: 4px; line-height: 1.45; }

.courts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.court { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--edge); }
.court img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
/* The Inferno, the last court, closes the gallery as a wide banner. */
.court:last-child { grid-column: 1 / -1; }
.court:last-child img { aspect-ratio: 21 / 6; object-position: 50% 30%; }
.court span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 10px; font-family: "Cinzel", serif; font-weight: 700; color: var(--gold-hi); background: linear-gradient(transparent, rgba(7, 11, 28, 0.9)); }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.split img { border-radius: 14px; border: 1px solid var(--edge); }
.split p { color: var(--ink-2); margin-top: 14px; }

.modes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px 24px; margin-top: 36px; }
.modes li { border-left: 2px solid var(--gold); padding: 4px 0 4px 14px; color: var(--ink-2); }
.modes b { display: block; color: var(--ink); font-family: "Cinzel", serif; }

.finale { position: relative; text-align: center; min-height: min(92vh, 860px); display: grid; align-content: end; padding-block: 80px clamp(48px, 7vw, 88px); overflow: hidden; isolation: isolate; }
.finale img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.finale::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(var(--night), rgba(7, 11, 28, 0.25) 30%, rgba(7, 11, 28, 0.25) 70%, var(--night)); }
.finale h2 { font-size: clamp(2rem, 5vw, 3.2rem); text-shadow: 0 4px 18px rgba(0, 0, 0, 0.9); }

/* Plain pages (privacy, support) */
.page { padding-block: 120px 72px; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page h2 { font-size: 1.3rem; margin-top: 36px; }
.page p, .page li { color: var(--ink-2); margin-top: 12px; }
.page .meta { color: var(--muted); font-size: 0.95rem; }
.page ul { padding-left: 20px; }
.solid { background: linear-gradient(var(--navy), var(--night)); position: static; border-bottom: 1px solid var(--edge); }
.solid + main .page { padding-top: 56px; }

/* Footer */
footer { border-top: 1px solid var(--edge); padding-block: 28px 40px; color: var(--muted); font-size: 0.92rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer nav { display: flex; gap: 20px; }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--gold-hi); }

@media (max-width: 1000px) {
  .bosses { grid-template-columns: repeat(3, 1fr); }
  .courts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { font-size: 0.9rem; }
  .nav .wide { display: none; }
  .hero { min-height: 88vh; }
  .hero .logo { display: none; }
  .hero .logo-stacked { display: block; width: min(420px, 100%); margin-inline: auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7)); }
  .split { grid-template-columns: 1fr; }
  .bosses { grid-template-columns: repeat(2, 1fr); }
}

/* Motion and polish: a glass header once you scroll, a slow drift on the paintings, sections that
   rise into view, soft lifts on hover. All of it stops for people who ask for less motion. */
.top { position: fixed; transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease; }
.top.scrolled { background: rgba(7, 11, 28, 0.72); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 var(--edge); }
.top .wrap { transition: padding 0.4s ease; }
.top.scrolled .wrap { padding-block: 10px; }
.top.scrolled .brand img { width: 38px; height: 38px; }
.brand img { transition: width 0.4s ease, height 0.4s ease; }
.nav a { position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform 0.3s ease; }
.nav a:hover::after { transform: scaleX(1); }

.hero picture img { animation: drift 40s ease-in-out infinite alternate; transform-origin: 70% 40%; }
@keyframes drift { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); } }
.hero .wrap > * { animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero .wrap > :nth-child(2) { animation-delay: 0.1s; }
.hero .wrap > :nth-child(3) { animation-delay: 0.35s; }
.hero .wrap > :nth-child(4) { animation-delay: 0.6s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 22px; height: 36px; margin-left: -11px; border: 1.5px solid rgba(239, 232, 216, 0.6); border-radius: 12px; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--gold-hi); animation: cue 2s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

.soon .badge { position: relative; overflow: hidden; }
.soon .badge::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%); transform: translateX(-120%); animation: sheen 5s ease-in-out 1.5s infinite; }
@keyframes sheen { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

.card, .boss img, .court { transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease; }
.card:hover, .court:hover { transform: translateY(-4px); border-color: rgba(232, 178, 74, 0.6); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 24px rgba(232, 178, 74, 0.08); }
.boss:hover img { transform: translateY(-4px) scale(1.02); border-color: rgba(232, 178, 74, 0.6); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); }
.court img { transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.court:hover img { transform: scale(1.06); }
.card h3::before { content: ""; display: block; width: 28px; height: 2px; margin-bottom: 14px; background: var(--gold); border-radius: 2px; }

.finale img { animation: drift 50s ease-in-out infinite alternate; transform-origin: 50% 45%; }

/* Plain pages keep a solid header in the flow, so it never covers the page's title. */
.top.solid { position: sticky; top: 0; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(7, 11, 28, 0.85); }

/* Upright phones: keep the castle in the hero, not just the sky. */
@media (max-width: 760px) {
  .hero picture img { object-position: 74% 50%; transform-origin: 74% 50%; }
}

@media (max-width: 520px) {
  .courts { grid-template-columns: 1fr; }
  .court:last-child img { aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
