@font-face {
    font-family: 'Blanka';
    src: url('fonts/Blanka-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #1A1412;
    --bg-secondary: #231C18;
    --surface: #2C231E;
    --accent: #D4956B;
    --text: #E8DDD4;
    --text-secondary: #A89888;
    --text-muted: #6B5D52;
    --border: #3A2F28;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Sticky header (WEB-1) */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 20, 18, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.9rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative;
}

.site-header-brand {
    margin-right: auto;
}

.site-header-brand {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    color: var(--text);
    text-decoration: none;
    font-family: 'Blanka', -apple-system, sans-serif;
    font-weight: 400;
    font-size: 1.15rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1;
}

.site-header-brand svg {
    width: 24px;
    height: 19px;
    align-self: baseline;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.site-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.15s;
}

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

.nav-cta {
    background: var(--accent);
    color: var(--bg);
    padding: 0.5rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s, opacity 0.15s;
}

.nav-cta:hover {
    transform: translateY(-1px);
    color: var(--bg);
    opacity: 0.92;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
    .site-header-inner {
        padding: 0.75rem 1.25rem;
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    .nav-toggle {
        display: flex;
        order: -1;
    }
    .site-nav {
        order: 3;
        flex-basis: 100%;
        justify-content: center;
        gap: 1.25rem;
        max-height: 0;
        padding: 0;
        margin: 0;
        overflow: hidden;
        border-top: 1px solid transparent;
        transition: max-height 0.25s ease, padding 0.25s ease, border-color 0.25s ease;
    }
    .site-nav.open {
        max-height: 80px;
        padding-top: 0.65rem;
        padding-bottom: 0.15rem;
        border-top-color: var(--border);
    }
    .site-nav a {
        font-size: 0.85rem;
    }
}

/* Hero */
.hero {
    /* Subtract sticky header height so hero fills the visible viewport without scrollbar */
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--bg));
}

.symbol {
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
}

.symbol svg {
    width: 100%;
    height: 100%;
}

.logo-text {
    font-size: 3rem;
    font-weight: 200;
    letter-spacing: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 0.75rem;
}

.quote {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.hero-video {
    width: 100%;
    max-width: 880px;
    margin: 0 auto 2.5rem;
    border-radius: 14px;
    overflow: hidden;
    background: #1A1412;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.hero-video video {
    display: block;
    width: 100%;
    height: auto;
}

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

.cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
}

.cta:hover { transform: translateY(-2px); }

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

.cta-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

/* Sections */
section {
    max-width: 960px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

h2 .accent { color: var(--accent); }

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
}

/* Philosophy */
.philosophy {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.philosophy p {
    max-width: 640px;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Tools Grid */
.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: border-color 0.2s, transform 0.2s;
}

.tool-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.tool-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: color-mix(in srgb, var(--tool-color, var(--accent)) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--tool-color, var(--accent)) 32%, transparent);
    color: var(--tool-color, var(--accent));
}

.tool-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.tool-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.pillar-group {
    margin-bottom: 2.5rem;
}

.pillar-heading {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14rem;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.25rem;
    text-align: center;
}

.pillar-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.pillar-tools .tool-card {
    flex: 1 1 280px;
    max-width: 360px;
}

.libba-featured {
    margin-top: 1rem;
    text-align: center;
    border-color: var(--accent);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.libba-featured .tool-icon {
    width: 64px;
    height: 64px;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.libba-featured .tool-category {
    margin-bottom: 0.75rem;
}

/* Pillars */
.pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.pillar {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.pillar h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

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

/* Privacy */
.privacy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.privacy-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.privacy-check {
    color: #4CAF50;
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.privacy-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Pricing */
.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

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

.price-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.price-card-link {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: 1;
    text-indent: -9999px;
    overflow: hidden;
}

.price-card-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.price-card.featured {
    border-color: var(--accent);
}

.price-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--bg);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 1rem;
    border-radius: 20px;
}

.price-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
}

.price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.price-note {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.price-features {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
}

.price-features li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.4rem 0;
}

.price-features li::before {
    content: "\2713";
    color: var(--accent);
    margin-right: 0.5rem;
    font-weight: 700;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Privacy Policy Page (anchor section) */
.policy-content {
    max-width: 720px;
    margin: 0 auto;
}

.policy-content h3 {
    font-size: 1.1rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.policy-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Responsive */
@media (max-width: 768px) {
    .logo-text { font-size: 2rem; letter-spacing: 0.6rem; }
    .tagline { font-size: 1rem; }
    .pillars { grid-template-columns: 1fr; }
    section { padding: 4rem 1.5rem; }
    h2 { font-size: 1.6rem; }
}

/* Email Capture */
.email-capture {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.email-capture .label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.email-form {
    display: flex;
    gap: 0.5rem;
    max-width: 440px;
    width: 100%;
}

.email-input {
    flex: 1;
    padding: 0.8rem 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.email-input::placeholder { color: var(--text-muted); }
.email-input:focus { border-color: var(--accent); }

.email-submit {
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    border: none;
    background: var(--accent);
    color: var(--bg);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.2s;
}

.email-submit:hover { opacity: 0.9; transform: translateY(-1px); }

.email-note {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.email-feedback {
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 1.4em;
}

.email-feedback.success { color: #4CAF50; }
.email-feedback.error { color: #E57373; }

/* App Store Badge cluster — two badges side-by-side on desktop, stacked on mobile.
   Apple's brand guidelines require both badges (App Store + Mac App Store) to be
   shown when the product is available on both platforms; both share the same visual
   styling so neither feels demoted. */
.app-badges {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.app-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    /* Inside the .app-badges cluster the cluster owns the top margin, so reset
       on each badge. Stand-alone usages (none currently, but defensive) inherit
       the original 1.5rem from .app-badges → .app-badge:only-child. */
    margin-top: 0;
    padding: 0.65rem 1.5rem;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.85rem;
    text-decoration: none;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s;
}

.app-badge:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.app-badge .apple-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.app-badge .badge-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.app-badge .badge-text .badge-small {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04rem;
}

.app-badge .badge-text .badge-large {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Screenshots */
.screenshots-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.screenshots-wrap {
    position: relative;
    width: 100%;
}

.screenshots-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(to right, transparent, var(--bg));
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s;
}

.screenshots-wrap.at-end::after {
    opacity: 0;
}

.screenshots-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 80px;
    background: linear-gradient(to left, transparent, var(--bg));
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
}

.screenshots-wrap.scrolled::before {
    opacity: 1;
}

.scroll-arrow {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 2;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.scroll-arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

.scroll-arrow-left { left: 12px; }
.scroll-arrow-right { right: 12px; }

.screenshots-wrap:not(.scrolled) .scroll-arrow-left { opacity: 0; pointer-events: none; }
.screenshots-wrap.at-end .scroll-arrow-right { opacity: 0; pointer-events: none; }

@media (min-width: 769px) {
    .screenshots-wrap:hover .scroll-arrow {
        display: flex;
    }
}

.screenshots-scroll {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding: 1rem 0 2rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.screenshots-scroll::-webkit-scrollbar { display: none; }

.screenshot-frame {
    flex: 0 0 auto;
    width: 220px;
    height: 440px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    scroll-snap-align: center;
    overflow: hidden;
    position: relative;
}

.screenshot-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 19px;
}

.screenshot-frame .placeholder-icon {
    font-size: 2.5rem;
    opacity: 0.5;
}

.screenshot-frame .placeholder-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Responsive additions */
@media (max-width: 768px) {
    .email-form { flex-direction: column; }
    .email-submit { width: 100%; }
    .screenshot-frame { width: 180px; height: 360px; }
}

/* Smooth scroll */
html { scroll-behavior: smooth; scroll-padding-top: 64px; }

/* FAQ / details (WEB-2/WEB-3) */
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--accent); }
.faq-item summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text);
    list-style: none;
    position: relative;
    padding-right: 2.5rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 400;
    transition: transform 0.2s;
}
.faq-item[open] summary::after {
    content: '\2013';
    transform: translateY(-50%) rotate(180deg);
}
.faq-item p {
    padding: 0 1.25rem 1.1rem 1.25rem;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Support channels (WEB-2) */
.support-channels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}
@media (max-width: 720px) {
    .support-channels {
        grid-template-columns: 1fr;
    }
}
.channel-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: color-mix(in srgb, var(--tool-color, var(--accent)) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--tool-color, var(--accent)) 32%, transparent);
}
.support-channel {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.15s;
}
.support-channel:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.channel-title {
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
}
.channel-sub {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Support page content block */
#support-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
}
