/* ---------------------------------------------------------------------------
   ZygApp — public (signed-out) pages: landing, about.

   Kept in an external stylesheet rather than inlined so that the server-rendered
   copy is the first thing in the HTML document. A crawler (or a reviewer running
   `curl | sed 's/<[^>]*>//g'`) then sees prose immediately instead of several
   hundred lines of CSS. It also caches across page views.
   --------------------------------------------------------------------------- */

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

:root {
    --bg-top:    #0b1220;
    --bg-bottom: #07101a;
    --text:      #e6eef6;
    --text-dim:  rgba(207, 233, 255, 0.62);
    --text-faint:rgba(207, 233, 255, 0.40);
    --accent:    #3aa0ff;
    --accent-2:  #2a7bd4;
    --violet:    #667eea;
    --panel:     rgba(12, 26, 48, 0.55);
    --panel-line:rgba(58, 160, 255, 0.16);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(160deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Ambient 3D canvas, created by js/login-bg.js. Sits behind everything and must
   never intercept a click meant for a link or button. */
#login-bg-canvas {
    position: fixed; inset: 0; width: 100vw; height: 100vh;
    z-index: 0; display: block; pointer-events: none; opacity: 0.45;
}

.wrap { position: relative; z-index: 1; }
.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }

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

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--accent); color: #fff; padding: 10px 16px;
    border-radius: 0 0 8px 0; z-index: 100; text-decoration: none; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between;
       gap: 16px; padding: 20px 0; flex-wrap: wrap; }
.nav-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
/* The logo asset is 1536x1024 with generous transparent padding, so the visible
   wordmark is much smaller than the box — it needs a taller box than the mark
   itself suggests. */
.nav-brand img { height: 76px; width: auto; display: block; }
@media (max-width: 480px) { .nav-brand img { height: 56px; } }
.nav-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-link {
    color: var(--text-dim); text-decoration: none; font-size: 0.9rem; font-weight: 600;
    padding: 8px 12px; border-radius: 8px; transition: color .18s, background .18s;
}
.nav-link:hover { color: var(--text); background: rgba(58,160,255,0.09); }
.nav-cta {
    padding: 8px 16px; border-radius: 8px; font-size: 0.9rem; font-weight: 700;
    text-decoration: none; color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    transition: filter .18s;
}
.nav-cta:hover { filter: brightness(1.12); }

/* ---------- Shared type ---------- */
.eyebrow {
    display: inline-block; font-size: 0.7rem; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 16px;
}
h1 { font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.15;
     font-weight: 800; letter-spacing: -0.02em; margin-bottom: 20px; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 800;
     letter-spacing: -0.01em; margin-bottom: 14px; }
h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }

section { padding: 56px 0; border-top: 1px solid rgba(255,255,255,0.06); }
.section-eyebrow {
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--text-faint); margin-bottom: 12px;
}
.section-lede { color: var(--text-dim); max-width: 680px; margin-bottom: 32px; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border-radius: 10px; font-size: 0.94rem; font-weight: 700;
    text-decoration: none; transition: filter .18s, background .18s, border-color .18s;
}
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-secondary { color: var(--text); background: rgba(255,255,255,0.04);
                 border: 1px solid rgba(255,255,255,0.14); }
.btn-secondary:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.28); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card {
    background: var(--panel); border: 1px solid var(--panel-line);
    border-radius: 14px; padding: 24px 22px; backdrop-filter: blur(8px);
}
.card p { color: var(--text-dim); font-size: 0.93rem; }

/* ---------- Footer ---------- */
footer.site-footer { border-top: 1px solid rgba(255,255,255,0.08);
                     padding: 36px 0 48px; margin-top: 16px; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand-name { font-weight: 800; font-size: 1rem; }
.footer-legal { font-size: 0.82rem; color: var(--text-faint); margin-top: 6px; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.footer-nav a { color: var(--text-dim); text-decoration: none; font-size: 0.85rem; }
.footer-nav a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Landing page ---------- */
.hero { padding: 56px 0 40px; max-width: 760px; }
.hero p.lede { font-size: clamp(1rem, 2.2vw, 1.13rem); color: var(--text-dim); margin-bottom: 12px; }
.hero p.sub  { font-size: 0.97rem; color: var(--text-faint); }

.video-section { padding: 8px 0 56px; }
.video-facade {
    position: relative; width: 100%; max-width: 860px;
    aspect-ratio: 16/9; border-radius: 16px; overflow: hidden;
    border: 1px solid var(--panel-line);
    background:
        radial-gradient(120% 120% at 30% 20%, rgba(58,160,255,0.16), transparent 60%),
        linear-gradient(150deg, rgba(102,126,234,0.20) 0%, rgba(10,20,38,0.94) 70%);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0;
    box-shadow: 0 16px 60px rgba(0,0,0,0.5);
}
.video-facade:hover .play-badge { transform: scale(1.06); background: rgba(58,160,255,0.30); }
.play-badge {
    display: flex; align-items: center; justify-content: center;
    width: 74px; height: 74px; border-radius: 50%;
    background: rgba(58,160,255,0.18);
    border: 1.5px solid rgba(58,160,255,0.55);
    color: #fff; transition: transform .2s, background .2s;
}
@media (prefers-reduced-motion: reduce) { .video-facade:hover .play-badge { transform: none; } }
.video-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 14px 18px; font-size: 0.82rem; color: var(--text-dim);
    background: linear-gradient(to top, rgba(4,10,20,0.88), transparent);
    text-align: left;
}
.video-facade iframe { width: 100%; height: 100%; border: 0; display: block; }

.grid-creatives { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.creative-card {
    display: block; text-decoration: none; color: inherit;
    background: var(--panel); border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px; overflow: hidden;
    transition: border-color .18s, transform .18s;
}
.creative-card:hover { border-color: rgba(58,160,255,0.42); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .creative-card:hover { transform: none; } }
.creative-thumb {
    aspect-ratio: 16/10; width: 100%; object-fit: cover; display: block;
    background: linear-gradient(135deg, rgba(102,126,234,0.30), rgba(10,20,38,0.9));
}
.creative-thumb-placeholder {
    aspect-ratio: 16/10; width: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(102,126,234,0.30), rgba(10,20,38,0.9));
    color: rgba(255,255,255,0.28);
}
.creative-body { padding: 14px 16px 16px; }
.creative-title { font-size: 0.93rem; font-weight: 700; margin-bottom: 4px; }
.creative-meta { font-size: 0.78rem; color: var(--text-faint); }
.see-all { margin-top: 20px; }

.empty-note {
    color: var(--text-faint); font-size: 0.92rem;
    border: 1px dashed rgba(255,255,255,0.14); border-radius: 12px; padding: 22px;
}

/* ---------- About page ---------- */
.about-hero { padding: 56px 0 8px; max-width: 760px; }
.about-hero p { color: var(--text-dim); font-size: clamp(1rem, 2.2vw, 1.1rem); }
.prose { max-width: 720px; }
.prose p { color: var(--text-dim); margin-bottom: 1em; }
.prose ul { color: var(--text-dim); padding-left: 1.3em; margin-bottom: 1em; }
.prose li { margin-bottom: 0.45em; }

.facts {
    list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; overflow: hidden;
}
.facts li { background: var(--bg-top); padding: 20px 22px; }
.fact-label {
    display: block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.13em;
    text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px;
}
.fact-value { font-size: 0.98rem; font-weight: 600; color: var(--text); }
.fact-value a { text-decoration: none; }
.fact-value a:hover { text-decoration: underline; }

/* ---------- Contact form ---------- */
.contact-form { max-width: 620px; }
.field { margin-bottom: 20px; }
.field label {
    display: block; font-size: 0.82rem; font-weight: 700;
    color: var(--text); margin-bottom: 7px;
}
.field input[type="text"],
.field input[type="email"],
.field textarea {
    width: 100%; padding: 12px 14px;
    background: rgba(4, 12, 26, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 10px;
    color: var(--text); font-size: 0.95rem;
    font-family: inherit; line-height: 1.6;
    outline: none; transition: border-color .18s, box-shadow .18s;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(207, 233, 255, 0.28); }
.field input:focus, .field textarea:focus {
    border-color: rgba(58, 160, 255, 0.65);
    box-shadow: 0 0 0 3px rgba(58, 160, 255, 0.14);
}
.field-hint { font-size: 0.78rem; color: var(--text-faint); margin-top: 6px; }
.field-error { font-size: 0.8rem; color: #ff8a8a; margin-top: 6px; }

/* Honeypot — visually gone, still submitted by bots that fill everything. */
.hp-field {
    position: absolute !important; left: -9999px !important;
    width: 1px; height: 1px; overflow: hidden;
}

.form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.form-actions .btn { border: none; cursor: pointer; font-family: inherit; }
.form-direct { font-size: 0.85rem; color: var(--text-faint); }

.notice {
    border-radius: 12px; padding: 16px 18px; margin-bottom: 24px;
    font-size: 0.92rem; line-height: 1.6;
}
.notice-success { background: rgba(46, 204, 130, 0.09); border: 1px solid rgba(46, 204, 130, 0.34); color: #b8f0d5; }
.notice-warn    { background: rgba(255, 193, 74, 0.08); border: 1px solid rgba(255, 193, 74, 0.32); color: #ffe0a8; }
.notice-error   { background: rgba(255, 106, 106, 0.08); border: 1px solid rgba(255, 106, 106, 0.32); color: #ffc4c4; }
.notice a { color: inherit; text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
    /* The canvas is not even requested below this width — see the script at the
       end of <body>. This rule covers a resize after load. */
    #login-bg-canvas { display: none; }
    section { padding: 40px 0; }
    .hero { padding: 36px 0 28px; }
    .about-hero { padding: 36px 0 8px; }
}
@media (max-width: 400px) {
    .container { padding: 0 16px; }
    .nav-link { padding: 6px 8px; }
}
