/* Brand fonts, hosted with the site (the server's security policy blocks Google Fonts). Both are variable fonts, latin subset (covers æ ø å). */
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('assets/fonts/fredoka.woff2') format('woff2'); }
@font-face { font-family: 'Hanken Grotesk'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('assets/fonts/hanken-grotesk.woff2') format('woff2'); }

/* Leagues 4 Friends: home page (EN + NO), v3 brand: app blue, gold trophy, confetti, Fredoka + Hanken Grotesk */
:root {
    --blue-1: #2E8BFF;
    --blue-2: #0D61C2;
    --blue-3: #083E8C;
    --blue-ink: #0B2A5C;
    --gold: #FFD54A;
    --gold-dark: #E8B400;
    --coral: #FF7A59;
    --mint: #7CF0B0;

    --bg: #F7F5F0;
    --surface: #FFFFFF;
    --text: #14213D;
    --muted: #5B6478;
    --line: #E6E1D6;
    --on-blue: #FFFFFF;
    --on-blue-muted: #DCEBFF;

    --font-head: 'Fredoka', system-ui, sans-serif;
    --font-body: 'Hanken Grotesk', system-ui, sans-serif;

    --radius: 20px;
    --radius-lg: 28px;
    --shadow: 0 10px 30px rgba(11, 42, 92, 0.10);
    --shadow-lg: 0 24px 60px rgba(4, 25, 60, 0.35);
    --gutter: 24px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.1; letter-spacing: -0.3px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
.emoji { font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; font-style: normal; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
    font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold); color: var(--blue-ink); box-shadow: 0 10px 24px rgba(4, 25, 60, 0.30); }
.btn-gold:hover { box-shadow: 0 14px 30px rgba(4, 25, 60, 0.40); }
.btn-blue { background: var(--blue-2); color: #fff; }
.btn-blue:hover { background: var(--blue-3); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-lg { padding: 17px 32px; font-size: 1.15rem; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Navigation */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; color: var(--blue-ink); white-space: nowrap; }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 4px 10px rgba(11, 42, 92, 0.25); }
.nav-links { display: flex; align-items: center; gap: 26px; font-weight: 600; color: var(--muted); }
.nav-links a:hover { color: var(--blue-2); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
    border: 1px solid var(--line); font-weight: 700; font-size: 0.9rem; color: var(--blue-ink); background: #fff;
}
.lang:hover { border-color: var(--blue-2); }
/* Flag backgrounds behind the language switch; a soft dark tint keeps the white label readable */
.lang.flag-no, .lang.flag-en {
    color: #fff; border: none; padding: 8px 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75), 0 0 6px rgba(0, 0, 0, 0.35);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(11, 42, 92, 0.2);
    background-size: 100% 100%; background-repeat: no-repeat;
    transition: filter .2s ease, transform .2s ease;
}
.lang.flag-no svg, .lang.flag-en svg { display: none; }
.lang.flag-no, .lang.flag-en { padding: 8px 18px; letter-spacing: 0.2px; }
.lang.flag-no:hover, .lang.flag-en:hover { filter: brightness(1.08) saturate(1.1); transform: translateY(-1px); }
.lang.flag-no {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 16' preserveAspectRatio='none'%3E%3Crect width='22' height='16' fill='%23BA0C2F'/%3E%3Cpath d='M6 0h4v16H6zM0 6h22v4H0z' fill='%23fff'/%3E%3Cpath d='M7 0h2v16H7zM0 7h22v2H0z' fill='%2300205B'/%3E%3C/svg%3E");
}
.lang.flag-en {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.28)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30' preserveAspectRatio='none'%3E%3CclipPath id='t'%3E%3Cpath d='M30 15h30v15zv15H0zH0V0zV0h30z'/%3E%3C/clipPath%3E%3Crect width='60' height='30' fill='%23012169'/%3E%3Cpath d='M0 0l60 30M60 0L0 30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0 0l60 30M60 0L0 30' clip-path='url(%23t)' stroke='%23C8102E' stroke-width='4'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/svg%3E");
}
.nav .btn { padding: 10px 20px; font-size: 0.95rem; }

/* Hero */
.hero {
    position: relative; overflow: hidden; color: var(--on-blue);
    background:
        radial-gradient(circle at 12% 8%, rgba(159, 208, 255, 0.45), rgba(159, 208, 255, 0) 42%),
        radial-gradient(circle at 92% 100%, rgba(4, 32, 79, 0.6), rgba(4, 32, 79, 0) 55%),
        linear-gradient(135deg, var(--blue-1) 0%, var(--blue-2) 55%, var(--blue-3) 100%);
    padding: 84px 0 0;
}
.beam { position: absolute; top: -120px; width: 220px; height: 900px; pointer-events: none;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)); filter: blur(10px); }
.confetti { position: absolute; border-radius: 6px; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: end; }
.hero-text { padding-bottom: 96px; }
.pill {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.28);
    font-weight: 700; font-size: 0.9rem; color: var(--gold); margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.4rem); margin-bottom: 20px; }
.hero h1 .gold { color: var(--gold); }
.hero .lead { font-size: 1.2rem; color: var(--on-blue-muted); max-width: 520px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.hero-stats div { color: var(--on-blue-muted); font-size: 0.95rem; }
.hero-stats b { display: block; font-family: var(--font-head); font-size: 1.7rem; color: #fff; line-height: 1.1; }

.hero-phones { position: relative; height: 560px; }
.phone {
    position: absolute; width: 270px; aspect-ratio: 600 / 1287; border-radius: 40px; background: #111318; padding: 10px;
    box-shadow: var(--shadow-lg);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 31px; background: #fff; }
.hero-phones .p1 { left: 4%; top: 70px; transform: rotate(-7deg); }
.hero-phones .p2 { right: 4%; top: 10px; transform: rotate(6deg); }

/* Sections */
section { padding: 96px 0; }
.kicker { font-weight: 700; font-size: 0.85rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--blue-2); margin-bottom: 10px; }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 52px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.9rem); margin-bottom: 14px; }
.section-head p { font-size: 1.15rem; color: var(--muted); }

/* Sports */
.sports { background: var(--surface); }
.sport-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.sport {
    position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px 12px 18px; text-align: center; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
}
.sport .emoji { display: block; font-size: 2.3rem; line-height: 1; margin-bottom: 10px; }
.sport small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.sport.soon { opacity: 0.75; }
.tag {
    position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 8px;
    font-family: var(--font-body); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px;
    background: #FFF1C2; color: #7A5A00;
}
.tag.soon { background: #E8EEF8; color: #3A5378; }
.sports-note { text-align: center; color: var(--muted); margin-top: 26px; }

/* Showcase rows */
.showcase { display: grid; gap: 110px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.row.flip .row-media { order: -1; }
.row-text h3 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 16px; }
.row-text p { font-size: 1.12rem; color: var(--muted); margin-bottom: 18px; }
.checks { list-style: none; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 34px; font-weight: 500; }
.checks li::before {
    content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
    background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B2A5C' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.row-media {
    position: relative; border-radius: var(--radius-lg); min-height: 520px; overflow: hidden;
    background:
        radial-gradient(circle at 20% 10%, rgba(159, 208, 255, 0.5), rgba(159, 208, 255, 0) 45%),
        linear-gradient(150deg, var(--blue-1), var(--blue-2) 55%, var(--blue-3));
}
.row-media .phone { left: 50%; top: 56px; width: 300px; transform: translateX(-50%) rotate(-3deg); }
.row.flip .row-media .phone { transform: translateX(-50%) rotate(3deg); }
.row-media .phone.second { width: 230px; top: 150px; left: 74%; transform: translateX(-50%) rotate(7deg); z-index: 2; }
.row-media.duo .phone:first-child { left: 36%; }

/* Scroll motion (html.motion is set only when the visitor allows motion and JavaScript runs).
   The extra translate/rotate/scale properties stack on top of each phone's own transform. */
@keyframes phone-float { from { translate: 0 0; } to { translate: 0 -14px; } }
.motion .hero-phones .p1 { animation: phone-float 4.2s ease-in-out infinite alternate; }
.motion .hero-phones .p2 { animation: phone-float 5s ease-in-out -2.5s infinite alternate; }
.motion .row-media .phone {
    opacity: 0; translate: 0 70px; rotate: -9deg; scale: .9;
    transition: opacity .6s ease, translate .9s cubic-bezier(.2, .8, .2, 1), rotate .9s cubic-bezier(.2, .8, .2, 1), scale .9s cubic-bezier(.2, .8, .2, 1);
}
.motion .row.flip .row-media .phone { rotate: 9deg; }
.motion .row .row-media.in .phone { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; }
/* Winner row: the share card slides out from the winner phone as you scroll (--p goes 0 → 1). */
.motion .row-media.duo .phone.second {
    rotate: 0deg; scale: 1; transition: opacity .6s ease .15s;
    translate: calc((1 - var(--p, 1)) * -110px) calc((1 - var(--p, 1)) * -50px);
}
.motion .row-media.duo .phone:first-child { translate: 0 calc((1 - var(--p, 1)) * 30px); }
.motion .row-media.duo.in .phone:first-child { transition: opacity .6s ease, rotate .9s cubic-bezier(.2, .8, .2, 1), scale .9s cubic-bezier(.2, .8, .2, 1); }

/* Small feature cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 110px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card .emoji { font-size: 2rem; line-height: 1; display: block; margin-bottom: 14px; }
.card h4 { font-family: var(--font-head); font-size: 1.25rem; margin-bottom: 6px; }
.card p { color: var(--muted); }

/* Formats */
.formats { background: var(--surface); }
.format-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.fgroup { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.fgroup h3 { font-size: 1.35rem; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.fgroup ul { list-style: none; display: grid; gap: 14px; }
.fgroup li b { display: block; font-weight: 700; }
.fgroup li span { color: var(--muted); font-size: 0.95rem; }

/* Video */
.video-section { background: var(--blue-ink); color: #fff; }
.video-section .section-head p { color: var(--on-blue-muted); }
.video-section .kicker { color: var(--gold); }
.video-frame { max-width: 960px; margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: #000; }
.video-frame video { width: 100%; height: auto; aspect-ratio: 16 / 9; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; position: relative; }
.step::before {
    counter-increment: step; content: counter(step);
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; margin-bottom: 16px;
    background: var(--blue-2); color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 1.3rem;
}
.step h3 { font-size: 1.25rem; margin-bottom: 6px; }
.step p { color: var(--muted); }

/* Free & Pro */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 900px; margin: 0 auto; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.plan h3 { font-size: 1.7rem; margin-bottom: 6px; }
.plan .price { color: var(--muted); margin-bottom: 20px; }
.plan.pro { background: linear-gradient(150deg, var(--blue-2), var(--blue-3)); color: #fff; border: none; }
.plan.pro .price { color: var(--on-blue-muted); }
.plan.pro .checks li { color: #fff; }

/* Coming next */
.next { background: var(--surface); }
.next-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.next-grid .card { box-shadow: none; background: var(--bg); }

/* CTA */
.cta {
    position: relative; overflow: hidden; text-align: center; color: #fff;
    background:
        radial-gradient(circle at 50% 0%, rgba(159, 208, 255, 0.4), rgba(159, 208, 255, 0) 55%),
        linear-gradient(135deg, var(--blue-1), var(--blue-2) 55%, var(--blue-3));
}
.cta img.icon { width: 120px; height: 120px; border-radius: 28px; margin: 0 auto 26px; box-shadow: var(--shadow-lg); }
.cta h2 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); margin-bottom: 14px; }
.cta p { font-size: 1.2rem; color: var(--on-blue-muted); max-width: 600px; margin: 0 auto 30px; }

/* Footer */
.footer { background: var(--blue-ink); color: var(--on-blue-muted); padding: 60px 0 28px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; margin-bottom: 40px; }
.footer .brand { color: #fff; margin-bottom: 12px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 64px; }
.footer h4 { font-family: var(--font-head); color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.footer-cols a { display: block; margin-bottom: 10px; }
.footer-cols a:hover { color: var(--gold); }
.footer-grid p a { text-decoration: underline; text-underline-offset: 3px; }
.footer-grid p a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 22px; font-size: 0.9rem; text-align: center; }

/* Responsive */
@media (max-width: 980px) {
    .nav-links { display: none; }
    .hero-grid, .row { grid-template-columns: 1fr; }
    .hero-text { padding-bottom: 0; text-align: center; }
    .hero .lead { margin-left: auto; margin-right: auto; }
    .hero-actions, .hero-stats { justify-content: center; }
    .hero-phones { height: 440px; max-width: 520px; width: 100%; margin: 20px auto 0; }
    .hero-phones .phone { width: 210px; }
    .row.flip .row-media { order: 0; }
    .row-text { text-align: center; }
    .checks { text-align: left; max-width: 460px; margin: 0 auto; }
    .showcase { gap: 80px; }
    .cards, .format-groups, .next-grid { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    :root { --gutter: 16px; }
    section { padding: 72px 0; }
    .hero { padding-top: 56px; }
    .hero .confetti { display: none; }
    .nav .btn { display: none; }
    .brand { font-size: 1.15rem; }
    .hero-actions .btn { width: 100%; }
    .hero-stats { gap: 22px; }
    .hero-phones { height: 360px; }
    .hero-phones .phone { width: 170px; border-radius: 30px; padding: 8px; }
    .hero-phones .phone img { border-radius: 23px; }
    .row-media { min-height: 440px; }
    .row-media .phone { width: 240px; }
    .row-media .phone.second { width: 170px; top: 130px; }
    .cards, .format-groups, .next-grid, .steps, .plans { grid-template-columns: 1fr; }
    .sport-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-cols { gap: 40px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .btn:hover { transition: none; transform: none; }
}
