/* Omega Directive — shared styles (studio + app pages). Plain CSS, no build. */

:root {
    --bg:        #f6f1e8;
    --surface:   #fffdf8;
    --surface2:  #efe8da;
    --border:    #d9cfbc;
    --border-soft:#e8e0d0;
    --text:      #1c1914;
    --muted:     #5a5346;   /* 6.9:1 on bg */
    --accent:    #b3261e;   /* 5.9:1 on bg */
    --red:       var(--accent);
    --accent-bg: #f6dcd6;
    --on-accent: #ffffff;
    --ink:       #15130f;
    --ok-bg: #d8efdc; --ok-fg: #14532d;
    --next-bg:#d9e6fb; --next-fg:#1e3a8a;
    --back-bg:#e9dcf8; --back-fg:#4c1d95;
    --shadow: 0 1px 2px rgba(28,25,20,.08), 0 8px 24px rgba(28,25,20,.06);
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:        #12100d;
        --surface:   #1b1813;
        --surface2:  #242019;
        --border:    #3a3328;
        --border-soft:#2a251d;
        --text:      #f1ebdf;
        --muted:     #b3aa98;   /* 8:1 on bg */
        --accent:    #ff8a6e;   /* 8.2:1 on bg */
        --accent-bg: #3b1d17;
        --on-accent: #1a0d09;
        --ok-bg:#16301f; --ok-fg:#86e0a0;
        --next-bg:#17274a; --next-fg:#a9c4ff;
        --back-bg:#2c1d4a; --back-fg:#d1b8ff;
        --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    }
}

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

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    /* faint blueprint grid */
    background-image:
        linear-gradient(var(--border-soft) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
    background-size: 48px 48px;
    background-position: -1px -1px;
}

img { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--on-accent); padding: 8px 14px; z-index: 200; }
.skip:focus { left: 8px; top: 8px; }

/* ===== NAV ===== */
nav {
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
    max-width: 1040px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.nav-brand img, .nav-logo { width: 28px; height: 28px; }
.nav-brand span { font-family: var(--mono); font-weight: 700; letter-spacing: .02em; font-size: .95rem; }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-links a {
    color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 600;
    padding: 6px 12px; border-radius: 6px;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); }
.nav-links a.active { color: var(--accent); background: var(--accent-bg); }
.nav-sep { color: var(--border); }

/* ===== LAYOUT ===== */
main { max-width: 1040px; margin: 0 auto; padding: 0 24px 72px; }
section { margin-bottom: 48px; }

.hero-eyebrow, .section-label {
    font-family: var(--mono); font-size: .75rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
    margin-bottom: 10px;
}
.section-label::before { content: "// "; opacity: .6; }
.section-title {
    font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 800; letter-spacing: -.02em;
    line-height: 1.2; margin-bottom: 24px;
}

/* ===== STUDIO HERO ===== */
.studio-hero { max-width: 1040px; margin: 0 auto; padding: 88px 24px 56px; }
.studio-hero .omega {
    font-size: clamp(4rem, 14vw, 8rem); line-height: .9; font-weight: 800;
    color: var(--accent); font-family: var(--sans); margin-bottom: 8px; display: block;
}
.studio-hero h1 {
    font-size: clamp(2.2rem, 6vw, 3.8rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.05;
    margin-bottom: 20px;
}
.studio-hero p { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.cursor { display: inline-block; width: .5em; height: 1em; background: var(--accent); vertical-align: -.12em; margin-left: .1em; }
@media (prefers-reduced-motion: no-preference) { .cursor { animation: blink 1.1s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }

/* ===== APP CARD (studio home) ===== */
.app-card {
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    padding: 32px; box-shadow: var(--shadow); border-left: 6px solid var(--accent);
}
.app-card h3 { font-size: 1.6rem; letter-spacing: -.02em; margin-bottom: 6px; }
.app-card .tag { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-bottom: 14px; display: block; }
.app-card p { color: var(--muted); margin-bottom: 20px; }
.app-card img { border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow); max-height: 460px; width: auto; justify-self: center; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
    display: inline-block; padding: 10px 18px; border-radius: 8px; font-weight: 700; font-size: .92rem;
    text-decoration: none; border: 2px solid var(--accent); color: var(--accent);
}
.btn:hover { background: var(--accent-bg); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }

/* ===== PRINCIPLES (studio) ===== */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.principle { border-top: 2px solid var(--text); padding-top: 12px; }
.principle h3 { font-family: var(--mono); font-size: .9rem; margin-bottom: 4px; }
.principle p { color: var(--muted); font-size: .92rem; }

/* ===== CINNABAR HERO ===== */
.hero {
    max-width: 1040px; margin: 0 auto; padding: 72px 24px 56px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin-bottom: 18px; }
.hero h1 span { color: var(--accent); }
.hero-desc { font-size: 1.05rem; color: var(--muted); margin-bottom: 28px; max-width: 26rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-top: 14px; }
.btn-appstore {
    display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: #fff;
    padding: 11px 22px; border-radius: 10px; text-decoration: none; border: 1px solid #4a4336;
}
.btn-appstore:hover { background: #000; }
.btn-text { line-height: 1.2; }
.btn-sub { display: block; font-size: .7rem; opacity: .8; }
.btn-main { font-size: 1rem; font-weight: 700; }

.hero-visual { display: flex; justify-content: center; }
.phones-container { position: relative; width: 300px; height: 480px; }
.phone-mockup { position: absolute; width: 230px; }
.phone-mockup-front { left: 0; top: 0; transform: rotate(-2deg); z-index: 2; }
.phone-mockup-back { right: -10px; top: 24px; width: 220px; transform: rotate(5deg); opacity: .65; }
.phone-frame { background: #1a1a1a; border-radius: 38px; padding: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.phone-screen { border-radius: 28px; overflow: hidden; aspect-ratio: 9/19.5; position: relative; background: #111; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 88px; height: 26px; background: #1a1a1a; border-radius: 0 0 16px 16px; z-index: 2; }

/* ===== CARDS ===== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px;
}
.feature-icon-wrap {
    width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; margin-bottom: 12px; background: var(--accent-bg) !important;
}
.feature-card h3 { font-size: 1rem; margin-bottom: 6px; }
.feature-card p { font-size: .9rem; color: var(--muted); }

.contact-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    border-left: 6px solid var(--accent);
}
.contact-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.contact-card p { color: var(--muted); font-size: .95rem; }
.contact-email-btn {
    display: inline-block; background: var(--accent); color: var(--on-accent); padding: 10px 18px;
    border-radius: 8px; font-weight: 700; text-decoration: none; font-family: var(--mono); font-size: .88rem;
    overflow-wrap: anywhere;
}
.contact-email-btn:hover { filter: brightness(1.08); }

.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.info-row { display: flex; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--border-soft); }
.info-row:last-child { border-bottom: 0; }
.info-row-icon { width: 28px; text-align: center; flex-shrink: 0; font-size: 1.1rem; }
.info-row p { color: var(--muted); font-size: .94rem; }
.info-row strong { color: var(--text); }

/* ===== ROADMAP ===== */
.roadmap-hero { max-width: 640px; margin: 0 auto; text-align: center; padding: 64px 24px 40px; }
.roadmap-hero h1 { font-size: clamp(2.1rem, 5vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.roadmap-hero p { color: var(--muted); margin-top: 12px; }

.version-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.version-header { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.version-header h3 { font-size: 1.05rem; }
.version-header p { font-size: .88rem; color: var(--muted); }
.version-badge { font-family: var(--mono); font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 99px; white-space: nowrap; border: 1px solid transparent; }
.badge-complete { background: var(--ok-bg); color: var(--ok-fg); }
.badge-current  { background: var(--accent-bg); color: var(--accent); }
.badge-next     { background: var(--next-bg); color: var(--next-fg); }
.badge-planned  { background: var(--surface2); color: var(--muted); border-color: var(--border); }
.badge-backlog  { background: var(--back-bg); color: var(--back-fg); }
.version-body { padding: 4px 0; }
.roadmap-item { display: flex; gap: 12px; padding: 11px 22px; border-bottom: 1px solid var(--border-soft); }
.roadmap-item:last-child { border-bottom: 0; }
.roadmap-item p { font-size: .94rem; }
.roadmap-check { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 700; }
.check-done { background: var(--ok-bg); color: var(--ok-fg); }
.check-pending { border: 2px solid var(--border); }

.release-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.release-table th { text-align: left; padding: 10px 16px; color: var(--muted); font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--border); }
.release-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.release-table tr:last-child td { border-bottom: 0; }
.release-table td:first-child { font-family: var(--mono); font-weight: 700; color: var(--accent); white-space: nowrap; }
.release-table td:nth-child(2) { color: var(--muted); white-space: nowrap; }

/* ===== 404 ===== */
.notfound { max-width: 640px; margin: 0 auto; padding: 96px 24px; text-align: center; }
.notfound .omega { font-size: 6rem; color: var(--accent); font-weight: 800; line-height: 1; }
.notfound h1 { font-size: 2rem; margin: 12px 0; }
.notfound p { color: var(--muted); margin-bottom: 24px; }

/* ===== FOOTER ===== */
footer {
    border-top: 1px solid var(--border); max-width: 1040px; margin: 0 auto; padding: 28px 24px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
    font-size: .85rem; color: var(--muted);
}
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ===== RESPONSIVE ===== */
@media (max-width: 760px) {
    .hero { grid-template-columns: 1fr; padding-top: 48px; }
    .hero-visual { display: none; }
    .app-card { grid-template-columns: 1fr; padding: 24px; }
    .app-card img { max-height: 380px; }
    .features-grid, .principles { grid-template-columns: 1fr 1fr; }
    .studio-hero { padding-top: 56px; }
    .contact-card { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    .features-grid, .principles { grid-template-columns: 1fr; }
    .info-row, .roadmap-item { padding-left: 16px; padding-right: 16px; }
    .release-table th, .release-table td { padding: 10px 10px; }
    .release-table td:nth-child(2) { white-space: normal; }
}
