/* Awakened Rift — the home page. Night city, gold of the Head's armour, violet of the Rift, cyan of the Gift.
   The legal pages keep style.css; this file is the home page only. */
:root {
  --ink: #05060c;
  --ink-2: #0b0d1c;
  --panel: rgba(17, 20, 40, .62);
  --line: rgba(233, 199, 123, .22);
  --line-hi: rgba(233, 199, 123, .55);
  --gold: #e2bd6e;
  --gold-hi: #f6dfa4;
  --violet: #9b6bff;
  --violet-deep: #4b1f9e;
  --cyan: #67ecf7;
  --text: #ece9f6;
  --muted: #aeaacb;
  --radius: 18px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; background: var(--ink); color: var(--text); overflow-x: clip;
  font: 400 17px/1.65 "Exo 2", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--cyan); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header: transparent over the art, glass once the page scrolls ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  transition: background .4s, padding .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.top.scrolled { padding-top: 10px; padding-bottom: 10px; background: rgba(5, 6, 12, .72);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--gold-hi); text-decoration: none;
  font: 600 14px/1 "Cinzel", Georgia, serif; letter-spacing: .2em; text-transform: uppercase; }
.brand img { width: 32px; height: 32px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line), 0 6px 20px rgba(0,0,0,.5); }
.nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav a { color: rgba(236, 233, 246, .78); text-decoration: none; transition: color .2s; }
.nav a:hover { color: var(--gold-hi); }
/* the language menu (8 languages; tools/sync_pages.mjs writes it into every page) */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px;
  border-radius: 999px; font-size: 13px; letter-spacing: .08em; color: var(--gold-hi); border: 1px solid var(--line); background: rgba(5,6,12,.35); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.lang-menu[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; margin: 0; padding: 6px; list-style: none; min-width: 176px;
  border-radius: 14px; background: rgba(10, 12, 24, .97); box-shadow: 0 0 0 1px var(--line) inset, 0 18px 50px rgba(0,0,0,.6); }
.lang-menu li a { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 8px 12px; border-radius: 9px;
  color: var(--text); text-decoration: none; font-size: 14px; letter-spacing: 0; }
.lang-menu li a span { color: var(--muted); font-size: 11px; letter-spacing: .1em; }
.lang-menu li a:hover { background: rgba(226,189,110,.12); color: var(--gold-hi); }
.lang-menu li a[aria-current] { color: var(--gold-hi); background: rgba(226,189,110,.16); }

/* Japanese and Chinese: Noto for the characters (Cinzel and Exo 2 keep the Latin letters), less letter-spacing */
html:lang(ja) body { font-family: "Exo 2", "Noto Sans JP", system-ui, sans-serif; }
html:lang(zh-Hans) body { font-family: "Exo 2", "Noto Sans SC", system-ui, sans-serif; }
html:lang(ja) :is(h1, h2, h3, .tagline, .ghost) { font-family: "Cinzel", "Noto Serif JP", serif; letter-spacing: .02em; }
html:lang(zh-Hans) :is(h1, h2, h3, .tagline, .ghost) { font-family: "Cinzel", "Noto Serif SC", serif; letter-spacing: .02em; }
html:lang(ja) :is(.kicker, .crests-title, .globe-hint, .scroll-cue), html:lang(zh-Hans) :is(.kicker, .crests-title, .globe-hint, .scroll-cue) { letter-spacing: .14em; }

/* ---------- hero: the key art in depth ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; isolation: isolate; }
.hero-stage { position: absolute; inset: 0; z-index: -1; background: #000; }
.hero-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 45%; }
.hero-gl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.hero-gl.on { opacity: 1; }
.hero-shade { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 18% 38%, rgba(5,6,12,.78), rgba(5,6,12,0) 58%),
    linear-gradient(180deg, rgba(5,6,12,.55) 0%, rgba(5,6,12,0) 18%, rgba(5,6,12,0) 62%, var(--ink) 100%); }
.hero-copy {
  position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center;
  width: min(560px, 100%); padding: 96px var(--gutter) 120px;
  will-change: transform, opacity;
}
.logo { margin: 0 0 6px; width: clamp(220px, 22vw, 320px); }
.logo img { width: 100%; height: auto; filter: drop-shadow(0 8px 40px rgba(155, 107, 255, .35)); }
.tagline { margin: 0 0 14px; font: 600 clamp(22px, 2.5vw, 32px)/1.2 "Cinzel", Georgia, serif; color: var(--gold-hi);
  letter-spacing: .02em; text-wrap: balance; text-shadow: 0 2px 24px rgba(0,0,0,.85); }
.lead { margin: 0 0 28px; max-width: 46ch; color: rgba(236,233,246,.9); text-shadow: 0 1px 14px rgba(0,0,0,.9); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* intro: the logo comes out of the light, then the words */
.intro .logo { opacity: 0; transform: scale(.94); filter: blur(8px); }
.intro .tagline, .intro .lead, .intro .cta { opacity: 0; transform: translateY(14px); }
.ready .logo { opacity: 1; transform: none; filter: none; transition: opacity 1.4s ease .3s, transform 1.8s cubic-bezier(.2,.7,.2,1) .3s, filter 1.4s ease .3s; }
.ready .tagline { opacity: 1; transform: none; transition: opacity .9s ease 1.1s, transform .9s ease 1.1s; }
.ready .lead { opacity: 1; transform: none; transition: opacity .9s ease 1.3s, transform .9s ease 1.3s; }
.ready .cta { opacity: 1; transform: none; transition: opacity .9s ease 1.5s, transform .9s ease 1.5s; }
.logo { position: relative; }
.logo::after { /* one pass of light over the gold */
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(105deg, transparent 35%, rgba(255,240,200,.55) 50%, transparent 65%) no-repeat;
  background-size: 250% 100%; background-position: 160% 0;
  -webkit-mask: url(/assets/hero/logo.webp) center / contain no-repeat; mask: url(/assets/hero/logo.webp) center / contain no-repeat;
}
.ready .logo::after { animation: sheen 2.4s ease 1.2s 1 both; }
@keyframes sheen { to { background-position: -60% 0; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 24px; border-radius: 999px;
  font-weight: 600; letter-spacing: .04em; text-decoration: none; cursor: pointer; border: 0; white-space: nowrap; }
.btn-play { position: relative; overflow: hidden; color: #1a1205;
  background: linear-gradient(180deg, #ffe7ad, var(--gold) 55%, #b98a3c);
  box-shadow: 0 0 0 1px rgba(255,231,173,.6) inset, 0 10px 34px rgba(226,189,110,.35); transition: transform .2s, box-shadow .2s; }
.btn-play:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255,231,173,.8) inset, 0 14px 44px rgba(226,189,110,.5); }
.btn-play::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.6) 50%, transparent 70%); animation: glint 4.5s ease-in-out 3s infinite; }
@keyframes glint { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.btn-play .ico { position: relative; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(26,18,5,.88); }
.btn-play .ico::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid rgba(26,18,5,.55); animation: ring 2.2s ease-out infinite; }
@keyframes ring { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.btn-play .ico::before { content: ""; margin-left: 3px; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--gold-hi); }
.btn-soon { color: var(--text); background: rgba(10,12,26,.55); box-shadow: 0 0 0 1px var(--line) inset;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: default; }
.btn-soon i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px;
  color: rgba(236,233,246,.6); text-decoration: none; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; }
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(180deg, rgba(246,223,164,0), var(--gold-hi)); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: #fff; animation: drip 2.2s ease-in-out infinite; }
@keyframes drip { to { top: 110%; } }

/* ---------- the world: the globe with the opening Rifts ---------- */
.world { position: relative; padding: clamp(80px, 12vw, 160px) var(--gutter) clamp(60px, 9vw, 120px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: center;
  max-width: 1440px; margin: 0 auto; }
.world::before { content: ""; position: absolute; inset: -10% 0; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 45% at 68% 50%, rgba(75,31,158,.38), rgba(5,6,12,0) 70%),
              radial-gradient(30% 30% at 10% 20%, rgba(103,236,247,.07), rgba(5,6,12,0) 70%); }
.kicker { margin: 0 0 14px; display: inline-flex; align-items: center; gap: 12px; color: var(--violet); font-weight: 600;
  font-size: 13px; letter-spacing: .32em; text-transform: uppercase; }
.kicker::before { content: ""; width: 34px; height: 1px; background: currentColor; }
.world h2 { margin: 0 0 22px; font: 600 clamp(32px, 4.4vw, 58px)/1.08 "Cinzel", Georgia, serif; color: var(--gold-hi);
  text-wrap: balance; }
.world p { margin: 0 0 16px; color: rgba(236,233,246,.86); max-width: 52ch; }
/* the world's two lines: a thin gold rule instead of icons */
.lines { margin: 26px 0 0; padding-left: 18px; border-left: 1px solid; border-image: linear-gradient(180deg, var(--gold), rgba(155,107,255,.6), transparent) 1; }
.lines p { margin: 0 0 10px; color: var(--muted); }
.lines b { color: var(--gold-hi); font-weight: 600; }

/* the seven worlds: the game's own crests */
.crests { margin-top: 30px; }
.crests-title { margin: 0 0 12px !important; font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold) !important; }
.crests ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 66px)); gap: 6px; }
.crests li { position: relative; animation: bob 4.8s ease-in-out infinite; }
.crests li:nth-child(2) { animation-delay: -.7s; } .crests li:nth-child(3) { animation-delay: -1.4s; } .crests li:nth-child(4) { animation-delay: -2.1s; }
.crests li:nth-child(5) { animation-delay: -2.8s; } .crests li:nth-child(6) { animation-delay: -3.5s; } .crests li:nth-child(7) { animation-delay: -4.2s; }
.crests img { width: 100%; height: auto; filter: drop-shadow(0 6px 14px rgba(0,0,0,.6)); transition: transform .3s, filter .3s; }
.crests li:hover img { transform: scale(1.18) translateY(-4px); filter: drop-shadow(0 0 18px rgba(246,223,164,.45)) drop-shadow(0 6px 14px rgba(0,0,0,.6)); }
.crests span { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 4px); white-space: nowrap; font-size: 12px; color: var(--gold-hi);
  opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; }
.crests li:hover span { opacity: 1; transform: translate(-50%, 0); }
@keyframes bob { 50% { transform: translateY(-5px); } }

/* a huge faint word behind a section's title */
.ghost { position: absolute; z-index: -1; pointer-events: none; user-select: none; white-space: nowrap;
  font: 700 clamp(96px, 13vw, 210px)/.8 "Cinzel", Georgia, serif; letter-spacing: .02em; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 1px rgba(226, 189, 110, .11);
  background: linear-gradient(180deg, rgba(226,189,110,.07), rgba(226,189,110,0) 70%); -webkit-background-clip: text; background-clip: text; }
.world-copy { position: relative; }
.world-copy .ghost { left: -.08em; top: -.55em; }

.globe-wrap { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 760px; justify-self: center; }
.globe { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; opacity: 0; transition: opacity 1.2s ease; }
.globe:active { cursor: grabbing; }
.globe-still { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; transition: opacity 1.2s ease; }   /* a frame of the live planet */
.globe-wrap.gl .globe { opacity: 1; }
.globe-wrap.gl .globe-still { opacity: 0; }
.rift-tag { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; white-space: nowrap;
  padding: 6px 12px 6px 10px; border-radius: 999px; font-size: 13px; letter-spacing: .04em; color: #fff;
  background: rgba(20, 8, 44, .78); box-shadow: 0 0 0 1px rgba(155,107,255,.6) inset, 0 6px 24px rgba(75,31,158,.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transform: translate(-50%, -150%) scale(.9); transition: opacity .35s, transform .35s; }
.rift-tag.on { opacity: 1; transform: translate(-50%, -170%) scale(1); }
.rift-tag::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%;
  background: #d9b8ff; box-shadow: 0 0 10px #b48cff; vertical-align: 1px; }
.globe-hint { position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%); margin: 0; font-size: 12px; letter-spacing: .2em;
  text-transform: uppercase; color: rgba(174,170,203,.6); white-space: nowrap; transition: opacity .6s; }
.globe-wrap.touched .globe-hint { opacity: 0; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .12s; } .reveal.d2 { transition-delay: .24s; } .reveal.d3 { transition-delay: .36s; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-in { max-width: 1440px; margin: 0 auto; padding: 30px var(--gutter); display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: space-between; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--gold-hi); }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- the trailer ---------- */
.trailer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--gutter);
  background: rgba(3, 3, 8, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .35s; }
.trailer[hidden] { display: none; }
.trailer.on { opacity: 1; }
.trailer-box { position: relative; width: min(1200px, 100%); }
.trailer video { width: 100%; height: auto; aspect-ratio: 1280 / 590; border-radius: 14px; background: #000;
  box-shadow: 0 0 0 1px var(--line), 0 30px 120px rgba(75,31,158,.55); }
.trailer-close { position: absolute; right: 0; top: -54px; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.08); box-shadow: 0 0 0 1px var(--line) inset; font-size: 22px; line-height: 1; color: var(--text); }
.trailer-close:hover { background: rgba(255,255,255,.16); }

/* ---------- phones ---------- */
@media (max-width: 900px) {
  .world { grid-template-columns: 1fr; padding-top: 72px; }
  .globe-wrap { order: -1; max-width: 560px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top { padding: 12px 16px; }
  .top.scrolled { padding-top: 8px; padding-bottom: 8px; }
  .brand span, .nav .hide-sm { display: none; }
  .nav { gap: 14px; font-size: 14px; }
  .hero-copy { justify-content: flex-end; width: 100%; padding: 64px 16px 40px; }
  .hero-shade { background: linear-gradient(180deg, rgba(5,6,12,.5) 0%, rgba(5,6,12,0) 14%, rgba(5,6,12,0) 46%, rgba(5,6,12,.88) 72%, var(--ink) 100%); }
  .hero-fallback { object-position: 58% 40%; }
  .logo { width: min(38vw, 160px); margin: 0 auto auto; }   /* the logo up top, the words at the bottom, the Head between */
  .tagline { font-size: 22px; }
  .lead { font-size: 15px; line-height: 1.55; margin-bottom: 20px; }
  .cta { gap: 10px; }
  .btn { height: 48px; padding: 0 20px; }
  .scroll-cue { display: none; }
  .crests ul { gap: 4px; }
  .ghost { font-size: 18vw; }
  .world { padding-left: 16px; padding-right: 16px; }
  .foot-in { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .intro .logo, .intro .tagline, .intro .lead, .intro .cta, .reveal { opacity: 1; transform: none; filter: none; }
  .btn-play::after, .btn-play .ico::after, .scroll-cue i::after, .btn-soon i, .crests li { animation: none; }
}
