/* Paginile publice ale jocului „Ultima Mână”. Culorile, literele și formele vin din
   docs/20-visual-direction.md, secțiunea 8 (și design/direction/tokens.json). Fără unelte:
   CSS simplu, Rubik servit de pe site (copiat de tools/build_public_site.py din app/assets/fonts). */

@font-face { font-family: "Rubik"; font-weight: 500; font-display: swap; src: url("fonts/Rubik-Medium.ttf") format("truetype"); }
@font-face { font-family: "Rubik"; font-weight: 700; font-display: swap; src: url("fonts/Rubik-Bold.ttf") format("truetype"); }
@font-face { font-family: "Rubik"; font-weight: 900; font-display: swap; src: url("fonts/Rubik-Black.ttf") format("truetype"); }

:root {
  color-scheme: dark;
  --bg-top: #1b1444;
  --bg-bottom: #0f0b23;
  --glow-pink: rgba(255, 61, 129, .32);
  --glow-teal: rgba(41, 224, 230, .18);
  --text: #f5f1ff;
  --muted: #a79de0;
  --panel: #221a52;
  --panel-edge: #3d3192;
  --hard-shadow: 0 5px 0 rgba(0, 0, 0, .55);
  --yellow: #ffd23f;
  --yellow-lip: #b58a00;
  --on-yellow: #1a1440;
  --pink: #ff3d81;
  --teal: #29e0e6;
  --green: #9bff5a;
  --ink: #0f0b23;
  --card-face: #fcfbff;
  --card-red: #e5173f;
  --card-black: #15122b;
  --gutter: 16px;
  --max: 1080px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg-bottom); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg-bottom);
  background-image:
    radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1.2px),
    radial-gradient(120% 55% at 50% -8%, var(--glow-pink), transparent 62%),
    radial-gradient(110% 45% at 50% 108%, var(--glow-teal), transparent 60%),
    linear-gradient(var(--bg-top), var(--bg-bottom));
  background-size: 18px 18px, 100% 100%, 100% 100%, 100% 100%;
  background-attachment: scroll, fixed, fixed, fixed;
  overflow-x: hidden;
}

a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: #7ff2f5; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }

/* ---------- Sigla G2 ---------- */
.logo {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  margin: 0; font-weight: 900; text-transform: uppercase; line-height: .92;
  transform: rotate(-4deg); letter-spacing: .01em; text-decoration: none;
}
.logo .l1 { color: #fff; font-size: 1em; text-shadow: 3px 3px 0 var(--pink); }
.logo .l2 { color: var(--yellow); font-size: 1.62em; text-shadow: 3px 3px 0 var(--pink), 6px 6px 0 var(--teal); }
.logo.one-line { flex-direction: row; gap: .3em; align-items: baseline; transform: rotate(-4deg); }
.logo.one-line .l2 { font-size: 1em; text-shadow: 2px 2px 0 var(--pink), 4px 4px 0 var(--teal); }
.logo.one-line .l1 { text-shadow: 2px 2px 0 var(--pink); }

/* ---------- Bara de sus (paginile interioare) ---------- */
.topbar { padding: 18px 0 8px; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar .logo { font-size: 20px; }
.topbar .play-small {
  font-weight: 900; font-size: 14px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--on-yellow); background: var(--yellow); text-decoration: none;
  padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center;
  border-radius: 12px; box-shadow: 0 4px 0 var(--yellow-lip);
}

/* ---------- Butoane ---------- */
.btn-main {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 64px; padding: 14px 34px; border-radius: 14px;
  font-weight: 900; font-size: 28px; text-transform: uppercase; letter-spacing: .02em;
  color: var(--on-yellow); background: var(--yellow); text-decoration: none;
  border: 2px solid var(--ink);
  box-shadow: 0 7px 0 var(--yellow-lip), 0 7px 0 2px var(--ink);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn-main:hover { color: var(--on-yellow); filter: brightness(1.04); }
.btn-main:active { transform: translateY(3px); box-shadow: 0 4px 0 var(--yellow-lip), 0 4px 0 2px var(--ink); }

.btn-store {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 18px;
  border-radius: 14px; background: var(--panel); border: 2px solid var(--panel-edge);
  box-shadow: var(--hard-shadow); color: var(--text); text-decoration: none; font-weight: 700;
}
.btn-store small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.btn-store svg { width: 26px; height: 26px; flex: none; }

/* ---------- Panouri ---------- */
.panel {
  background: var(--panel); border: 2px solid var(--panel-edge); border-radius: 14px;
  box-shadow: var(--hard-shadow); padding: 18px;
}
.label {
  display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--teal);
}

/* ---------- Pagina de prezentare ---------- */
.hero { padding: 28px 0 8px; text-align: center; }
.hero .logo { font-size: 44px; margin-top: 8px; }
.hero .kicker { margin: 26px 0 0; font-weight: 900; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero .lead { margin: 10px auto 0; max-width: 34em; font-size: 18px; }

.tabi-line { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 22px auto 0; }
.tabi-line img { width: 72px; height: 72px; flex: none; }
.bubble {
  position: relative; background: #fff; color: var(--card-black); font-weight: 700; font-size: 15px;
  padding: 10px 14px; border-radius: 14px; border: 2px solid var(--ink); box-shadow: 0 4px 0 var(--ink);
  text-align: left;
}
.bubble::before {
  content: ""; position: absolute; left: -9px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: #fff; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg);
}

.cta { margin: 30px 0 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cta .note { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.store-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Capturile: rând orizontal pe telefon, trei alăturate pe calculator */
.shots { margin: 40px 0 0; }
.shots-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px var(--gutter) 18px; margin: 0 calc(-1 * var(--gutter));
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.shots-track::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 74%; max-width: 300px; scroll-snap-align: center; margin: 0; }
.shot figcaption { font-weight: 900; font-size: 17px; line-height: 1.25; margin: 0 0 10px; min-height: 2.5em; }
.shot figcaption span { display: block; font-weight: 500; font-size: 14px; color: var(--muted); }
.phone {
  display: block; width: 100%; aspect-ratio: 375 / 812; border-radius: 26px; overflow: hidden;
  border: 3px solid var(--panel-edge); box-shadow: 0 7px 0 rgba(0, 0, 0, .55); background: var(--bg-bottom);
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; }

.how { margin: 26px 0 0; display: grid; gap: 14px; }
.how h3 { margin: 6px 0 4px; font-weight: 900; font-size: 18px; }
.how p { margin: 0; color: var(--muted); }

.newbie { margin: 26px 0 0; text-align: center; }
.newbie p { margin: 0 0 6px; }

/* ---------- Paginile de text (reguli, confidențialitate) ---------- */
.doc { padding: 10px 0 30px; }
.doc h1 { font-weight: 900; font-size: 28px; line-height: 1.15; margin: 18px 0 6px; }
.doc .sub { color: var(--muted); margin: 0 0 22px; }
.doc h2 { font-weight: 900; font-size: 20px; margin: 30px 0 8px; }
.doc p, .doc li { font-size: 16px; }
.doc ul, .doc ol { padding-left: 1.2em; }
.doc li { margin: 4px 0; }
.doc .panel { margin: 14px 0; }
.doc strong { font-weight: 700; }

.table-scroll { overflow-x: auto; margin: 12px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--panel-edge); vertical-align: top; }
th { font-weight: 700; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

/* Cărți mici desenate în text */
.c {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.1em; height: 1.55em;
  padding: 0 .3em; margin: 0 .08em; border-radius: 5px; background: var(--card-face); color: var(--card-black);
  font-weight: 700; font-size: .92em; line-height: 1; box-shadow: 0 2px 4px rgba(0, 0, 0, .35); white-space: nowrap;
  vertical-align: .05em;
}
.c.r { color: var(--card-red); }
.dot { display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: #ffb800; vertical-align: .05em; }

.stars { color: var(--yellow); letter-spacing: .05em; white-space: nowrap; }

/* Locurile care așteaptă date de la Fabrizio: se văd limpede și opresc o publicare „--final”. */
.todo { background: var(--yellow); color: var(--on-yellow); font-weight: 700; padding: 0 .3em; border-radius: 4px; }

/* ---------- Subsol ---------- */
.foot { margin: 46px 0 0; padding: 22px 0 34px; border-top: 2px solid var(--panel-edge); color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot a { color: var(--text); display: inline-flex; min-height: 44px; align-items: center; }

/* ---------- Lățime de calculator ---------- */
@media (min-width: 760px) {
  .hero { padding-top: 48px; }
  .hero .logo { font-size: 64px; }
  .hero .lead { font-size: 20px; }
  .shots-track { overflow: visible; justify-content: center; margin: 0; padding: 6px 0 18px; }
  .shot { flex: 0 1 300px; }
  .how { grid-template-columns: repeat(3, 1fr); }
  .doc h1 { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-main { transition: none; }
}
