/* xhwgame · design A "Two worlds" (Master 2026-10-13). Plain CSS, self-hosted OFL fonts, no scripts, no third parties. */
@font-face { font-family: "Commissioner"; src: url("fonts/Commissioner.woff2?v=9558b12ee0") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("fonts/Fredoka.woff2?v=ab739ca9df") format("woff2"); font-weight: 300 700; font-display: swap; }
:root {
  color-scheme: dark;
  --ink: #f6f2ea;
  --muted: #b9b3a8;
  --night: #07090c;
  --gold: #f2c45a;
  --line: rgba(255, 255, 255, .12);
  --display: "Commissioner", "SF Pro Display", -apple-system, "Segoe UI", Roboto, sans-serif;
  --round: "Fredoka", "Commissioner", -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--ink); font: 17px/1.6 var(--sans); overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, .world:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 20; background: #fff; color: #000; padding: 6px 10px; }

/* Top bar floats over the hero */
.top { position: absolute; inset: 0 0 auto 0; z-index: 10; }
.top .wrap { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; }
.mark { font: 800 1.35rem/1 var(--display); letter-spacing: .06em; text-decoration: none; text-shadow: 0 2px 18px rgba(0, 0, 0, .45); }
.mark span { color: var(--gold); }
.top nav { display: flex; gap: 22px; font-weight: 600; font-size: .95rem; }
.top nav a { text-decoration: none; opacity: .9; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.top nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* Split hero: two worlds */
.worlds { position: relative; height: min(100svh, 920px); min-height: 620px; display: flex; overflow: hidden; background: #000; }
.world { position: relative; flex: 1 1 50%; min-width: 0; transition: flex-basis .7s cubic-bezier(.2, .8, .2, 1), filter .7s; text-decoration: none; isolation: isolate; }
.world img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transform: scale(1.08); transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); z-index: -2; }
.world::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.world.day { clip-path: polygon(0 0, 100% 0, calc(100% - 9vw) 100%, 0 100%); margin-right: -4.5vw; }
.world.day::after { background: linear-gradient(90deg, rgba(4, 26, 61, .78) 0%, rgba(4, 26, 61, .35) 55%, rgba(4, 26, 61, 0) 100%), linear-gradient(0deg, rgba(3, 12, 28, .55), transparent 45%); }
.world.night { clip-path: polygon(9vw 0, 100% 0, 100% 100%, 0 100%); margin-left: -4.5vw; }
.world.night::after { background: linear-gradient(270deg, rgba(2, 10, 6, .86) 0%, rgba(2, 10, 6, .4) 55%, rgba(2, 10, 6, 0) 100%), linear-gradient(0deg, rgba(0, 0, 0, .6), transparent 45%); }
.worlds:hover .world { filter: saturate(.65) brightness(.7); }
.worlds .world:hover, .worlds .world:focus-visible { flex-basis: 64%; filter: none; }
.worlds .world:hover img.art { transform: scale(1); }
.copy { position: absolute; bottom: clamp(56px, 11vh, 120px); max-width: 30rem; }
.day .copy { left: clamp(16px, 5vw, 72px); }
.night .copy { right: clamp(16px, 5vw, 72px); text-align: right; }
.kicker { display: inline-block; font: 700 .75rem/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; padding: 8px 12px; border-radius: 99px; background: rgba(0, 0, 0, .38); border: 1px solid rgba(255, 255, 255, .25); }
.copy h2 { margin: 14px 0 10px; font: 900 clamp(2.4rem, 5.6vw, 4.8rem)/.95 var(--display); letter-spacing: -.01em; }
.copy p { margin: 0 0 18px; font-size: clamp(1rem, 1.6vw, 1.15rem); color: rgba(255, 255, 255, .9); text-shadow: 0 2px 16px rgba(0, 0, 0, .6); }
.t-day.copy h2, h2.t-day { background: linear-gradient(180deg, #fff 30%, #cfe9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2.t-night { font-family: var(--round); font-weight: 700; background: linear-gradient(180deg, #fff3c4 10%, #ffb33d 70%, #e0781c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.go { display: inline-flex; gap: 10px; align-items: center; font-weight: 700; padding: 12px 20px; border-radius: 99px; background: #fff; color: #0b1830; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .3s, box-shadow .3s; }
.night .go { background: linear-gradient(180deg, #ffd879, #ffb33d); color: #2a1300; }
.world:hover .go { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.go::after { content: "→"; transition: transform .3s; }
.world:hover .go::after { transform: translateX(4px); }
.seal { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 5; text-align: center; pointer-events: none; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
/* Follow the seam when one world opens up (hover only; :has is an enhancement) */
.worlds:has(.day:hover) .seal { transform: translate(calc(-50% + 12vw), -50%); }
.worlds:has(.night:hover) .seal { transform: translate(calc(-50% - 12vw), -50%); }
.orb { position: relative; width: clamp(170px, 16vw, 230px); aspect-ratio: 1; margin: 0 auto; }
.orb > * { position: absolute; inset: 0; border-radius: 50%; }
/* A thin spinning ring that runs sea blue → gold → ember → jade, with a soft glow copy behind it */
.halo { background: conic-gradient(from 0deg, #5cc8ff, #f2c45a, #ffb33d, #19c37d, #5cc8ff); -webkit-mask: radial-gradient(circle, transparent 61%, #000 62%, #000 66%, transparent 67%); mask: radial-gradient(circle, transparent 61%, #000 62%, #000 66%, transparent 67%); animation: spin 9s linear infinite; will-change: transform; }
.halo::after { content: ""; position: absolute; inset: -6%; border-radius: 50%; background: inherit; -webkit-mask: radial-gradient(circle, transparent 52%, #000 60%, #000 66%, transparent 74%); mask: radial-gradient(circle, transparent 52%, #000 60%, #000 66%, transparent 74%); filter: blur(10px); opacity: .7; }
.words { width: 100%; height: 100%; animation: spin 40s linear infinite reverse; will-change: transform; overflow: visible; }
.words text { fill: rgba(255, 255, 255, .78); font: 700 10.4px var(--sans); letter-spacing: .28em; }
.orbit { animation: spin 6s linear infinite; will-change: transform; }
.spark { position: absolute; left: 50%; top: -3px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; }
.spark.sea { background: #bfeaff; box-shadow: 0 0 14px 4px rgba(92, 200, 255, .9); }
.spark.ember { top: auto; bottom: -3px; background: #ffe2a3; box-shadow: 0 0 14px 4px rgba(255, 179, 61, .9); }
.core { inset: 20%; display: grid; place-content: center; background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .28), rgba(255, 255, 255, .05) 58%), radial-gradient(circle, rgba(10, 14, 22, .82), rgba(10, 14, 22, .92));
  border: 1px solid rgba(255, 255, 255, .3); box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 0 30px rgba(242, 196, 90, .25); }
.core::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 50%, rgba(92, 200, 255, .45), transparent 60%); opacity: .35; transition: opacity .6s; }
.core::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 70% 50%, rgba(255, 179, 61, .45), transparent 60%); opacity: .35; transition: opacity .6s; }
.worlds:has(.day:hover) .core::before, .worlds:has(.night:hover) .core::after { opacity: 1; }
.worlds:has(.day:hover) .core::after, .worlds:has(.night:hover) .core::before { opacity: .05; }
.core b { position: relative; z-index: 1; font: 900 clamp(1.3rem, 2vw, 1.8rem)/1 var(--display); letter-spacing: .08em; background: linear-gradient(90deg, #cfeeff, #fff 45%, #ffe2a3); -webkit-background-clip: text; background-clip: text; color: transparent; }
.core small { position: relative; z-index: 1; display: block; margin-top: 6px; font: 600 .62rem/1.2 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.seal .tag { margin-top: 16px; padding: 6px 14px; border-radius: 99px; background: rgba(0, 0, 0, .4); font: 800 clamp(1rem, 1.6vw, 1.25rem)/1.2 var(--display); letter-spacing: .02em; animation: tagglow 6s ease-in-out infinite; }
@keyframes tagglow { 50% { box-shadow: 0 0 0 1px rgba(242, 196, 90, .35), 0 0 30px rgba(242, 196, 90, .25); } }
@keyframes spin { to { transform: rotate(1turn); } }
.scroll-hint { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 6; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(255, 255, 255, .7); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* One section per game */
section.game { position: relative; padding: clamp(72px, 10vw, 140px) 0; overflow: hidden; }
section.game.t-day { background: radial-gradient(80% 60% at 15% 20%, rgba(27, 127, 224, .35), transparent 60%), radial-gradient(60% 50% at 90% 90%, rgba(242, 196, 90, .16), transparent 60%), linear-gradient(180deg, #06101f, #071a33); }
section.game.t-night { background: radial-gradient(70% 60% at 85% 25%, rgba(255, 179, 61, .22), transparent 60%), radial-gradient(70% 60% at 10% 90%, rgba(25, 195, 125, .22), transparent 60%), linear-gradient(180deg, #050b08, #071510); }
.game .grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.game.flip .grid { grid-template-columns: 1fr 1.05fr; }
.game.flip .text { order: 2; }
.eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.eyebrow img { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .12); }
.eyebrow span { font: 700 .78rem/1.35 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.game h3 { margin: 0 0 14px; font: 900 clamp(2.2rem, 4.6vw, 3.8rem)/1.02 var(--display); letter-spacing: -.01em; color: #fff; }
.game.t-night h3 { font-family: var(--round); font-weight: 700; }
.game h3 em { font-style: normal; color: var(--accent); }
.game .lede { font-size: 1.12rem; color: rgba(246, 242, 234, .88); max-width: 34rem; margin: 0 0 26px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 28px; padding: 0; list-style: none; max-width: 34rem; }
.facts li { padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.facts b { display: block; font: 800 1.35rem/1.1 var(--display); color: var(--accent); }
.facts span { font-size: .9rem; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.status { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: .95rem; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent2, var(--gold)); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(242, 196, 90, .7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(242, 196, 90, 0); } }
.more { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; padding: 11px 18px; border-radius: 99px; text-decoration: none; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .06); transition: background .3s, transform .3s; }
.more::after { content: "→"; }
.more:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px); }

/* Fanned phones */
.phones { position: relative; height: clamp(420px, 46vw, 600px); perspective: 1400px; }
.phone { position: absolute; top: 50%; left: 50%; width: clamp(150px, 15.5vw, 220px); aspect-ratio: 520 / 1130; border-radius: 28px; overflow: hidden;
  border: 6px solid #0b0d10; background: #0b0d10; box-shadow: 0 40px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .12); transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone:nth-child(2) { transform: translate(-120%, -46%) rotateY(18deg) rotateZ(-8deg); }
.phone:nth-child(3) { transform: translate(-50%, -54%) translateZ(60px); z-index: 2; }
.phone:nth-child(4) { transform: translate(20%, -46%) rotateY(-18deg) rotateZ(8deg); }
.phones:hover .phone:nth-child(2) { transform: translate(-135%, -44%) rotateY(10deg) rotateZ(-11deg); }
.phones:hover .phone:nth-child(4) { transform: translate(35%, -44%) rotateY(-10deg) rotateZ(11deg); }
.glow { position: absolute; inset: 15% 10%; border-radius: 50%; filter: blur(60px); background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 65%); }

/* Contact and footer */
.contact { padding: clamp(72px, 9vw, 120px) 0; text-align: center; background: linear-gradient(180deg, #071510, var(--night)); }
.contact h4 { margin: 0 0 12px; font: 900 clamp(2rem, 5vw, 3.6rem)/1.05 var(--display); }
.contact h4 span { background: linear-gradient(90deg, #5cc8ff, var(--gold), #ffb33d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact p { color: var(--muted); margin: 0 0 26px; }
.mail { display: inline-block; font: 700 clamp(1.05rem, 2.4vw, 1.4rem)/1 var(--display); padding: 18px 28px; border-radius: 99px; text-decoration: none; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); transition: background .3s, transform .3s; overflow-wrap: anywhere; }
.mail:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }
footer { border-top: 1px solid var(--line); padding: 26px 0 36px; color: #8a857c; font-size: .82rem; }
footer a { color: #b9b3a8; }

/* Intro page for a game */
.intro-hero { position: relative; min-height: min(86svh, 780px); display: flex; align-items: flex-end; isolation: isolate; overflow: hidden; }
.intro-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); z-index: -2; }
.intro-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--night) 0%, rgba(7, 9, 12, .55) 45%, rgba(7, 9, 12, .15) 100%); }
.intro-hero .wrap { width: 100%; padding-bottom: clamp(40px, 7vw, 80px); }
.intro-hero .app { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.intro-hero .app img { width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .15); }
.intro-hero h1 { margin: 0; font: 700 clamp(2.6rem, 7vw, 5.4rem)/.95 var(--round); background: linear-gradient(180deg, #fff3c4 10%, var(--accent) 70%, #e0781c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro-hero .sub { margin: 6px 0 0; font: 700 .85rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.intro-hero .promo { margin: 18px 0 22px; max-width: 36rem; font-size: clamp(1.05rem, 2vw, 1.3rem); color: rgba(255, 255, 255, .92); }
.panes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: clamp(40px, 6vw, 80px) 0; }
.pane { border-radius: 20px; padding: 24px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.pane h3 { margin: 0 0 12px; font: 700 1.35rem/1.15 var(--round); color: var(--accent); }
.pane ul { margin: 0; padding-left: 1.1em; color: rgba(246, 242, 234, .88); }
.pane li { margin: 0 0 8px; }
.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding-bottom: clamp(48px, 7vw, 96px); }
.shots img { width: 100%; height: auto; aspect-ratio: 520 / 1130; object-fit: cover; border-radius: 22px; border: 5px solid #0b0d10; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.back { display: inline-block; margin-top: 8px; color: var(--muted); }

@media (max-width: 860px) {
  .worlds { flex-direction: column; height: auto; min-height: 0; }
  .world { min-height: 66svh; }
  .world.day { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 9vw)); margin: 0 0 -4.5vw; }
  .world.night { clip-path: polygon(0 9vw, 100% 0, 100% 100%, 0 100%); margin: -4.5vw 0 0; }
  .worlds:hover .world, .worlds .world:hover { filter: none; flex-basis: auto; }
  .day .copy, .night .copy { left: 16px; right: 16px; text-align: left; bottom: 64px; max-width: none; }
  .night .copy { bottom: 40px; }
  .seal { top: calc(66svh - 4.5vw); left: auto; right: 16px; transform: translateY(-50%); }
  .kicker { letter-spacing: .1em; font-size: .68rem; }
  .orb { width: 112px; }
  .words { display: none; }
  .core b { font-size: 1rem; } .core small { font-size: .5rem; letter-spacing: .22em; }
  .seal .tag, .scroll-hint { display: none; }
  .game .grid, .game.flip .grid { grid-template-columns: 1fr; }
  .game.flip .text { order: 0; }
  .phones { height: 360px; }
  .phone { width: 124px; border-radius: 20px; border-width: 4px; }
  .phone:nth-child(2) { transform: translate(-112%, -46%) rotateY(18deg) rotateZ(-8deg); }
  .phone:nth-child(4) { transform: translate(12%, -46%) rotateY(-18deg) rotateZ(8deg); }
  .panes { grid-template-columns: 1fr; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
