/* Playful Modernism v7 — marketing (aligned with App pastelTones + theme.ts) */

@font-face {
    font-family: 'ZCOOLKuaiLe';
    src: url('/marketing/fonts/ZCOOLKuaiLe-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #000000;
    --ink-dark: #000000;
    --ink-light: #333333;
    --accent: #7F8BC4;
    --accent-light: #D2D6EC;
    --accent-dark: #5C6899;
    --accent-yellow: #FBBD10;
    --accent-yellow-deep: #E5A00A;
    --yellow-ink: #6B4E00;
    --lavender-ink: #2A3470;
    --lilac-mid: #9AA3D4;
    --sage: #8FBC6E;
    --coral: #E27565;
    --warm-bg: #F4F4F4;
    --warm-bg-2: #F2F2F2;
    --surface: #FFFFFF;
    --border: #000000;
    --text-muted: #333333;
    --on-accent: #FFFFFF;
    --footer-bg: #000000;
    --footer-text: #F4F4F4;
    --footer-muted: #9AA3D4;
    --shadow-ink: #000000;

    --heroui-foreground: var(--ink);
    --heroui-content1: var(--surface);
    --heroui-content4: var(--text-muted);
    --heroui-primary-50: var(--warm-bg);
    --heroui-primary-100: var(--warm-bg-2);
    --heroui-primary-200: var(--border);
    --heroui-primary-300: #E2E2E2;
    --heroui-primary-600: var(--ink);
    --heroui-primary-700: var(--ink-dark);
    --heroui-primary-800: var(--ink-light);
    --heroui-primary-900: var(--ink);

    --text: var(--ink);
    --primary: var(--accent);
    --surface-muted: var(--warm-bg-2);
    --heading: var(--ink);
    --nav-bg: var(--surface);
    --nav-overlay-bg: var(--surface);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-xl: 28px;
    --radius-pill: 9999px;
    --shadow-sm: 2px 2px 0 var(--shadow-ink);
    --shadow-md: 4px 4px 0 var(--shadow-ink);
    --shadow-lg: 6px 6px 0 var(--shadow-ink);
    --shadow-card: var(--shadow-md);
    --shadow-card-hover: 6px 6px 0 var(--shadow-ink);
    --shadow-primary: var(--shadow-md);
    --font-display: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
    --font-body: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
    --font-cute: 'ZCOOLKuaiLe', 'PingFang SC', system-ui, sans-serif;
    --page-max: 1168px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal-on-scroll { opacity: 1; transform: none; }
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text);
    background: var(--warm-bg);
    overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

/* Sitewide lilac focus ring (Playful Modernism) */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.skip-link {
    position: fixed;
    left: 0;
    top: -80px;
    padding: 12px 20px;
    background: var(--ink-dark);
    color: var(--on-accent);
    text-decoration: none;
    font-weight: 600;
    z-index: 10001;
    transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.icon-sprite {
    width: 100%;
    height: 100%;
    display: block;
}

.icon-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.navbar {
    position: fixed;
    top: 16px;
    left: 16px;
    right: 16px;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 12px 20px;
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: var(--radius-md);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo span { font-family: var(--font-cute); }
.logo:hover { color: var(--primary); }
.logo:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.logo img,
.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--ink);
    display: block;
}

.pill-cute { font-family: var(--font-cute); }

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.nav-links a.active,
.nav-links a[aria-current="true"],
.nav-links a[aria-current="page"] {
    background: var(--accent-yellow);
    color: var(--ink);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    border: 2px solid var(--ink);
    font-weight: 600;
}

@media (min-width: 768px) and (max-width: 1100px) {
    .nav-links { gap: 16px; }
    .nav-links a { font-size: 14px; }
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 2px solid var(--ink);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    position: relative;
    z-index: 1001;
}
.nav-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--heading);
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sfx-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 6px 14px;
    border: 2px solid var(--lilac-mid);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 3px 3px 0 var(--lilac-mid);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

.sfx-toggle:hover {
    background: var(--lilac-mid);
    color: var(--ink);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--lilac-mid);
}

.sfx-toggle:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.sfx-toggle[aria-pressed="true"] {
    background: var(--accent-yellow);
    color: var(--ink);
    border-color: var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
}

.sfx-toggle:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    border: 3px solid var(--ink);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:active,
.btn.is-pressed {
    transform: translate(4px, 4px);
    box-shadow: none;
}
.btn:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}
.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary {
    background: var(--accent-yellow);
    color: var(--ink);
}
.btn-secondary:hover { background: var(--accent-yellow-deep); }
.btn-ghost {
    background: var(--surface);
    color: var(--ink);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--heading);
    margin-bottom: 40px;
}
.section-title-center { text-align: center; }

.footer {
    padding: 56px 24px 40px;
    background: var(--footer-bg);
    color: var(--footer-text);
    border-top: 4px solid var(--accent-yellow);
}

.footer-inner {
    max-width: var(--page-max);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--footer-text);
    padding: 8px 16px 8px 8px;
    border: 2px solid var(--accent-yellow);
    border-radius: var(--radius-pill);
    box-shadow: 3px 3px 0 var(--accent-yellow);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.footer-logo:hover {
    background: var(--accent-yellow);
    color: var(--ink);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--accent-yellow);
}

.footer-logo .logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.footer-logo span {
    font-family: var(--font-cute);
    font-size: clamp(22px, 4vw, 28px);
    letter-spacing: 0.08em;
    line-height: 1;
}

.footer-tagline {
    margin: 0;
    max-width: 26ch;
    font-size: 14px;
    line-height: 1.55;
    color: var(--footer-muted);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 560px;
}

.footer-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border: 2px solid var(--accent-yellow);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--footer-text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 3px 3px 0 var(--accent-yellow);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

.footer-pill:hover {
    background: var(--accent-yellow);
    color: var(--ink);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--accent-yellow);
}

.footer-pill:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.footer-pill--lavender {
    border-color: var(--lilac-mid);
    box-shadow: 3px 3px 0 var(--lilac-mid);
}

.footer-pill--lavender:hover {
    background: var(--lilac-mid);
    color: var(--ink);
    box-shadow: 5px 5px 0 var(--lilac-mid);
}

.footer-pill--yellow {
    background: var(--accent-yellow);
    color: var(--ink);
    border-color: var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
}

.footer-pill--yellow:hover {
    background: var(--accent-yellow-deep);
    box-shadow: 5px 5px 0 var(--ink);
}

.footer-pill[aria-current="page"] {
    background: var(--accent-yellow);
    color: var(--ink);
    border-color: var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
}

.footer-pill:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.footer-meta {
    width: 100%;
    max-width: 640px;
    padding-top: 24px;
    border-top: 2px solid var(--lilac-mid);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.footer-copy {
    margin: 0;
    font-size: 13px;
    color: var(--footer-muted);
}

.footer-icp {
    margin: 0;
    font-size: 12px;
    color: var(--footer-muted);
}

.footer-icp a {
    color: inherit;
    text-decoration: none;
    transition: color 0.12s ease;
}

.footer-icp a:hover {
    color: var(--accent-yellow);
}

@media (prefers-reduced-motion: reduce) {
    .footer-logo:hover,
    .footer-pill:hover,
    .footer-pill:active,
    .sfx-toggle:hover,
    .sfx-toggle:active {
        transform: none;
    }
}

@media (max-width: 767px) {
    .footer {
        padding: 48px 20px 36px;
    }

    .footer-nav {
        gap: 10px;
    }

    .footer-pill {
        min-height: 42px;
        padding: 9px 16px;
        font-size: 13px;
    }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
}
.reveal-on-scroll.is-visible {
    animation: fadeInUp 0.5s ease-out forwards;
}

@media (max-width: 767px) {
    .nav-toggle { display: flex; }

    .sfx-toggle {
        min-height: 40px;
        padding: 6px 10px;
        font-size: 12px;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        z-index: 999;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 32px;
        background: var(--nav-overlay-bg);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }
    .nav-links.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .nav-links a {
        font-size: 20px;
        color: var(--heading);
        padding: 12px 28px;
        border: 2px solid var(--ink);
        border-radius: var(--radius-pill);
        background: var(--surface);
        box-shadow: var(--shadow-sm);
    }
    .nav-links a.active,
    .nav-links a[aria-current="true"],
    .nav-links a[aria-current="page"] {
        background: var(--accent-yellow);
    }
}
