/* -----------------------------------------------------------------------
   Juno Cassandra — landing page
   Modern minimal home page. Pure HTML/CSS/JS. No framework.
----------------------------------------------------------------------- */

:root {
    --color-bg: #fbfcfd;
    --color-surface: #ffffff;
    --color-ink: #0f1d2e;
    --color-ink-soft: #3b4a63;
    --color-muted: #62718a;
    --color-border: #e5e9ef;
    --color-border-strong: #d0d5dd;

    --color-primary: #1e3a5f;        /* existing brand navy */
    --color-primary-deep: #0f2a4a;
    --color-accent: #2f7dd1;
    --color-accent-hover: #1f63ad;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --shadow-soft: 0 1px 2px rgba(15, 29, 46, 0.04), 0 4px 16px rgba(15, 29, 46, 0.05);

    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --container-max: 1120px;
    --header-height: 64px;
}

/* -----------------------------------------------------------------------
   Reset-ish
----------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    color: var(--color-ink);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); }
img, svg { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
}
.skip-link:focus {
    left: 16px;
    top: 16px;
    background: var(--color-primary);
    color: #fff;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    z-index: 100;
}

/* -----------------------------------------------------------------------
   Header
----------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 252, 253, 0.85);
    backdrop-filter: saturate(180%) blur(8px);
    -webkit-backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--color-border);
}
.header-row {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 24px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--color-ink);
    letter-spacing: -0.01em;
}
.brand:hover { color: var(--color-ink); }
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: -0.02em;
}
.brand-wordmark { font-size: 0.95rem; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
}
.site-nav a {
    color: var(--color-ink-soft);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--color-ink); }

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
    cursor: pointer;
}
.cta-primary {
    background: var(--color-primary);
    color: #fff;
}
.cta-primary:hover {
    background: var(--color-primary-deep);
    color: #fff;
}
.cta-ghost {
    background: transparent;
    color: var(--color-ink);
    border-color: var(--color-border-strong);
}
.cta-ghost:hover {
    background: var(--color-surface);
    border-color: var(--color-ink-soft);
    color: var(--color-ink);
}
.cta-lg {
    padding: 12px 22px;
    font-size: 0.95rem;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    background: transparent;
    border: 0;
    cursor: pointer;
    margin-left: auto;
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-ink);
    border-radius: 1px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 12px 24px 20px;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}
.mobile-nav a {
    padding: 10px 0;
    color: var(--color-ink-soft);
    font-size: 0.95rem;
    border-bottom: 1px solid var(--color-border);
}
.mobile-nav a:last-child {
    border-bottom: 0;
    margin-top: 8px;
}
.mobile-nav.open { display: flex; }

/* -----------------------------------------------------------------------
   Hero
----------------------------------------------------------------------- */
.hero {
    padding: 88px 0 72px;
    background:
        radial-gradient(circle at 85% 10%, rgba(47, 125, 209, 0.08), transparent 55%),
        radial-gradient(circle at 15% 90%, rgba(30, 58, 95, 0.05), transparent 55%);
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
}
.eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    margin-bottom: 18px;
}
.hero h1 {
    font-size: clamp(2rem, 3.6vw, 3.25rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--color-ink);
    margin-bottom: 20px;
}
.accent { color: var(--color-accent); }
.lede {
    font-size: 1.075rem;
    color: var(--color-ink-soft);
    max-width: 540px;
    margin-bottom: 28px;
}
.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
}
.network {
    width: 100%;
    max-width: 440px;
    height: auto;
}
.network .node {
    fill: #ffffff;
    stroke: #1e3a5f;
    stroke-width: 2;
    transform-origin: center;
    transform-box: fill-box;
}
.network .node-primary {
    fill: var(--color-accent);
    stroke: var(--color-accent-hover);
}
.network .edges line {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: draw-in 1.6s ease-out forwards;
}
.network .edges line:nth-of-type(1) { animation-delay: 0.10s; }
.network .edges line:nth-of-type(2) { animation-delay: 0.20s; }
.network .edges line:nth-of-type(3) { animation-delay: 0.30s; }
.network .edges line:nth-of-type(4) { animation-delay: 0.40s; }
.network .edges line:nth-of-type(5) { animation-delay: 0.50s; }
.network .edges line:nth-of-type(6) { animation-delay: 0.60s; }
.network .edges line:nth-of-type(7) { animation-delay: 0.70s; }
.network .edges line:nth-of-type(8) { animation-delay: 0.80s; }

/* Flow pulses — short bright segment travels along the edge.
   Dasharray period (308) > longest edge length (~180), so only one
   pulse is visible per edge per cycle. Staggered start times via delay. */
.network .flows line {
    stroke-dasharray: 8 300;
    stroke-dashoffset: 0;
    opacity: 0;
    animation: pulse-fade-in 0.4s ease-out forwards, flow 3.6s linear infinite;
}
.network .flows .flow-1 { animation-delay: 1.6s, 1.6s; }
.network .flows .flow-2 { animation-delay: 2.1s, 2.1s; }
.network .flows .flow-3 { animation-delay: 2.6s, 2.6s; }
.network .flows .flow-4 { animation-delay: 3.1s, 3.1s; }

@keyframes flow {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: -308; }
}
@keyframes pulse-fade-in {
    to { opacity: 1; }
}

.network .node {
    opacity: 0;
    animation: node-pop 0.6s ease-out forwards, node-breathe 4s ease-in-out infinite 2s;
}
.network .node:nth-of-type(1) { animation-delay: 0.25s, 2.2s; }
.network .node:nth-of-type(2) { animation-delay: 0.45s, 2.0s; }
.network .node:nth-of-type(3) { animation-delay: 0.60s, 2.8s; }
.network .node:nth-of-type(4) { animation-delay: 0.75s, 2.4s; }
.network .node:nth-of-type(5) { animation-delay: 0.90s, 3.0s; }
.network .node:nth-of-type(6) { animation-delay: 1.00s, 2.6s; }
.network .node:nth-of-type(7) { animation-delay: 1.10s, 3.2s; }

@keyframes draw-in {
    to { stroke-dashoffset: 0; }
}
@keyframes node-pop {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes node-breathe {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%      { opacity: 0.8; transform: scale(1.08); }
}

/* -----------------------------------------------------------------------
   Section scaffolding
----------------------------------------------------------------------- */
section { padding: 80px 0; }
.section-heading {
    font-size: clamp(1.5rem, 2.4vw, 2.15rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--color-ink);
    margin-bottom: 12px;
}
.section-sub {
    color: var(--color-muted);
    font-size: 1.05rem;
    max-width: 640px;
    margin-bottom: 48px;
}

/* -----------------------------------------------------------------------
   Features
----------------------------------------------------------------------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.feature {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.feature:hover {
    border-color: var(--color-border-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}
.feature-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef4fc;
    color: var(--color-accent);
    border-radius: 8px;
    margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-ink);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.feature p {
    color: var(--color-muted);
    font-size: 0.92rem;
}

/* -----------------------------------------------------------------------
   Domains strip
----------------------------------------------------------------------- */
.domains { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.domain-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.domain-strip li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-primary);
    transition: color 0.15s ease, border-color 0.15s ease;
}
.domain-strip li:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}
.domain-strip svg {
    width: 48px;
    height: 48px;
    color: inherit;
}
.domain-strip span {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-ink);
}

/* -----------------------------------------------------------------------
   Capabilities
----------------------------------------------------------------------- */
.capabilities-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}
.check-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}
.check-list li {
    position: relative;
    padding-left: 28px;
    color: var(--color-ink-soft);
    font-size: 0.95rem;
}
.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 18px;
    height: 18px;
    background: #eef4fc;
    border-radius: 50%;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f7dd1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 12 10 16 18 8'/></svg>");
    background-size: 12px 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.capabilities-card {
    background: var(--color-primary-deep);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    font-family: var(--font-mono);
    color: #d7e2f2;
}
.capabilities-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #555;
}
.dot-green { background: #4ea56d; }
.dot-amber { background: #e3a94a; }
.dot-red   { background: #e07a72; }
.capabilities-card-title {
    margin-left: 12px;
    font-size: 0.8rem;
    color: rgba(215, 226, 242, 0.7);
}
.capabilities-log {
    margin: 0;
    padding: 20px 22px 24px;
    font-size: 0.84rem;
    line-height: 1.75;
    white-space: pre-wrap;
}
.log-t { color: rgba(215, 226, 242, 0.4); }
.log-i { color: #7fbfe0; }
.log-w { color: #e3a94a; }
.log-s { color: #7fd79c; }

/* -----------------------------------------------------------------------
   Footer
----------------------------------------------------------------------- */
.site-footer {
    padding: 56px 0 36px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-muted);
    font-size: 0.9rem;
}
.footer-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 32px;
}
.brand-footer .brand-mark { background: var(--color-primary); }
.footer-tag { margin-top: 10px; color: var(--color-muted); }
.footer-contact p { margin: 0 0 6px 0; }
.footer-contact strong { color: var(--color-ink); font-weight: 600; }
.footer-contact a { color: var(--color-ink-soft); }
.footer-contact a:hover { color: var(--color-accent); }
.footer-copy {
    grid-column: 1 / -1;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    font-size: 0.82rem;
    color: var(--color-muted);
}

/* -----------------------------------------------------------------------
   Reveal-on-scroll
----------------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* -----------------------------------------------------------------------
   Responsive
----------------------------------------------------------------------- */
@media (max-width: 900px) {
    .hero { padding: 64px 0 48px; }
    .hero-grid { grid-template-columns: 1fr; gap: 32px; }
    .hero-visual { order: -1; max-width: 360px; margin: 0 auto; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .domain-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .capabilities-grid { grid-template-columns: 1fr; gap: 32px; }
    .site-nav { display: none; }
    .menu-toggle { display: inline-flex; }
    .header-row > .cta-button { display: none; }
    section { padding: 64px 0; }
}

@media (max-width: 560px) {
    .feature-grid { grid-template-columns: 1fr; }
    .footer-row { grid-template-columns: 1fr; }
    .domain-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* -----------------------------------------------------------------------
   Reduced motion
----------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .network .edges line { stroke-dashoffset: 0; animation: none; }
    .network .node { opacity: 1; animation: none; }
    .network .flows { display: none; }
    * { transition: none !important; }
}
