/* Mu Mortal Union landing (2026-10-19). Mobile first: one column, big touch targets, the game's
   own art (the loading battle, the registration stone frame, the app emblem). Same-origin only:
   the site sends COEP require-corp, so no web fonts or third-party images. */
:root {
  --bg: #07090d;
  --ink: #efe6d2;
  --ink-dim: #b9ad97;
  --gold-1: #fff1b8;
  --gold-2: #f5c64a;
  --gold-3: #b8801f;
  --gold-4: #6e4a10;
  --stone: #17191e;
  --stone-2: #23262d;
  --line: rgba(245, 198, 74, 0.35);
  --error: #ff7b5f;
  --ok: #8fe08a;
  --serif: "Cinzel", "Trajan Pro", "Times New Roman", Georgia, "Noto Serif", serif;
  --sans: system-ui, -apple-system, "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(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
}
img { max-width: 100%; }

/* ---- hero ---------------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: calc(env(safe-area-inset-top) + 24px) 20px calc(env(safe-area-inset-bottom) + 28px);
  overflow: hidden;
  isolation: isolate;
}
.hero-art {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.15) 0%, rgba(7, 9, 13, 0.2) 35%, rgba(7, 9, 13, 0.82) 70%, var(--bg) 100%),
    url("img/hero-portrait.webp") center 30% / cover no-repeat;
  animation: drift 24s ease-in-out infinite alternate;
}
@media (min-aspect-ratio: 1/1) {
  .hero-art { background-image:
    linear-gradient(180deg, rgba(7, 9, 13, 0.1) 0%, rgba(7, 9, 13, 0.35) 55%, var(--bg) 100%),
    url("img/hero-wide.webp"); }
}
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.12) translateY(-1.5%); } }
@media (prefers-reduced-motion: reduce) { .hero-art { animation: none; } html { scroll-behavior: auto; } }

.hero-inner { width: 100%; max-width: 440px; text-align: center; }
.emblem {
  width: 128px; height: 128px;
  border-radius: 26px;
  box-shadow: 0 0 0 1px rgba(255, 220, 140, 0.25), 0 10px 40px rgba(60, 120, 255, 0.35), 0 0 60px rgba(245, 198, 74, 0.25);
}
.title {
  margin: 14px 0 4px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(30px, 9vw, 44px);
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--gold-1) 0%, var(--gold-2) 45%, var(--gold-3) 70%, var(--gold-2) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.85)) drop-shadow(0 0 18px rgba(245, 198, 74, 0.25));
}
.title span { display: block; font-size: 1.45em; letter-spacing: 0.08em; }
/* What the game is, in the visitor's language (2026-10-20): part of the h1, in plain letters. */
.title .title-sub {
  display: block; margin: 12px auto 0; max-width: 26em;
  font: 600 15px/1.35 var(--sans); letter-spacing: 0.02em; text-transform: none;
  color: var(--gold-1); -webkit-text-fill-color: var(--gold-1);
}
.tagline { margin: 6px 0 22px; font-size: 18px; color: var(--ink); text-shadow: 0 1px 6px #000; }
.cta { display: grid; gap: 12px; }
.platforms { margin: 16px 0 0; color: var(--ink-dim); font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; }

/* ---- buttons: the game's look, gold letters on dark metal --------------------------------- */
.btn {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 6px;
  font: 700 18px/1 var(--serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:focus-visible { outline: 2px solid var(--gold-1); outline-offset: 3px; }
.btn-gold {
  color: #1d1305;
  border: 1px solid #ffe7a0;
  background: linear-gradient(180deg, #fff3c4 0%, var(--gold-2) 38%, var(--gold-3) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -3px 0 rgba(110, 74, 16, 0.6),
    0 6px 22px rgba(245, 198, 74, 0.35), 0 0 0 2px rgba(0, 0, 0, 0.6);
  text-shadow: 0 1px 0 rgba(255, 245, 210, 0.6);
}
.btn-gold:hover { filter: brightness(1.06); }
.btn-gold[disabled] { filter: grayscale(0.6) brightness(0.7); cursor: progress; }
.btn-stone {
  color: var(--gold-2);
  border: 1px solid #6b6f78;
  background: linear-gradient(180deg, #3a3e46 0%, #1e2025 55%, #121317 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 2px #0b0c0f, 0 0 0 1px #000;
  text-shadow: 0 1px 0 #000, 0 0 10px rgba(245, 198, 74, 0.35);
}
.btn-wide { width: 100%; }

/* ---- panels: the registration stone frame --------------------------------------------------- */
.panel { padding: 8px 14px 18px; display: flex; justify-content: center; }
.frame {
  width: 100%; max-width: 460px;
  padding: 10px 6px 8px;
  /* The registration panel's stone, its ornamented corners scaled to 30px and its middle as the
     panel's own surface (fill). */
  border: 30px solid transparent;
  border-image: url("img/frame.webp") 92 fill / 30px / 0 stretch;
  background: #121418;
  margin: 0;
}
.panel-title {
  margin: 0 0 6px;
  text-align: center;
  font: 700 24px/1.2 var(--serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-2);
  text-shadow: 0 1px 0 #000, 0 0 14px rgba(245, 198, 74, 0.3);
}
.panel-title::after {
  content: ""; display: block; height: 1px; margin: 10px auto 0; width: 70%;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.panel-lead { margin: 10px 0 18px; color: var(--ink-dim); text-align: center; font-size: 15px; }

/* ---- the form ------------------------------------------------------------------------------- */
.field { display: block; margin-bottom: 14px; }
.field-label { display: block; margin-bottom: 6px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-2); }
.field input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border-radius: 4px;
  border: 1px solid #4a4e57;
  background: #0b0c0f;
  color: var(--ink);
  font: 500 17px/1.2 var(--sans);   /* 16px or more: no zoom on focus in iOS Safari */
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
}
.field input:focus { outline: none; border-color: var(--gold-2); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8), 0 0 0 3px rgba(245, 198, 74, 0.18); }
.field.bad input { border-color: var(--error); }
.field-hint { display: block; min-height: 18px; margin-top: 5px; font-size: 13px; color: var(--ink-dim); }
.field.bad .field-hint { color: var(--error); }
.form-status { min-height: 22px; margin: 12px 0 0; text-align: center; font-size: 15px; }
.form-status.error { color: var(--error); }
.form-status.ok { color: var(--ok); }
.done { text-align: center; }
.done img { border-radius: 16px; box-shadow: 0 0 30px rgba(245, 198, 74, 0.3); }
.done h3 { margin: 10px 0 4px; font: 700 22px/1.2 var(--serif); color: var(--gold-2); }
.done strong { color: var(--gold-1); letter-spacing: 0.04em; }

/* ---- install steps -------------------------------------------------------------------------- */
.steps { list-style: none; counter-reset: step; margin: 0 0 18px; padding: 0; }
.steps li {
  counter-increment: step;
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 12px 12px 14px;
  margin-bottom: 10px;
  border: 1px solid #2c2f36;
  border-radius: 6px;
  background: linear-gradient(180deg, #1a1c21, #121317);
  font-size: 16px;
}
/* The step number sits on the icon's corner, like a badge. */
.steps li::before {
  content: counter(step);
  position: absolute; left: 6px; top: 6px; z-index: 1;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 12px/1 var(--serif);
  color: #1d1305;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-3));
  box-shadow: 0 0 0 2px #000;
}
/* A button the step names, drawn like the phone's own: icon plus its label. */
.steps .key, .notice .key {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: -5px;
  min-width: 26px; padding: 2px 7px; margin: 1px 2px;
  border: 1px solid #5b5f68; border-radius: 7px; background: #24272d; color: var(--gold-1);
  font-weight: 700; text-align: center; white-space: nowrap;
}
.key svg { width: 18px; height: 18px; flex: none; }
.step-icon {
  flex: none; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px; margin-left: 6px;
  background: radial-gradient(circle at 50% 35%, #2f323a, #16181c); border: 1px solid #3a3e46; color: var(--gold-2);
}
.step-icon svg { width: 22px; height: 22px; }
.step-text { flex: 1; line-height: 1.45; }
/* "¿Cómo abro Safari?": a question under the step that opens in place. */
.how-box { margin-top: 10px; }
.steps li:has(.how-box[open]) { align-items: flex-start; }
.how-box summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(245, 198, 74, 0.1); color: var(--gold-1); font-weight: 700; font-size: 15px;
}
.how-box summary::-webkit-details-marker { display: none; }
.how-box summary::after { content: '▾'; color: var(--gold-2); transition: transform 0.15s; }
.how-box[open] summary::after { transform: rotate(180deg); }
.how { margin: 10px 0 0; padding: 12px 12px 12px 30px; border-radius: 8px; background: rgba(0, 0, 0, 0.35); }
.how li { counter-increment: none; margin: 0 0 8px; padding: 0; border: 0; background: none; display: list-item; font-size: 15px; }
.how li:last-child { margin-bottom: 0; }
/* The real home-screen icon to look for, at the size it has on the phone. */
.app-icon { display: block; width: 60px; height: 60px; border-radius: 13.5px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55); }
.app-find { display: flex; flex-direction: column; align-items: center; gap: 4px; width: fit-content; margin: 10px auto 2px; color: var(--ink); font-size: 13px; }
.how-box summary .app-icon { width: 22px; height: 22px; border-radius: 5px; box-shadow: none; }
.how li::before { content: none; }
/* What the page detected: device, iOS version, browser or app. */
.env-chip {
  display: block; width: fit-content; margin: -4px auto 12px; padding: 4px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(245, 198, 74, 0.08);
  color: var(--gold-1); font-size: 13px; letter-spacing: 0.04em;
}
.sheet-card .env-chip { margin: -6px 0 12px; }
.env-chip:empty { display: none; }
.notice { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; font-size: 15px; line-height: 1.45; }
.notice[hidden] { display: none; }
.notice.warn { border: 1px solid rgba(255, 123, 95, 0.5); background: rgba(255, 123, 95, 0.08); color: #ffd6cc; }
.notice.ok { border: 1px solid rgba(143, 224, 138, 0.45); background: rgba(143, 224, 138, 0.08); color: #d6f5d3; }
.btn-small { font-size: 15px; padding-top: 10px; padding-bottom: 10px; margin-top: 10px; }
.btn[hidden] { display: none; }
#install-open, #guide-open { margin-bottom: 16px; }
.steps-lead { margin: 0 0 10px; color: var(--ink-dim); font-size: 14px; text-align: center; }
.steps-lead[hidden] { display: none; }
.play-link { display: block; margin-top: 16px; text-align: center; color: var(--gold-2); font-size: 15px; }

/* ---- the guide sheet (iPhone / manual steps) ------------------------------------------------ */
.sheet {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  padding: 0 10px calc(env(safe-area-inset-bottom) + 10px);
}
.sheet[hidden] { display: none; }
.sheet-card {
  position: relative;
  width: 100%; max-width: 460px;
  padding: 22px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #1e2026, #0f1013);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7);
}
.sheet-card h3 { margin: 0 34px 14px 0; font: 700 20px/1.2 var(--serif); color: var(--gold-2); }
.sheet-close {
  position: absolute; top: 10px; right: 10px;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: #2a2d34; color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer;
}
/* The arrow that points at the browser's own button, at the edge of the screen where it sits. */
.pointer {
  position: fixed; z-index: 11; width: 56px; height: 56px; pointer-events: none;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v15M5 11l7 7 7-7' fill='none' stroke='%23f5c64a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  filter: drop-shadow(0 0 8px rgba(245, 198, 74, 0.7));
}
.pointer[hidden] { display: none; }
.pointer.bottom { left: calc(50% - 28px); bottom: calc(env(safe-area-inset-bottom) + 6px); animation: bob-down 1.1s ease-in-out infinite; }
.pointer.bottom-right { right: 18px; bottom: calc(env(safe-area-inset-bottom) + 6px); animation: bob-down 1.1s ease-in-out infinite; }
.pointer.top-right { right: 14px; top: calc(env(safe-area-inset-top) + 6px); transform: rotate(180deg); animation: bob-up 1.1s ease-in-out infinite; }
@keyframes bob-down { 50% { translate: 0 8px; } }
@keyframes bob-up { 50% { translate: 0 -8px; } }
/* The card leaves room for the arrow at the bottom edge. */
.sheet:has(.pointer.bottom:not([hidden])) .sheet-card,
.sheet:has(.pointer.bottom-right:not([hidden])) .sheet-card { margin-bottom: 58px; }
@media (prefers-reduced-motion: reduce) { .pointer { animation: none; } }

.foot { display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; padding: 18px 16px calc(env(safe-area-inset-bottom) + 24px); color: var(--ink-dim); font-size: 13px; }
.foot-brand { display: flex; gap: 8px; align-items: center; }
.foot img { border-radius: 6px; }
/* Every language as a plain link (2026-10-20): crawlers find each page, visitors pick theirs. */
.langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; max-width: 760px; }
.langs a { color: var(--ink-dim); text-decoration: none; padding: 4px 0; }
.langs a:hover, .langs a:focus-visible { color: var(--gold-1); text-decoration: underline; }
.langs a[aria-current="page"] { color: var(--gold-2); font-weight: 700; }

/* ---- what the game is: platforms, features, questions (2026-10-20) ------------------------- */
.info { width: 100%; max-width: 960px; margin: 0 auto; padding: 8px 16px 8px; }
.info-block { margin: 0 0 26px; }
.info-title {
  margin: 0 0 12px; text-align: center;
  font: 700 22px/1.25 var(--serif); letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--gold-2); text-shadow: 0 1px 0 #000, 0 0 14px rgba(245, 198, 74, 0.25);
}
.info p, .info li { color: var(--ink); font-size: 16px; line-height: 1.55; }
.about { max-width: 720px; margin: 0 auto 12px; text-align: center; }
.cards { display: grid; gap: 12px; }
.card, .faq-item {
  padding: 14px 16px; border: 1px solid #2c2f36; border-radius: 8px;
  background: linear-gradient(180deg, #16181d, #101115);
}
.card h3, .faq-item h3 { margin: 0 0 6px; font: 700 17px/1.3 var(--sans); color: var(--gold-1); }
.card p, .faq-item p { margin: 0; color: var(--ink-dim); font-size: 15px; }
.feats { max-width: 720px; margin: 0 auto; padding: 0; list-style: none; }
.feats li { position: relative; padding: 6px 0 6px 26px; }
.feats li::before { content: "\2726"; position: absolute; left: 2px; top: 6px; color: var(--gold-2); }
[dir="rtl"] .feats li { padding: 6px 26px 6px 0; }
[dir="rtl"] .feats li::before { left: auto; right: 2px; }
.faq { display: grid; gap: 10px; }
@media (min-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .faq { grid-template-columns: 1fr 1fr; }
}

/* The visitor's own language, offered on a page in another one: a chip at the top. */
.lang-suggest {
  position: absolute; z-index: 3; top: calc(env(safe-area-inset-top) + 10px); right: 12px;
  display: flex; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(10, 11, 14, 0.82);
  backdrop-filter: blur(3px);
}
.lang-suggest[hidden] { display: none; }
.lang-suggest a { padding: 8px 4px 8px 14px; color: var(--gold-1); font-size: 14px; font-weight: 600; text-decoration: none; }
.lang-suggest button { width: 34px; height: 34px; border: 0; background: none; color: var(--ink-dim); font-size: 20px; line-height: 1; cursor: pointer; }
[dir="rtl"] .lang-suggest { right: auto; left: 12px; }
[dir="rtl"] .lang-suggest a { padding: 8px 14px 8px 4px; }

/* Wider screens: the hero and the two panels side by side. */
@media (min-width: 960px) {
  main { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "hero hero" "cuenta instalar" "info info" "foot foot"; }
  .hero { grid-area: hero; min-height: 78vh; }
  #cuenta { grid-area: cuenta; justify-content: flex-end; }
  #instalar { grid-area: instalar; justify-content: flex-start; align-items: flex-start; }
  .info { grid-area: info; }
  .foot { grid-area: foot; }
  .cta { grid-template-columns: 1fr 1fr; }
}

/* After returning from the in-app browser with ?instalar=1: the button asks to be tapped. */
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 0 2px rgba(0,0,0,.6), 0 0 32px 6px rgba(245,198,74,.55); } }

/* Language (2026-10-19): a page that will be translated stays hidden until its texts arrive. */
.i18n-wait body { visibility: hidden; }
.lang-pick { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; }
.lang-pick select {
  max-width: 170px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line);
  background: #15171b; color: var(--ink); font: 500 14px/1.2 var(--sans);
}
/* Right-to-left languages: the step badge and the arrows mirror. */
[dir="rtl"] .steps li::before { left: auto; right: 6px; }
[dir="rtl"] .step-icon { margin-left: 0; margin-right: 6px; }
[dir="rtl"] .how { padding: 12px 30px 12px 12px; }
[dir="rtl"] .sheet-card h3 { margin: 0 0 14px 34px; }
[dir="rtl"] .sheet-close { right: auto; left: 10px; }

/* "Tap here" (2026-10-19): the install button calls for the tap. Soft on any phone visit; strong
   (glow, breathing, a bubble with a bouncing arrow) when the visitor comes back from the app. */
.cta { position: relative; }
.cta:has(.nudge-tip:not([hidden])) { margin-top: 48px; }
/* Phones get the bubble on every visit: its room is there from the first paint (no layout shift). */
@media (pointer: coarse) { .cta { margin-top: 48px; } }
.btn.nudge { animation: nudge-glow 2.4s ease-in-out infinite; }
.btn.nudge-strong { animation: nudge-glow 1.1s ease-in-out infinite, nudge-breathe 1.1s ease-in-out infinite; }
@keyframes nudge-glow {
  50% { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 0 2px rgba(0,0,0,.6), 0 0 34px 8px rgba(245,198,74,.6); }
}
@keyframes nudge-breathe { 50% { transform: scale(1.045); } }
.nudge-tip {
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; pointer-events: none;
  animation: nudge-bounce 1.1s ease-in-out infinite;
}
.nudge-tip[hidden] { display: none; }
.nudge-tip span {
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-3)); color: #1d1305;
  font: 700 15px/1 var(--sans); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 18px rgba(245, 198, 74, 0.5);
}
.nudge-tip::after {
  content: ''; width: 0; height: 0; margin-top: -1px;
  border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 11px solid var(--gold-3);
}
@keyframes nudge-bounce { 50% { translate: 0 6px; } }
@media (prefers-reduced-motion: reduce) { .btn.nudge, .btn.nudge-strong, .nudge-tip { animation: none; } }
