/* ============================================================
   HOME (helix) - page-specific styles.
   Loaded only on the homepage, on top of site.css. The shared
   chrome (reset, back-bar, header, nav, buttons, .section-label,
   @keyframes orbitSpin, footer, mobile menu) lives in site.css;
   this file is just the hero + homepage sections.
   ============================================================ */

.mono { font-family: 'JetBrains Mono', monospace; }

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 32px;
}

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: center;
    padding: 160px 32px 40px;
    overflow: hidden;
}

.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(30px, 4vw, 48px);
    /* 200, not 100: Outfit Thin's hairline strokes break up on standard-DPI screens. */
    font-weight: 200;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero h1 .highlight {
    /* A step heavier than the line above: the gradient colors are dimmer than
       white, so at the same weight the highlighted line read as the weakest. */
    font-weight: 300;
    background: linear-gradient(135deg, #9B7CC8, #E8B931);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    color: #a0a0a0;
    margin-bottom: 40px;
    min-height: 1.6em;
    line-height: 1.6;
}

.hero-subtitle .cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: #E8B931;
    vertical-align: text-bottom;
    animation: cursorBlink 0.8s step-end infinite;
    margin-left: 2px;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Orbit-dots canvas background */
#helixCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.45;
    pointer-events: none;
}

/* Orbital rings centered behind hero (scoped to .hero so they can't
   collide with the .page-hero rings defined in site.css). Reuses the
   shared @keyframes orbitSpin. */
.hero .orbital-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    z-index: 0;
    pointer-events: none;
}

.hero .orbital-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(155, 124, 200, 0.08);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.hero .orbital-ring:nth-child(1) {
    width: 400px;
    height: 400px;
    animation: orbitSpin 25s linear infinite;
    border-color: rgba(155, 124, 200, 0.1);
    border-top-color: rgba(155, 124, 200, 0.25);
}

.hero .orbital-ring:nth-child(2) {
    width: 560px;
    height: 560px;
    animation: orbitSpin 35s linear infinite reverse;
    border-color: rgba(232, 185, 49, 0.06);
    border-bottom-color: rgba(232, 185, 49, 0.15);
}

.hero .orbital-ring:nth-child(3) {
    width: 700px;
    height: 700px;
    animation: orbitSpin 50s linear infinite;
    border-color: rgba(155, 124, 200, 0.04);
    border-left-color: rgba(155, 124, 200, 0.12);
}

/* Central glow behind hero */
.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(126, 87, 194, 0.18) 0%, rgba(126, 87, 194, 0.06) 40%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

/* Floating base-pair letters (full-page decorative backdrop) */
.base-pairs-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.base-letter {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 300;
    color: rgba(155, 124, 200, 0.06);
    animation: floatLetter linear infinite;
}

@keyframes floatLetter {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-20px) rotate(180deg); opacity: 0; }
}

/* ============================================================
   SECTION DIVIDER - mini horizontal helix
   ============================================================ */
.helix-divider {
    width: 100%;
    height: 40px;
    position: relative;
    overflow: hidden;
    opacity: 0.3;
    margin: -50px 0;
}
.helix-divider canvas {
    width: 100%;
    height: 100%;
}

/* ============================================================
   INTRO GRID - Why NWOS (left) + Today's Daily Note (right)
   ============================================================ */
.intro-grid-section {
    padding: 0 0 60px;
    position: relative;
}
.intro-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 40px;
    align-items: start;
}
.intro-pitch {
    padding-top: 8px;
}
.intro-pitch h2 {
    margin-bottom: 14px;
}
@media (max-width: 920px) {
    .intro-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* Pitch text (shared with the "Why NWOS" column) */
.dna-section-text h2 {
    font-family: 'Inter', sans-serif;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}
.dna-section-text h2 .gold { color: #E8B931; }
.dna-section-text p {
    font-size: 16px;
    color: #a0a0a0;
    line-height: 1.8;
    margin-bottom: 16px;
}
.dna-section-text .sequence-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #9B7CC8;
    background: rgba(155, 124, 200, 0.08);
    border: 1px solid rgba(155, 124, 200, 0.15);
    padding: 4px 12px;
    border-radius: 4px;
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
}

/* ============================================================
   TODAY'S DAILY NOTE card
   ============================================================ */
.todays-note-card {
    display: block;
    position: relative;
    background: linear-gradient(160deg, rgba(26, 18, 38, 0.95) 0%, rgba(10, 8, 18, 0.98) 100%);
    border: 1px solid rgba(155, 124, 200, 0.2);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.todays-note-card:hover {
    transform: translateY(-4px);
    border-color: rgba(155, 124, 200, 0.55);
    box-shadow: 0 24px 60px -20px rgba(155, 124, 200, 0.4);
}
.todays-note-glow {
    position: absolute;
    top: -120px;
    left: 30%;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(155, 124, 200, 0.18) 0%, transparent 65%);
    pointer-events: none;
    animation: todays-note-glow-drift 9s ease-in-out infinite;
}
@keyframes todays-note-glow-drift {
    0%, 100% { transform: translateX(0); opacity: 0.7; }
    50%      { transform: translateX(80px); opacity: 1; }
}
.todays-note-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(155, 124, 200, 0.12);
}
.terminal-dot { width: 11px; height: 11px; border-radius: 50%; }
.terminal-dot.red    { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green  { background: #27c93f; }
.todays-note-filename {
    margin-left: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #888;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.todays-note-body { position: relative; padding: 28px 32px 32px; }
.todays-note-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #888;
    margin-bottom: 14px;
}
.todays-note-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #6ee99e;
    box-shadow: 0 0 0 0 rgba(110, 233, 158, 0.5);
    animation: todays-note-pulse 1.8s ease-out infinite;
    margin-right: 4px;
}
@keyframes todays-note-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(110, 233, 158, 0.5); }
    70%  { box-shadow: 0 0 0 12px rgba(110, 233, 158, 0); }
    100% { box-shadow: 0 0 0 0 rgba(110, 233, 158, 0); }
}
.todays-note-label {
    color: #6ee99e;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}
.todays-note-sep { color: #555; }
.todays-note-api {
    color: #9B7CC8;
    background: rgba(155, 124, 200, 0.12);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
}
.todays-note-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(22px, 2.6vw, 30px);
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    margin: 0 0 12px;
}
.todays-note-card:hover .todays-note-title {
    background: linear-gradient(120deg, #fff 0%, #c8b8e0 60%, #E8B931 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.todays-note-excerpt {
    font-size: 16px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 18px;
}
.todays-note-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #9B7CC8;
    letter-spacing: 0.02em;
}
.todays-note-arrow { transition: transform 0.25s ease; display: inline-block; }
.todays-note-card:hover .todays-note-arrow { transform: translateX(6px); color: #E8B931; }

@media (max-width: 640px) {
    .todays-note-card { margin: 0 16px; }
    .todays-note-body { padding: 22px 22px 26px; }
    .todays-note-meta { font-size: 11px; }
}

/* ============================================================
   SERVICES SECTION
   ============================================================ */
.services-section {
    padding: 20px 0 80px;
    position: relative;
}
.services-header {
    text-align: center;
    margin-bottom: 36px;
}
.services-header .section-label {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
}
.services-header h2 {
    font-family: 'Inter', sans-serif;
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}
.services-header h2 .gold { color: #E8B931; }

/* Card grid (matches /consulting cards) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 8px;
}
.card {
    background: #12101a;
    border: 1px solid rgba(155, 124, 200, 0.08);
    border-radius: 12px;
    padding: 36px;
    padding-top: 48px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 14px 0 0 #ffbd2e, 28px 0 0 #27c93f;
    z-index: 1;
}
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(155, 124, 200, 0.06);
    border-radius: 12px 12px 0 0;
}
.card:hover {
    transform: translateY(-4px);
    border-color: #9B7CC8;
    box-shadow: 0 0 30px rgba(155, 124, 200, 0.1);
}
.card h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px;
}
.card p {
    color: #a0a0a0;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.7;
    margin: 0;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
    padding: 100px 0 120px;
    position: relative;
}
.cta-card {
    text-align: center;
    background: rgba(10, 8, 18, 0.9);
    border: 1px solid rgba(155, 124, 200, 0.15);
    border-radius: 16px;
    padding: 60px 40px;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s;
}
.cta-card:hover {
    border-color: rgba(155, 124, 200, 0.35);
}
.cta-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    background: linear-gradient(135deg, rgba(155, 124, 200, 0.1), transparent, rgba(232, 185, 49, 0.08));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
}
.cta-card:hover::before {
    opacity: 1;
}
.cta-card .section-label {
    margin-bottom: 24px;
}
.cta-card h2 {
    font-family: 'Inter', sans-serif;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}
.cta-card p {
    font-size: 16px;
    color: #a0a0a0;
    margin-bottom: 36px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .hero .orbital-rings { width: 500px; height: 500px; }
    .hero .orbital-ring:nth-child(1) { width: 280px; height: 280px; }
    .hero .orbital-ring:nth-child(2) { width: 400px; height: 400px; }
    .hero .orbital-ring:nth-child(3) { width: 500px; height: 500px; }
}

@media (max-width: 768px) {
    .hero { padding: 120px 20px 60px; }
    .hero h1 { font-size: 32px; }
    .hero-subtitle { font-size: 14px; }

    .hero .orbital-rings { width: 350px; height: 350px; }
    .hero .orbital-ring:nth-child(1) { width: 200px; height: 200px; }
    .hero .orbital-ring:nth-child(2) { width: 280px; height: 280px; }
    .hero .orbital-ring:nth-child(3) { width: 350px; height: 350px; }

    .services-section, .cta-section { padding: 60px 0; }

    .cta-card { padding: 40px 24px; }
    .cta-card h2 { font-size: 28px; }
}

/* ============================================================
   REDUCED MOTION - respect the OS "reduce motion" setting.
   Pauses the decorative loops; the canvas rAF loops are also
   skipped in home.js under the same media query.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .hero .orbital-ring,
    .base-letter,
    .todays-note-glow,
    .todays-note-pulse,
    .hero-subtitle .cursor {
        animation: none !important;
    }
    .fade-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
