/* ===========================================================================
   Joel Research Corporation — shared site styles
   Dark, modern theme that echoes the apps' own UI.
   =========================================================================== */

:root {
    --bg:        #0b0c16;
    --bg-2:      #111324;
    --surface:   #171a2e;
    --surface-2: #1e2238;
    --border:    rgba(255,255,255,0.08);
    --text:      #eef1f8;
    --text-dim:  #a6adc8;
    --text-faint:#6b7290;
    --accent:    #4a9eff;
    --accent-2:  #2dd4bf;
    --accent-red:#ff5a52;
    --radius:    16px;
    --maxw:      1040px;
}

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

html { scroll-behavior: smooth; }

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

/* Ambient gradient glow behind everything */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(900px 600px at 15% -5%, rgba(74,158,255,0.18), transparent 60%),
        radial-gradient(800px 600px at 95% 0%, rgba(45,212,191,0.12), transparent 55%),
        linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Highlighted letters in the Audioscriber Pro wordmark (spells "AI") */
.ai { color: var(--accent-red); -webkit-text-fill-color: var(--accent-red); }
/* The hero wordmark opts out of the gradient text so .ai colors show through */
.wordmark {
    background: none !important;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: var(--text);
    color: var(--text);
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- Site header / nav -------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(140%) blur(14px);
    background: rgba(11,12,22,0.72);
    border-bottom: 1px solid var(--border);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.brand {
    display: flex; align-items: center; gap: 12px;
    color: var(--text); font-weight: 700; letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand span { font-size: 1.05rem; }
.site-nav a {
    color: var(--text-dim);
    margin-left: 22px;
    font-size: 0.95rem;
    font-weight: 500;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* ---- Hero --------------------------------------------------------------- */
.hero { text-align: center; padding: 96px 0 72px; }
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    background: linear-gradient(180deg, #fff, #b9c2e6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 18px;
}
.hero p.tagline {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--text-dim);
    max-width: 620px;
    margin: 0 auto;
}
.hero p.tagline .hl { color: var(--accent-2); font-weight: 600; }
.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 18px;
}

/* ---- Sections ----------------------------------------------------------- */
section { padding: 56px 0; }
.section-title { text-align: center; margin-bottom: 12px; font-size: 1.8rem; letter-spacing: -0.02em; }
.section-sub { text-align: center; color: var(--text-dim); max-width: 600px; margin: 0 auto 44px; }

/* ---- Project cards (home) ---------------------------------------------- */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    color: var(--text);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
    overflow: hidden;
}
.project-card:hover {
    transform: translateY(-4px);
    border-color: rgba(74,158,255,0.5);
    box-shadow: 0 18px 40px rgba(0,0,0,0.45);
    text-decoration: none;
}
.project-card .icon {
    width: 72px; height: 72px; border-radius: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.4);
    margin-bottom: 20px;
}
.project-card .glyph {
    width: 72px; height: 72px; border-radius: 18px; margin-bottom: 20px;
    display: grid; place-items: center; font-size: 34px;
    background: linear-gradient(135deg, rgba(74,158,255,0.25), rgba(45,212,191,0.25));
    border: 1px solid var(--border);
}
.project-card h3 { font-size: 1.35rem; margin-bottom: 6px; }
.project-card .status {
    display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--accent-2);
    background: rgba(45,212,191,0.12); border: 1px solid rgba(45,212,191,0.3);
    padding: 3px 10px; border-radius: 999px; margin-bottom: 14px;
}
.project-card p { color: var(--text-dim); font-size: 0.97rem; margin-bottom: 20px; }
.project-card .cta {
    margin-top: auto; color: var(--accent); font-weight: 600; font-size: 0.95rem;
}
.project-card .cta::after { content: " →"; transition: margin-left .2s ease; }
.project-card:hover .cta::after { margin-left: 4px; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-block; padding: 12px 22px; border-radius: 10px;
    font-weight: 600; font-size: 0.95rem;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), #3b7fe0);
    color: #fff; border: none;
}
.btn-primary:hover { text-decoration: none; filter: brightness(1.08); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { text-decoration: none; border-color: var(--accent); }
.coming-soon {
    display: inline-block; padding: 11px 20px; border-radius: 10px;
    background: var(--surface-2); border: 1px solid var(--border);
    color: var(--text-dim); font-weight: 600; font-size: 0.9rem;
}

/* ---- Feature grid ------------------------------------------------------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    transition: border-color .2s ease, transform .2s ease;
}
.feature:hover { border-color: rgba(74,158,255,0.4); transform: translateY(-2px); }
.feature .fi { font-size: 22px; margin-bottom: 10px; display: block; }
.feature h4 { margin-bottom: 6px; font-size: 1.05rem; }
.feature p { color: var(--text-dim); font-size: 0.92rem; }

/* ---- Privacy callout ---------------------------------------------------- */
.privacy-callout {
    max-width: 860px;
    margin: 0 auto;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid rgba(45,212,191,0.35);
    border-radius: var(--radius);
    padding: 44px 40px;
    text-align: center;
}
.privacy-callout .lock {
    display: grid; place-items: center;
    width: 60px; height: 60px; margin: 0 auto 18px;
    font-size: 28px; border-radius: 16px;
    background: rgba(45,212,191,0.12);
    border: 1px solid rgba(45,212,191,0.3);
}
.privacy-callout h2 { font-size: 1.7rem; letter-spacing: -0.02em; margin-bottom: 12px; }
.privacy-callout p.lead { color: var(--text-dim); max-width: 600px; margin: 0 auto; }
.privacy-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 32px;
    text-align: left;
}
@media (max-width: 620px) { .privacy-points { grid-template-columns: 1fr; } }
.privacy-points .pt {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
}
.privacy-points .pt strong { display: block; margin-bottom: 4px; }
.privacy-points .pt span { color: var(--text-dim); font-size: 0.9rem; }

/* ---- Phone-framed screenshots ------------------------------------------ */
.shots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 28px;
    max-width: 920px;
    margin: 0 auto;
}
.shot { text-align: center; }
.phone {
    position: relative;
    border-radius: 30px;
    padding: 8px;
    background: linear-gradient(160deg, #2a2f47, #11131f);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 18px 40px rgba(0,0,0,0.5);
    transition: transform .25s ease;
}
.phone:hover { transform: translateY(-6px); }
.phone img { width: 100%; display: block; border-radius: 24px; }
.shot .caption { margin-top: 12px; color: var(--text-dim); font-size: 0.88rem; }

/* ---- Back link ---------------------------------------------------------- */
.back-link { display: inline-block; margin-bottom: 8px; color: var(--text-dim); font-size: 0.9rem; }
.back-link:hover { color: var(--text); text-decoration: none; }
.back-link::before { content: "← "; }

/* ---- Generic prose (privacy / terms) ----------------------------------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h1 { font-size: 2rem; margin-bottom: 8px; letter-spacing: -0.02em; }
.prose h2 { font-size: 1.25rem; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--text-dim); }
.prose ul { margin: 10px 0 10px 22px; }
.prose .updated { color: var(--text-faint); font-size: 0.9rem; margin-bottom: 24px; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 40px;
    padding: 40px 0;
    font-size: 0.85rem;
    color: var(--text-faint);
}
.site-footer .container {
    display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start;
}
.site-footer nav a { color: var(--text-dim); margin-left: 18px; }
.site-footer nav a:hover { color: var(--text); text-decoration: none; }
.site-footer .legal { max-width: 560px; margin-top: 12px; line-height: 1.5; }

/* ---- Focus styles ------------------------------------------------------- */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (max-width: 640px) {
    .site-footer .container { flex-direction: column; }
    .site-footer nav a { margin: 0 16px 0 0; }
}
