/* ============================================================
   Sign-in landing page (signed-out visitors) + boot splash
   + language panel on the Account page.
   Brand fonts/colours from style.css; one radius scale:
   cards 28px, inner cards 20px, controls 14px, chips pill.
   ============================================================ */

/* ---------- boot splash (until check_auth answers) ---------- */
.boot {
    position: fixed; inset: 0;
    display: grid; place-items: center;
    z-index: 50;
}
.boot img { width: 220px; animation: boot-in .28s ease-out both; }
@keyframes boot-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- page shell ---------- */
.landing {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(18px, 4vw, 48px) 40px;
}

.ld-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 0;
}
.ld-logo img { height: 44px; display: block; }
.ld-top .spacer { flex: 1; }

.ld-lang {
    display: inline-flex;
    background: rgba(255, 255, 255, .7);
    border-radius: 999px;
    padding: 4px;
    box-shadow: 0 2px 0 rgba(59, 59, 88, .08);
}
.ld-lang button {
    border: none; background: transparent;
    font-family: var(--font-head); font-weight: 600; font-size: .9rem;
    color: var(--ink-soft);
    padding: 6px 12px; border-radius: 999px;
    transition: background .15s ease-out, color .15s ease-out;
}
.ld-lang button.on { background: var(--ink); color: #fff; }
.ld-top-signin {
    border: 3px solid rgba(59, 59, 88, .14);
    background: #fff;
    color: var(--ink);
    font-family: var(--font-head); font-weight: 600; font-size: .95rem;
    padding: 8px 16px; border-radius: 999px;
    white-space: nowrap;
    transition: border-color .15s ease-out, transform .12s ease-out;
}
.ld-top-signin:hover { border-color: var(--teal); }
.ld-top-signin:active { transform: scale(.97); }

/* ---------- hero ---------- */
.ld-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(24px, 4vw, 64px);
    align-items: center;
    padding: clamp(12px, 3vw, 40px) 0 clamp(28px, 4vw, 56px);
}
.ld-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, .75);
    color: var(--teal-deep);
    font-family: var(--font-head); font-weight: 600; font-size: .95rem;
    padding: 6px 14px; border-radius: 999px;
    margin-bottom: 16px;
}
.ld-title {
    font-size: clamp(2.4rem, 5.2vw, 4.1rem);
    line-height: 1.04;
    color: var(--ink);
    max-width: 14ch;
    text-wrap: balance;
}
.ld-sub {
    margin: 16px 0 24px;
    font-size: 1.12rem;
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 46ch;
}

/* sign-in card */
.ld-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 44px rgba(39, 159, 176, .18), 0 2px 0 rgba(59, 59, 88, .05);
    padding: 22px 24px 18px;
    max-width: 440px;
    scroll-margin: 24px;
}
.ld-tabs {
    display: grid; grid-template-columns: 1fr 1fr;
    background: rgba(59, 59, 88, .06);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 16px;
}
.ld-tabs button {
    border: none; background: transparent;
    font-family: var(--font-head); font-weight: 600; font-size: .98rem;
    color: var(--ink-soft);
    padding: 9px 8px; border-radius: 10px;
    transition: background .15s ease-out, color .15s ease-out, box-shadow .15s ease-out;
}
.ld-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(59, 59, 88, .12); }
.ld-google { padding: 13px 16px; font-size: 1.02rem; }
.ld-card .auth-divider { margin: 14px 0; }
.ld-form { display: grid; gap: 12px; }
.ld-field { display: grid; gap: 6px; }
.ld-field > span:first-child { font-weight: 800; font-size: .9rem; color: var(--ink); }
.ld-field .input { margin: 0; }
.ld-field .password-wrap { display: block; }
.ld-submit {
    width: 100%;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 1.08rem;
    padding: 14px 18px;
    margin-top: 4px;
    white-space: nowrap;
}
.ld-submit:active:not(:disabled) { transform: translateY(2px) scale(.98); }
.ld-card-note {
    margin-top: 12px;
    text-align: center;
    font-size: .88rem;
    color: var(--ink-soft);
}

/* hero art: three live game previews fanned out */
.ld-hero-art {
    position: relative;
    aspect-ratio: 1 / .86;
    min-width: 0;
}
.ld-fan { position: absolute; inset: 6% 2% 10% 4%; }
.ld-fan-card {
    position: absolute;
    width: 66%;
    background: #fff;
    padding: 10px 10px 0;
    border-radius: var(--radius-md);
    box-shadow: 0 22px 46px rgba(59, 59, 88, .18);
    animation: ld-card-in .28s ease-out both;
}
.ld-fan-card .gp-preview { border-radius: 14px; }
.ld-fan-card.f1 { left: 0;   top: 4%;  transform: rotate(-7deg); animation-delay: .05s; z-index: 1; }
.ld-fan-card.f3 { right: 0;  top: 0;   transform: rotate(6deg);  animation-delay: .12s; z-index: 2; }
.ld-fan-card.f2 { left: 17%; top: 34%; transform: rotate(-1deg); animation-delay: .19s; z-index: 3; }
@keyframes ld-card-in { from { opacity: 0; translate: 0 14px; scale: .95; } to { opacity: 1; translate: 0 0; scale: 1; } }

.ld-chip {
    position: absolute;
    z-index: 4;
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-head); font-weight: 600; font-size: .95rem;
    padding: 9px 14px; border-radius: 999px;
    box-shadow: 0 10px 24px rgba(59, 59, 88, .14);
    white-space: nowrap;
    animation: ld-card-in .26s ease-out both;
}
.ld-chip i { font-size: 1.15rem; }
.ld-chip.c1 { left: -2%; bottom: 10%; animation-delay: .3s; }  .ld-chip.c1 i { color: var(--coral); }
.ld-chip.c2 { right: 0;  top: -2%;   animation-delay: .36s; } .ld-chip.c2 i { color: var(--teal-deep); }
.ld-chip.c3 { right: 4%; bottom: 0;  animation-delay: .42s; } .ld-chip.c3 i { color: var(--berry); }

/* ---------- numbers ---------- */
.ld-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    background: rgba(255, 255, 255, .72);
    border-radius: var(--radius-lg);
    padding: 8px;
}
.ld-stats > div {
    padding: 16px 18px;
    display: grid; gap: 2px;
}
.ld-stats > div + div { border-left: 2px solid rgba(59, 59, 88, .07); }
.ld-stats strong {
    font-family: var(--font-title); font-weight: 400;
    font-size: 2.3rem; line-height: 1;
    color: var(--coral-deep);
}
.ld-stats span { color: var(--ink-soft); font-weight: 700; }

/* ---------- sections ---------- */
.ld-section { padding: clamp(44px, 6vw, 80px) 0 0; }
.ld-h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.8rem);
    line-height: 1.08;
    color: var(--ink);
    text-wrap: balance;
}
.ld-lead { margin: 10px 0 0; color: var(--ink-soft); font-size: 1.08rem; max-width: 60ch; }

/* games: one big tile + four small (bento) */
.ld-games {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.ld-game {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 12px 12px 16px;
    box-shadow: var(--shadow-soft);
}
.ld-game.big { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; }
.ld-game.big .gp-preview { flex: 1; aspect-ratio: auto; min-height: 220px; }
.ld-game h3 { font-size: 1.35rem; margin: 2px 4px 4px; color: var(--ink); }
.ld-game.big h3 { font-size: 1.8rem; }
.ld-game p { margin: 0 4px; color: var(--ink-soft); font-size: .93rem; line-height: 1.45; }

/* steps */
.ld-steps {
    list-style: none;
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.ld-steps li {
    background: rgba(255, 255, 255, .78);
    border-radius: var(--radius-md);
    padding: 22px 22px 24px;
}
.ld-step-n {
    display: grid; place-items: center;
    width: 44px; height: 44px;
    border-radius: 14px;
    font-family: var(--font-title); font-size: 1.5rem; color: #fff;
    margin-bottom: 14px;
}
.ld-steps li:nth-child(1) .ld-step-n { background: var(--coral); }
.ld-steps li:nth-child(2) .ld-step-n { background: var(--teal); }
.ld-steps li:nth-child(3) .ld-step-n { background: var(--leaf); }
.ld-steps h3 { font-size: 1.45rem; color: var(--ink); margin-bottom: 6px; }
.ld-steps p { color: var(--ink-soft); line-height: 1.5; }

/* final call to action */
.ld-final {
    margin-top: clamp(44px, 6vw, 80px);
    background: var(--teal-deep);
    background-image: radial-gradient(circle at 88% 20%, rgba(255, 201, 60, .35), transparent 42%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: clamp(30px, 5vw, 56px);
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) auto;
    gap: 14px 40px;
    align-items: center;
}
.ld-final h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.1; grid-column: 1; text-wrap: balance; }
.ld-final p { grid-column: 1; opacity: .92; font-size: 1.08rem; }
.ld-final-btns { grid-column: 2; grid-row: 1 / span 2; display: grid; gap: 12px; min-width: 260px; }
.ld-final .btn-google { border-color: transparent; }
.ld-final .btn-sun { width: 100%; white-space: nowrap; }

.ld-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 28px 4px 0;
    color: var(--ink-soft);
}
.ld-foot img { height: 30px; opacity: .8; }
.ld-foot a { color: var(--teal-deep); font-weight: 800; text-decoration: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    .ld-hero { grid-template-columns: 1fr; }
    .ld-hero-art { max-width: 620px; width: 100%; justify-self: center; }
    .ld-card { max-width: none; }
    .ld-title { max-width: 18ch; }
    .ld-games { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ld-final { grid-template-columns: 1fr; }
    .ld-final-btns { grid-column: 1; grid-row: auto; min-width: 0; }
}
@media (max-width: 640px) {
    .ld-top { flex-wrap: wrap; }
    .ld-logo img { height: 36px; }
    .ld-top-signin { padding: 7px 12px; font-size: .88rem; }
    .ld-chip { font-size: .82rem; padding: 7px 11px; }
    .ld-games, .ld-steps { grid-template-columns: 1fr; }
    .ld-game.big { grid-column: auto; grid-row: auto; }
    .ld-game.big .gp-preview { aspect-ratio: 16 / 10; min-height: 0; }
    .ld-stats { grid-template-columns: 1fr 1fr; }
    .ld-stats > div + div { border-left: none; }
    .ld-card { padding: 18px 16px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .boot img, .ld-fan-card, .ld-chip { animation: none; }
}

/* ---------- Account page: language panel ---------- */
.lang-panel {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px 24px; flex-wrap: wrap;
}
.lang-panel .photo-hint { margin-bottom: 0; }
.lang-choice { display: flex; gap: 10px; flex-wrap: wrap; }
.lang-opt {
    display: inline-flex; align-items: center; gap: 10px;
    border: 3px solid rgba(59, 59, 88, .12);
    background: #fff;
    color: var(--ink);
    font-family: var(--font-head); font-weight: 600; font-size: 1rem;
    padding: 10px 18px 10px 10px;
    border-radius: var(--radius-sm);
    transition: border-color .15s ease-out, background .15s ease-out, transform .12s ease-out;
}
.lang-opt:hover { border-color: var(--teal); }
.lang-opt:active { transform: scale(.97); }
.lang-opt.on { border-color: var(--teal-deep); background: rgba(62, 193, 211, .12); }
.lang-code {
    display: grid; place-items: center;
    width: 34px; height: 28px; border-radius: 8px;
    background: rgba(59, 59, 88, .08);
    font-size: .8rem; letter-spacing: .04em;
}
.lang-opt.on .lang-code { background: var(--teal-deep); color: #fff; }
