/* Komo Website Styles */

/* Light mode (default) */
:root {
    --bg-dark: #f8fafc;
    --bg-darker: #ffffff;
    --bg-alt: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-cyan: #0891b2;
    --accent-purple: #7c3aed;
    --accent-warm: #b45309;
    --font-serif: 'EB Garamond', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
    --nav-bg: rgba(248, 250, 252, 0.9);
    --border-subtle: rgba(0, 0, 0, 0.1);
}

/* Dark mode */
[data-theme="dark"] {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-alt: #1e1b4b;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-cyan: #22d3ee;
    --accent-purple: #a78bfa;
    --accent-warm: #fef3c7;
    --nav-bg: rgba(15, 23, 42, 0.9);
    --border-subtle: rgba(255, 255, 255, 0.1);
}

/* Auto dark mode based on OS preference */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-dark: #0f172a;
        --bg-darker: #020617;
        --bg-alt: #1e1b4b;
        --text-primary: #e2e8f0;
        --text-secondary: #94a3b8;
        --text-muted: #64748b;
        --accent-cyan: #22d3ee;
        --accent-purple: #a78bfa;
        --accent-warm: #fef3c7;
        --nav-bg: rgba(15, 23, 42, 0.9);
        --border-subtle: rgba(255, 255, 255, 0.1);
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-dark);
}

/* Links - sitewide default */
a {
    color: var(--accent-cyan);
    text-underline-offset: 0.25em;
    text-decoration: underline;
    text-decoration-style: dotted;
    transition: color 0.2s ease, text-decoration-style 0.2s ease;
}

a:hover,
a:active {
    color: var(--accent-cyan);
    text-decoration-style: solid;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--border-subtle);
}

/* Theme toggle - removed, using system auto only */

.nav-logo {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.1em;
}

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

.nav-links a {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Pull Quote */
.pull-quote {
    padding: 6rem 2rem 2rem;
    text-align: center;
    background: var(--bg-darker);
}

.pull-quote blockquote {
    font-size: 1.75rem;
    font-style: italic;
    color: var(--text-primary);
    max-width: 600px;
    margin: 0 auto;
}

.pull-quote cite {
    display: block;
    margin-top: 1rem;
    font-size: 1rem;
    font-style: normal;
    color: var(--accent-cyan);
    font-family: var(--font-sans);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.hero-content {
    max-width: 800px;
    margin-bottom: 3rem;
}

.hero-title {
    font-family: var(--font-sans);
    font-size: 4rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-hook {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.hero-hook:last-of-type {
    margin-bottom: 2rem;
}

.hero-visual {
    max-width: 600px;
    width: 100%;
}

.hero-visual img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    opacity: 0.9;
}

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

/* Sections */
.section {
    padding: 6rem 0;
}

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

.glass-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-alt) 50%, var(--bg-dark) 100%);
}

.glass-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.glass-text {
    flex: 1;
}

.glass-text p {
    margin-bottom: 1.5rem;
}

.glass-visual {
    flex: 0 0 200px;
}

.glass-visual img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .glass-content {
        flex-direction: column;
        text-align: center;
    }

    .glass-visual {
        flex: none;
        width: 150px;
    }
}

/* Section with image layout */
.section-with-image {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

.section-with-image.reverse {
    flex-direction: row-reverse;
}

.section-image {
    flex: 0 0 150px;
    width: 150px;
    height: auto;
    border-radius: 8px;
    opacity: 0.9;
}

.section-content {
    flex: 1;
}

@media (max-width: 768px) {
    .section-with-image,
    .section-with-image.reverse {
        flex-direction: column;
        align-items: center;
    }

    .section-image {
        flex: none;
        width: 120px;
        margin-bottom: 1.5rem;
        order: -1; /* Always put image first on mobile */
    }
}

/* Typography */
h2 {
    font-family: var(--font-sans);
    font-size: 2rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
}

h3 {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent-cyan);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

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

.lead {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.emphasis {
    font-style: italic;
    color: var(--accent-warm);
}

/* Lists */
ul, ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

li strong {
    color: var(--text-primary);
}

/* Practices */
.practice {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid var(--accent-purple);
    border-radius: 0 4px 4px 0;
}

.practice h3 {
    margin-top: 0;
    color: var(--accent-purple);
}

.practice p {
    margin-bottom: 0;
}

/* Principles */
.principles-list {
    list-style: none;
    padding-left: 0;
    counter-reset: principle;
}

.principles-list li {
    counter-increment: principle;
    margin-bottom: 1.5rem;
    padding-left: 2.5rem;
    position: relative;
}

.principles-list li::before {
    content: counter(principle) ".";
    position: absolute;
    left: 0;
    font-family: var(--font-sans);
    font-weight: 500;
    color: var(--accent-cyan);
}

/* Page Header */
.page-header {
    padding: 8rem 2rem 4rem;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.page-header h1 {
    font-family: var(--font-sans);
    font-size: 3rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.page-header .lead {
    max-width: 600px;
    margin: 0 auto;
}

/* Space items */
.space-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-left: 2px solid var(--accent-cyan);
    border-radius: 0 4px 4px 0;
}

.space-item h3 {
    margin-top: 0;
}

.space-item p {
    margin-bottom: 0;
}

/* Places list */
.places-list {
    list-style: none;
    padding-left: 0;
}

.places-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.places-list li:last-child {
    border-bottom: none;
}

/* Large emphasis text */
.large {
    font-size: 1.5rem;
}

/* Voice/pattern styles */
.pattern {
    margin-bottom: 2rem;
}

.voice-meta {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-align: right;
    font-style: italic;
}

.voice-meta a {
    color: var(--text-muted);
    text-underline-offset: 0.25em;
    text-decoration: underline;
    text-decoration-style: dotted;
    transition: color 0.2s ease;
}

.voice-meta a:hover,
.voice-meta a:active {
    color: var(--accent-cyan);
    text-decoration-style: solid;
}

.voice-quote {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--text-primary);
    padding: 1.5rem;
    margin: 1.5rem 0;
    background: rgba(124, 58, 237, 0.08);
    border-left: 3px solid var(--accent-purple);
    border-radius: 0 4px 4px 0;
}

/* Attribution inside quote blocks */
.voice-quote .voice-meta {
    margin-top: 1rem;
    margin-bottom: 0;
    font-style: normal;
}

/* Haiku styles */
.haiku-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

.haiku {
    text-align: center;
    font-size: 1.125rem;
    line-height: 2;
    color: var(--text-primary);
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
}

/* Attribution inside haiku blocks */
.haiku .voice-meta {
    margin-top: 1rem;
    margin-bottom: 0;
    font-style: normal;
}

/* Active nav link */
.nav-links a.active {
    color: var(--accent-cyan);
}

/* Voice link */
.voice-link {
    display: inline-block;
    margin-top: 1rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--accent-cyan);
    text-decoration: none;
}

.voice-link:hover {
    text-decoration: underline;
}

/* Update entries */
.update-entry {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-subtle);
}

.update-entry:last-child {
    border-bottom: none;
}

.update-date {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--accent-cyan);
    margin-bottom: 0.25rem;
}

.update-author {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.update-entry h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.update-entry ul {
    margin-bottom: 0.5rem;
}

.update-entry p {
    margin-bottom: 0;
    font-size: 0.9375rem;
}

/* Attribution */
.attribution {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Footer */
.footer {
    padding: 6rem 0 2rem;
    text-align: center;
    background: var(--bg-darker);
}

.footer .container {
    max-width: 600px;
}

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

.footer .closing {
    font-size: 1.25rem;
    color: var(--text-primary);
}

.footer .welcome {
    font-size: 1.5rem;
    color: var(--accent-warm);
    margin-top: 2rem;
}

.footer-meta {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-meta p {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-meta a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-meta a:hover {
    color: var(--accent-cyan);
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        padding: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.75rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-hook {
        font-size: 1.125rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .section {
        padding: 4rem 0;
    }

    body {
        font-size: 16px;
    }
}

/* Session table */
.session-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
}

.session-table th,
.session-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.session-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.session-table td {
    color: var(--text-secondary);
}

.session-table a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.session-table a:hover {
    text-decoration: underline;
}

/* Dialogue/Transcript styles for book pages */
.chapter-label {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
}

.dialogue-intro {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.dialogue-container {
    max-width: 800px;
}

.dialogue-container h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.dialogue {
    margin: 2rem 0;
}

.dialogue-turn {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
}

.human-turn {
    background: rgba(180, 83, 9, 0.08);
    border-left: 3px solid var(--accent-warm);
}

.ai-turn {
    background: rgba(124, 58, 237, 0.08);
    border-left: 3px solid var(--accent-purple);
}

.dialogue-speaker {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.human-turn .dialogue-speaker {
    color: var(--accent-warm);
}

.ai-turn .dialogue-speaker {
    color: var(--accent-purple);
}

.dialogue-content {
    color: var(--text-secondary);
}

.dialogue-content p {
    margin-bottom: 1rem;
}

.dialogue-content p:last-child {
    margin-bottom: 0;
}

.dialogue-content h3 {
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.dialogue-content h4 {
    color: var(--text-primary);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-family: var(--font-sans);
}

.dialogue-content ul,
.dialogue-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.dialogue-content li {
    margin-bottom: 0.5rem;
}

.dialogue-content strong {
    color: var(--text-primary);
}

.dialogue-meta {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

/* Chapter navigation */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    font-family: var(--font-sans);
    font-size: 0.875rem;
}

.chapter-nav a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.chapter-nav a:hover {
    text-decoration: underline;
}

.chapter-nav .prev::before {
    content: "← ";
}

.chapter-nav .next::after {
    content: " →";
}

/* Smooth animations */
@media (prefers-reduced-motion: no-preference) {
    .hero-visual img {
        animation: float 6s ease-in-out infinite;
    }

    @keyframes float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
    }
}
