/* Samme skrift og farger som i appen (Panti/UI/Theme.swift og Panti/Fonts). */
@font-face { font-family: Figtree; src: url(/fonts/Figtree-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Figtree; src: url(/fonts/Figtree-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Figtree; src: url(/fonts/Figtree-ExtraBold.ttf) format("truetype"); font-weight: 800; font-display: swap; }

:root {
    --bottle: #0b6b4c;
    --bottle-deep: #064a34;
    --foam: #bdefd6;
    --cap: #ffc93c;
    --ink: #12251d;
    --muted: #5b6e65;
    --paper: #ffffff;
    --paper-shade: #f1f5f3;
    --lottery: #b5413a;
    --lottery-soft: #fce8e6;
    --line: #e1e8e4;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--paper-shade);
    line-height: 1.6;
}

a { color: var(--bottle); }

/* Grønn topp med en dus sirkel, som i appen: det grønne går rett ned, og den lyse bunnen
   legger seg over det grønne med avrundede hjørner øverst (::before). */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--bottle);
    color: var(--paper);
    text-align: center;
    padding: 84px 20px 108px;
}

.hero::before,
.page-header::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32px;
    background: var(--paper-shade);
    border-radius: 32px 32px 0 0;
    z-index: 2;
}

.hero::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
}

.hero > * { position: relative; z-index: 1; }

/* Logoen: «pant» i Figtree ExtraBold, og i-en tegnet som flaske med gul kork. */
.wordmark {
    display: inline-flex;
    align-items: baseline;
    font-weight: 800;
    font-size: clamp(3.5rem, 12vw, 5.5rem);
    letter-spacing: -0.025em;
    line-height: 1;
    margin: 0;
    color: inherit;
    text-decoration: none;
}

.wordmark .i { height: 0.76em; width: auto; }
.wordmark.small { font-size: 2rem; color: var(--paper); }

.hero p {
    color: var(--foam);
    font-size: 1.25rem;
    margin: 14px 0 0;
}

.badge {
    display: inline-block;
    margin-top: 28px;
    background: var(--cap);
    color: var(--ink);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 999px;
}

main {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 20px 56px;
}

/* Hvite kort med tynn kant og lett skygge. */
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(18, 37, 29, 0.05);
}

.card h2 { margin-top: 0; }

.features {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-bottom: 20px;
}

.features .card { margin: 0; }
.features h3 { margin: 0 0 6px; color: var(--ink); font-weight: 600; }
.features p { margin: 0; color: var(--muted); }

.page-header {
    position: relative;
    background: var(--bottle);
    color: var(--paper);
    padding: 28px 20px 60px;
}

.policy h2 { color: var(--bottle); font-weight: 600; margin-top: 36px; }
.policy h2:first-of-type { margin-top: 0; }
.policy .updated { color: var(--muted); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--paper-shade); }
th { color: var(--muted); font-weight: 600; }

footer {
    text-align: center;
    color: var(--muted);
    padding: 0 20px 40px;
    font-size: 0.9rem;
}

/* Passer på telefon, iPad og PC: overskrifter som skalerer, lange ord som deles,
   og litt mindre luft rundt kortene på små skjermer. */
html { -webkit-text-size-adjust: 100%; }
body { overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: clamp(1.7rem, 6.5vw, 2.5rem); line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.25rem, 4.6vw, 1.6rem); line-height: 1.3; }
h3 { font-size: 1.1rem; line-height: 1.35; }
a[href^="mailto:"] { overflow-wrap: anywhere; }
.policy table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 600px) {
    main { padding: 24px 14px 40px; }
    .card { padding: 20px 18px; border-radius: 18px; }
    .hero { padding: 64px 16px 84px; }
    .hero::before, .page-header::before { height: 26px; border-radius: 26px 26px 0 0; }
    .hero p { font-size: 1.1rem; }
    .page-header { padding: 20px 18px 50px; }
    .features { grid-template-columns: 1fr; }
}

@media (min-width: 1100px) {
    main { max-width: 860px; }
}

/* ---------- Animasjon av appen på forsiden ---------- */
.demo {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 40px;
    align-items: center;
    margin: 8px 0 36px;
}

.demo-phone {
    position: relative;
    width: 270px;
    height: 560px;
    border-radius: 42px;
    overflow: hidden;
    background: var(--paper-shade);
    box-shadow: 0 24px 50px rgba(6, 74, 52, 0.25), 0 0 0 9px #12251d, 0 0 0 10px #2d3b34;
    font-size: 13px;
    color: var(--ink);
}

.screen { position: absolute; inset: 0; opacity: 0; transform: translateX(20px); transition: opacity .45s ease, transform .45s ease; }
.screen.active { opacity: 1; transform: none; }
.demo-phone.still .screen { transition: none; }

/* Som i appen: grønt rett ned, og den lyse bunnen legger seg over med runde hjørner, 12 px over det første kortet. */
.screen .top { background: var(--bottle); color: #fff; padding: 46px 18px 46px; position: relative; overflow: hidden; }
.screen .top::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: var(--paper-shade); border-radius: 22px 22px 0 0; z-index: 2; }
.screen .top::after { content: ""; position: absolute; right: -60px; top: -40px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255,255,255,.07); }
.screen .top > * { position: relative; z-index: 1; }
.screen .title { font-weight: 600; font-size: 21px; display: flex; align-items: baseline; gap: 8px; }
.screen .title span { color: var(--foam); font-size: 15px; }
.screen .title small { margin-left: auto; color: var(--foam); font-size: 12px; font-weight: 600; }
.screen .big { margin-top: 6px; }
.screen .big b { color: var(--cap); font-size: 38px; font-weight: 800; }
.screen .big span { color: var(--foam); font-size: 15px; }
.screen .figs { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.15); }
.screen .figs b { display: block; font-size: 15px; font-weight: 800; }
.screen .figs span { font-size: 10px; color: var(--foam); }
.screen .body { padding: 0 14px; margin-top: -18px; position: relative; z-index: 3; }
.screen .btn { background: var(--cap); border-radius: 999px; text-align: center; padding: 11px; font-weight: 600; font-size: 13px; box-shadow: 0 4px 10px rgba(6,74,52,.18); }
.screen .lbl { font-weight: 800; font-size: 13px; margin: 14px 4px 6px; }
.screen .card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; margin-bottom: 8px; }
.screen .row { display: grid; grid-template-columns: 1fr auto; }
.screen .row b { font-weight: 600; }
.screen .row span { grid-column: 1; font-size: 10.5px; color: var(--muted); }
.screen .row em { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-weight: 600; font-size: 11px; background: var(--cap); padding: 3px 8px; border-radius: 999px; }

/* Åpning: logoen toner frem, og korken faller ned. */
.splash { background: var(--bottle); display: grid; place-items: center; color: #fff; }
.splash::after { content: ""; position: absolute; right: -80px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.07); }
.splash-logo { display: inline-flex; align-items: baseline; font-weight: 800; font-size: 54px; letter-spacing: -0.025em; position: relative; z-index: 1; }
.splash-logo .i { height: 0.76em; width: auto; overflow: visible; }
.splash.play .splash-logo { animation: fadeUp .6s ease-out both; }
.splash.play .cap { animation: capDrop .7s cubic-bezier(.3,1.5,.5,1) .35s both; }

/* Hjem: kortene glir inn. */
.home.play .rise { animation: fadeUp .5s ease-out .35s both; }
.home.play .rise.d2 { animation-delay: .5s; }

/* Skann: lappen glir inn i rammen, strålen skanner, og «Alt funnet» kommer. */
.scan .cam { position: absolute; inset: 0 0 90px; background: linear-gradient(160deg, #3b4540, #1f2723); display: grid; place-items: center; }
.scan .slip { width: 130px; background: #fbfaf5; border-radius: 4px; padding: 12px 10px; text-align: center; font: 600 9px ui-monospace, Menlo, monospace; color: #222; box-shadow: 0 10px 20px rgba(0,0,0,.35); }
.scan .slip-bars, .till .bars { display: flex; gap: 1.5px; justify-content: center; height: 34px; margin: 8px 0; }
.scan .slip-bars i, .till .bars i { display: block; background: #111; }
.scan .frame { position: absolute; width: 170px; height: 210px; border: 3px solid var(--cap); border-radius: 18px; }
.scan .beam { position: absolute; width: 150px; height: 3px; background: var(--cap); box-shadow: 0 0 12px var(--cap); opacity: 0; }
.scan .panel { position: absolute; left: 10px; right: 10px; bottom: 14px; background: #fff; border-radius: 18px; padding: 16px; font-weight: 800; opacity: 0; }
.scan .ok { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--bottle); color: #fff; font-size: 12px; margin-right: 6px; }
.scan.play .slip { animation: slipIn .8s ease-out both; }
.scan.play .beam { animation: beam 1.4s ease-in-out .8s both; }
.scan.play .panel { animation: fadeUp .4s ease-out 2.2s both; }

/* I kassen: grønt ark med hvit lapp og strekkode. */
.till { background: rgba(18,37,29,.55); }
.till .sheet { position: absolute; left: 0; right: 0; bottom: 0; top: 70px; background: var(--bottle); border-radius: 26px 26px 0 0; padding: 22px 16px; }
.till .receipt { background: #fff; border-radius: 14px; padding: 14px; }
.till .store { font-weight: 600; }
.till .amount { font-size: 30px; font-weight: 800; color: var(--bottle); }
.till .bars { height: 60px; }
.till .code { text-align: center; font: 11px ui-monospace, Menlo, monospace; color: var(--muted); }
.till .hint { color: var(--foam); text-align: center; font-size: 11px; margin: 14px 8px; }
.till.play .sheet { animation: sheetUp .6s cubic-bezier(.2,.9,.3,1) both; }
.till.play .receipt { animation: glow 1.4s ease-in-out .7s both; }

/* Toppliste: den lyse bunnen er lav, og lista starter rett under. */
.board .top { padding-bottom: 28px; }
.board .top::before { height: 12px; }
.board .body { margin-top: 0; }

/* Poeng: premier og fordeler kommer snart, med gul handlepose. */
.screen .soon { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-weight: 600; font-size: 11.5px; }
.screen .soon svg { width: 13px; height: 13px; flex: none; }

/* Toppliste: pallen vokser opp. */
.board .podium { display: flex; align-items: flex-end; gap: 8px; height: 110px; margin-top: 12px; }
.board .podium div { flex: 1; text-align: center; font-weight: 700; font-size: 11px; }
.board .podium i { display: grid; place-items: center; font-style: normal; font-weight: 800; color: var(--ink); border-radius: 10px 10px 3px 3px; transform-origin: bottom; }
.board .p1 { height: 74px; background: linear-gradient(#ffe27a, #e0a800); font-size: 20px; }
.board .p2 { height: 52px; background: linear-gradient(#eef1f4, #a9b2bc); }
.board .p3 { height: 38px; background: linear-gradient(#f0c29a, #b0703c); }
.board.play .podium i { animation: grow .7s cubic-bezier(.3,1.3,.5,1) both; }
.board.play .p2 { animation-delay: .15s; } .board.play .p1 { animation-delay: .3s; } .board.play .p3 { animation-delay: .45s; }
.board .lrow { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 10px; }
.board .lrow i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 11px; }
.board .m1 { background: linear-gradient(135deg, #ffe27a, #e0a800); } .board .m2 { background: linear-gradient(135deg, #eef1f4, #a9b2bc); } .board .m3 { background: linear-gradient(135deg, #f0c29a, #b0703c); }
.board .lrow b { font-weight: 600; flex: 1; }
.board .lrow em { font-style: normal; font-weight: 700; font-size: 11px; }
.board .lrow.me { background: #ddf5e9; }

/* Poeng: myntene faller ned i kortet, og kortet fylles opp. */
.points .ccard { position: relative; aspect-ratio: 85.6 / 54; border-radius: 12px; padding: 14px; background: linear-gradient(135deg, #ffe27a, #ffc93c 50%, #e3a10f); overflow: hidden; box-shadow: 0 10px 20px rgba(6,74,52,.25); }
.points .ccard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.9), rgba(255,243,196,.6)); transform: scaleX(0); transform-origin: left; opacity: .6; }
.points .cname { font-weight: 800; letter-spacing: 3px; font-size: 14px; }
.points .chip { width: 28px; height: 20px; border-radius: 4px; background: linear-gradient(135deg, #e9e4d6, #b9b29c); margin-top: 6px; }
.points .cpts { display: flex; align-items: baseline; gap: 6px; margin-top: 18px; }
.points .cpts b { font: 800 28px ui-rounded, system-ui, sans-serif; }
.points .cowner { font: 600 9px ui-monospace, Menlo, monospace; letter-spacing: 1.5px; opacity: .75; margin-top: 2px; }
.points .pp { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1.3px solid var(--ink); border-radius: 50%; font: 800 7px ui-rounded, system-ui, sans-serif; }
.points .coins { position: absolute; left: 0; right: 0; top: -190px; display: flex; justify-content: center; gap: 22px; pointer-events: none; }
.points .coins i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--cap); box-shadow: 0 2px 4px rgba(6,74,52,.3); }
.points .coins .pp { width: 26px; height: 26px; font-size: 9px; }
.points .card { margin-top: 12px; }
.points.play .coins i { animation: coin 1s ease-in both; }
.points.play .coins i:nth-child(2) { animation-delay: .15s; } .points.play .coins i:nth-child(3) { animation-delay: .3s; }
.points.play .ccard::after { animation: fill 1.2s ease-in-out 1.1s both; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes capDrop { from { transform: translateY(-40px); opacity: 0; } 30% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes slipIn { from { transform: translateY(80px) rotate(-4deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes beam { 0% { opacity: 0; transform: translateY(-70px); } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(70px); } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 rgba(255,255,255,0); } 50% { box-shadow: 0 0 28px rgba(255,255,255,.8); } }
@keyframes grow { from { transform: scaleY(0); } to { transform: none; } }
@keyframes coin { from { transform: translateY(0); opacity: 1; } 85% { opacity: 1; } to { transform: translateY(300px); opacity: 0; } }
@keyframes fill { 0% { transform: scaleX(0); opacity: .6; } 70% { transform: scaleX(1); opacity: .6; } 100% { transform: scaleX(1); opacity: 0; } }

/* Stegene ved siden av telefonen. Trykk for å hoppe til et steg. */
.demo-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.demo-steps li { padding: 12px 16px; border-radius: 16px; cursor: pointer; transition: background .3s, box-shadow .3s; }
.demo-steps li b { display: block; font-weight: 600; }
.demo-steps li span { color: var(--muted); font-size: .95rem; }
.demo-steps li.active { background: #fff; box-shadow: 0 2px 8px rgba(18,37,29,.06); border: 1px solid var(--line); }
.demo-steps li.active b { color: var(--bottle); }

@media (max-width: 760px) {
    .demo { grid-template-columns: 1fr; justify-items: center; gap: 22px; }
    .demo-steps { width: 100%; }
    .demo-steps li { display: none; text-align: center; }
    .demo-steps li.active { display: block; }
}

@media (prefers-reduced-motion: reduce) {
    .screen, .screen * { animation: none !important; transition: none !important; }
}
