/* Domino Nights, the landing page (second version, after Ignacio's review of 2026-11-20).
   A light page with one container, the game's own buttons (a lit face over a darker lip, as its pills are drawn),
   a laptop and a phone with real screenshots, and cards. Colours come from the game (src/ui/theme.ts). */

:root {
  --page: #ffffff;
  --card: #ffffff;
  --band: #f6f4f0;
  --ink: #2b1d14;
  --soft: #6b5a4c;
  --line: #ece8e1;
  --gold: #f2c14e;
  --gold-top: #f8d77e;
  --gold-lip: #b98a2b;
  --ivory-top: #fffaf0;
  --ivory: #f4ecdc;
  --ivory-lip: #c7b897;
  --brown: #5a3a22;
  --brown-top: #74502f;
  --brown-lip: #2e1c0f;
  --night: #1a110b;
  --link: #8a5a12;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: clamp(40px, 5.4vw, 72px);
  --heading: clamp(30px, 3.4vw, 46px);
  --sub: clamp(19px, 1.6vw, 22px);
  --body: 17px;
  --small: 15px;

  --width: 1200px;
  --pad: clamp(16px, 4vw, 32px);
  --section: clamp(72px, 9vw, 120px);
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(43, 29, 20, 0.05), 0 10px 28px -12px rgba(43, 29, 20, 0.16);
  --shadow-lg: 0 2px 4px rgba(43, 29, 20, 0.08), 0 28px 56px -24px rgba(43, 29, 20, 0.32);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 var(--body)/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--brown); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--gold); color: var(--ink); }
.wrap { width: 100%; max-width: calc(var(--width) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--pad); top: 12px; z-index: 60; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }

/* The game's button: a lit face on a darker lip. Pressed, the face goes down onto the lip. */
.btn {
  --top: var(--gold-top); --face: var(--gold); --lip: var(--gold-lip); --text: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border-radius: 16px;
  background: linear-gradient(var(--top), var(--face)); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 4px 0 var(--lip), 0 10px 18px -8px rgba(43, 29, 20, 0.45);
  font: 700 17px/1 var(--font); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
  transition: transform 140ms var(--ease), box-shadow 140ms var(--ease), filter 160ms ease;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 1px 0 var(--lip), 0 4px 8px -6px rgba(43, 29, 20, 0.45); }
.btn-lg { min-height: 64px; padding: 0 44px; font-size: 20px; border-radius: 20px; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; border-radius: 13px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 3px 0 var(--lip); }
.btn-brown { --top: var(--brown-top); --face: var(--brown); --lip: var(--brown-lip); --text: #fbf3e4; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 0 var(--lip), 0 10px 18px -8px rgba(43, 29, 20, 0.5); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

/* Navigation: one compact row. Name left, links centred, language and the action right. */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.88); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; }
.nav .mark { justify-self: start; }
.nav .mark img { height: 40px; width: auto; }
.nav .links { display: flex; gap: 4px; }
.nav .links a { display: block; padding: 8px 14px; border-radius: 10px; font-size: var(--small); font-weight: 500; color: var(--soft); text-decoration: none; transition: color 150ms ease, background-color 150ms ease; }
.nav .links a:hover { color: var(--ink); background: var(--band); }
.nav .right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 12px; font-size: var(--small); font-weight: 600; border: 1px solid var(--line); background: var(--card); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 16px; height: 16px; color: var(--soft); }
.lang[open] summary { background: var(--band); }
.lang ul { position: absolute; right: 0; top: 46px; min-width: 160px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.lang ul a { display: block; padding: 9px 12px; border-radius: 9px; font-size: var(--small); text-decoration: none; }
.lang ul a:hover { background: var(--band); }
.lang ul a[aria-current="true"] { font-weight: 700; background: var(--band); }

/* Hero: words on the left, the two devices on the right, all on the first screen. */
.hero { position: relative; padding: clamp(28px, 4vw, 56px) 0 clamp(40px, 5vw, 72px); background: radial-gradient(60% 70% at 78% 40%, rgba(242, 193, 78, 0.16), rgba(242, 193, 78, 0) 70%), linear-gradient(#fff, #fbfaf7); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(24px, 4vw, 56px); align-items: center; min-height: min(calc(100svh - 64px - 96px), 720px); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 14px; font-weight: 500; color: var(--soft); }
.pill b { color: #e0a424; letter-spacing: 1px; font-weight: 700; }
.hero h1 { margin-top: 18px; font-size: clamp(40px, 4.8vw, 68px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.02; }
.hero .lead { margin-top: 16px; max-width: 32rem; font-size: var(--sub); line-height: 1.45; color: var(--soft); }
.hero .cta { margin-top: 26px; }
.points { margin-top: 22px; display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 6px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: var(--small); font-weight: 600; }
.points li { display: flex; align-items: center; gap: 9px; padding: 6px 14px 6px 6px; border-radius: 12px; background: var(--band); }
.points li span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: linear-gradient(var(--gold-top), var(--gold)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 0 var(--gold-lip); }
.points svg { width: 18px; height: 18px; }
.badges { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.badges a { display: block; border-radius: 9px; transition: transform 160ms var(--ease); }
.badges a:hover { transform: translateY(-2px); }
.badges img { height: 46px; width: auto; }

.devices { position: relative; padding: 0 0 9% 10%; }
.laptop { position: relative; aspect-ratio: 2400 / 1466; filter: drop-shadow(0 26px 30px rgba(43, 29, 20, 0.28)); }
.laptop .screen { position: absolute; left: 9.250%; top: 2.520%; width: 81.500%; height: 86.090%; overflow: hidden; background: #000; border-radius: 0.600% 0.600% 0 0; }
.laptop .screen img { width: 100%; height: 100%; object-fit: cover; }
.laptop .frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.phone { position: relative; width: 100%; aspect-ratio: 1100 / 578; filter: drop-shadow(0 20px 24px rgba(43, 29, 20, 0.38)); }
.phone .screen { position: absolute; left: 6.070%; top: 11.540%; width: 87.870%; height: 76.920%; border-radius: 5.800% / 12.600%; overflow: hidden; background: #000; }
.phone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; transition: opacity 500ms ease; }
.phone .screen img.off { opacity: 0; }
.phone .frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.devices .phone { position: absolute; left: 0; bottom: 0; width: 58%; z-index: 2; }

/* The strip of facts under the hero, in black. */
.proof { padding: 30px 0; background: var(--night); color: #fff; }
.proof ul { display: grid; grid-template-columns: 1.400fr repeat(4, 1fr); gap: 16px; text-align: center; }
.proof strong { display: block; font-size: clamp(24px, 2.600vw, 34px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--gold-top); }
.proof span { font-size: var(--small); color: rgba(255, 255, 255, 0.72); }

/* Sections */
section { padding-top: var(--section); }
.head { max-width: 42rem; }
.head.center { margin-inline: auto; text-align: center; }
.head h2 { font-size: var(--heading); }
.head p { margin-top: 12px; font-size: var(--sub); line-height: 1.45; color: var(--soft); }

/* Three ways to play: cards with the game's own icons on its dark keys. */
.modes { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mode { display: flex; flex-direction: column; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); text-decoration: none; transition: transform 200ms var(--ease), box-shadow 200ms var(--ease); }
.mode:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.mode .icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 17px; background: linear-gradient(var(--brown-top), var(--brown)); color: var(--gold); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 4px 0 var(--brown-lip); }
.mode .icon svg { width: 30px; height: 30px; }
.mode h3 { margin-top: 26px; font-size: var(--sub); }
.mode p { margin-top: 8px; color: var(--soft); font-size: 16px; }
.mode .go { margin-top: auto; padding-top: 20px; font-weight: 700; font-size: var(--small); color: var(--link); }

/* Leagues: a dark band; each league stands a step higher than the one before, on a slim gold column. */
#leagues { margin-top: var(--section); padding: var(--section) 0; background: radial-gradient(70% 90% at 50% 0%, #3a2616, var(--night) 70%); color: #fff; }
#leagues .head p { color: rgba(255, 255, 255, 0.74); }
.climb { margin-top: 44px; }
.climb ol { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; align-items: end; }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; }
.step img { width: 60px; height: 60px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.step h3 { margin-top: 8px; font-size: 16px; letter-spacing: -0.01em; }
.step .stakes { margin-top: 2px; font-size: 13px; color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; line-height: 1.35; }
.step .riser { width: 34%; min-width: 22px; margin-top: 12px; border-radius: 999px 999px 4px 4px; background: linear-gradient(var(--gold-top), var(--gold) 40%, rgba(242, 193, 78, 0.12)); height: calc(28px + var(--n) * 22px); }

/* Cities: five screenshots fanned like tiles in a hand. */
.fan { margin-top: 48px; display: flex; justify-content: center; align-items: center; padding: 20px 0 8px; }
.fan figure { position: relative; margin: 0 -2.5%; width: 25%; flex: none; border-radius: 16px; overflow: hidden; background: var(--night); box-shadow: var(--shadow-lg); transform: rotate(var(--r)) translateY(var(--y)); transition: transform 260ms var(--ease); }
.fan figure:hover { transform: rotate(0deg) translateY(-10px) scale(1.04); z-index: 3; }
.fan figure:nth-child(3) { z-index: 2; width: 29%; }
.fan img { width: 100%; aspect-ratio: 2110 / 976; object-fit: cover; }
.fan figcaption { position: absolute; left: 10px; bottom: 10px; padding: 4px 12px; border-radius: 999px; background: rgba(26, 17, 11, 0.8); color: #fff; font-size: 13px; font-weight: 600; }
.fan figure:nth-child(n+4) figcaption { left: auto; right: 10px; }
main { overflow-x: clip; }
.more { margin-top: 24px; text-align: center; }
.more span { display: inline-block; padding: 8px 18px; border-radius: 999px; background: var(--band); border: 1px solid var(--line); font-weight: 600; font-size: var(--small); }

/* Free to play and the VIP Club: two picture cards, words in white over a fade to black. */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.offer { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 440px; padding: 32px; border-radius: var(--radius-lg); overflow: hidden; color: #fff; background: var(--night); box-shadow: var(--shadow); }
.offer > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.offer::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(rgba(0, 0, 0, 0) 15%, rgba(0, 0, 0, 0.6) 55%, rgba(0, 0, 0, 0.94)); }
.offer > :not(.bg) { position: relative; z-index: 2; }
.offer .art { width: 80px; height: 80px; object-fit: contain; margin-bottom: 14px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.offer h2 { font-size: clamp(28px, 3vw, 38px); }
.offer p { margin-top: 10px; max-width: 30rem; color: rgba(255, 255, 255, 0.88); font-size: 16px; }
.offer .btn { margin-top: 22px; align-self: flex-start; }

/* Get the app: the game's own "Get the app" screen, as a band. */
.getapp { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(28px, 5vw, 64px); border-radius: var(--radius-lg); overflow: hidden; color: #fff; background: var(--night); box-shadow: var(--shadow); }
.getapp > img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.getapp > :not(.bg) { position: relative; }
.getapp h2 { font-size: var(--heading); }
.getapp p { margin-top: 12px; color: rgba(255, 255, 255, 0.88); }
.getapp ul { margin-top: 18px; display: grid; gap: 10px; font-weight: 600; }
.getapp li { display: flex; align-items: center; gap: 10px; }
.getapp li svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.getapp .badges { justify-content: flex-start; }

/* Questions: the heading on the left, the answers on the right. */
.faq { display: grid; grid-template-columns: 1fr 1.7fr; gap: clamp(24px, 5vw, 80px); align-items: start; }
.faq .head a { display: inline-block; margin-top: 16px; font-weight: 700; color: var(--link); }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.faq details + details { margin-top: 10px; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; font-size: 18px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; color: var(--soft); transition: transform 200ms var(--ease); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--soft); font-size: 16px; max-width: 60ch; }

/* The close: the Mexico City table, Havana tiles lying around it, one button. */
.close .card { position: relative; overflow: hidden; padding: clamp(56px, 8vw, 104px) var(--pad); border-radius: var(--radius-lg); background: var(--night); color: #fff; text-align: center; box-shadow: var(--shadow-lg); }
.close .card > .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.close .card::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(60% 80% at 50% 50%, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.25)); }
.close .tile { position: absolute; z-index: 2; width: clamp(110px, 15vw, 200px); height: auto; transform: translate(-50%, 0) rotate(var(--r)) scale(var(--s)); filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.55)); }
.close .tile.far { z-index: 0; filter: blur(1.500px) brightness(0.8) drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5)); }
.close .words { position: relative; z-index: 3; }
.close h2 { font-size: var(--heading); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5); }
.close p { margin: 12px auto 0; max-width: 32rem; font-size: var(--sub); color: rgba(255, 255, 255, 0.9); }
.close .btn { margin-top: 26px; }

footer { margin-top: var(--section); padding: 56px 0 32px; background: var(--night); color: rgba(255, 255, 255, 0.8); }
footer .top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
footer .brand img { height: 68px; width: auto; }
footer .brand p { margin-top: 14px; max-width: 22rem; font-size: var(--small); }
footer h3 { font-size: var(--small); letter-spacing: 0; color: #fff; margin-bottom: 10px; }
footer .top a { display: block; padding: 4px 0; font-size: var(--small); text-decoration: none; }
footer .top a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
footer .legal { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 13px; line-height: 1.55; color: rgba(255, 255, 255, 0.62); }
footer .legal p + p { margin-top: 8px; }

/* Entrances. Nothing stays hidden without script. */
.js .rise { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.js .rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise { opacity: 1; transform: none; transition: none; }
  .mode, .fan figure, .btn, .badges a { transition: none; }
}

/* Tablet */
@media (max-width: 980px) {
  .nav .wrap { grid-template-columns: 1fr auto; }
  .nav nav { display: none; }
  .modes { grid-template-columns: 1fr; }
  .mode { display: grid; grid-template-columns: 60px 1fr; column-gap: 20px; }
  .mode .icon { grid-row: span 3; }
  .mode h3 { margin-top: 0; }
  .mode .go { padding-top: 12px; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .badges, .points { justify-content: center; }
  .devices { max-width: 640px; margin: 8px auto 0; width: 100%; }
  .proof ul { grid-template-columns: repeat(2, 1fr); }
  .proof li:first-child { grid-column: 1 / -1; }
  .climb ol { grid-template-columns: repeat(4, 1fr); row-gap: 24px; }
  .duo, .getapp, .faq { grid-template-columns: 1fr; }
  .getapp { text-align: center; }
  .getapp ul { justify-items: center; }
  .getapp .badges { justify-content: center; }
  footer .top { grid-template-columns: 1fr 1fr; }
}

/* Phone */
@media (max-width: 640px) {
  .nav .wrap { height: 56px; }
  .nav .mark img { height: 34px; }
  .lang summary span { display: none; }
  .hero h1 { font-size: clamp(36px, 11vw, 46px); }
  .btn-lg { width: 100%; min-height: 60px; }
  .points { display: flex; }
  .points li { flex: 1 1 auto; }
  .close .tile { width: 96px; }
  .climb ol { grid-template-columns: repeat(2, 1fr); }
  .step .riser { display: none; }
  .fan { flex-direction: column; gap: 12px; padding: 0; }
  .fan figure, .fan figure:nth-child(3) { width: 100%; margin: 0; transform: none; }
  .step img { width: 52px; height: 52px; }
  .fan figure:nth-child(n+4) { display: none; }
  .offer { min-height: 360px; padding: 24px; }
  footer .top { grid-template-columns: 1fr; }
}
