/* ==========================================================================
   Funily — strona główna (landing v2)
   Samodzielny arkusz: brak zależności od Bootstrapa i zewnętrznych CDN.
   Paleta i skala typografii są zdefiniowane raz, w tokenach poniżej.
   ========================================================================== */

@font-face {
    font-family: 'InterVar';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'InterVar';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Kolory — kontrast tekstu na tle >= 4.5:1 (WCAG AA) */
    --canvas: #fbf6ee;
    --surface: #ffffff;
    --surface-warm: #fdf3e7;
    --ink: #14231c;
    --ink-soft: #41544a;
    --muted: #5f6f66;
    --line: #e6ded0;
    --brand: #b8480a;
    --brand-strong: #963904;
    --brand-soft: #fdece0;
    --sun: #f0b429;
    --sun-soft: #fdf3d8;
    --forest: #123126;
    --forest-soft: #1b4133;
    --mint: #e6f2ea;
    --mint-ink: #175c3a;

    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 26px;
    --shadow-sm: 0 1px 2px rgba(20, 35, 28, .05), 0 8px 20px -12px rgba(20, 35, 28, .18);
    --shadow: 0 2px 4px rgba(20, 35, 28, .05), 0 24px 48px -24px rgba(20, 35, 28, .28);
    --shadow-lg: 0 4px 10px rgba(20, 35, 28, .06), 0 40px 80px -32px rgba(20, 35, 28, .32);
    --wrap: 1140px;
    --gutter: clamp(18px, 4vw, 40px);
    --font: 'InterVar', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }

:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
    border-radius: 6px;
}

h1, h2, h3, h4 {
    margin: 0 0 .6em;
    line-height: 1.14;
    letter-spacing: -.02em;
    font-weight: 800;
    text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 60;
    padding: 12px 16px;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius-sm);
    transform: translateY(-200%);
    transition: transform .18s ease;
}
.skip:focus { transform: translateY(0); color: #fff; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.lead {
    font-size: clamp(1.05rem, 1.6vw, 1.22rem);
    color: var(--ink-soft);
    max-width: 34em;
}

.muted { color: var(--muted); }
.small { font-size: .92rem; }

/* ── Przyciski ─────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 14px 26px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, color .16s ease;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 12px 26px -14px rgba(184, 72, 10, .75);
}
.btn-primary:hover { background: var(--brand-strong); color: #fff; transform: translateY(-2px); }

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}
.btn-ghost:hover { background: #fff; color: var(--ink); transform: translateY(-2px); }

.btn-light {
    background: #fff;
    color: var(--brand-strong);
}
.btn-light:hover { background: var(--surface-warm); color: var(--brand-strong); transform: translateY(-2px); }

.btn-on-dark {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, .45);
}
.btn-on-dark:hover { background: rgba(255, 255, 255, .12); color: #ffffff; }

.btn-note-dark { color: #cfe0d6; }
.btn-note-dark svg { color: var(--sun); }

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 26px 0 14px;
}

.btn-note {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: .9rem;
    color: var(--muted);
}
.btn-note span { display: inline-flex; align-items: center; gap: 7px; }
.btn-note svg { width: 15px; height: 15px; flex: none; color: var(--mint-ink); }

/* ── Nagłówek ──────────────────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 246, 238, .88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 74px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.22rem;
    letter-spacing: -.02em;
    color: var(--ink);
    text-decoration: none;
    margin-right: auto;
}
.brand img { width: 34px; height: 34px; }

.site-nav {
    display: flex;
    gap: 26px;
    font-size: .95rem;
    font-weight: 600;
}
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--brand-strong); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-login {
    padding: 10px 14px;
    font-weight: 600;
    font-size: .95rem;
    color: var(--ink-soft);
    text-decoration: none;
}
.header-login:hover { color: var(--ink); }
.header-actions .btn { min-height: 44px; padding: 10px 20px; font-size: .95rem; }

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    padding: clamp(48px, 8vw, 92px) 0 clamp(40px, 6vw, 76px);
    background:
        radial-gradient(1100px 520px at 78% -10%, rgba(240, 180, 41, .20), transparent 62%),
        radial-gradient(900px 460px at 6% 8%, rgba(23, 92, 58, .10), transparent 60%);
    overflow: hidden;
}

.hero .wrap {
    display: grid;
    grid-template-columns: 1.04fr .96fr;
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}

.hero h1 { margin-bottom: .45em; }
.hero .lead { font-size: clamp(1.08rem, 1.7vw, 1.28rem); }

/* Makieta planu dziecka — czysty HTML/CSS, zero obrazków do wczytania */
.plan-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    max-width: 460px;
    margin-inline: auto;
}

.plan-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.plan-head strong { font-size: 1.05rem; }
.plan-day {
    font-size: .82rem;
    font-weight: 700;
    color: var(--mint-ink);
    background: var(--mint);
    border-radius: 999px;
    padding: 5px 11px;
}

.plan-list { display: grid; gap: 10px; }

.plan-row {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--canvas);
}
.plan-row.is-done { background: var(--mint); border-color: #c9e3d5; }
.plan-row.is-next { background: var(--surface-warm); border-color: #f3d9be; }

.plan-mark {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    border: 1.5px solid var(--line);
    color: var(--mint-ink);
    flex: none;
}
.plan-row.is-done .plan-mark { background: var(--mint-ink); border-color: var(--mint-ink); color: #fff; }
.plan-mark svg { width: 15px; height: 15px; }

.plan-text { min-width: 0; }
.plan-text b { display: block; font-size: .98rem; font-weight: 650; }
.plan-text span { font-size: .82rem; color: var(--muted); }

.plan-points {
    font-size: .85rem;
    font-weight: 700;
    color: var(--brand-strong);
    background: var(--brand-soft);
    border-radius: 999px;
    padding: 5px 11px;
    white-space: nowrap;
}

.plan-goal {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
}
.plan-goal-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    font-size: .93rem;
    margin-bottom: 10px;
}
.plan-goal-head b { font-weight: 700; }
.plan-goal-head span { color: var(--muted); font-variant-numeric: tabular-nums; }

.plan-bar {
    height: 12px;
    border-radius: 999px;
    background: #efe7da;
    overflow: hidden;
}
.plan-bar i {
    display: block;
    height: 100%;
    width: 53%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--sun), var(--brand));
}

.plan-hint {
    margin: 12px 0 0;
    font-size: .85rem;
    color: var(--muted);
}

/* ── Sekcje ────────────────────────────────────────────────────────────── */

section[id] { scroll-margin-top: 90px; }

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { max-width: 46rem; margin-bottom: clamp(28px, 4vw, 46px); }
.section-head p { color: var(--ink-soft); font-size: 1.06rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow-sm);
}

.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    background: var(--brand-soft);
    color: var(--brand-strong);
}
.card-icon svg { width: 22px; height: 22px; }
.card-icon.mint { background: var(--mint); color: var(--mint-ink); }
.card-icon.sun { background: var(--sun-soft); color: #8a5a06; }

.turn {
    margin-top: 26px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 18px;
    align-items: center;
    padding: 22px 26px;
    border-radius: var(--radius);
    background: var(--forest);
    color: #eef4f0;
}
.turn strong { color: #fff; }
.turn p { margin: 0; color: #cfe0d6; }
.turn svg { width: 26px; height: 26px; color: var(--sun); flex: none; }

/* Kroki */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 22px;
    box-shadow: var(--shadow-sm);
}
.step::before {
    counter-increment: step;
    content: counter(step);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
    font-size: .95rem;
}
.step h3 { font-size: 1.06rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* Sekcja celu — ciemna */
.goal {
    background: var(--forest);
    color: #eef4f0;
}
.goal h2 { color: #fff; }
.goal .section-head p { color: #cfe0d6; }

.goal .wrap { display: grid; grid-template-columns: 1fr .9fr; gap: clamp(28px, 5vw, 60px); align-items: center; }

.goal-list { display: grid; gap: 14px; margin-top: 8px; }
.goal-list li {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 12px;
    align-items: start;
    color: #dbe8e1;
}
.goal-list svg { width: 20px; height: 20px; color: var(--sun); margin-top: 3px; }
.goal-list b { color: #fff; }

.choose-card {
    background: var(--forest-soft);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
}
.choose-card h3 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.choose-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .10);
    margin-bottom: 10px;
}
.choose-option b { color: #fff; font-weight: 650; font-size: .96rem; }
.choose-option span { font-size: .8rem; color: #b9cfc4; display: block; }
.choose-price { font-weight: 800; color: var(--sun); white-space: nowrap; }
.choose-note {
    margin: 16px 0 0;
    font-size: .86rem;
    color: #b9cfc4;
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding-top: 14px;
}

/* Plany */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; align-items: start; }

.plan-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}
.plan-box.is-premium {
    border-color: #eccf9a;
    box-shadow: var(--shadow);
    background: linear-gradient(180deg, #fffdf8, #fff);
    position: relative;
}
.plan-tag {
    position: absolute;
    top: -13px;
    left: 30px;
    background: var(--sun);
    color: #4a3000;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
}
.plan-box h3 { font-size: 1.25rem; margin-bottom: .2em; }
.plan-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.plan-price b { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.plan-price span { color: var(--muted); font-size: .9rem; }
.plan-box > p { color: var(--ink-soft); font-size: .97rem; }

.plan-features { display: grid; gap: 14px; margin: 22px 0 26px; }
.plan-features li { display: grid; grid-template-columns: 22px 1fr; gap: 11px; align-items: start; }
.plan-features svg { width: 18px; height: 18px; margin-top: 4px; color: var(--mint-ink); flex: none; }
.plan-features b { display: block; font-size: .97rem; font-weight: 650; }
.plan-features span { font-size: .9rem; color: var(--muted); }

.plan-box .btn { width: 100%; }

.honesty {
    margin-top: 22px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    padding: 18px 22px;
    border-radius: var(--radius);
    background: var(--mint);
    color: #14432e;
}
.honesty svg { width: 22px; height: 22px; flex: none; margin-top: 2px; color: var(--mint-ink); }
.honesty p { margin: 0; font-size: .96rem; }

/* Zaufanie */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}
.trust-item svg { width: 24px; height: 24px; color: var(--brand-strong); margin-bottom: 12px; }
.trust-item b { display: block; margin-bottom: 6px; }
.trust-item p { margin: 0; font-size: .93rem; color: var(--ink-soft); }

/* FAQ */
.faq-list { display: grid; gap: 12px; max-width: 52rem; }
.faq-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 4px 22px;
}
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    cursor: pointer;
    font-weight: 650;
    font-size: 1.02rem;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '';
    width: 11px;
    height: 11px;
    flex: none;
    border-right: 2.5px solid var(--brand);
    border-bottom: 2.5px solid var(--brand);
    transform: rotate(45deg);
    transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item p { margin: 0 0 20px; color: var(--ink-soft); font-size: .97rem; }

/* CTA końcowe */
.cta-final { padding: clamp(20px, 4vw, 40px) 0 clamp(64px, 8vw, 96px); }
.cta-panel {
    position: relative;
    border-radius: var(--radius-lg);
    padding: clamp(32px, 5vw, 62px);
    background:
        radial-gradient(700px 320px at 88% 0%, rgba(240, 180, 41, .28), transparent 60%),
        linear-gradient(150deg, var(--forest), #0d2419);
    color: #eef4f0;
    overflow: hidden;
}
.cta-panel h2 { color: #fff; max-width: 22em; }
.cta-panel p { color: #cfe0d6; max-width: 40em; }
.cta-panel .btn-row { margin-bottom: 0; }

/* Stopka */
.site-footer {
    background: #0f2018;
    color: #a9bfb3;
    padding: 46px 0 34px;
    font-size: .93rem;
}
.site-footer a { color: #dcebe2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-top {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
    justify-content: space-between;
    align-items: start;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 750; font-size: 1.1rem; }
.footer-brand img { width: 30px; height: 30px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 26px; }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    justify-content: space-between;
    padding-top: 22px;
    font-size: .88rem;
    color: #8fa79b;
}

/* ── Responsywność ─────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
    .hero .wrap { grid-template-columns: 1fr; }
    .plan-card { margin-top: 8px; }
    .goal .wrap { grid-template-columns: 1fr; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .site-nav { display: none; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .plans { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    body { font-size: 16px; }
    .steps { grid-template-columns: 1fr; }
    .trust-grid { grid-template-columns: 1fr; }
    .header-login { display: none; }
    .btn { width: 100%; }
    .btn-row { flex-direction: column; }
    .turn { grid-template-columns: 1fr; }
    .turn svg { margin-bottom: 4px; }
    .plan-card { padding: 18px; }
    .plan-row { grid-template-columns: 26px 1fr auto; gap: 10px; padding: 11px; }
    .plan-points { font-size: .78rem; padding: 4px 9px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}

@media print {
    .site-header, .cta-panel, .site-footer { display: none; }
}
