/* ── Design tokens ────────────────────────────────────────── */
:root {
    --primary: #7A5C3E;
    --primary-hover: #2A2520;
    --secondary: #6B6259;
    --bg: #F7F2EA;
    --bg-alt: #F1E8D9;
    --surface: #FDFAF5;
    --text: #2E2E2E;
    --text-muted: #8C8279;
    --border: #D5C9B8;
    --success: #5B8C7A;
    --radius: 0.75rem;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1);
    --font-serif: 'Source Serif 4', Georgia, serif;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ── Reset & base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    line-height: 1.2;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-ghost {
    border-color: rgba(255 255 255 / .4);
    color: #fff;
}
.btn-ghost:hover {
    border-color: #fff;
    background: rgba(255 255 255 / .1);
}

.btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }

/* ── Navigation ──────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
    background: rgba(253, 250, 245, .95);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-weight: 700;
}
.nav .scrolled .nav-brand { color: var(--text); }

/* In hero area (before scroll) make nav text white */
.nav:not(.scrolled) .nav-brand { color: #fff; }
.nav:not(.scrolled) .nav-links a { color: rgba(255 255 255 / .85); }
.nav:not(.scrolled) .nav-links a:hover { color: #fff; }
.nav:not(.scrolled) .btn-outline { border-color: rgba(255 255 255 / .5); color: #fff; }
.nav:not(.scrolled) .btn-outline:hover { background: rgba(255 255 255 / .15); border-color: #fff; }
.nav:not(.scrolled) .nav-toggle span { background: #fff; }

.nav-logo { width: 36px; height: 36px; }

.nav-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}
.nav-links a {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    flex-direction: column;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #3E3831 0%, #7A5C3E 100%);
    color: #fff;
    padding: 10rem 0 6rem;
    text-align: center;
}

.hero-owl {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-tagline {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 600;
    color: rgba(255 255 255 / .9);
    margin-bottom: 1.5rem;
    font-family: var(--font-serif);
    font-style: italic;
}

.hero-sub {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: rgba(255 255 255 / .75);
    font-size: 1.05rem;
    line-height: 1.7;
}

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

/* ── Sections ────────────────────────────────────────────── */
.section {
    padding: 5rem 0;
}
.section-alt {
    background: var(--bg-alt);
}

.section h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    text-align: center;
    margin-bottom: 0.75rem;
}

.section-sub {
    text-align: center;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 3rem;
    font-size: 1.05rem;
}

/* ── Steps (How it Works) ────────────────────────────────── */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

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

.step-number {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.step p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* ── Email demo ──────────────────────────────────────────── */
.demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.email-mock {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.email-header {
    background: var(--primary-hover);
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.email-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.email-dot.red { background: #e74c3c; }
.email-dot.yellow { background: #f1c40f; }
.email-dot.green { background: #2ecc71; }

.email-title {
    color: rgba(255 255 255 / .7);
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.email-body {
    padding: 1.25rem;
    font-size: 0.88rem;
    line-height: 1.6;
}

.email-field {
    margin-bottom: 0.25rem;
    font-size: 0.82rem;
}

.email-field .highlight {
    background: rgba(122, 92, 62, .15);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-weight: 600;
    color: var(--primary);
}

.email-divider {
    border-top: 1px solid var(--border);
    margin: 0.75rem 0;
}

.email-attachment {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--bg);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.82rem;
    margin-top: 0.5rem;
    color: var(--secondary);
}

.attachment-icon { line-height: 1; }
.attachment-icon svg { width: 16px; height: 16px; stroke: var(--secondary); }

.email-reply {
    background: var(--bg);
    border-left: 3px solid var(--primary);
    padding: 1rem;
    border-radius: 0 6px 6px 0;
    margin-top: 0.5rem;
}

.email-reply p { margin-bottom: 0.5rem; }

.email-source {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
}

/* ── Value Proposition (pitch) ───────────────────────────── */
.section-pitch {
    background: linear-gradient(135deg, #3E3831 0%, #7A5C3E 100%);
    color: #fff;
    padding: 5rem 0;
}

.pitch-headline {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    text-align: center;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.15;
}

.pitch-lead {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3.5rem;
    font-size: 1.1rem;
    line-height: 1.75;
    color: rgba(255 255 255 / .8);
}
.pitch-lead strong { color: #fff; }

.pitch-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.pitch-point {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    overflow: hidden;
}

.pitch-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
    pointer-events: none;
}
.pitch-icon svg {
    width: 100px;
    height: 100px;
    stroke: rgba(255 255 255 / .08);
    stroke-width: 1;
}

.pitch-point h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: #fff;
    position: relative;
}

.pitch-point p {
    color: rgba(255 255 255 / .75);
    font-size: 0.95rem;
    line-height: 1.65;
    position: relative;
}

.pitch-coda {
    text-align: center;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.15rem;
    color: rgba(255 255 255 / .9);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255 255 255 / .15);
}

/* ── Use Cases ───────────────────────────────────────────── */
.cases-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.case-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    transition: box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}
.case-card:hover { box-shadow: var(--shadow-md); }

.case-icon {
    position: absolute;
    top: -10px;
    right: -10px;
    line-height: 1;
    pointer-events: none;
}
.case-icon svg {
    width: 80px;
    height: 80px;
    stroke: var(--primary);
    stroke-width: 1;
    opacity: 0.1;
}

.case-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.case-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 0.75rem;
}

.case-example {
    font-style: italic;
    color: var(--primary) !important;
    font-size: 0.9rem !important;
    border-left: 2px solid var(--primary);
    padding-left: 0.75rem;
    margin-top: 1rem !important;
}

/* ── Features grid ───────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}
.feature:hover { box-shadow: var(--shadow-md); }

.feature-icon {
    position: absolute;
    top: -8px;
    right: -8px;
    line-height: 1;
    pointer-events: none;
}
.feature-icon svg {
    width: 64px;
    height: 64px;
    stroke: var(--primary);
    stroke-width: 1;
    opacity: 0.08;
}

.feature h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.feature p {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.55;
    position: relative;
}

/* ── Pricing ─────────────────────────────────────────────── */
.pricing-trial {
    background: linear-gradient(135deg, #3E3831 0%, #7A5C3E 100%);
    color: #fff;
    text-align: center;
    padding: 1.25rem 2rem;
    border-radius: var(--radius);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}
.pricing-trial strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

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

.pricing-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: box-shadow 0.2s;
}
.pricing-card:hover { box-shadow: var(--shadow-md); }

.pricing-featured {
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-md);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    white-space: nowrap;
}

.pricing-tier {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.pricing-price {
    font-family: var(--font-serif);
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}
.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.pricing-period {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.pricing-features li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text);
    border-bottom: 1px solid rgba(0 0 0 / .05);
}

.pricing-features li::before {
    content: "\2713\00a0";
    color: var(--success);
    font-weight: 700;
}

.pricing-card .btn {
    width: 100%;
    text-align: center;
}

.pricing-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 2rem;
}
.pricing-note a {
    font-weight: 600;
}

/* ── Self-hosted ─────────────────────────────────────────── */
/* ── Hosted vs Self-hosted comparison ────────────────────── */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.comparison-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
}

.comparison-hosted { border: 2px solid var(--primary); }

.comparison-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.comparison-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.comparison-list {
    list-style: none;
    flex-grow: 1;
    margin-bottom: 1.75rem;
}

.comparison-list li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0 0 0 / .05);
}

.comparison-list li.included::before {
    content: "\2713\00a0";
    color: var(--success);
    font-weight: 700;
}

.comparison-list li.yourself::before {
    content: "\2192\00a0";
    color: var(--text-muted);
}

.comparison-card .btn {
    text-align: center;
    width: 100%;
}

.comparison-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1.75rem;
}

/* ── Legal pages ─────────────────────────────────────────── */
.section-legal {
    padding-top: 8rem;
}

.legal {
    max-width: 780px;
    margin: 0 auto;
}

.legal h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.legal .legal-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
}

.legal h2 {
    font-size: 1.35rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.legal h3 {
    font-size: 1.1rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.legal p {
    margin-bottom: 1rem;
    line-height: 1.75;
    font-size: 0.95rem;
}

.legal ul, .legal ol {
    margin-bottom: 1rem;
    padding-left: 1.75rem;
}

.legal li {
    margin-bottom: 0.5rem;
    line-height: 1.65;
    font-size: 0.95rem;
}

.legal ol ol, .legal ul ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.legal table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

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

.legal th {
    background: var(--bg-alt);
    font-weight: 600;
}

.legal a {
    text-decoration: underline;
}

.legal strong {
    font-weight: 600;
}

.footer-legal {
    font-size: 0.85rem;
}
.footer-legal a {
    font-size: 0.85rem;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
    background: var(--primary-hover);
    color: rgba(255 255 255 / .7);
    padding: 3rem 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.1rem;
}

.footer-logo {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}
.footer-links a {
    color: rgba(255 255 255 / .6);
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }

.footer-copy {
    font-size: 0.8rem;
    color: rgba(255 255 255 / .4);
}

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

@media (max-width: 900px) {
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 1rem 1.5rem;
        box-shadow: var(--shadow-md);
        gap: 0.75rem;
    }
    .nav-links.open { display: flex; }
    /* Override white text for mobile menu */
    .nav-links a { color: var(--text) !important; }
    .nav-links .btn-outline { color: var(--primary) !important; border-color: var(--primary) !important; }

    .hero { padding: 8rem 0 4rem; }
    .hero-owl { width: 72px; height: 72px; }

    .steps { grid-template-columns: 1fr; gap: 1.5rem; }
    .step { padding: 1.5rem 1rem; }

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

    .pitch-points { grid-template-columns: 1fr; gap: 2rem; }

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

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

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

    .section { padding: 3.5rem 0; }
}

@media (max-width: 480px) {
    .features-grid { grid-template-columns: 1fr; }

    .hero h1 { font-size: 1.75rem; }
}
