/* Reset and Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&display=swap');

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

:root {
    --primary: #e87a9e;
    --primary-dark: #c05070;
    --secondary: #9e9890;
    --dark: #ece6d9;
    --bg-base: #131110;
    --bg-section: #1b1916;
    --bg-card: #221f1b;
    --bg-header: #0d0b09;
    --text-on-bg: #131110;
    --border: #2c2926;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.7);
}

/* Light mode via system preference (no JS required) */
@media (prefers-color-scheme: light) {
    :root {
        --secondary: #6b5d52;
        --dark: #1c1815;
        --bg-base: #faf8f5;
        --bg-section: #f0ece5;
        --bg-card: #ffffff;
        --bg-header: #fefcfa;
        --text-on-bg: #faf8f5;
        --border: #ddd5c8;
        --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.12);
    }
}

/* Manual dark override (takes precedence over system preference) */
html[data-theme="dark"] {
    --secondary: #9e9890;
    --dark: #ece6d9;
    --bg-base: #131110;
    --bg-section: #1b1916;
    --bg-card: #221f1b;
    --bg-header: #0d0b09;
    --text-on-bg: #131110;
    --border: #2c2926;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.6);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.7);
}

/* Manual light override */
html[data-theme="light"] {
    --secondary: #6b5d52;
    --dark: #1c1815;
    --bg-base: #faf8f5;
    --bg-section: #f0ece5;
    --bg-card: #ffffff;
    --bg-header: #fefcfa;
    --text-on-bg: #faf8f5;
    --border: #ddd5c8;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--bg-base);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
    color: var(--secondary);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.2rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-base);
}

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

.btn-secondary {
    background: var(--bg-card);
    color: var(--dark);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--bg-base);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-header);
    box-shadow: var(--shadow);
    z-index: 1000;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    display: inline-flex;
    align-items: center;
}

.logo img {
    height: 32px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--secondary);
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    border-radius: 0.2rem;
    border: 1px solid var(--border);
    padding: 0.5rem 0;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 0.5rem 1rem;
}

.dropdown-menu li a:hover {
    background: var(--bg-section);
    color: var(--dark);
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Features Section */
.features {
    background: var(--bg-section);
}

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

.feature {
    text-align: center;
    padding: 2rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
}

/* CTA Section */
.cta {
    background: var(--bg-header);
    color: var(--dark);
    text-align: center;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.cta h2 {
    color: var(--primary);
}

.cta p {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta .btn-primary {
    background: var(--primary);
    color: var(--bg-base);
}

.cta .btn-primary:hover {
    background: var(--primary-dark);
}

/* Sitewide Footer */
.site-footer {
    background: var(--bg-header);
    color: var(--dark);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
}

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

.footer-col h4 {
    margin-bottom: 1.5rem;
}

.footer-col p {
    color: var(--secondary);
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    color: var(--secondary);
    transition: color 0.2s;
    cursor: pointer;
}

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

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

.footer-bottom p {
    color: var(--secondary);
    opacity: 0.5;
    margin: 0;
}

/* Subpage Common Styles */
.page-hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, #b84e70 0%, #8a3252 100%);
    color: var(--dark);
    text-align: center;
}

.page-hero h1 {
    color: var(--dark);
}

.page-hero p {
    color: rgba(236, 230, 217, 0.85);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.benefits {
    background: var(--bg-section);
}

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

.benefit-card {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.3rem;
}

.benefit-card h3 {
    color: var(--primary);
}

.use-cases {
    background: var(--bg-section);
}

.use-case-list {
    max-width: 800px;
    margin: 0 auto;
}

.use-case-item {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 0.3rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.use-case-item h3 {
    margin-bottom: 0.5rem;
}

/* Testimonial */
.testimonial {
    background: var(--bg-base);
}

.testimonial-card {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem;
    background: var(--bg-section);
    border-radius: 0.3rem;
    border-left: 3px solid var(--primary);
}

.testimonial-card blockquote {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.testimonial-card cite {
    color: var(--secondary);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.2rem;
    transition: color 0.2s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    color: var(--dark);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Dark mode (default): show sun to switch to light */
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }

/* System preference light: show moon to switch to dark */
@media (prefers-color-scheme: light) {
    .theme-toggle .icon-sun { display: none; }
    .theme-toggle .icon-moon { display: block; }
}

/* Manual dark override */
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Manual light override */
html[data-theme="light"] .theme-toggle .icon-sun { display: none; }
html[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }

    .nav-links {
        display: none;
    }

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