/* === Variables === */
:root {
    /* Editorial Swiss palette — the tokens the App Store screenshots are built
       from (Screenshot/marketing/source/build.py), so page and store match. */
    --ink: #15171c;            /* near-black headlines / text */
    --ink-soft: #71767e;       /* muted body text */
    --bg: #f4f3ef;             /* warm off-white page */
    --bg-alt: #eceae4;         /* slightly deeper section band */
    --dark: #1c2a41;           /* Grischun navy — dark sections */

    --red: #da271b;            /* Swiss / Grischun flag red */
    --red-dark: #b81d13;
    --red-tint: #fbe6e4;
    --gold: #a67b39;           /* bronze accent (used on dark) */
    --gold-tint: #f3ead9;
    --forest: #1c2a41;         /* alpine navy */
    --forest-tint: #e5e8ee;

    /* Legacy aliases kept so existing inline icon colors stay coherent */
    --primary: #15171c;
    --primary-light: #e8e7e1;
    --secondary: #da271b;
    --secondary-light: #fbe6e4;
    --accent: #a67b39;
    --accent-light: #f3ead9;
    --forest-light: #e5e8ee;
    --dark-light: #e4e3dd;
    --cream: #f4f3ef;

    --card: #ffffff;
    --text: #15171c;
    --text-muted: #71767e;
    --radius: 14px;
    --radius-sm: 10px;
    --line: rgba(20,20,15,0.10);
    --shadow: 0 1px 2px rgba(20,20,15,0.04), 0 6px 20px rgba(20,20,15,0.05);
    --shadow-lg: 0 12px 40px rgba(20,20,15,0.12);
}

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

/* === Utilities === */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.text-accent { color: var(--red); }

/* Eyebrow label — shared editorial kicker */
.eyebrow, .hero-badge, .section-tag {
    display: inline-block;
    font-size: 0.78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.16em;
    color: var(--red); margin-bottom: 18px;
}

/* === Nav === */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(244,243,239,0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: background 0.3s, border-color 0.3s;
}
.navbar.scrolled { background: rgba(244,243,239,0.96); border-bottom-color: var(--line); }
.nav-container {
    max-width: 1120px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.nav-back {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 10px;
    color: var(--ink-soft); transition: all 0.2s;
    margin-right: 4px;
}
.nav-back:hover { background: var(--primary-light); color: var(--ink); }
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.nav-icon { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 2px 8px rgba(20,20,15,0.12); }
.logo-text { color: var(--ink); }
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-size: 0.88rem; font-weight: 500; color: var(--ink-soft); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
    font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em;
    padding: 9px 20px; border-radius: 999px;
    background: var(--red); color: #fff;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); background: var(--red-dark); box-shadow: 0 6px 16px rgba(213,43,30,0.35); }

/* Mobile toggle */
.mobile-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.mobile-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.3s; }

@media (max-width: 768px) {
    .nav-links, .nav-cta { display: none; }
    .mobile-toggle { display: flex; }
    .nav-links.open {
        display: flex; flex-direction: column; gap: 0;
        position: absolute; top: 64px; left: 0; right: 0;
        background: var(--bg); border-bottom: 1px solid var(--line);
        padding: 16px 24px;
    }
    .nav-links.open a { padding: 12px 0; font-size: 1rem; }
}

/* === Hero === */
.hero {
    position: relative; overflow: hidden;
    padding: 150px 0 200px;
    background: var(--bg);
}
.hero-flag { position: absolute; top: 96px; right: 40px; z-index: 1; line-height: 0; }
.hero-flag svg { border-radius: 6px; box-shadow: 0 6px 18px rgba(213,43,30,0.22); }

.hero-content { display: flex; align-items: center; gap: 56px; position: relative; z-index: 2; }
.hero-text { flex: 1; }
.hero h1 {
    font-size: clamp(2.8rem, 6.4vw, 4.6rem); font-weight: 900;
    line-height: 0.98; letter-spacing: -0.035em; color: var(--ink);
    margin-bottom: 24px;
}
.hero-subtitle { font-size: 1.12rem; color: var(--ink-soft); max-width: 460px; margin-bottom: 32px; line-height: 1.6; }
.hero-actions { margin-bottom: 44px; }
.hero-stats { display: flex; gap: 40px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-number { font-size: 1.9rem; font-weight: 900; color: var(--ink); letter-spacing: -0.02em; line-height: 1; }
.stat-label { font-size: 0.74rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.1em; }

.hero-visual { flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.hero-phone {
    width: 300px; border-radius: 28px;
    box-shadow: 0 30px 70px rgba(20,20,15,0.22), 0 8px 24px rgba(20,20,15,0.12);
}

.hero-mountains { position: absolute; left: 0; right: 0; bottom: 0; z-index: 0; line-height: 0; pointer-events: none; }
.hero-mountains svg { width: 100%; height: 220px; display: block; }

@media (max-width: 900px) {
    .hero { padding: 130px 0 170px; }
    .hero-content { flex-direction: column-reverse; text-align: center; gap: 40px; }
    .hero-subtitle { margin-left: auto; margin-right: auto; }
    .hero-stats { justify-content: center; flex-wrap: wrap; gap: 28px; }
    .hero-actions { display: flex; justify-content: center; }
    .hero-flag { display: none; }
    .hero-phone { width: 240px; }
}
@media (max-width: 560px) {
    .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 320px; margin: 0 auto; }
    .hero-mountains svg { height: 140px; }
}

/* === Section Headers === */
.section-header { text-align: center; margin-bottom: 56px; }
.section-header .section-tag { margin-bottom: 14px; }
.section-header h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 900;
    letter-spacing: -0.03em; line-height: 1.04; color: var(--ink);
}
.section-header.light h2 { color: #fff; }
.section-header.light .section-tag { color: var(--gold); }

/* === Features === */
.features { padding: 104px 0; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
    background: var(--card); border-radius: var(--radius); padding: 30px;
    box-shadow: var(--shadow); border: 1px solid var(--line);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(20,20,15,0.16); }
.feature-icon {
    width: 50px; height: 50px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}
.feature-card h3 { font-size: 1.08rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature-card p { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.55; }

@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }

/* === Topics === */
.topics { padding: 104px 0; background: var(--bg-alt); }
.topics-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.topic-card {
    background: var(--card); border-radius: var(--radius); padding: 26px 18px;
    text-align: center; box-shadow: var(--shadow); border: 1px solid var(--line);
    transition: transform 0.3s, box-shadow 0.3s;
}
.topic-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.topic-emoji { font-size: 2rem; display: block; margin-bottom: 12px; }
.topic-card h4 { font-size: 0.92rem; font-weight: 800; margin-bottom: 4px; }
.topic-card p { font-size: 0.76rem; color: var(--ink-soft); line-height: 1.45; }

@media (max-width: 900px) { .topics-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .topics-grid { grid-template-columns: repeat(2, 1fr); } }

/* === Dialogues === */
.dialogues {
    padding: 104px 0;
    background: var(--dark);
}
.dialogues-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.dialogue-card {
    background: rgba(255,255,255,0.05); border-radius: var(--radius); padding: 30px;
    border: 1px solid rgba(255,255,255,0.09);
    transition: transform 0.3s, background 0.3s, border-color 0.3s;
}
.dialogue-card:hover { transform: translateY(-4px); background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.16); }
.dialogue-icon {
    width: 54px; height: 54px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}
.dialogue-icon.primary { background: #fff; color: var(--ink); }
.dialogue-icon.secondary { background: var(--red); color: #fff; }
.dialogue-icon.accent { background: var(--gold); color: #fff; }
.dialogue-icon.forest { background: var(--forest); color: #fff; }
.dialogue-card h3 { color: #fff; font-size: 1.08rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.01em; }
.dialogue-card p { color: rgba(255,255,255,0.58); font-size: 0.88rem; line-height: 1.5; }

@media (max-width: 900px) { .dialogues-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .dialogues-grid { grid-template-columns: 1fr; } }

/* === Screenshots === */
.screenshots { padding: 104px 0; background: var(--bg-alt); }
.screenshots-wrapper {
    display: flex; align-items: center; gap: 16px;
    max-width: 1200px; margin: 0 auto; padding: 0 16px;
}
.screenshots-scroll {
    flex: 1; min-width: 0;
    display: flex; gap: 20px; overflow-x: auto;
    padding: 8px 0 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.screenshots-scroll::-webkit-scrollbar { display: none; }
.screenshot-item { flex-shrink: 0; width: 260px; scroll-snap-align: start; }
.screenshot-item img {
    width: 100%; border-radius: 22px;
    box-shadow: 0 10px 36px rgba(20,20,15,0.14);
    transition: transform 0.3s ease;
}
.screenshot-item img:hover { transform: scale(1.03); }
.screenshot-caption {
    text-align: center; margin-top: 14px;
    font-size: 0.74rem; font-weight: 700; color: var(--ink-soft);
    text-transform: uppercase; letter-spacing: 0.1em;
}
.scroll-btn {
    flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
    background: #fff; border: 1px solid var(--line);
    color: var(--ink-soft); display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 8px rgba(20,20,15,0.08);
}
.scroll-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
@media (max-width: 768px) {
    .scroll-btn { width: 36px; height: 36px; }
    .screenshots-wrapper { gap: 8px; padding: 0 8px; }
}
@media (max-width: 560px) { .screenshot-item { width: 180px; } }

/* === Dialects === */
.dialects { padding: 104px 0; }
.dialects-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
    max-width: 720px; margin: 0 auto;
}
.dialect-card {
    background: var(--card); border-radius: var(--radius); padding: 20px 24px;
    text-align: center; box-shadow: var(--shadow); border: 1px solid var(--line);
    transition: transform 0.3s, box-shadow 0.3s;
}
.dialect-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.dialect-emoji { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.dialect-card h4 { font-size: 0.95rem; font-weight: 800; margin-bottom: 2px; }
.dialect-card p { font-size: 0.75rem; color: var(--ink-soft); }

@media (max-width: 560px) { .dialects-grid { grid-template-columns: repeat(2, 1fr); } }

/* === Our Story === */
.our-story { padding: 104px 0; background: var(--bg-alt); }

.story-hero {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    border-radius: var(--radius); overflow: hidden;
    background: var(--card); box-shadow: var(--shadow-lg);
    margin-bottom: 64px; border: 1px solid var(--line);
}
.story-hero-photo { position: relative; overflow: hidden; }
.story-hero-photo img {
    width: 100%; height: 100%; object-fit: cover; object-position: center 45%;
    display: block; filter: brightness(1.02) contrast(1.03);
    transition: transform 0.6s ease;
}
.story-hero-photo img:hover { transform: scale(1.04); }
.story-hero-text {
    display: flex; flex-direction: column; justify-content: center; padding: 48px;
}
.story-quote {
    font-size: clamp(1.2rem, 2.5vw, 1.55rem); font-weight: 800; line-height: 1.4;
    color: var(--ink); letter-spacing: -0.01em; margin-bottom: 20px;
}
.story-author { font-size: 0.82rem; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 0.08em; }

@media (max-width: 768px) {
    .story-hero { grid-template-columns: 1fr; }
    .story-hero-photo { max-height: 280px; }
    .story-hero-text { padding: 32px; }
}

/* Timeline */
.story-timeline { position: relative; max-width: 800px; margin: 0 auto; padding: 0 20px; }
.timeline-line {
    position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
    background: linear-gradient(to bottom, var(--red), var(--gold));
    transform: translateX(-50%); border-radius: 2px;
}
.timeline-item {
    display: flex; align-items: flex-start; gap: 32px;
    margin-bottom: 40px; position: relative;
    padding-right: calc(50% + 32px);
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item .timeline-marker {
    position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--card); border: 3px solid var(--ink);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; z-index: 2; box-shadow: 0 4px 12px rgba(20,20,15,0.10);
}
.timeline-marker.dual {
    width: auto; height: auto; background: none; border: none; box-shadow: none;
    display: flex; flex-direction: column; gap: 4px; align-items: center;
}
.timeline-marker.dual span {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--card); border: 3px solid var(--ink);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; box-shadow: 0 4px 12px rgba(20,20,15,0.10);
}
.timeline-item.right {
    padding-right: 0; padding-left: calc(50% + 32px); flex-direction: row-reverse;
}
.timeline-card {
    background: var(--card); border-radius: var(--radius); padding: 28px;
    box-shadow: var(--shadow); border: 1px solid var(--line);
    transition: transform 0.3s, box-shadow 0.3s; flex: 1;
}
.timeline-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.timeline-label {
    display: inline-block; font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--red); margin-bottom: 10px;
}
.timeline-card h4 { font-size: 1.05rem; font-weight: 800; margin-bottom: 8px; color: var(--ink); letter-spacing: -0.01em; }
.timeline-card p { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.7; }

@media (max-width: 768px) {
    .timeline-line { left: 24px; }
    .timeline-item, .timeline-item.right {
        padding-left: 72px; padding-right: 0; flex-direction: row;
    }
    .timeline-item .timeline-marker { left: 24px; width: 40px; height: 40px; font-size: 1rem; }
}

/* === CTA === */
.cta { padding: 96px 0 112px; }
.cta-card {
    position: relative; overflow: hidden;
    text-align: center; padding: 72px 40px; border-radius: 24px;
    background: var(--dark);
    color: #fff; display: flex; flex-direction: column; align-items: center;
}
.cta-card::before {
    content: ""; position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
    width: 520px; height: 520px; border-radius: 50%;
    background: radial-gradient(circle, rgba(213,43,30,0.25), transparent 60%);
    pointer-events: none;
}
.cta-card > * { position: relative; z-index: 1; }
.cta-icon {
    width: 88px; height: 88px; border-radius: 22px;
    margin: 0 auto 24px; box-shadow: 0 8px 28px rgba(0,0,0,0.3);
}
.cta-card h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 900; letter-spacing: -0.03em; margin-bottom: 10px; }
.cta-card p { font-size: 1.05rem; opacity: 0.78; margin-bottom: 32px; }

/* === Footer === */
.footer { padding: 32px 0; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.footer-icon { width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 2px 6px rgba(20,20,15,0.1); }
.footer-copy { font-size: 0.82rem; color: var(--ink-soft); }
@media (max-width: 560px) { .footer-inner { flex-direction: column; gap: 12px; text-align: center; } }

/* === Splash Screen === */
.splash {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--dark); display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s ease;
}
.splash.fade-out { opacity: 0; pointer-events: none; }
.splash.hidden { display: none; }
#splashCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.splash-ring { position: absolute; inset: 0; pointer-events: none; }
.ring-img {
    position: absolute; width: 52px; height: 52px;
    opacity: 0; transform: scale(0.3);
    transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ring-img.visible { opacity: 0.2; transform: scale(1); }

.splash-titles {
    position: relative; z-index: 2;
    text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.splash-title {
    font-size: clamp(2.6rem, 7vw, 3.4rem); font-weight: 900; letter-spacing: -0.03em;
    background: linear-gradient(90deg, #ffffff, #e4e3dd, #ffffff);
    background-size: 300% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0; transform: scale(0.5);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1.2;
}
.splash-title.visible { animation: text-shimmer 2.5s ease-in-out infinite; opacity: 1; transform: scale(1); }
@keyframes text-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.splash-subtitle {
    font-size: clamp(1.6rem, 5vw, 2.2rem); font-weight: 500;
    color: #e4e3dd; text-shadow: 0 0 10px rgba(213,43,30,0.3);
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.splash-subtitle.visible { opacity: 1; transform: translateY(0); }

.splash-label {
    font-size: 0.9rem; font-weight: 500; color: rgba(228,227,221,0.7);
    opacity: 0; transition: opacity 0.6s ease;
}
.splash-label.visible { opacity: 1; }

/* === Animations === */
[data-animate] {
    opacity: 0; transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
[data-animate].visible { opacity: 1; transform: translateY(0); }

/* Topic-card line icons (replaced emoji) */
.topic-emoji { color: var(--forest); }
.topic-emoji svg { width: 32px; height: 32px; display: block; margin: 0 auto; }
.timeline-marker svg { width: 22px; height: 22px; }
.dialect-emoji svg { width: 26px; height: 26px; display: block; margin: 0 auto; color: var(--forest); }
.timeline-marker svg { color: var(--forest); }
.timeline-item .timeline-marker { border-color: var(--gold); }
.timeline-marker svg { color: var(--gold); }
