/* flyingdev.org — jeden arkusz dla całej witryny */

:root {
    color-scheme: light dark;

    --bg: #ffffff;
    --bg-soft: #f4f7fb;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --border: #e2e8f2;
    --border-strong: #cfd9e8;
    --text: #0d1526;
    --muted: #59677f;
    --accent: #1667d6;
    --accent-soft: #e8f0fd;
    --warn-bg: #fff5f5;
    --warn-border: #f3c9c9;
    --warn-text: #8f1d1d;
    --shadow: 0 1px 2px rgba(13, 21, 38, .06), 0 8px 24px rgba(13, 21, 38, .06);
    --shadow-lift: 0 2px 4px rgba(13, 21, 38, .08), 0 18px 40px rgba(13, 21, 38, .12);
    --radius: 16px;
    --maxw: 1060px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a111e;
        --bg-soft: #0d1626;
        --surface: #101b2d;
        --surface-2: #14213600;
        --surface-2: #142136;
        --border: #1e2c44;
        --border-strong: #2a3b58;
        --text: #e9eef8;
        --muted: #97a6bf;
        --accent: #5aa2ff;
        --accent-soft: #16294a;
        --warn-bg: #2a1518;
        --warn-border: #5c2a2f;
        --warn-text: #ffb3b3;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
        --shadow-lift: 0 2px 6px rgba(0, 0, 0, .45), 0 20px 44px rgba(0, 0, 0, .5);
    }
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- nagłówek ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--text);
    text-decoration: none;
    font-size: 17px;
    white-space: nowrap;
}

.brand svg { width: 22px; height: 22px; flex: none; }
.brand .wordmark { display: inline; }
.brand .dev { color: var(--muted); font-weight: 600; }

nav.main {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 15px;
}

nav.main a {
    color: var(--muted);
    text-decoration: none;
    padding: 7px 11px;
    border-radius: 9px;
    white-space: nowrap;
}

nav.main a:hover,
nav.main a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.lang {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 3px;
    gap: 2px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.lang a {
    color: var(--muted);
    text-decoration: none;
    padding: 3px 10px;
    border-radius: 999px;
    line-height: 1.4;
}

.lang a[aria-current="true"] { background: var(--accent); color: #fff; }

/* wąskie ekrany: marka w pierwszym rzędzie, nawigacja i języki w drugim */
@media (max-width: 640px) {
    .site-header .wrap {
        flex-wrap: wrap;
        min-height: 0;
        padding-top: 10px;
        padding-bottom: 10px;
        row-gap: 4px;
    }

    nav.main {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
        font-size: 14.5px;
    }

    nav.main a { padding: 6px 9px; }
    nav.main a:first-child { margin-left: -9px; }
    .lang { margin-left: 0; }
}

/* ---------- sekcje ---------- */

main { display: block; }

section { padding: 56px 0; }
section + section { padding-top: 0; }

.hero { padding: 72px 0 48px; }

h1 {
    font-size: clamp(32px, 6vw, 48px);
    line-height: 1.1;
    letter-spacing: -.025em;
    margin: 0 0 16px;
    font-weight: 750;
}

h2 {
    font-size: clamp(22px, 3.4vw, 28px);
    letter-spacing: -.018em;
    margin: 0 0 20px;
    font-weight: 700;
}

h3 {
    font-size: 18px;
    letter-spacing: -.01em;
    margin: 0 0 8px;
    font-weight: 650;
}

.lead {
    font-size: clamp(18px, 2.4vw, 21px);
    color: var(--muted);
    max-width: 46ch;
    margin: 0;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 14px;
}

/* ---------- kafle ---------- */

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
    gap: 16px;
}

.tile {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    -webkit-tap-highlight-color: transparent;
}

a.tile:hover,
a.tile:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
    border-color: var(--border-strong);
    outline: none;
}

a.tile:active { transform: translateY(-1px) scale(.995); }

.tile.muted { opacity: .82; }

.tile-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tile-icon {
    width: 56px;
    height: 56px;
    border-radius: 13px;
    flex: none;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.tile-icon img { width: 100%; height: 100%; object-fit: cover; }
.tile-icon svg { width: 26px; height: 26px; color: var(--muted); }

.tile h3 { margin: 0; }

.tile p {
    margin: 0;
    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.55;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.chip {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 10px;
    white-space: nowrap;
}

.chip.live { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

.tile-go {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
}

/* ---------- AeroPlan: hero aplikacji ---------- */

.app-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 28px;
    padding: 64px 0 40px;
}

.app-hero img.icon {
    width: 116px;
    height: 116px;
    border-radius: 26px;
    border: 1px solid var(--border);
    flex: none;
}

.app-hero .txt { flex: 1 1 320px; }
.app-hero h1 { margin-bottom: 10px; }

.badge-link { display: inline-block; margin-top: 20px; }
.badge-link img { height: 46px; width: auto; }

/* odznaka App Store: czarna na jasnym tle, biała na ciemnym */
.badge-img.only-dark { display: none; }

@media (prefers-color-scheme: dark) {
    .badge-img.only-light { display: none; }
    .badge-img.only-dark { display: block; }
}

/* ---------- zrzuty ekranu ---------- */

.shots {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 20px 20px;
    margin: 0 -20px;
    -webkit-overflow-scrolling: touch;
}

.shots img {
    width: 232px;
    flex: none;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    scroll-snap-align: center;
    background: var(--surface-2);
}

.shots figure { margin: 0; flex: none; width: 232px; scroll-snap-align: center; }
.shots figcaption {
    margin-top: 10px;
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.45;
}

/* ---------- listy funkcji ---------- */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

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

.card ul, .plain ul {
    margin: 10px 0 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 15.5px;
}

.card li { margin: 5px 0; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- ostrzeżenie ---------- */

.notice {
    background: var(--warn-bg);
    border: 1px solid var(--warn-border);
    color: var(--warn-text);
    border-radius: var(--radius);
    padding: 22px;
}

.notice h3 { color: var(--warn-text); margin-bottom: 10px; }
.notice p { margin: 0 0 10px; font-size: 15.5px; }
.notice p:last-child { margin-bottom: 0; }

/* ---------- wydania ---------- */

.release {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 24px;
}

.release:first-of-type { border-top: 0; }

.release .meta { color: var(--muted); font-size: 15px; }
.release .ver {
    font-size: 21px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.01em;
    display: block;
}

.release h3 { margin-top: 18px; }
.release h3:first-child { margin-top: 0; }
.release p { margin: 0 0 10px; color: var(--muted); font-size: 15.5px; }

@media (max-width: 640px) {
    .release { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- stopka ---------- */

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 64px;
    padding: 32px 0 48px;
    color: var(--muted);
    font-size: 14.5px;
}

.site-footer .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    align-items: center;
}

.site-footer a { color: var(--muted); }
.site-footer .spacer { margin-left: auto; }

/* ---------- drobne ---------- */

.sources {
    columns: 2;
    column-gap: 32px;
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 15.5px;
}

.sources li { break-inside: avoid; margin: 5px 0; }

@media (max-width: 560px) { .sources { columns: 1; } }

.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 11px 20px;
    border-radius: 11px;
}

.btn.ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border-strong);
}

.center { text-align: center; }
