:root {
    --bg: #fdfbf7;
    --text-main: #3d2b1f;
    --text-sub: #5c4033;
    --accent: #d97706;
    --accent-hover: #b45309;
    --card-bg: rgba(255, 255, 255, 0.4);
    --border: rgba(92, 64, 51, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(139, 69, 19, 0.08);
}

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

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

body {
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mb-2 { margin-bottom: 0.5rem; }

/* Navbar */
.navbar {
    padding: 24px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 251, 247, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #d97706, #fbbf24);
    border-radius: 10px;
    position: relative;
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
}

.logo-text span {
    font-weight: 300;
    opacity: 0.5;
    font-size: 14px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-sub);
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 0.6;
}

.github-link {
    display: flex;
    align-items: center;
    opacity: 0.3;
}

/* Buttons */
.btn-primary {
    background: var(--text-main);
    color: white !important;
    padding: 10px 24px;
    border-radius: 100px;
}

.btn-main {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--text-main);
    color: white;
    padding: 16px 36px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(61, 43, 31, 0.15);
}

.btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(61, 43, 31, 0.25);
    background: #000;
}

/* Hero Section */
.hero {
    padding: 160px 0 80px;
    background: radial-gradient(circle at top right, rgba(217, 119, 6, 0.05), transparent 40%),
                radial-gradient(circle at bottom left, rgba(217, 119, 6, 0.03), transparent 30%);
}

.hero-copy {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 56px;
}

.hero-kicker {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
}

.hero-title {
    font-size: 72px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-title .accent {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-sub);
    max-width: 640px;
    margin: 0 auto 40px;
    opacity: 0.85;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.version-info {
    font-size: 13px;
    color: var(--text-sub);
    opacity: 0.5;
    margin-top: 14px;
}

.hero-carousel {
    position: relative;
}

.hero-viewport {
    position: relative;
    aspect-ratio: 3 / 2;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 24px 60px rgba(139, 69, 19, 0.1);
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: #fff;
    cursor: zoom-in;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.hero-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(253, 251, 247, 0.92);
    color: var(--text-main);
    box-shadow: 0 8px 20px rgba(61, 43, 31, 0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hero-carousel:hover .hero-nav,
.hero-nav:focus-visible {
    opacity: 1;
}

.hero-nav.prev { left: 16px; }
.hero-nav.next { right: 16px; }

.hero-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 18px;
}

.hero-caption {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
    opacity: 0.7;
    min-height: 1.2em;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(92, 64, 51, 0.22);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--accent);
    transform: scale(1.15);
}

/* Features Section */
.features {
    padding: 80px 0 100px;
    background: white;
}

.section-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 16px;
}

.section-lead {
    font-size: 17px;
    color: var(--text-sub);
    opacity: 0.75;
    max-width: 560px;
    margin: 0 auto 56px;
}

.text-center { text-align: center; }

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

.feature-card {
    padding: 40px;
    border-radius: 32px;
    background: var(--bg);
    transition: transform 0.3s ease;
}

.feature-card:hover { transform: scale(1.05); }

.f-icon {
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin-bottom: 24px;
}

.feature-card h3 { font-size: 22px; margin-bottom: 12px; font-weight: 800;}
.feature-card p { font-size: 15px; color: var(--text-sub); opacity: 0.7; line-height: 1.7; }

/* Product screenshots */
.shot {
    display: block;
    width: 100%;
    padding: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 24px 60px rgba(139, 69, 19, 0.1);
    cursor: zoom-in;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.shot:hover {
    transform: translateY(-4px);
    box-shadow: 0 32px 72px rgba(139, 69, 19, 0.16);
}

.shot img {
    display: block;
    width: 100%;
    height: auto;
}

.shot-stack {
    display: grid;
    gap: 20px;
}

/* Showcase */
.showcase {
    padding: 40px 0 80px;
}

.showcase-row {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 56px;
    align-items: center;
    margin-bottom: 88px;
}

.showcase-row.reverse {
    grid-template-columns: 1.15fr 0.85fr;
}

.showcase-row.reverse .showcase-copy {
    order: 2;
}

.showcase-copy h3 {
    font-family: 'Noto Serif SC', serif;
    font-size: 28px;
    font-weight: 700;
    margin: 12px 0 16px;
    letter-spacing: 0.01em;
}

.showcase-copy p {
    font-size: 16px;
    color: var(--text-sub);
    line-height: 1.85;
    opacity: 0.88;
}

.showcase-copy code {
    font-size: 13px;
    background: rgba(217, 119, 6, 0.1);
    color: var(--accent);
    padding: 1px 7px;
    border-radius: 6px;
}

/* Family mosaic */
.family-os {
    padding: 80px 0;
    background: white;
}

.mosaic {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.mosaic-card {
    grid-column: span 3;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0;
    font: inherit;
    color: inherit;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg);
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mosaic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(139, 69, 19, 0.1);
}

.mosaic-wide {
    grid-column: span 6;
}

.mosaic-card img {
    display: block;
    width: 100%;
    height: auto;
}

.mosaic-caption {
    padding: 18px 22px 20px;
}

.mosaic-caption h4 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}

.mosaic-caption p {
    font-size: 13px;
    color: var(--text-sub);
    opacity: 0.7;
}

/* Download */
.download {
    padding: 100px 0 80px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 960px;
    margin: 0 auto;
}

.download-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.download-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(139, 69, 19, 0.1);
}

.download-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--text-main);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.download-card h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}

.download-card p {
    font-size: 12px;
    color: var(--text-sub);
    opacity: 0.65;
}

.download-more {
    text-align: center;
    margin-top: 28px;
    font-size: 13px;
    color: var(--text-sub);
    opacity: 0.7;
}

.download-more a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(20, 12, 8, 0.86);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
}

.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-width: min(1280px, 92vw);
    max-height: 82vh;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 24px;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: white;
    font-size: 32px;
    cursor: pointer;
    opacity: 0.8;
}

#lightbox-caption {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 16px;
    font-size: 14px;
}

/* Footer */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer p { font-size: 13px; opacity: 0.4; }

/* Responsive */
@media (max-width: 1100px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .download-grid { grid-template-columns: 1fr; max-width: 520px; }
}

@media (max-width: 968px) {
    .hero-title { font-size: 48px; }
    .hero-subtitle { font-size: 17px; }
    .features-grid { grid-template-columns: 1fr; }
    .showcase-row,
    .showcase-row.reverse { grid-template-columns: 1fr; gap: 24px; }
    .showcase-row.reverse .showcase-copy { order: 0; }
    .mosaic { grid-template-columns: 1fr; }
    .mosaic-card,
    .mosaic-wide { grid-column: span 1; }
    .nav-links { gap: 16px; }
    .container { padding: 0 20px; }
    .hero-nav { opacity: 1; width: 34px; height: 34px; }
    .scene, .scene:nth-child(even) { grid-template-columns: 1fr; gap: 30px; direction: ltr; }
    .scene-content { padding: 10px 0; }
}

/* Tab Switching System */
.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.tab-link {
    cursor: pointer;
    position: relative;
    padding: 4px 0;
}
.tab-link.active {
    color: var(--accent) !important;
    opacity: 1 !important;
}
.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* Story Book Exquisite Styles (Noto Serif SC Literary Aesthetics) */
.story-hero {
    text-align: center;
    padding: 160px 20px 40px;
    max-width: 800px;
    margin: 0 auto;
}
.story-hero h1 {
    font-family: 'Noto Serif SC', serif;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    color: var(--text-main);
}
.story-hero p {
    font-family: 'Noto Serif SC', serif;
    font-size: 16px;
    color: var(--text-sub);
    opacity: 0.8;
    letter-spacing: 0.02em;
}
.story-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 40px 100px;
}
.chapter {
    margin-bottom: 140px;
}
.chapter-header {
    text-align: center;
    margin-bottom: 80px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 40px;
}
.chapter-subtitle {
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-weight: 800;
    margin-bottom: 8px;
}
.chapter-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-main);
}
.scene {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 70px;
    align-items: center;
    margin-bottom: 100px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.scene.visible {
    opacity: 1;
    transform: translateY(0);
}
.scene:nth-child(even) {
    direction: rtl;
}
.scene:nth-child(even) .scene-content {
    direction: ltr;
}
.scene-image-container {
    width: 100%;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(139, 69, 19, 0.08);
    border: 1px solid var(--border);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}
.scene-image-container:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 30px 60px rgba(139, 69, 19, 0.15);
}
.scene-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
.scene-content {
    padding: 20px 0;
}
.scene-trait {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(217, 119, 6, 0.07);
    color: var(--accent);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.02em;
}
.scene-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
    letter-spacing: 0.02em;
}
.scene-text {
    font-family: 'Noto Serif SC', serif;
    font-size: 14.5px;
    color: var(--text-sub);
    line-height: 1.9;
    margin-bottom: 16px;
    opacity: 0.9;
    text-align: justify;
}
