/* Rivr — Clay design system */
:root {
    --bg: #F5F5F4;
    --surface: #FAFAFA;
    --fg: #0A0A0A;
    --muted: #6B7280;
    --muted-light: #9CA3AF;
    --accent: #FF6B35;
    --border: #E5E5E5;
    --pill-bg: #0A0A0A;
    --pill-fg: #FFFFFF;
    --max-width: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter",
        "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--fg);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }

/* Layout */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

section { padding: 80px 0; }

/* Nav */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(245, 245, 244, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
}
nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
nav ul {
    list-style: none;
    display: flex;
    gap: 28px;
    align-items: center;
}
nav ul a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.2s;
}
nav ul a:hover { color: var(--fg); }
.lang-switch {
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: var(--fg) !important;
}
.lang-switch:hover { border-color: var(--fg); }
.nav-cta {
    background: var(--pill-bg);
    color: var(--pill-fg) !important;
    padding: 8px 18px;
    border-radius: 100px;
    font-weight: 600 !important;
}
.nav-cta:hover { color: var(--pill-fg) !important; opacity: 0.85; }

/* Buttons */
.btn-primary, .btn-secondary, .mas-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, opacity 0.2s;
    cursor: pointer;
}
.btn-primary {
    background: var(--pill-bg);
    color: var(--pill-fg);
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
.btn-secondary {
    background: transparent;
    color: var(--fg);
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid var(--border);
}
.btn-secondary:hover { border-color: var(--fg); }
.mas-badge-link { line-height: 0; }
.mas-badge-link:hover { transform: translateY(-2px); opacity: 0.85; }
.mas-badge-link img { height: 52px; width: auto; }

/* Hero */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 107, 53, 0.1);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 24px;
}
.hero-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}
.hero h1 {
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    max-width: 880px;
    margin: 0 auto 24px;
}
.hero-sub {
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.55;
}
.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}
.hero-image {
    margin: 0 auto;
    max-width: 1100px;
}
.hero-image img {
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
}

/* Horizontal swipe gallery (Hero) */
.hero-gallery-wrap {
    position: relative;
    margin: 0 auto;
    width: 100%;
}
.hero-gallery {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 24px;
    -webkit-overflow-scrolling: touch;
}
.hero-gallery::-webkit-scrollbar { display: none; }
.hero-gallery img {
    flex: 0 0 auto;
    width: auto;
    max-width: 80vw;
    max-height: 500px;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    background: white;
    scroll-snap-align: center;
    display: block;
    margin: 0 auto;
}
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.85);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.gallery-arrow:hover {
    background: var(--fg);
    transform: translateY(-50%) scale(1.08);
}
.gallery-arrow.left { left: 12px; }
.gallery-arrow.right { right: 12px; }
.gallery-arrow svg { width: 16px; height: 16px; }
@media (max-width: 720px) {
    .gallery-arrow { display: none; }
    .hero-gallery img { max-width: 90vw; max-height: 380px; }
}

/* Generic section heading */
.section-title {
    text-align: center;
    margin-bottom: 56px;
}
.section-title h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.section-title p {
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* Feature grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}
.feature-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}
.feature-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 107, 53, 0.1);
    color: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.feature-card p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Screenshot gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 56px;
}
.gallery img {
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Comparison cards on landing */
.compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.compare-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.compare-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}
.compare-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.compare-card p { color: var(--muted); }
.compare-card .arrow {
    margin-top: 8px;
    font-weight: 700;
    color: var(--accent);
    font-size: 0.95rem;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}
.pricing-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
}
.pricing-card.featured {
    border-color: var(--fg);
    border-width: 2px;
    position: relative;
}
.pricing-card.featured::before {
    content: "Beliebt";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--fg);
    color: white;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.pricing-card.featured[data-popular="Popular"]::before { content: "Popular"; }
.pricing-period {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}
.pricing-amount {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.pricing-sub {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 4px;
    margin-bottom: 24px;
}
.pricing-features {
    list-style: none;
    text-align: left;
    margin: 0 auto 28px;
    display: inline-block;
}
.pricing-features li {
    padding: 6px 0;
    color: var(--fg);
    font-size: 0.95rem;
}
.pricing-features li::before {
    content: "✓";
    color: var(--accent);
    margin-right: 10px;
    font-weight: 700;
}
.pricing-card .btn-primary, .pricing-card .btn-secondary {
    width: 100%;
    justify-content: center;
    margin-top: auto;
}

/* Comparison table (subpages) */
.compare-table-wrap {
    overflow-x: auto;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    margin: 0 auto;
    max-width: 920px;
}
table.compare {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
table.compare th, table.compare td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
table.compare thead th {
    background: var(--bg);
    font-weight: 700;
    font-size: 1rem;
}
table.compare tr:last-child td { border-bottom: none; }
table.compare td.win {
    color: var(--accent);
    font-weight: 600;
}
table.compare td.label { font-weight: 600; }

/* Article (SEO long-form) */
.article {
    max-width: 720px;
    margin: 0 auto;
}
.article h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 40px 0 16px;
    letter-spacing: -0.01em;
}
.article h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 28px 0 10px;
}
.article p { margin-bottom: 16px; color: var(--fg); }
.article ul, .article ol { margin: 0 0 16px 24px; }
.article li { margin-bottom: 8px; }

/* Legal pages */
.legal {
    max-width: 760px;
    margin: 0 auto;
}
.legal h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}
.legal .updated {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
}
.legal h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 32px 0 10px;
}
.legal p { margin-bottom: 12px; color: var(--fg); }
.legal a { color: var(--accent); text-decoration: underline; }

/* CTA section reusable */
.cta-section {
    text-align: center;
    background: var(--fg);
    color: white;
    border-radius: 24px;
    padding: 64px 32px;
    margin: 40px 0;
}
.cta-section h2 {
    font-size: clamp(1.8rem, 3.4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.cta-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.cta-section .mas-badge-link img { height: 56px; }

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
    background: var(--surface);
}
footer .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.footer-copy { color: var(--muted); font-size: 0.85rem; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
    color: var(--muted);
    font-size: 0.85rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--fg); }

/* Mobile */
@media (max-width: 720px) {
    section { padding: 56px 0; }
    nav ul { gap: 14px; }
    nav ul li:nth-child(2), nav ul li:nth-child(3) { display: none; }
    .hero { padding: 48px 0 40px; }
    .hero-image { padding: 0 16px; }
    .cta-section { padding: 48px 24px; }
    footer .container { flex-direction: column; }
}
