/* ====================================================
   PapaiArt Animation Studio — Site Styles
   ==================================================== */

:root {
    --brand: #1e9cf0;
    --brand-dark: #0d7ec9;
    --brand-light: #5fb8f5;
    --accent: #ef233c;
    --bg: #ffffff;
    --bg-soft: #f5f7fb;
    --bg-dark: #14161c;
    --bg-darker: #0b0d12;
    --surface: #ffffff;
    --surface-dark: #1c1f27;
    --text: #1a1d24;
    --text-soft: #4a5260;
    --text-muted: #8d99ae;
    --text-on-dark: #e7ebf2;
    --border: #e4e8ef;
    --border-dark: #2a2f3a;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 18px 48px rgba(15, 23, 42, 0.18);
    --max-width: 1200px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--text);
    line-height: 1.2;
    margin: 0 0 .6em;
    letter-spacing: -0.02em;
    font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--text-soft); }

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

/* ============ NAVIGATION ============ */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}

.site-nav__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text);
    font-size: 1rem;
    letter-spacing: -.01em;
}

.brand-mark img { width: 32px; height: 32px; }
.brand-mark span small { display: block; font-size: .72rem; color: var(--text-muted); font-weight: 500; }

.nav-links {
    display: flex;
    gap: 6px;
    margin-left: auto;
    list-style: none;
    padding: 0;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text);
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 500;
    font-size: .95rem;
    transition: background .15s ease, color .15s ease;
}

.nav-links a:hover { background: var(--bg-soft); color: var(--brand); }
.nav-links a.is-active { color: var(--brand); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: .95rem;
    border: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(30,156,240,.35); }

.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn--ghost:hover { background: var(--bg-soft); color: var(--brand); }

.btn--lg { padding: 16px 30px; font-size: 1rem; }

/* ============ HERO ============ */

.hero {
    position: relative;
    color: var(--text-on-dark);
    background:
        radial-gradient(1200px 600px at 20% 0%, rgba(30,156,240,.45), transparent 60%),
        radial-gradient(900px 500px at 90% 30%, rgba(95,184,245,.25), transparent 60%),
        linear-gradient(180deg, #0d1018 0%, #14161c 100%);
    overflow: hidden;
    padding: 80px 0 60px;
}

.about-hero { position: relative; overflow: hidden; }

.hero__canvas,
.hero__grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero__canvas { z-index: 0; width: 100%; height: 100%; display: block; }

.hero__grid {
    z-index: 1;
    background-image:
        linear-gradient(rgba(95,184,245,0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(95,184,245,0.09) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 18%, transparent 78%);
            mask-image: radial-gradient(ellipse 80% 70% at 50% 35%, #000 18%, transparent 78%);
    animation: hero-grid-drift 28s linear infinite;
    opacity: .85;
}

@keyframes hero-grid-drift {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 56px 0, 0 56px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero__grid { animation: none; }
}

.hero__inner {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: center;
}

.about-hero > .container { position: relative; z-index: 2; }

.hero__title-img {
    max-width: 480px;
    margin-bottom: 24px;
    filter: drop-shadow(0 6px 24px rgba(0,0,0,.4));
}

.hero__lead {
    color: #b9c2d2;
    font-size: 1.15rem;
    max-width: 520px;
    margin-bottom: 28px;
}

.hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__shot {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,.06);
    transform: rotate(.6deg);
}

.hero__shot--overflow {
    overflow: visible;
    border: none;
    box-shadow: none;
    border-radius: 0;
    position: relative;
    z-index: 5;
    transform: translateY(-20px) scale(1.6);
    transform-origin: center top;
}

.hero__shot--overflow img {
    filter: drop-shadow(0 22px 50px rgba(0,0,0,.5));
}

.hero { overflow: visible; }

@media (max-width: 880px) {
    .hero__shot--overflow {
        transform: none;
    }
}

.hero__meta {
    margin-top: 24px;
    color: #8d99ae;
    font-size: .9rem;
}

.hero__meta strong { color: #fff; font-weight: 600; }

@media (max-width: 880px) {
    .hero__inner { grid-template-columns: 1fr; }
    .hero__title-img { max-width: 360px; }
}

/* ============ SECTION ============ */

.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--bg-dark); color: var(--text-on-dark); }
.section--dark p { color: #b9c2d2; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }

.section__head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
}

.section__eyebrow {
    display: inline-block;
    color: var(--brand);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .82rem;
    margin-bottom: 12px;
}

/* ============ FEATURE GRID ============ */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: rgba(30,156,240,.4);
}

.feature-card .ico {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 16px;
    font-weight: 700;
}

.feature-card h3 { margin-bottom: 8px; }
.feature-card p { font-size: .95rem; margin-bottom: 0; }

.section--dark .feature-card { background: var(--surface-dark); border-color: var(--border-dark); }

/* ============ SHOWCASE / ALT IMAGE ROWS ============ */

.alt-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    margin-bottom: 96px;
}

.alt-row:last-child { margin-bottom: 0; }
.alt-row--reverse > .alt-row__media { order: 2; }

.alt-row__media img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.alt-row__copy h2 { margin-bottom: 16px; }
.alt-row__copy ul { padding-left: 20px; margin: 12px 0 0; color: var(--text-soft); }
.alt-row__copy ul li { margin-bottom: 6px; }

@media (max-width: 880px) {
    .alt-row { grid-template-columns: 1fr; gap: 32px; margin-bottom: 64px; }
    .alt-row--reverse > .alt-row__media { order: 0; }
}

/* ============ DOWNLOAD ============ */

.dl-card {
    background: linear-gradient(135deg, #1e9cf0 0%, #0d7ec9 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 56px;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
    align-items: center;
    box-shadow: 0 24px 60px rgba(13,126,201,.35);
}

.dl-card h2 { color: #fff; }
.dl-card p { color: rgba(255,255,255,.85); }
.dl-card .btn--primary { background: #fff; color: var(--brand-dark); }
.dl-card .btn--primary:hover { background: #f0f7ff; color: var(--brand-dark); }

.dl-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: .9rem; color: rgba(255,255,255,.85); margin-top: 18px; }
.dl-meta span::before { content: "✓"; margin-right: 6px; opacity: .8; }

.dl-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 32px;
}

.dl-option {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}

.dl-option h4 { margin-bottom: 4px; }
.dl-option .muted { color: var(--text-muted); font-size: .9rem; }

@media (max-width: 880px) {
    .dl-card { grid-template-columns: 1fr; padding: 36px; }
}

/* ============ TABLE (capabilities) ============ */

.cap-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.cap-table th, .cap-table td { padding: 18px 22px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.cap-table th { background: var(--bg-dark); color: #fff; font-weight: 600; text-transform: uppercase; font-size: .82rem; letter-spacing: .06em; }
.cap-table tr:last-child td { border-bottom: none; }
.cap-table td.cat { color: var(--brand); font-weight: 600; width: 28%; }
.cap-table tr:hover td { background: var(--bg-soft); }
.cap-table ul { margin: 0; padding-left: 18px; color: var(--text-soft); }
.cap-table ul li { margin-bottom: 4px; }

/* ============ ARTICLE CARDS ============ */

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(30,156,240,.4); }

.article-card__cover {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1e9cf0 0%, #14161c 100%);
    position: relative;
    overflow: hidden;
}
.article-card__cover img { width: 100%; height: 100%; object-fit: cover; }

.article-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.article-card__tag { color: var(--brand); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.article-card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.article-card p { font-size: .92rem; flex: 1; }
.article-card a.read-more { font-weight: 600; align-self: flex-start; margin-top: 8px; }

/* ============ ABOUT ============ */

.about-hero {
    background: linear-gradient(180deg, #14161c 0%, #1c1f27 100%);
    color: #fff;
    padding: 80px 0;
}

.about-hero h1 { color: #fff; max-width: 760px; }
.about-hero p { color: #b9c2d2; max-width: 680px; font-size: 1.1rem; }

.about-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.about-card h3 { margin-bottom: 8px; }

.team-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
}

.team-row img { width: 160px; height: auto; border-radius: 14px; }

@media (max-width: 600px) {
    .team-row { grid-template-columns: 1fr; }
    .team-row img { margin: 0 auto; }
}

/* ============ FOOTER ============ */

.site-footer {
    background: var(--bg-darker);
    color: #b9c2d2;
    padding: 56px 0 32px;
    margin-top: 0;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .06em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer a { color: #b9c2d2; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.site-footer__brand p { color: #8d99ae; font-size: .9rem; max-width: 320px; }

.site-footer__base {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #1f242e;
    padding-top: 24px;
    color: #8d99ae;
    font-size: .85rem;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 880px) {
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ============ MISC ============ */

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.gallery img { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }

.tagline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(30,156,240,.12);
    color: var(--brand);
    font-weight: 600;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 18px;
}

.tagline--on-dark { background: rgba(255,255,255,.08); color: #fff; }

.divider-soft { height: 1px; background: var(--border); margin: 56px 0; }

/* small-screen nav collapse */
@media (max-width: 720px) {
    .nav-links { display: none; }
    .site-nav__inner { gap: 12px; }
}

/* ============ COUNTDOWN ============ */

.countdown {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 28px 0 8px;
}

.countdown__cell {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    padding: 18px 22px;
    min-width: 92px;
    text-align: center;
    backdrop-filter: blur(8px);
}

.countdown__cell--light {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.countdown__num {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}

.countdown__cell--light .countdown__num { color: var(--brand); }

.countdown__lbl {
    display: block;
    margin-top: 8px;
    color: rgba(255,255,255,.7);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
}

.countdown__cell--light .countdown__lbl { color: var(--text-muted); }

.countdown-label {
    text-align: center;
    color: rgba(255,255,255,.7);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 600;
    margin-bottom: 6px;
}

[data-countdown].is-live .countdown { display: none; }
[data-countdown] .countdown-live { display: none; color: var(--brand); font-weight: 600; text-align: center; padding: 18px; }
[data-countdown].is-live .countdown-live { display: block; }
[data-countdown].is-live .countdown-label { display: none; }

/* ============ BETA FORM ============ */

.beta-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    max-width: 720px;
    margin: 0 auto;
}

.beta-form h2 { margin-bottom: 6px; }
.beta-form > p { margin-bottom: 24px; }

.form-row { margin-bottom: 18px; }
.form-row label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: 6px;
    color: var(--text);
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(30,156,240,.15);
}

.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0 24px;
    color: var(--text-soft);
    font-size: .92rem;
}
.form-consent input { margin-top: 4px; }

.form-success {
    display: none;
    padding: 22px;
    background: rgba(30,156,240,.08);
    border: 1px solid rgba(30,156,240,.3);
    border-radius: 10px;
    color: var(--brand-dark);
    font-weight: 600;
    margin-top: 12px;
}
.form-success.is-shown { display: block; }

/* ============ ARTICLE MODAL ============ */
.article-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.article-modal-overlay.is-active {
    display: flex;
    opacity: 1;
}
.article-modal-content {
    background: var(--bg);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    padding: 40px;
}
.article-modal-overlay.is-active .article-modal-content {
    transform: translateY(0);
}
.article-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-soft);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    transition: background 0.2s, color 0.2s;
}
.article-modal-close:hover {
    background: var(--brand);
    color: #fff;
}
.article-modal-body {
    color: var(--text);
}
.article-modal-body .container {
    padding: 0;
    box-shadow: none;
    background: transparent;
    max-width: 100%;
}
.article-modal-body h1 { font-size: 2rem; }
.article-modal-body .subtitle { color: var(--brand); font-weight: 500; margin-bottom: 20px; }
.article-loader {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* ============ ARTICLE FORMATTING ============ */
.article-formatted {
    font-size: 1.05rem;
    line-height: 1.7;
}
.article-formatted h1 {
    font-size: 2.4rem;
    color: var(--text);
    margin-bottom: 0.5em;
}
.article-formatted .subtitle {
    font-size: 1.2rem;
    color: var(--brand);
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}
.article-formatted h2 {
    font-size: 1.8rem;
    margin-top: 2em;
    margin-bottom: 1em;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5em;
}
.article-formatted h3 {
    font-size: 1.4rem;
    margin-top: 1.5em;
    color: var(--text);
}
.article-formatted p {
    margin-bottom: 1.2em;
    color: var(--text-soft);
}
.article-formatted ul, .article-formatted ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
    color: var(--text-soft);
}
.article-formatted li {
    margin-bottom: 0.5em;
}
.article-formatted .code-inline {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: var(--brand-dark);
}
.article-formatted .divider {
    height: 1px;
    background: var(--border);
    margin: 3em 0;
}
.article-formatted table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
}
.article-formatted th, .article-formatted td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.article-formatted th {
    background: var(--bg-soft);
    font-weight: 600;
}

