/* ===== JotBee — Apple-Inspired Design System ===== */
/* Reference: tangzhihong.com structure — SF Pro, cinematic sections, binary rhythm */
/* Color swap: black→dark brown, white→cream, accent→gold */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
    /* JotBee Color System (mapped from Apple palette) */
    --black: #1A1208;
    --white: #ffffff;
    --gray-bg: #FAF5E9;
    --text-primary: #1A1208;
    --text-secondary: rgba(26, 18, 8, 0.8);
    --text-tertiary: rgba(26, 18, 8, 0.48);
    --accent: #D4AF37;
    --accent-hover: #E8C84A;
    --link-light: #A08520;
    --link-dark: #D4AF37;

    /* Surfaces */
    --dark-surface: #1A1208;
    --card-shadow: rgba(26, 18, 8, 0.22) 3px 5px 30px 0px;

    /* Typography — SF Pro fallback chain */
    --font-display: 'SF Pro Display', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    --font-text: 'SF Pro Text', 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

    /* Layout */
    --max-width: 980px;
    --section-padding: 120px 0;
}

html { scroll-behavior: smooth }

body {
    font-family: var(--font-text);
    font-size: 17px;
    line-height: 1.47;
    letter-spacing: -0.374px;
    color: var(--text-primary);
    background: var(--gray-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none }
img { max-width: 100%; height: auto; display: block }

/* ===== Skip Navigation (Accessibility) ===== */

.skip-nav {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 200;
    background: var(--accent);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 0 0 8px 8px;
    font-size: 14px;
    font-weight: 600;
    transition: top .2s;
}

.skip-nav:focus { top: 0 }

/* ===== Navigation — Glass Effect ===== */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 18, 8, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    height: 48px;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    color: var(--white);
    letter-spacing: -0.374px;
}

.nav-links { display: flex; gap: 28px }

.nav-links a {
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    transition: color .2s;
}

.nav-links a:hover { color: var(--white) }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--white);
    border-radius: 1px;
    transition: all .3s;
}

/* ===== Sections — Content-Driven Layout ===== */

.section {
    padding: var(--section-padding);
    text-align: center;
}

.section + .section { margin-top: 12px }
.nav + .section { margin-top: 0 }

.section-dark {
    background: var(--black);
    color: var(--white);
}

.section-light {
    background: var(--gray-bg);
    color: var(--text-primary);
}

.section-white {
    background: var(--white);
    color: var(--text-primary);
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Typography — Apple Hierarchy ===== */

.headline-hero {
    font-family: var(--font-display);
    font-size: 80px;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.4px;
}

.headline-section {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 600;
    line-height: 1.10;
    letter-spacing: normal;
    margin-bottom: 16px;
}

.subtitle {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 400;
    line-height: 1.19;
    letter-spacing: 0.231px;
    margin-top: 12px;
}

.section-dark .subtitle { color: rgba(255, 255, 255, 0.7) }
.section-light .subtitle,
.section-white .subtitle { color: var(--text-secondary) }

.section-icon {
    display: block;
    font-size: 48px;
    margin-bottom: 20px;
}

.caption {
    font-family: var(--font-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.43;
    letter-spacing: -0.224px;
    color: var(--text-tertiary);
}

.section-dark .caption { color: rgba(255, 255, 255, 0.5) }

.meta {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-top: 16px;
}

.section-dark .meta { color: rgba(255, 255, 255, 0.5) }

/* ===== Hero ===== */

.hero {
    padding: 80px 0 40px;
    text-align: center;
}

.hero .headline-hero { margin-bottom: 0 }

.hero .subtitle {
    margin-top: 16px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-tagline-en {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
    letter-spacing: 0.5px;
}

.app-icon-hero {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    margin: 0 auto 28px;
    display: block;
}

.screenshot-showcase {
    margin-top: 48px;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.screenshot-showcase img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

/* ===== Buttons & CTAs ===== */

.cta-group {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-text);
    font-size: 17px;
    font-weight: 400;
    color: var(--white);
    background: var(--accent);
    padding: 12px 28px;
    border-radius: 980px;
    border: 1px solid transparent;
    transition: background .3s;
    cursor: pointer;
}

.btn-primary:hover { background: var(--accent-hover) }

.btn-primary svg { width: 15px; height: 15px }

.btn-dark {
    background: var(--dark-surface);
    color: var(--white);
}

.btn-dark:hover { background: #2d2520 }

.btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-text);
    font-size: 17px;
    font-weight: 400;
    padding: 8px 22px;
    border-radius: 980px;
    border: 1px solid var(--link-light);
    color: var(--link-light);
    background: transparent;
    transition: all .2s;
    cursor: pointer;
}

.btn-pill:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.section-dark .btn-pill {
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--link-dark);
}

.section-dark .btn-pill:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.link-more {
    display: inline-block;
    font-size: 17px;
    font-weight: 400;
    transition: opacity .2s;
}

.section-dark .link-more { color: var(--link-dark) }
.section-white .link-more,
.section-light .link-more { color: var(--link-light) }

.link-more:hover { opacity: 0.7 }

/* ===== Screenshot Grid ===== */

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.screenshot-grid img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.screenshot-caption {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-top: 12px;
}

.section-dark .screenshot-caption { color: rgba(255, 255, 255, 0.5) }

/* ===== Features Grid ===== */

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 48px;
}

.feature-item {
    padding: 28px 20px;
    text-align: center;
}

.feature-icon { font-size: 32px; margin-bottom: 12px }

.feature-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 6px;
}

.feature-desc {
    font-size: 14px;
    line-height: 1.43;
    color: var(--text-tertiary);
}

.section-dark .feature-desc { color: rgba(255, 255, 255, 0.5) }

/* ===== Values Grid ===== */

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.value-card { text-align: center; padding: 20px }

.value-card h3 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.value-card p {
    font-size: 14px;
    line-height: 1.43;
    color: var(--text-tertiary);
}

.section-dark .value-card p { color: rgba(255, 255, 255, 0.5) }

/* ===== Selling Points ===== */

.selling-points {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.sp-item { text-align: center }

.sp-number {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}

.section-white .sp-number,
.section-light .sp-number { color: var(--text-primary) }

.sp-label {
    font-size: 15px;
    font-weight: 500;
    margin-top: 8px;
    color: var(--text-tertiary);
}

.section-dark .sp-label { color: rgba(255, 255, 255, 0.5) }

/* ===== Story ===== */

.story-block {
    max-width: 640px;
    margin: 0 auto;
    text-align: left;
}

.story-block p {
    font-size: 17px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.story-block p:last-of-type { margin-bottom: 0 }

.story-signature {
    margin-top: 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-tertiary);
}

/* ===== Platforms ===== */

.platforms {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-top: 40px;
}

.platform-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.platform-icon { font-size: 40px }

.platform-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-tertiary);
}

.section-dark .platform-name { color: rgba(255, 255, 255, 0.5) }

/* ===== Footer ===== */

.footer {
    background: var(--black);
    color: var(--white);
    padding: 60px 0 32px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 0;
    transition: color .2s;
}

.footer-col a:hover { color: var(--accent) }

.footer-legal {
    max-width: var(--max-width);
    margin: 40px auto 0;
    padding: 24px 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.4);
    transition: color .2s;
}

.footer-legal a:hover { color: var(--accent) }

/* ===== Animations ===== */

.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */

@media (max-width: 768px) {
    :root { --section-padding: 80px 0 }

    .headline-hero { font-size: 48px }
    .headline-section { font-size: 32px }
    .subtitle { font-size: 18px }

    .features-grid { grid-template-columns: 1fr; gap: 12px }
    .values-grid { grid-template-columns: repeat(2, 1fr) }
    .selling-points { grid-template-columns: repeat(2, 1fr); gap: 24px }
    .screenshot-grid { grid-template-columns: 1fr; max-width: 320px }
    .footer-inner { grid-template-columns: 1fr; gap: 32px }

    .footer-legal {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .nav-toggle { display: flex }

    .nav-links {
        display: none;
        position: absolute;
        top: 48px;
        left: 0;
        right: 0;
        background: rgba(26, 18, 8, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 16px 24px;
        flex-direction: column;
        gap: 16px;
    }

    .nav-links.open { display: flex }

    .nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translateY(6px) }
    .nav-toggle.open span:nth-child(2) { opacity: 0 }
    .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translateY(-6px) }

    .hero { padding: 48px 0 24px }
    .app-icon-hero { width: 120px; height: 120px; border-radius: 50% }
}

@media (max-width: 480px) {
    .headline-hero { font-size: 40px }
    .cta-group { flex-direction: column; align-items: center }
    .selling-points { grid-template-columns: 1fr 1fr }
}
