/* Rodzinny Adwent — landing page. Colours and type follow the app (docs/design/system/tokens.css). No external resources. */
@font-face { font-family: 'Nunito'; src: url('fonts/nunito.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: 'Atkinson'; src: url('fonts/atkinson.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

:root {
  --night: #12302A; --night-raised: #1E4539; --night-deep: #0D241F; --on-night: #F4E3C3; --on-night-muted: #C9B79A;
  --gold: #F2B632; --card: #FFF6E5; --card-sunken: #FBEBD0; --on-card: #3A2414; --on-card-muted: #7A5A3F;
  --primary: #A8322A; --on-primary: #FFF6E5; --ginger: #B9722F;
  --tier-silver: #C9D1D9; --tier-diamond: #9FE7F5;
  --space-s: 8px; --space-m: 12px; --space-l: 16px; --space-xl: 24px; --space-xxl: 32px; --space-xxxl: 56px;
  --radius-s: 14px; --radius-m: 22px; --radius-l: 28px;
  --font-head: 'Nunito', system-ui, sans-serif; --font-body: 'Atkinson', system-ui, sans-serif;
  --shadow-ginger: 0 6px 0 rgba(0, 0, 0, .25);
  --shadow-lift: 0 12px 32px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--night); color: var(--on-night); font: 400 1.0625rem/1.55 var(--font-body); overflow-wrap: break-word; hyphens: auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 var(--space-m); }
h1 { font-weight: 900; font-size: clamp(1.75rem, 6vw + 0.5rem, 3.25rem); }
h2 { font-weight: 900; font-size: clamp(1.625rem, 3vw + 0.75rem, 2.25rem); color: var(--gold); }
h3 { font-weight: 800; font-size: 1.25rem; }
p { margin: 0 0 var(--space-m); }

.wrap { width: min(1080px, 100%); margin: 0 auto; padding: 0 var(--space-l); }
.section { padding: var(--space-xxxl) 0; }
.section--raised { background: var(--night-raised); }
.section--raised .steps li, .section--raised .card--night { background: var(--night); }
.lead { font-size: 1.1875rem; color: var(--on-night); }
.hero .lead { max-width: 36em; }
.muted { color: var(--on-night-muted); }
.overline { font: 800 0.8125rem/1.3 var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--on-night-muted); margin: 0 0 var(--space-s); }

/* Top bar */
.topbar { padding: var(--space-l) 0; }
.topbar .wrap { display: flex; align-items: center; gap: var(--space-m); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: var(--space-m); color: var(--on-night); text-decoration: none; font: 900 1.25rem/1 var(--font-head); }
.brand img { width: 44px; height: 44px; border-radius: 12px; }
.topbar nav { margin-left: auto; display: flex; gap: var(--space-l); flex-wrap: wrap; }
.topbar nav a { color: var(--on-night); text-decoration: none; font: 700 1rem/1 var(--font-head); padding: 16px 4px; }
.topbar nav a:hover { color: var(--gold); }

/* Hero */
.hero { padding: var(--space-xl) 0 var(--space-xxxl); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); align-items: center; }
.hero__art { justify-self: center; width: min(320px, 80vw); }
.hero__facts { display: flex; flex-wrap: wrap; gap: var(--space-s); list-style: none; padding: 0; margin: var(--space-l) 0 0; }
.hero__facts li { background: var(--night-raised); border-radius: 999px; padding: 6px 14px; font: 700 0.9375rem/1.3 var(--font-head); }

/* Store badges: the same height for both (Google Play never smaller), artwork unaltered. */
.badges { display: flex; flex-wrap: wrap; gap: var(--space-m); align-items: center; margin-top: var(--space-xl); }
.badges a { display: inline-block; border-radius: 8px; }
.badges + p { margin-top: var(--space-l); }
.badges--center { justify-content: center; margin-top: var(--space-l); }
.badges img { height: 56px; width: auto; }
@media (max-width: 400px) { .badges img { height: 46px; } }

/* Cards */
.grid { display: grid; gap: var(--space-l); }
.card { background: var(--card); color: var(--on-card); border-radius: var(--radius-m); padding: var(--space-xl); box-shadow: var(--shadow-ginger); }
.card h3 { color: var(--on-card); }
.card p { color: var(--on-card); }
.card p:last-child { margin-bottom: 0; }
.card--night { background: var(--night-raised); color: var(--on-night); box-shadow: none; }
.card--night h3, .card--night p { color: var(--on-night); }

/* Steps */
.steps { list-style: none; padding: 0; margin: var(--space-xl) 0 0; display: grid; gap: var(--space-l); counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-wrap: wrap; gap: var(--space-l); align-items: flex-start; background: var(--night-raised); border-radius: var(--radius-m); padding: var(--space-xl); }
.steps li > div { flex: 1 1 9em; min-width: 0; }
.steps li::before { flex: none; content: counter(step); display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--gold); color: var(--on-card); font: 900 1.5rem/1 var(--font-head); }
.steps h3 { margin-bottom: var(--space-s); }
.steps p { color: var(--on-night); }
.steps p:last-child { margin-bottom: 0; }
.step-row { display: flex; flex-wrap: wrap; gap: var(--space-l) var(--space-xl); align-items: flex-start; }
.step-row > div { flex: 1 1 16em; min-width: 0; }
.tree-live { flex: 0 1 220px; width: 220px; max-width: 100%; margin: 0 auto; }
.tiers { display: flex; flex-wrap: wrap; gap: var(--space-s); margin-top: var(--space-s); }
.tier { border-radius: 999px; padding: 4px 12px; font: 800 0.9375rem/1.3 var(--font-head); color: var(--night); }
.tier--silver { background: var(--tier-silver); }
.tier--gold { background: var(--gold); }
.tier--diamond { background: var(--tier-diamond); }
.note { margin-top: var(--space-xl); display: flex; flex-wrap: wrap; gap: var(--space-l); align-items: center; }
.note img { flex: none; }
.note p { flex: 1 1 9em; min-width: 0; margin: 0; }

/* Activities */
.games { display: grid; gap: var(--space-l); margin-top: var(--space-xl); }
.game { display: flex; flex-wrap: wrap; gap: var(--space-l); align-items: center; }
.game > div { flex: 1 1 9em; min-width: 0; }
.game img { flex: none; width: 88px; height: 88px; }
.game h3 { margin-bottom: var(--space-s); }

/* Screens: a centred carousel — the active phone is large with a gold frame, its neighbours dimmed (site.js marks it). */
.carousel-wrap { margin-top: var(--space-xl); }
.carousel { display: flex; gap: var(--space-xl); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: var(--space-l) calc(50% - min(150px, 34vw)) var(--space-l); scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; border-radius: var(--radius-m); }
.carousel__slide { flex: 0 0 min(300px, 68vw); margin: 0; scroll-snap-align: center; text-align: center; cursor: pointer; transition: transform .45s cubic-bezier(.33, 1, .68, 1), opacity .45s; }
.carousel__phone { border-radius: 44px; padding: 10px; background: var(--night-deep); border: 3px solid var(--night-raised); box-shadow: var(--shadow-lift); transition: border-color .45s; }
.carousel__phone img { width: 100%; border-radius: 34px; }
.carousel__caption { margin-top: var(--space-m); font: 700 1rem/1.3 var(--font-head); color: var(--on-night-muted); transition: color .45s; }
.js .carousel__slide { transform: scale(.88); }
.js .carousel__slide .carousel__phone { opacity: .6; transition: border-color .45s, opacity .45s; }
.js .carousel__slide.is-active { transform: none; cursor: default; }
.js .carousel__slide.is-active .carousel__phone { opacity: 1; }
.carousel__slide.is-active .carousel__phone { border-color: var(--gold); }
.carousel__slide.is-active .carousel__caption { color: var(--gold); }
.carousel__controls { display: none; justify-content: center; align-items: center; gap: var(--space-s); margin-top: var(--space-s); }
.js .carousel__controls { display: flex; }
.carousel__dots { display: flex; justify-content: center; flex-wrap: wrap; }
.carousel__dot { width: 28px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.carousel__dot::after { content: ''; width: 10px; height: 10px; border-radius: 999px; background: var(--on-night-muted); transition: width .3s cubic-bezier(.33, 1, .68, 1), background-color .3s; }
.carousel__dot.is-active::after { width: 24px; background: var(--gold); }
.carousel__dot:focus-visible, .carousel__pause:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 999px; }
.carousel__pause { width: 48px; height: 48px; border-radius: 999px; border: 2px solid var(--on-night-muted); background: none; cursor: pointer; display: grid; place-items: center; }
.carousel__pause::before { content: ''; width: 10px; height: 14px; border-left: 4px solid var(--on-night); border-right: 4px solid var(--on-night); box-sizing: border-box; }
.carousel__pause[aria-pressed="true"]::before { width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent var(--on-night); margin-left: 4px; }
.carousel__pause[hidden] { display: none; }

/* Privacy */
.privacy { display: grid; gap: var(--space-xl); align-items: center; }
.privacy ul { margin: 0 0 var(--space-l); padding-left: 1.2em; }
.privacy li { margin: var(--space-s) 0; }
.privacy__art { width: min(220px, 60vw); justify-self: center; }

/* FAQ */
.faq { display: grid; gap: var(--space-m); margin-top: var(--space-xl); }
.faq details { background: var(--card); color: var(--on-card); border-radius: var(--radius-s); padding: 0 var(--space-xl); }
.faq summary { cursor: pointer; list-style: none; font: 800 1.125rem/1.35 var(--font-head); padding: var(--space-l) 0; min-height: 48px; display: flex; gap: var(--space-m); justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 10px; height: 10px; margin-right: 4px; border-right: 3px solid var(--primary); border-bottom: 3px solid var(--primary); transform: translateY(-3px) rotate(45deg); }
.faq__body { overflow: hidden; }
.faq details p { padding-bottom: var(--space-l); margin: 0; }

/* Download */
.download { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); align-items: center; text-align: center; justify-items: center; }
.download .badges { justify-content: center; }
/* The QR code is for a computer screen; on a phone the badges are enough. */
.qr { display: none; background: var(--card); border-radius: var(--radius-m); padding: var(--space-l); width: min(220px, 100%); box-shadow: var(--shadow-ginger); }
.qr figcaption { color: var(--on-card); font: 700 0.9375rem/1.3 var(--font-head); margin-top: var(--space-s); text-align: center; }
.qr img { width: 100%; }

/* Footer */
.footer { padding: var(--space-xxl) 0; background: var(--night-deep); color: var(--on-night-muted); font-size: 0.9375rem; }
.footer .wrap { display: grid; gap: var(--space-m); }
.footer a { color: var(--on-night); }
.footer nav { display: flex; flex-wrap: wrap; gap: var(--space-l); }
.footer nav a { padding: 12px 0; }
.legal { font-size: 0.8125rem; opacity: .8; margin: 0; }

/* Policy page */
.doc { max-width: 46em; }
.doc h2 { margin-top: var(--space-xxl); font-size: 1.5rem; }
.doc h3 { margin-top: var(--space-xl); color: var(--on-night); }
.doc ul { padding-left: 1.2em; }
.doc li { margin: var(--space-s) 0; }
.doc table { width: 100%; border-collapse: collapse; margin: var(--space-m) 0 var(--space-l); font-size: 0.9375rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: var(--space-s) var(--space-m); border-bottom: 1px solid var(--night-raised); }
.doc th { font-family: var(--font-head); color: var(--gold); }
.table-wrap { overflow-x: auto; }
@media (max-width: 600px) {
  .doc thead { display: none; }
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc tr { padding: var(--space-m) 0; border-bottom: 1px solid var(--night-raised); }
  .doc td { border: 0; padding: 2px 0; }
  .doc td::before { content: attr(data-label); display: block; font: 800 0.8125rem/1.3 var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin-top: var(--space-s); }
}

@media (max-width: 400px) {
  .steps li, .card { padding: var(--space-l); }
}

@media (min-width: 768px) {
  .qr { display: block; }
  .hero .wrap { grid-template-columns: 1.2fr 1fr; }
  .hero__art { grid-column: 2; grid-row: 1; width: 340px; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .games { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 1fr; } /* every tile as tall as the tallest */
  .privacy { grid-template-columns: 1fr 240px; }
  .download { grid-template-columns: auto 1fr; text-align: left; justify-items: start; }
  .download .badges { justify-content: flex-start; }
}

/* Motion: gentle and short, like the app. Hidden-until-visible only when site.js runs (html.js). */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s cubic-bezier(.33, 1, .68, 1), transform .5s cubic-bezier(.33, 1, .68, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.grid .reveal:nth-child(2), .games .reveal:nth-child(2n) { transition-delay: .08s; }
.grid .reveal:nth-child(3) { transition-delay: .16s; }
.card, .steps li, .faq details { transition: transform .2s cubic-bezier(.33, 1, .68, 1), box-shadow .2s cubic-bezier(.33, 1, .68, 1), opacity .5s, background-color .2s; }
.card:hover { transform: translateY(-3px); }
.faq summary::after { transition: transform .25s cubic-bezier(.33, 1, .68, 1); }
.faq details[open] summary::after { transform: translateY(2px) rotate(225deg); }
.faq details.is-closing summary::after { transform: translateY(-3px) rotate(45deg); }
.faq summary:hover { color: var(--primary); }
.hero__art { animation: none; }
.hero h1, .hero .lead, .hero__facts { animation: rise .7s cubic-bezier(.33, 1, .68, 1) both; }
.hero .lead { animation-delay: .08s; } .hero__facts { animation-delay: .24s; }
.hero__art { animation: pop .8s cubic-bezier(.34, 1.56, .64, 1) .1s both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__art, .hero h1, .hero .lead, .hero__facts { animation: none; }
  .carousel__slide, .carousel__phone, .carousel__caption, .carousel__dot::after { transition: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover { transform: none; }
}

/* Season over (from 25 December, see site.js): „Wracamy w grudniu 2027” instead of the download calls. */
[data-over] { display: none; }
.season-over [data-live] { display: none !important; }
.season-over [data-over] { display: block; }

/* Hero: a phone with a finale board, Pierniczek peeking from its corner. */
.hero__phone { position: relative; justify-self: center; width: min(250px, 62vw); }
.hero__phone .carousel__phone { transform: rotate(3deg); }
.hero__peek { position: absolute; right: -44px; bottom: -22px; width: 118px; }
@media (min-width: 768px) { .hero__phone { grid-column: 2; grid-row: 1; justify-self: center; width: 280px; } }
@media (prefers-reduced-motion: reduce) { .hero__phone .carousel__phone { transform: none; } }
.hero__phone { animation: pop .8s cubic-bezier(.34, 1.56, .64, 1) .1s both; }
@media (prefers-reduced-motion: reduce) { .hero__phone { animation: none; } }

/* A plain call-to-action link (404 page). */
.btn { display: inline-block; padding: 12px 24px; border-radius: 999px; background: var(--gold); color: var(--on-card); font: 800 1.0625rem/1.3 var(--font-head); text-decoration: none; box-shadow: var(--shadow-ginger); }
.btn:hover { filter: brightness(1.05); }

/* Many screens: on a phone there is no row of dots (the carousel is swiped; only the pause button stays, it is required for the automatic scrolling). */
@media (max-width: 600px) {
  .carousel__dots { display: none; }
}

/* Phone menu (see site.js): a hamburger button that opens the links as a small panel; hidden on wider screens. */
.menu-button { display: none; }
@media (max-width: 600px) {
  .topbar { position: relative; z-index: 5; }
  .js .menu-button { display: grid; place-items: center; margin-left: auto; width: 48px; height: 48px; border: 2px solid var(--on-night-muted); border-radius: 999px; background: none; cursor: pointer; }
  .menu-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
  .menu-button span, .menu-button span::before, .menu-button span::after { display: block; width: 20px; height: 3px; border-radius: 2px; background: var(--on-night); transition: transform .25s cubic-bezier(.33, 1, .68, 1), background-color .2s; }
  .menu-button span { position: relative; }
  .menu-button span::before, .menu-button span::after { content: ''; position: absolute; left: 0; }
  .menu-button span::before { top: -7px; }
  .menu-button span::after { top: 7px; }
  .menu-button[aria-expanded="true"] span { background: transparent; }
  .menu-button[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
  .menu-button[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }
  .js .topbar nav { display: none; position: absolute; left: var(--space-l); right: var(--space-l); top: calc(100% - 4px); margin: 0; flex-direction: column; gap: 0; padding: var(--space-s); border-radius: var(--radius-m); background: var(--night-raised); box-shadow: var(--shadow-lift); }
  .js .topbar nav.is-open { display: flex; animation: menu-in .22s cubic-bezier(.33, 1, .68, 1) both; }
  .js .topbar nav a { padding: 14px 12px; border-radius: var(--radius-s); }
  .js .topbar nav a:hover { background: var(--night); }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .topbar nav.is-open { animation: none; } .menu-button span, .menu-button span::before, .menu-button span::after { transition: none; } }
