/* ============================================================
   Rybmap — rybmap.cz
   Barvy odpovídají iOS aplikaci (AppTheme.swift / Assets.xcassets)
   ============================================================ */

:root {
    /* Brand — light mode (z asset katalogu aplikace) */
    --water-deep: #1c4a6b;
    --water-light: #599ec7;
    --accent-green: #33a673;
    --hero-start: #1c4a6b;
    --hero-end: #599ec7;

    --bg: #f7fafc;
    --surface: #ffffff;
    --surface-alt: #eef4f8;
    --text: #17293a;
    --text-secondary: #51667a;
    --border: rgba(28, 74, 107, 0.12);
    --shadow: 0 6px 24px rgba(28, 74, 107, 0.1);
    --shadow-soft: 0 2px 10px rgba(28, 74, 107, 0.07);
}

@media (prefers-color-scheme: dark) {
    :root {
        --water-deep: #7ac7f2;
        --water-light: #6bb8e0;
        --accent-green: #52d185;
        --hero-start: #0f2942;
        --hero-end: #245c85;

        --bg: #0b1622;
        --surface: #14232f;
        --surface-alt: #1a2c3b;
        --text: #e8f1f8;
        --text-secondary: #9db4c6;
        --border: rgba(122, 199, 242, 0.14);
        --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
        --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.25);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
}

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

a {
    color: var(--water-deep);
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

.container--narrow {
    max-width: 760px;
}

/* ---------- Header ---------- */

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

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    max-width: 1080px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
}

.brand img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.site-nav a:hover {
    color: var(--water-deep);
}

.site-nav a.nav-cta {
    color: #fff;
    background: var(--accent-green);
    padding: 8px 16px;
    border-radius: 99px;
    font-weight: 600;
}

.site-nav a.nav-cta:hover {
    filter: brightness(1.08);
}

@media (max-width: 640px) {
    .site-nav a:not(.nav-cta) {
        display: none;
    }
}

/* ---------- Hero ---------- */

.hero {
    background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
    color: #fff;
    overflow: hidden;
    position: relative;
}

.hero::after {
    /* jemné vlnky */
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 80% 10%, rgba(255, 255, 255, 0.1), transparent 60%),
        radial-gradient(ellipse 50% 35% at 15% 90%, rgba(255, 255, 255, 0.07), transparent 60%);
    pointer-events: none;
}

.hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 40px;
    padding: 72px 20px 88px;
    max-width: 1080px;
    margin: 0 auto;
}

.hero h1 {
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}

.hero p.lead {
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.88);
    max-width: 34em;
    margin-bottom: 30px;
}

.hero__badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 99px;
    padding: 5px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero__icon-wrap {
    display: flex;
    justify-content: center;
}

.hero__icon {
    width: min(240px, 55vw);
    height: auto;
    border-radius: 22.5%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
    .hero__icon { animation: none; }
    html { scroll-behavior: auto; }
}

/* Pre-launch CTA — bez loga Apple, neimituje oficiální badge (App Store Marketing Guidelines) */
.prelaunch-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.cta-band .prelaunch-cta {
    align-items: center;
}

.prelaunch-cta__note {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
}

.cta-band .prelaunch-cta__note {
    color: var(--text-secondary);
}

.btn-coming-soon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-green);
    color: #fff;
    text-decoration: none;
    border-radius: 99px;
    padding: 13px 28px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

/* Oficiální App Store badge — použít až po vydání (viz web/README.md) */
.btn-appstore {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-appstore:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}

.btn-appstore img {
    height: 40px;
    width: auto;
    display: block;
}

@media (max-width: 760px) {
    .hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 56px 20px 64px;
    }

    .hero p.lead {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__icon-wrap {
        order: -1;
    }

    .hero__icon {
        width: min(170px, 45vw);
    }

    .hero .prelaunch-cta {
        align-items: center;
    }
}

/* ---------- Sekce ---------- */

.section {
    padding: 72px 0;
}

.section--alt {
    background: var(--surface-alt);
}

.section__title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    letter-spacing: -0.015em;
    margin-bottom: 10px;
    text-align: center;
    color: var(--text);
}

.section__subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 40em;
    margin: 0 auto 44px;
}

/* ---------- Karty funkcí ---------- */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 26px 22px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-card .icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
    color: #fff;
    margin-bottom: 14px;
}

.feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* ---------- PRO sekce ---------- */

.pro-panel {
    background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
    border-radius: 24px;
    color: #fff;
    padding: 48px 36px;
    box-shadow: var(--shadow);
}

.pro-panel__head {
    text-align: center;
    margin-bottom: 36px;
}

.pro-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 99px;
    padding: 4px 14px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.pro-panel h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 8px;
}

.pro-panel__head p {
    color: rgba(255, 255, 255, 0.85);
    max-width: 38em;
    margin: 0 auto;
}

.pro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-bottom: 34px;
}

.pro-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    padding: 14px 16px;
}

.pro-item .icon {
    font-size: 1.25rem;
    line-height: 1.4;
}

.pro-item strong {
    display: block;
    font-size: 0.95rem;
}

.pro-item span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.pro-panel__cta {
    text-align: center;
}

.pro-price {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.pro-price strong {
    font-size: 1.5rem;
}

.pro-panel__cta small {
    display: block;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 10px;
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    .pro-panel {
        padding: 36px 22px;
        border-radius: 18px;
    }
}

/* ---------- Komunita ---------- */

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* ---------- FAQ ---------- */

.faq {
    max-width: 720px;
    margin: 0 auto;
    display: grid;
    gap: 12px;
}

.faq details {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.faq summary {
    cursor: pointer;
    font-weight: 600;
    padding: 16px 20px;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--water-light);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq details p {
    padding: 0 20px 18px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ---------- CTA pás ---------- */

.cta-band {
    text-align: center;
    padding: 72px 20px;
}

.cta-band h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 12px;
}

.cta-band p {
    color: var(--text-secondary);
    margin-bottom: 26px;
}

.cta-band .prelaunch-cta {
    margin-top: 4px;
}

/* ---------- Patička ---------- */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.site-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--water-deep);
    text-decoration: underline;
}

.site-footer__legal {
    margin-top: 8px;
    font-size: 0.75rem;
    line-height: 1.45;
    max-width: 36em;
    color: var(--text-secondary);
    opacity: 0.85;
}

/* ---------- Obsahové stránky (soukromí, podmínky, podpora) ---------- */

.page-hero {
    background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
    color: #fff;
    padding: 52px 0;
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    letter-spacing: -0.02em;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.85);
    margin-top: 8px;
}

.page-content {
    padding: 56px 0 72px;
}

.page-content h2 {
    font-size: 1.35rem;
    margin: 36px 0 12px;
    color: var(--text);
}

.page-content h2:first-child {
    margin-top: 0;
}

.page-content h3 {
    font-size: 1.05rem;
    margin: 24px 0 8px;
}

.page-content p,
.page-content li {
    color: var(--text-secondary);
}

.page-content p {
    margin-bottom: 14px;
}

.page-content ul,
.page-content ol {
    margin: 0 0 16px 22px;
}

.page-content li {
    margin-bottom: 6px;
}

.page-content .updated {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    margin: 24px 0;
}

.contact-card strong {
    color: var(--text);
}

/* ---------- 404 ---------- */

.error-page {
    min-height: 60vh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 60px 20px;
}

.error-page .code {
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    margin-bottom: 8px;
}

/* ---------- Animace při scrollu ---------- */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------- Revír landing (/revir/:id) ---------- */

.revir-page {
    padding: 48px 20px 72px;
}

.revir-state {
    text-align: center;
    padding: 48px 0;
    color: var(--text-secondary);
}

.revir-state__icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.revir-state__lead {
    margin: 12px 0 24px;
}

.revir-spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 16px;
    border: 3px solid var(--border);
    border-top-color: var(--water-deep);
    border-radius: 50%;
    animation: revir-spin 0.8s linear infinite;
}

@keyframes revir-spin {
    to { transform: rotate(360deg); }
}

.revir-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px 32px;
    box-shadow: var(--shadow-soft);
}

.revir-card__badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--water-deep);
    background: color-mix(in srgb, var(--water-deep) 12%, transparent);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.revir-card__title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.25;
    margin-bottom: 6px;
}

.revir-card__number {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.revir-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 16px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.revir-meta dt {
    color: var(--text-secondary);
    font-weight: 500;
}

.revir-meta dd {
    margin: 0;
    color: var(--text);
}

.revir-card__desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    white-space: pre-line;
}

.revir-map-section {
    margin-bottom: 24px;
}

.revir-map {
    width: 100%;
    height: 240px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    z-index: 0;
}

.btn-navigate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--water-deep) 10%, transparent);
    color: var(--water-deep);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid color-mix(in srgb, var(--water-deep) 25%, transparent);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-navigate:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.revir-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn-open-app {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 12px;
    background: var(--water-deep);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-open-app:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

@media (prefers-reduced-motion: reduce) {
    .revir-spinner { animation: none; }
}
