/* === Variables === */
:root {
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --bg-dark: #111111;
    --card: #ffffff;
    --text: #1a1a1a;
    --text-muted: #6b6b6b;
    --text-light: #999999;
    --border: rgba(0, 0, 0, 0.08);
    --accent: #2563eb;
    --accent-light: #eff6ff;
    --accent-hover: #1d4ed8;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 24px rgba(0, 0, 0, 0.06);
}

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: clip;
}
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(--accent); }

/* === Nav === */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}
.navbar.scrolled { background: rgba(255, 255, 255, 0.95); }
.nav-container {
    max-width: 1120px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; }
.logo-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--text); color: var(--bg);
    font-weight: 800; font-size: 0.72rem; letter-spacing: -0.03em;
}
.logo-text { color: var(--text); }
.nav-links { display: flex; gap: 32px; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
    font-size: 0.85rem; font-weight: 600;
    padding: 8px 20px; border-radius: 999px;
    background: var(--accent); color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35); }

/* Mobile toggle */
.mobile-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.mobile-toggle span { width: 22px; height: 2px; background: var(--text); 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(--border);
        padding: 16px 24px;
    }
    .nav-links.open a { padding: 12px 0; font-size: 1rem; }
}

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    font-weight: 600; border-radius: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary {
    background: var(--text); color: #fff;
    padding: 14px 28px; font-size: 0.95rem;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* === Hero === */
.hero {
    position: relative;
    padding: 180px 0 200px;
    text-align: center;
    overflow: hidden;
    background: #E8D5CE;
}
.hero-bg {
    position: absolute; inset: 0;
    background: url('images/hero-alps.svg') center bottom / cover no-repeat;
    pointer-events: none;
}
.hero-bg::after {
    /* Soft white veil behind the text so copy stays readable */
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 38%, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.55) 30%, rgba(255, 255, 255, 0) 62%);
    pointer-events: none;
}
.hero-content { position: relative; max-width: 720px; margin: 0 auto; z-index: 2; }
.hero-badge {
    display: inline-block; font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; padding: 6px 16px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.25); color: var(--accent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(30, 50, 80, 0.08);
    margin-bottom: 20px;
}
.hero h1 {
    font-size: clamp(2.8rem, 6vw, 4.2rem); font-weight: 800;
    line-height: 1.08; margin-bottom: 24px; letter-spacing: -0.02em;
    color: var(--text);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
}
.hero-subtitle {
    display: inline-block;
    font-size: 1.15rem; color: var(--text-muted);
    max-width: 560px; margin: 0 auto 40px; line-height: 1.7;
    padding: 14px 28px; border-radius: 20px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 14px rgba(30, 50, 80, 0.08);
}
.hero-actions { display: flex; justify-content: center; position: relative; z-index: 2; }

@media (max-width: 560px) {
    .hero { padding: 140px 0 140px; }
}

/* === Hero Hot Air Balloons (Thai + Swiss) === */
.hero-balloons {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}
.balloon {
    position: absolute;
    width: 58px; height: 84px;
    filter: drop-shadow(0 6px 10px rgba(30, 50, 80, 0.18));
    will-change: transform;
}
.balloon-thai {
    top: 22%;
    left: 22%;
    animation: balloon-float-a 14s ease-in-out infinite;
}
.balloon-swiss {
    top: 38%;
    right: 22%;
    animation: balloon-float-b 17s ease-in-out infinite;
    animation-delay: -5s;
}
.balloon-appenzell {
    top: 12%;
    left: calc(50% - 29px); /* half of 58px balloon width */
    animation: balloon-float-c 16s ease-in-out infinite;
    animation-delay: -9s;
}

@keyframes balloon-float-c {
    0%   { transform: translate(0, 0)        rotate(1deg); }
    25%  { transform: translate(5px, -12px)  rotate(-1.5deg); }
    50%  { transform: translate(-3px, -22px) rotate(1.8deg); }
    75%  { transform: translate(6px, -10px)  rotate(-1deg); }
    100% { transform: translate(0, 0)        rotate(1deg); }
}

/* Multi-waypoint keyframes so the motion never looks like it restarts.
   Combines vertical bob + tiny horizontal drift + gentle sway. */
@keyframes balloon-float-a {
    0%   { transform: translate(0, 0)        rotate(-1.8deg); }
    20%  { transform: translate(6px, -10px)  rotate(1.2deg); }
    40%  { transform: translate(-4px, -18px) rotate(-1deg); }
    60%  { transform: translate(8px, -12px)  rotate(2deg); }
    80%  { transform: translate(-2px, -6px)  rotate(-1.5deg); }
    100% { transform: translate(0, 0)        rotate(-1.8deg); }
}
@keyframes balloon-float-b {
    0%   { transform: translate(0, 0)        rotate(1.5deg); }
    25%  { transform: translate(-6px, -14px) rotate(-1.5deg); }
    50%  { transform: translate(4px, -20px)  rotate(1.8deg); }
    75%  { transform: translate(-4px, -8px)  rotate(-1deg); }
    100% { transform: translate(0, 0)        rotate(1.5deg); }
}

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

@media (max-width: 768px) {
    .balloon { width: 48px; height: 70px; }
    .balloon-thai { left: 12%; }
    .balloon-swiss { right: 12%; }
    .balloon-appenzell { left: calc(50% - 24px); }
}
@media (max-width: 560px) {
    .balloon { width: 40px; height: 58px; }
    .balloon-thai { top: 18%; left: 8%; }
    .balloon-swiss { top: 16%; right: 8%; }
    .balloon-appenzell { top: 10%; left: calc(50% - 20px); }
}

/* === Snowfall === */
.snowfall {
    position: absolute; inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.snowfall span {
    position: absolute; top: -12px;
    display: block;
    width: 6px; height: 6px; border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
    opacity: 0;
    animation-name: snowfall-drop;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform, opacity;
}

@keyframes snowfall-drop {
    0%   { transform: translate3d(0, -10px, 0); opacity: 0; }
    10%  { opacity: 1; }
    50%  { transform: translate3d(40px, 45vh, 0); }
    90%  { opacity: 1; }
    100% { transform: translate3d(-30px, 110vh, 0); opacity: 0; }
}

/* 40 randomized flakes — varied left, duration, delay, size */
.snowfall span:nth-child(1)  { left: 2%;  width: 5px; height: 5px; animation-duration: 14s; animation-delay: -1s; }
.snowfall span:nth-child(2)  { left: 6%;  width: 3px; height: 3px; animation-duration: 22s; animation-delay: -4s; opacity: 0.7; }
.snowfall span:nth-child(3)  { left: 9%;  width: 6px; height: 6px; animation-duration: 12s; animation-delay: -9s; }
.snowfall span:nth-child(4)  { left: 13%; width: 4px; height: 4px; animation-duration: 18s; animation-delay: -2s; }
.snowfall span:nth-child(5)  { left: 16%; width: 3px; height: 3px; animation-duration: 24s; animation-delay: -6s; opacity: 0.65; }
.snowfall span:nth-child(6)  { left: 19%; width: 7px; height: 7px; animation-duration: 11s; animation-delay: -3s; }
.snowfall span:nth-child(7)  { left: 22%; width: 4px; height: 4px; animation-duration: 16s; animation-delay: -7s; }
.snowfall span:nth-child(8)  { left: 25%; width: 5px; height: 5px; animation-duration: 13s; animation-delay: -10s; }
.snowfall span:nth-child(9)  { left: 28%; width: 3px; height: 3px; animation-duration: 26s; animation-delay: -5s; opacity: 0.7; }
.snowfall span:nth-child(10) { left: 31%; width: 6px; height: 6px; animation-duration: 12s; animation-delay: -8s; }
.snowfall span:nth-child(11) { left: 34%; width: 4px; height: 4px; animation-duration: 19s; animation-delay: -1s; }
.snowfall span:nth-child(12) { left: 37%; width: 5px; height: 5px; animation-duration: 15s; animation-delay: -11s; }
.snowfall span:nth-child(13) { left: 40%; width: 3px; height: 3px; animation-duration: 23s; animation-delay: -3s; opacity: 0.65; }
.snowfall span:nth-child(14) { left: 43%; width: 7px; height: 7px; animation-duration: 10s; animation-delay: -6s; }
.snowfall span:nth-child(15) { left: 46%; width: 4px; height: 4px; animation-duration: 17s; animation-delay: -9s; }
.snowfall span:nth-child(16) { left: 49%; width: 6px; height: 6px; animation-duration: 13s; animation-delay: -2s; }
.snowfall span:nth-child(17) { left: 52%; width: 3px; height: 3px; animation-duration: 25s; animation-delay: -7s; opacity: 0.7; }
.snowfall span:nth-child(18) { left: 55%; width: 5px; height: 5px; animation-duration: 14s; animation-delay: -4s; }
.snowfall span:nth-child(19) { left: 58%; width: 4px; height: 4px; animation-duration: 18s; animation-delay: -10s; }
.snowfall span:nth-child(20) { left: 61%; width: 6px; height: 6px; animation-duration: 12s; animation-delay: -1s; }
.snowfall span:nth-child(21) { left: 64%; width: 3px; height: 3px; animation-duration: 24s; animation-delay: -8s; opacity: 0.65; }
.snowfall span:nth-child(22) { left: 67%; width: 5px; height: 5px; animation-duration: 15s; animation-delay: -5s; }
.snowfall span:nth-child(23) { left: 70%; width: 4px; height: 4px; animation-duration: 20s; animation-delay: -3s; }
.snowfall span:nth-child(24) { left: 72%; width: 7px; height: 7px; animation-duration: 11s; animation-delay: -6s; }
.snowfall span:nth-child(25) { left: 75%; width: 3px; height: 3px; animation-duration: 26s; animation-delay: -9s; opacity: 0.7; }
.snowfall span:nth-child(26) { left: 78%; width: 5px; height: 5px; animation-duration: 13s; animation-delay: -2s; }
.snowfall span:nth-child(27) { left: 81%; width: 4px; height: 4px; animation-duration: 17s; animation-delay: -11s; }
.snowfall span:nth-child(28) { left: 84%; width: 6px; height: 6px; animation-duration: 12s; animation-delay: -4s; }
.snowfall span:nth-child(29) { left: 87%; width: 3px; height: 3px; animation-duration: 22s; animation-delay: -7s; opacity: 0.65; }
.snowfall span:nth-child(30) { left: 90%; width: 5px; height: 5px; animation-duration: 14s; animation-delay: -10s; }
.snowfall span:nth-child(31) { left: 93%; width: 4px; height: 4px; animation-duration: 19s; animation-delay: -1s; }
.snowfall span:nth-child(32) { left: 96%; width: 6px; height: 6px; animation-duration: 13s; animation-delay: -8s; }
.snowfall span:nth-child(33) { left: 11%; width: 2px; height: 2px; animation-duration: 28s; animation-delay: -5s; opacity: 0.5; }
.snowfall span:nth-child(34) { left: 23%; width: 2px; height: 2px; animation-duration: 30s; animation-delay: -3s; opacity: 0.5; }
.snowfall span:nth-child(35) { left: 38%; width: 2px; height: 2px; animation-duration: 27s; animation-delay: -9s; opacity: 0.5; }
.snowfall span:nth-child(36) { left: 51%; width: 2px; height: 2px; animation-duration: 29s; animation-delay: -6s; opacity: 0.5; }
.snowfall span:nth-child(37) { left: 66%; width: 2px; height: 2px; animation-duration: 31s; animation-delay: -2s; opacity: 0.5; }
.snowfall span:nth-child(38) { left: 79%; width: 2px; height: 2px; animation-duration: 26s; animation-delay: -11s; opacity: 0.5; }
.snowfall span:nth-child(39) { left: 88%; width: 2px; height: 2px; animation-duration: 32s; animation-delay: -4s; opacity: 0.5; }
.snowfall span:nth-child(40) { left: 4%;  width: 2px; height: 2px; animation-duration: 28s; animation-delay: -7s; opacity: 0.5; }

@media (prefers-reduced-motion: reduce) {
    .snowfall span { animation: none; opacity: 0; }
}

/* === Section Headers === */
.section-header { text-align: center; margin-bottom: 48px; }
.section-tag {
    display: inline-block; font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; padding: 5px 14px; border-radius: 999px;
    background: var(--accent-light); color: var(--accent); margin-bottom: 12px;
}
.section-header h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }

/* === Apps === */
.apps { padding: 96px 0; background: var(--bg-alt); }
.apps-category { margin-bottom: 56px; }
.apps-category:last-child { margin-bottom: 0; }
.apps-category-header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 28px;
}
.apps-category-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.apps-category-icon.lang { background: var(--accent-light); color: var(--accent); }
.apps-category-icon.kids { background: #FFF3E0; color: #F5A623; }
.apps-category-icon.life { background: #e8f5e9; color: #059669; }
.apps-category-icon.tools { background: #ede5ff; color: #7C5CFC; }
.apps-category-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.apps-category-count {
    font-size: 0.75rem; font-weight: 600;
    padding: 3px 10px; border-radius: 999px;
    background: var(--bg); color: var(--text-light);
}
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.app-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--card); border-radius: var(--radius);
    padding: 32px; box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s;
}
.app-card.featured { border-top: 3px solid var(--accent); }
.app-card.featured:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.app-card.placeholder {
    border: 2px dashed rgba(0, 0, 0, 0.1);
    background: transparent; box-shadow: none;
}
.app-card-badge {
    display: inline-block; font-size: 0.72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 4px 12px; border-radius: 999px;
    background: var(--accent-light); color: var(--accent);
    margin-bottom: 20px; align-self: flex-start;
}
.app-card-badge.coming-soon { background: var(--bg-alt); color: var(--text-light); }
.app-card-icon { margin-bottom: 20px; }
.app-card-icon img {
    width: 72px; height: 72px; border-radius: 16px;
    box-shadow: var(--shadow);
}
.placeholder-icon {
    width: 72px; height: 72px; border-radius: 16px;
    background: var(--bg-alt); color: var(--text-light);
    display: flex; align-items: center; justify-content: center;
}
.app-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.app-card-tagline { font-size: 0.85rem; color: var(--accent); font-weight: 600; margin-bottom: 10px; }
.placeholder .app-card-tagline { color: var(--text-light); }
.app-card-desc { font-size: 0.88rem; color: var(--text-muted); line-height: 1.55; }
.app-card-cta {
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 600; font-size: 0.9rem;
    color: var(--accent); margin-top: auto; padding-top: 20px;
    transition: gap 0.2s;
}
.app-card:hover .app-card-cta { gap: 10px; }

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

/* === About === */
.about { padding: 96px 0; }
.about-content {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
    align-items: start;
}
.about-text p {
    font-size: 1.05rem; color: var(--text-muted);
    line-height: 1.75; margin-bottom: 20px;
}
.about-text p:last-child { margin-bottom: 0; }
.about-highlight {
    font-size: 1.15rem !important; font-weight: 600;
    color: var(--text) !important; font-style: italic;
}
.about-values { display: flex; flex-direction: column; gap: 28px; }
.value-item { display: flex; gap: 16px; align-items: flex-start; }
.value-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--accent-light); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.value-item h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.value-item p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }

@media (max-width: 768px) {
    .about-content { grid-template-columns: 1fr; gap: 40px; }
}

/* === Sister Studio === */
.sister-studio {
    padding: 64px 0 96px;
    --tree: #2d6a4f;
    --tree-hover: #1b4332;
    --tree-soft: #e8f3ee;
}
.about-link { color: var(--accent); font-weight: 600; border-bottom: 1px solid currentColor; }
.about-link:hover { color: var(--text); }
.sister-card {
    display: block; max-width: 720px; margin: 0 auto;
    padding: 0;
    color: var(--text);
    text-align: center;
}
.sister-card-body { position: relative; }
.sister-card-brand {
    display: inline-block;
    margin-bottom: 28px;
    transition: transform 0.25s ease;
}
.sister-card-brand:hover { transform: scale(1.05); }
.sister-logo-img {
    width: 112px; height: 112px; border-radius: 50%;
    box-shadow: var(--shadow-lg);
}

/* App icon grid */
.sister-apps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin: 28px 0;
    padding: 24px;
    border-radius: 14px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
}
.sister-app {
    display: flex; flex-direction: column; align-items: center;
    gap: 10px;
    padding: 12px 8px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}
.sister-app:hover { transform: translateY(-3px); background: var(--tree-soft); }
.sister-app img {
    width: 56px; height: 56px; border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    object-fit: cover;
}
.sister-app span {
    font-size: 0.78rem; font-weight: 500;
    color: var(--text-muted);
    text-align: center;
}
@media (max-width: 640px) {
    .sister-apps { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 400px) {
    .sister-apps { grid-template-columns: repeat(2, 1fr); }
}
.sister-card h3 {
    font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 700;
    margin-bottom: 16px; color: var(--text); line-height: 1.3;
}
.sister-card p {
    font-size: 0.95rem; color: var(--text-muted);
    line-height: 1.7; margin: 0 auto 20px; max-width: 56ch;
    text-align: center;
}
.sister-card strong { color: var(--text); font-weight: 600; }
.sister-card-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px; border-radius: 999px;
    background: var(--tree);
    color: #fff; font-weight: 600; font-size: 0.9rem;
    text-decoration: none;
    transition: gap 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.sister-card-cta:hover { gap: 12px; background: var(--tree-hover); transform: translateY(-1px); }

/* === Feedback === */
.feedback { padding: 96px 0; background: var(--bg-alt); }
.feedback-content {
    display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
    align-items: start;
}
.feedback-text p {
    font-size: 1.05rem; color: var(--text-muted);
    line-height: 1.75; margin-bottom: 20px;
}
.feedback-text p:last-child { margin-bottom: 0; }
.feedback-highlight {
    font-size: 1.15rem !important; font-weight: 600;
    color: var(--text) !important; font-style: italic;
}
.feedback-form {
    display: flex; flex-direction: column; gap: 20px;
}
.feedback-field {
    display: flex; flex-direction: column; gap: 6px;
}
.feedback-field label {
    font-size: 0.85rem; font-weight: 600; color: var(--text);
}
.feedback-optional {
    font-weight: 400; color: var(--text-light);
}
.feedback-field select,
.feedback-field textarea,
.feedback-field input {
    padding: 12px 14px; font-size: 0.9rem;
    font-family: inherit;
    background: var(--card); color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.feedback-field select:focus,
.feedback-field textarea:focus,
.feedback-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.feedback-field textarea { resize: vertical; min-height: 120px; }
.feedback-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}
.feedback-btn { width: 100%; justify-content: center; }

@media (max-width: 768px) {
    .feedback-content { grid-template-columns: 1fr; gap: 40px; }
}

/* === Footer === */
.footer { background: var(--bg-dark); color: #fff; padding: 64px 0 0; }
.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 3fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 48px;
}
/* Sticky category jump-nav */
.apps-nav {
    position: sticky; top: 62px; z-index: 40;
    display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
    padding: 12px 0; margin: 0 0 40px;
    background: rgba(255,255,255,0.82); backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.apps-nav a {
    font-size: 0.85rem; font-weight: 600; color: var(--text-muted);
    padding: 7px 15px; border-radius: 999px; transition: color 0.2s, background 0.2s;
}
.apps-nav a:hover, .apps-nav a.active { color: var(--text); background: var(--bg-alt); }
.apps-category { scroll-margin-top: 120px; }
@media (max-width: 640px) {
    .apps-nav { top: 58px; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .apps-nav::-webkit-scrollbar { display: none; }
    .apps-nav a { white-space: nowrap; }
}

/* First-Alphabet Series (compact tile grid) */
.alphabet-series { margin-top: 44px; }
.series-header h4 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
.series-header p { font-size: 0.95rem; color: var(--text-muted); max-width: 640px; line-height: 1.6; }
.series-region { margin-top: 32px; }
.series-region h5 {
    font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--text-muted); margin-bottom: 16px; padding-bottom: 9px; border-bottom: 1px solid var(--border);
}
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(142px, 1fr)); gap: 14px; }
.app-tile {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px;
    padding: 22px 12px 18px; background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius); text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.app-tile:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.app-tile img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 3px 10px rgba(0,0,0,0.12); }
.tile-name { font-weight: 600; font-size: 0.9rem; color: var(--text); line-height: 1.3; }
.tile-lang { font-size: 0.7rem; font-weight: 500; color: var(--text-muted); background: var(--bg-alt); padding: 2px 9px; border-radius: 999px; }
@media (max-width: 560px) {
    .tile-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
    .app-tile { padding: 18px 8px 14px; }
    .app-tile img { width: 48px; height: 48px; }
}

/* Grouped apps column */
.footer-apps-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 32px;
}
.footer-app-group h5 {
    font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: rgba(255,255,255,0.5);
    margin-bottom: 12px;
}
.footer-app-group ul { display: flex; flex-direction: column; gap: 9px; }
.footer-more { color: rgba(255,255,255,0.4) !important; font-weight: 500; }
.footer-more:hover { color: #fff !important; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-logo .logo-mark { background: #fff; color: var(--bg-dark); }
.footer-logo .logo-text { color: #fff; font-weight: 700; font-size: 1.1rem; }
.footer-tagline { font-size: 0.88rem; color: rgba(255,255,255,0.45); margin-bottom: 20px; line-height: 1.5; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
    width: 36px; height: 36px; border-radius: 8px;
    background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.footer-social a:hover { background: rgba(255,255,255,0.15); color: #fff; }
.footer-col h4 {
    font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; color: rgba(255,255,255,0.35);
    margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.9rem; color: rgba(255,255,255,0.65); transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-muted { font-size: 0.88rem; color: rgba(255,255,255,0.25); }

/* Newsletter */
.newsletter-desc { font-size: 0.85rem; color: rgba(255,255,255,0.4); margin-bottom: 14px; line-height: 1.5; }
.newsletter-form {
    display: flex; border-radius: var(--radius-xs); overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
}
.newsletter-input {
    flex: 1; padding: 10px 14px; font-size: 0.85rem;
    background: rgba(255,255,255,0.05); color: #fff; border: none;
    outline: none; font-family: inherit; min-width: 0;
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.25); }
.newsletter-input:focus { background: rgba(255,255,255,0.08); }
.newsletter-btn {
    padding: 10px 18px; font-size: 0.82rem; font-weight: 600;
    background: var(--accent); color: #fff; border: none;
    cursor: pointer; transition: background 0.2s; white-space: nowrap;
}
.newsletter-btn:hover { background: var(--accent-hover); }

/* Footer bottom */
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px 0; border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.8rem; color: rgba(255,255,255,0.3);
}

@media (max-width: 900px) {
    .footer-top { grid-template-columns: 1fr 1fr; }
    .footer-brand-col { grid-column: 1 / -1; }
    .footer-newsletter-col { grid-column: 1 / -1; }
    .footer-apps-col { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 560px) {
    .footer-top { grid-template-columns: 1fr; }
    .footer-apps-grid { grid-template-columns: 1fr 1fr; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* === 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);
}

/* Alphabet series filter */
.series-search { position: relative; max-width: 320px; margin-top: 18px; }
.series-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); pointer-events: none; }
.series-search input {
    width: 100%; padding: 11px 16px 11px 40px; font-size: 0.92rem; font-family: inherit;
    border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.series-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.series-empty { color: var(--text-muted); font-size: 0.9rem; padding: 8px 0; display: none; }

/* === Dark mode === */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #0f1115;
        --bg-alt: #161922;
        --card: #171a22;
        --text: #f1f2f4;
        --text-muted: #a2a6ae;
        --text-light: #6c717a;
        --border: rgba(255, 255, 255, 0.10);
        --accent: #6ea0ff;
        --accent-light: rgba(110, 160, 255, 0.14);
        --accent-hover: #8bb4ff;
        --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
        --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.55);
        --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.35), 0 6px 24px rgba(0, 0, 0, 0.45);
    }
    .navbar { background: rgba(15, 17, 21, 0.85); }
    .navbar.scrolled { background: rgba(15, 17, 21, 0.95); }
    .apps-nav { background: rgba(15, 17, 21, 0.82); }
    /* The hero is a light illustrated banner — keep its text on the light art */
    .hero h1 { color: #1a1a1a; }
    .hero-subtitle { color: #4b4b4b; }
    .hero-badge, .hero .text-accent { color: #2563eb; }
    /* Category icon chips: keep colorful but darken their tinted backgrounds */
    .apps-category-icon.lang { background: rgba(37, 99, 235, 0.18); }
    .apps-category-icon.kids { background: rgba(240, 90, 34, 0.18); }
    .apps-category-icon.life { background: rgba(5, 150, 105, 0.18); }
    .apps-category-icon.tools { background: rgba(124, 92, 252, 0.18); }
    /* Primary button: light chip with dark text on dark sections... */
    .btn-primary { color: var(--bg); }
    /* ...but keep it a dark button on the light hero banner */
    .hero .btn-primary { background: #1a1a1a; color: #fff; }
}
