/* ==========================================================================
   오늘의 감정 — Brand Theme (matches today-emotion app light/dark themes)
   Light: primary #E07868 / bg #FAF7F5 / surface #FFFFFF
   Dark : primary #F09080 / bg #1C1816 / surface #2A2220
   Brand gradient: #F0B088 → #E8946A → #E07868 (splash _brandGradient)
   ========================================================================== */

:root {
    /* Brand */
    --brand-1: #F0B088;
    --brand-2: #E8946A;
    --brand-3: #E07868;
    --primary: #E07868;
    --accent-text: #B04A3C;          /* darker rose for AA text on light bg */
    --tint: rgba(232, 148, 106, 0.14);

    /* Surfaces */
    --bg: #FAF7F5;                   /* app scaffoldBackgroundColor */
    --bg-alt: #F3EDE7;               /* alternating section cream */
    --surface: #FFFFFF;              /* cards */

    /* Text */
    --text-strong: #2D2420;
    --text: #5C4F46;
    --text-muted: #7A6E65;

    /* Lines & shadows */
    --border: #E8E0D8;
    --shadow-sm: 0 4px 6px rgba(45, 36, 32, 0.06);
    --shadow-lg: 0 10px 25px rgba(45, 36, 32, 0.12);
    --shadow-accent: 0 10px 25px rgba(224, 120, 104, 0.18);

    /* Navbar / Footer */
    --nav-bg: rgba(250, 247, 245, 0.92);
    --nav-bg-solid: rgba(250, 247, 245, 0.98);
    --footer-bg: #2D2420;
    --footer-text: #D9CFC8;
    --footer-muted: #A0948C;
    --footer-border: #4A3F38;

    /* Hero / brand gradient (app splash) */
    --hero-gradient: linear-gradient(135deg, #F0B088 0%, #E8946A 50%, #E07868 100%);

    color-scheme: light;
}

/* Manual dark (toggle) */
:root[data-theme="dark"] {
    --brand-1: #F0CFA0;
    --brand-2: #F0A880;
    --brand-3: #F09080;
    --primary: #F09080;
    --accent-text: #F09080;
    --tint: rgba(240, 144, 128, 0.12);

    --bg: #1C1816;                   /* app dark scaffold */
    --bg-alt: #211C19;
    --surface: #2A2220;              /* app dark surface */

    --text-strong: #F5EDE8;
    --text: #C4B8B0;
    --text-muted: #A0948C;

    --border: #4A3F38;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.45);
    --shadow-accent: 0 10px 25px rgba(0, 0, 0, 0.45);

    --nav-bg: rgba(28, 24, 22, 0.9);
    --nav-bg-solid: rgba(28, 24, 22, 0.97);
    --footer-bg: #16110F;
    --footer-text: #D9CFC8;
    --footer-muted: #A0948C;
    --footer-border: #4A3F38;

    --hero-gradient: linear-gradient(135deg, #8F654C 0%, #7E5340 50%, #6E4038 100%);

    color-scheme: dark;
}

/* System dark (no manual override) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --brand-1: #F0CFA0;
        --brand-2: #F0A880;
        --brand-3: #F09080;
        --primary: #F09080;
        --accent-text: #F09080;
        --tint: rgba(240, 144, 128, 0.12);

        --bg: #1C1816;
        --bg-alt: #211C19;
        --surface: #2A2220;

        --text-strong: #F5EDE8;
        --text: #C4B8B0;
        --text-muted: #A0948C;

        --border: #4A3F38;
        --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.25);
        --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.45);
        --shadow-accent: 0 10px 25px rgba(0, 0, 0, 0.45);

        --nav-bg: rgba(28, 24, 22, 0.9);
        --nav-bg-solid: rgba(28, 24, 22, 0.97);
        --footer-bg: #16110F;
        --footer-text: #D9CFC8;
        --footer-muted: #A0948C;
        --footer-border: #4A3F38;

        --hero-gradient: linear-gradient(135deg, #8F654C 0%, #7E5340 50%, #6E4038 100%);

        color-scheme: dark;
    }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

::selection {
    background: rgba(232, 148, 106, 0.35);
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

img {
    max-width: 100%;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: var(--nav-bg-solid);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-text);
}

.nav-logo .logo-emoji {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-strong);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-text);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Theme toggle */
.theme-toggle {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--text-strong);
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.theme-toggle:hover {
    color: var(--accent-text);
    border-color: var(--primary);
    background: var(--tint);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-strong);
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--nav-bg-solid);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
    gap: 0;
}

.nav-menu.active li {
    padding: 0.75rem 20px;
    border-bottom: 1px solid var(--border);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: var(--hero-gradient);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.92;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 13px 26px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background: #FFFFFF;
    color: #B04A3C;
}

.btn-primary:hover {
    background: #FFF3EC;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 36, 32, 0.18);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.btn-secondary:hover {
    background: white;
    color: #B04A3C;
    border-color: white;
}

/* Phone Mockup */
.phone-mockup {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-screen {
    width: 280px;
    height: 560px;
    background: #2D2420;
    border-radius: 30px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.app-preview {
    background: var(--hero-gradient);
    height: 100%;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    color: white;
}

.emotion-display {
    margin-bottom: 20px;
}

.emoji-large {
    font-size: 4rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.preview-text {
    text-align: center;
    margin-bottom: 15px;
}

.preview-text h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.preview-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.diary-input {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Section heading rhythm */
.features h2,
.emotions h2,
.download h2,
.about h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-strong);
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--bg-alt);
    transition: background-color 0.3s ease;
}

.features h2 {
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--hero-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-strong);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Emotions Section */
.emotions {
    padding: 80px 0;
    background: var(--bg);
    transition: background-color 0.3s ease;
}

.emotions h2 {
    margin-bottom: 0.5rem;
}

.emotions-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.emotions-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.emotion-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    min-width: 100px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.emotion-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-accent);
}

.emotion-emoji {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.emotion-label {
    color: var(--text);
    font-weight: 500;
}

/* Download Section */
.download {
    padding: 80px 0;
    background: var(--bg-alt);
    transition: background-color 0.3s ease;
}

.download h2 {
    margin-bottom: 1rem;
}

.download > .container > p {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.download-options {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.download-card {
    display: flex;
    align-items: center;
    padding: 2rem;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    background: var(--surface);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    min-width: 250px;
}

.download-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.download-card i {
    font-size: 3rem;
    margin-right: 1rem;
    color: var(--accent-text);
}

.download-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-strong);
}

.download-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--bg);
    transition: background-color 0.3s ease;
}

.about h2 {
    margin-bottom: 3rem;
}

.about-content {
    display: flex;
    justify-content: center;
    align-items: start;
}

.about-text {
    max-width: 800px;
    width: 100%;
}

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-strong);
}

.about-text p {
    margin-bottom: 2rem;
    color: var(--text);
    line-height: 1.7;
}

.about-text ul {
    list-style: none;
    margin-bottom: 2rem;
}

.about-text li {
    padding: 0.75rem 0;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: start;
}

.about-text li::before {
    content: "✓";
    color: var(--accent-text);
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.2rem;
}

.about-text li:last-child {
    border-bottom: none;
}

/* Legal pages (privacy / terms) */
.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 110px 20px 60px 20px;
    line-height: 1.8;
}

.privacy-content h1 {
    color: var(--text-strong);
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2.2rem;
    letter-spacing: -0.02em;
}

.privacy-content h2 {
    color: var(--text-strong);
    margin: 2.5rem 0 1rem 0;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
    font-size: 1.4rem;
}

.privacy-content h3 {
    color: var(--text);
    margin: 1.5rem 0 0.5rem 0;
    font-size: 1.1rem;
}

.privacy-content p {
    margin-bottom: 1rem;
    color: var(--text);
}

.privacy-content ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.privacy-content li {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.contact-info {
    background: var(--surface);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.contact-info h3 {
    color: var(--text-strong);
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info i {
    color: var(--accent-text);
    margin-right: 0.5rem;
}

.highlight-box {
    background: var(--tint);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    margin: 1.5rem 0;
}

.highlight-box strong {
    color: var(--accent-text);
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 20px;
    transition: background-color 0.3s ease;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #FFFFFF;
}

.footer-section p {
    color: var(--footer-text);
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #F0A880;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--footer-border);
    color: var(--footer-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--nav-bg-solid);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: var(--shadow-sm);
    }

    .nav-menu li {
        padding: 0.75rem 20px;
        border-bottom: 1px solid var(--border);
    }

    .hamburger {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        flex-direction: column;
    }

    .download-options {
        flex-direction: column;
        align-items: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .emotions-grid {
        gap: 1rem;
    }

    .emotion-item {
        min-width: 80px;
        padding: 1rem;
    }

    .emotion-emoji {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .phone-screen {
        width: 240px;
        height: 480px;
    }
}
