/* ============================================
   DICE RIVALS - LANDING PAGE (dicerivals.com)
   Palette matches the Dice Rivals support page on tagada.games.
   ============================================ */

:root {
    --sky-top: #2A8EE8;
    --sky-bottom: #5DC2F5;
    --water: #6DE4D0;
    --coral: #E04545;
    --coral-dark: #C03030;
    --gold: #F5C518;
    --navy: #0E3A66;
    --shadow-blue: rgba(0, 60, 120, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Blue behind iOS/macOS overscroll, so the page never flashes white. */
html {
    background: var(--sky-top);
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #fff;
    background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 55%, var(--water) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Soft clouds */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    z-index: 0;
    pointer-events: none;
}

body::before {
    width: 360px;
    height: 140px;
    top: 70px;
    right: -80px;
    filter: blur(32px);
}

body::after {
    width: 300px;
    height: 120px;
    top: 260px;
    left: -100px;
    filter: blur(28px);
}

/* ============================================
   HERO
   ============================================ */

.hero {
    flex: 1;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    align-items: center;
    /* On tall screens, put spare height above and below the content, not between rows. */
    align-content: center;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo img {
    display: block;
    width: min(440px, 82vw);
    height: auto;
    filter: drop-shadow(0 12px 24px rgba(0, 40, 100, 0.25));
}

.tagline {
    margin-top: 1rem;
    font-size: clamp(1.9rem, 4.6vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    /* Even line lengths when it wraps on phones ("The Ultimate 1v1 / Dice Battle!"). */
    text-wrap: balance;
    text-shadow:
        0 3px 0 var(--coral-dark),
        0 6px 16px rgba(0, 0, 0, 0.2);
}

.lead {
    max-width: 34rem;
    margin-top: 0.9rem;
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    font-weight: 500;
    text-shadow: 0 1px 4px var(--shadow-blue);
}

/* Store badges */
.store-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 1.75rem;
}

.store-badge {
    display: inline-flex;
    border-radius: 10px;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.store-badge:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 10px 18px rgba(0, 40, 100, 0.35));
}

.store-badge:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.store-badge img {
    display: block;
    height: 56px;
    width: auto;
}

/* Phone with the store screenshots slideshow */
.hero-art {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.phone {
    width: min(300px, 68vw);
    padding: 10px;
    background: #0F2340;
    border-radius: 44px;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.35),
        0 30px 60px rgba(0, 40, 100, 0.35);
    transform: rotate(3deg);
    animation: float 6s ease-in-out infinite;
}

/* The visible "screen". clip-path keeps the rounded corners while the track
   slides (Safari can let a transformed child escape overflow + border-radius). */
.screen {
    aspect-ratio: 600 / 1301;
    overflow: hidden;
    border-radius: 34px;
    clip-path: inset(0 round 34px);
    background: #1B3A63;
    touch-action: pan-y;
}

.track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.track img {
    flex: 0 0 100%;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

/* Slide dots (added by carousel.js) */
.dots {
    display: flex;
    gap: 0.15rem;
}

.dots[hidden] {
    display: none;
}

.dots button {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.dots button::before {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 1px 3px rgba(0, 60, 120, 0.3);
    transition: width 0.25s ease, background 0.25s ease;
}

.dots button[aria-current="true"]::before {
    width: 22px;
    background: #fff;
}

.dots button:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 1px;
    border-radius: 6px;
}

@keyframes float {
    0%, 100% { transform: rotate(3deg) translateY(0); }
    50%      { transform: rotate(3deg) translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
    .phone { animation: none; }
    .store-badge { transition: none; }
    .track { transition: none; }
}

/* ============================================
   FOOTER
   ============================================ */

.page-footer {
    position: relative;
    z-index: 1;
    padding: 1.5rem 1rem 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--navy);
}

.page-footer a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.page-footer a:hover {
    color: var(--coral-dark);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 1.25rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 860px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2rem 1rem 1.5rem;
    }

    .phone {
        width: min(260px, 66vw);
    }
}

@media (max-width: 400px) {
    .store-badge img {
        height: 48px;
    }
}
