/* ============================================================================
   Frontier Solutions AI — Main Stylesheet
   Dark navy + electric cyan. Inter typeface. Static, no framework.
   ============================================================================ */

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

:root {
    --navy-950: #0B1422;
    --navy-900: #0F2744;
    --navy-800: #16345C;
    --navy-700: #1E3A8A;
    --navy-600: #2E5EAA;
    --navy-500: #3E74C4;
    --navy-300: #7DA6DE;
    --navy-100: #CBDCF2;

    --cyan: #22D3EE;
    --cyan-strong: #0EA5E9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --bg-white: #ffffff;
    --bg-subtle: #F8FAFC;
    --bg-muted: #EEF3FA;

    --border: #E2E8F0;
    --border-strong: #CBD5E1;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --nav-h: 64px;
    --section-pad: 48px;
    --max-w: 1240px;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --shadow-sm: 0 1px 3px rgba(15, 39, 68, 0.08);
    --shadow-md: 0 8px 24px rgba(15, 39, 68, 0.10);
    --shadow-lg: 0 20px 48px rgba(15, 39, 68, 0.14);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.section-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.section-eyebrow {
    font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--navy-600); margin-bottom: 14px;
}
.section-eyebrow.on-dark { color: var(--cyan); }

section { padding: var(--section-pad) 0; }
.section-light { background: var(--bg-white); }
.section-subtle { background: var(--bg-subtle); }

/* ── Compact page header (subpages — replaces full hero) ─────────────────── */

.page-header {
    position: relative;
    background: radial-gradient(900px 420px at 78% -20%, rgba(34,211,238,0.12), transparent 60%),
                linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
    padding: calc(var(--nav-h) + 26px) 0 26px;
}
.page-header .hero-inner { position: relative; max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
.page-header .hero-headline { font-size: clamp(28px, 3.6vw, 42px); }
.page-header .hero-sub { margin-top: 12px; font-size: 16px; }
.page-header .hero-eyebrow { margin-bottom: 14px; }

h1, h2, h3, h4 { letter-spacing: -0.02em; font-weight: 700; color: var(--text-primary); }
h2.section-title { font-size: clamp(28px, 3.4vw, 40px); max-width: 720px; margin-bottom: 14px; }
p.section-sub { font-size: 17px; color: var(--text-secondary); max-width: 640px; }

/* ── Nav ──────────────────────────────────────────────────────────────────── */

.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--nav-h); background: rgba(11, 20, 34, 0.0);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    border-bottom: 1px solid transparent;
}
.site-nav.scrolled, .site-nav.solid {
    background: rgba(11, 20, 34, 0.97);
    border-bottom-color: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.nav-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 32px; height: 100%;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; display: flex; align-items: center; gap: 9px; }
.logo-mark { width: 26px; height: auto; display: block; }
.logo-frontier { color: #ffffff; }
.logo-solutions { color: var(--navy-300); }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: rgba(255,255,255,0.68); letter-spacing: -0.01em; transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: #ffffff; }
.nav-link-cta {
    padding: 9px 18px; border-radius: 999px; background: var(--cyan);
    color: var(--navy-950) !important; font-weight: 700 !important;
}
.nav-link-cta:hover { background: #67e4f7; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.cta-primary, .cta-ghost {
    display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px;
    padding: 14px 26px; border-radius: 999px; transition: all 0.18s ease;
}
.cta-primary { background: var(--cyan); color: var(--navy-950); }
.cta-primary:hover { background: #67e4f7; transform: translateY(-1px); }
.cta-ghost { border: 1px solid rgba(255,255,255,0.25); color: #fff; }
.cta-ghost:hover { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.05); }
.cta-arrow { transition: transform 0.18s ease; }
.cta-primary:hover .cta-arrow { transform: translateX(3px); }

.cta-primary.on-light { background: var(--navy-900); color: #fff; }
.cta-primary.on-light:hover { background: var(--navy-700); }
.cta-ghost.on-light { border-color: var(--border-strong); color: var(--text-primary); }
.cta-ghost.on-light:hover { border-color: var(--navy-600); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
    position: relative; min-height: 80vh; display: flex; align-items: center;
    background: radial-gradient(1100px 620px at 78% -10%, rgba(34,211,238,0.14), transparent 60%),
                linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
    padding-top: var(--nav-h); padding-bottom: 32px;
}
.hero-grid-overlay {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
                       linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 56px 56px;
}
.hero-inner { position: relative; max-width: var(--max-w); margin: 0 auto; padding: 40px 32px; width: 100%; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.72);
    border: 1px solid rgba(255,255,255,0.16); padding: 8px 16px; border-radius: 999px; margin-bottom: 20px;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px rgba(34,211,238,0.8); }
.hero-headline { font-size: clamp(34px, 5vw, 58px); line-height: 1.1; color: #fff; max-width: 880px; }
.headline-accent { color: var(--cyan); }
.hero-sub { font-size: 18px; color: rgba(255,255,255,0.72); max-width: 640px; margin-top: 16px; }
.hero-ctas { display: flex; gap: 16px; margin-top: 26px; flex-wrap: wrap; }
.hero-flywheel-wrap { display: flex; justify-content: center; margin-top: 0; }

.hero-inner-split {
    display: grid; grid-template-columns: 0.9fr 1.15fr; gap: 28px; align-items: center;
}
.hero-inner-split .hero-headline,
.hero-inner-split .hero-sub { max-width: 100%; }
.hero-inner-split .hero-flywheel-wrap { flex-direction: column; }

@media (max-width: 980px) {
    .hero-inner-split { grid-template-columns: 1fr; }
    .hero-flywheel-wrap { margin-top: 40px; }
}

/* ── Interactive flywheel ─────────────────────────────────────────────────── */

.fw-node { cursor: pointer; outline: none; }
.fw-node circle { transition: stroke 0.15s ease, stroke-width 0.15s ease, filter 0.15s ease; }
.fw-node:hover circle, .fw-node:focus-visible circle {
    stroke: #22D3EE; stroke-width: 2.5; filter: drop-shadow(0 0 8px rgba(34,211,238,0.55));
}
.fw-node.active circle {
    stroke: #22D3EE; stroke-width: 3; fill: #123252;
    filter: drop-shadow(0 0 10px rgba(34,211,238,0.7));
}
.fw-node-inner:hover circle, .fw-node-inner:focus-visible circle, .fw-node-inner.active circle {
    filter: drop-shadow(0 0 14px rgba(34,211,238,0.6));
}

.fw-panel {
    margin-top: 26px; border: 1px solid rgba(255,255,255,0.14); border-radius: 14px;
    padding: 20px 24px; background: rgba(255,255,255,0.03); min-height: 118px;
    max-width: 680px; width: 100%;
}
.fw-panel-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 8px; }
.fw-panel-title { font-size: 17px; color: #22D3EE; margin-bottom: 8px; }
.fw-panel-desc { font-size: 14.5px; color: rgba(255,255,255,0.75); line-height: 1.6; }
.fw-panel-flow { font-size: 12.5px; color: rgba(255,255,255,0.45); margin-top: 12px; font-style: italic; }

.fw-panel.on-light {
    border-color: var(--border-strong); background: var(--bg-subtle);
    margin-left: auto; margin-right: auto;
}
.fw-panel.on-light .fw-panel-eyebrow { color: var(--text-muted); }
.fw-panel.on-light .fw-panel-title { color: var(--navy-700); }
.fw-panel.on-light .fw-panel-desc { color: var(--text-secondary); }
.fw-panel.on-light .fw-panel-flow { color: var(--text-muted); }

.fw-diagram-center { display: flex; flex-direction: column; align-items: center; margin-top: 24px; }

.fw-dot { pointer-events: none; }
@keyframes fw-dot-pulse-outer {
    0%, 100% { opacity: 0.85; r: 5.5; }
    50%      { opacity: 1;    r: 6.5; }
}
@keyframes fw-dot-pulse-inner {
    0%, 100% { opacity: 0.85; r: 4;   }
    50%      { opacity: 1;    r: 5;   }
}
.fw-dot-outer { animation: fw-dot-pulse-outer 2s ease-in-out infinite; }
.fw-dot-inner { animation: fw-dot-pulse-inner 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
    .fw-dot-outer, .fw-dot-inner { animation: none; }
}

.platform-loop-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: center; margin-top: 22px; }
.platform-loop-grid .fw-diagram-center { margin-top: 0; }
.loop-cards-light { display: grid; gap: 14px; margin-top: 18px; }
.loop-card-light { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 20px; background: var(--bg-subtle); }
.loop-card-light h4 { font-size: 15px; color: var(--navy-800); margin-bottom: 6px; }
.loop-card-light p { font-size: 13.5px; color: var(--text-secondary); margin: 0; }
.loop-card-light.inner { border-color: rgba(14,165,233,0.3); background: rgba(14,165,233,0.05); }
.loop-card-light.inner h4 { color: var(--cyan-strong); }

@media (max-width: 980px) {
    .platform-loop-grid { grid-template-columns: 1fr; }
}

/* ── Problem cards ────────────────────────────────────────────────────────── */

.problem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 28px; }
.problem-card {
    background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px; box-shadow: var(--shadow-sm);
}
.problem-card h3 { font-size: 19px; margin-bottom: 10px; }
.problem-card p { color: var(--text-secondary); font-size: 15px; }
.problem-card .tag { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy-600); margin-bottom: 10px; }

/* ── Flywheel section ─────────────────────────────────────────────────────── */

.flywheel-section { background: var(--navy-950); color: #fff; }
.flywheel-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; margin-top: 24px; }
.flywheel-copy p { color: rgba(255,255,255,0.68); font-size: 16px; margin-top: 12px; }
.loop-cards { display: grid; gap: 14px; margin-top: 20px; }
.loop-card { border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-md); padding: 18px 20px; background: rgba(255,255,255,0.03); }
.loop-card h4 { color: #fff; font-size: 15px; margin-bottom: 6px; }
.loop-card p { color: rgba(255,255,255,0.6); font-size: 14px; margin: 0; }
.loop-card.inner { border-color: rgba(34,211,238,0.35); background: rgba(34,211,238,0.06); }
.loop-card.inner h4 { color: var(--cyan); }

/* ── Solutions grid ───────────────────────────────────────────────────────── */

.solutions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 28px; }
.solutions-grid-detailed { grid-template-columns: repeat(4, 1fr); }
.solutions-grid-detailed .solution-card p { font-size: 13.5px; }
@media (max-width: 1100px) { .solutions-grid-detailed { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .solutions-grid-detailed { grid-template-columns: 1fr; } }
.solution-card {
    border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px;
    background: var(--bg-white); transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.solution-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.solution-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: rgba(14,165,233,0.08); border: 1px solid rgba(14,165,233,0.18);
    display: flex; align-items: center; justify-content: center; color: var(--cyan-strong); margin-bottom: 14px;
}
.solution-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.solution-card h3 { font-size: 17px; margin-bottom: 8px; }
.solution-card p { font-size: 14.5px; color: var(--text-secondary); margin-bottom: 12px; }
.solution-card a { font-size: 13.5px; font-weight: 700; color: var(--navy-700); }

/* ── Pillars table ────────────────────────────────────────────────────────── */

.pillars-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 28px; }
.pillar-card {
    border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 16px;
    background: var(--bg-subtle); text-align: left;
}
.pillar-card .pillar-index { font-size: 12px; font-weight: 700; color: var(--cyan-strong); letter-spacing: 0.08em; }
.pillar-card h4 { font-size: 15.5px; margin: 6px 0 6px; }
.pillar-card p { font-size: 13px; color: var(--text-secondary); }

.spanning-bar {
    margin-top: 18px; border: 1px dashed var(--border-strong); border-radius: var(--radius-md);
    padding: 12px 22px; text-align: center; font-size: 13.5px; font-weight: 600; color: var(--navy-700);
    background: var(--bg-white);
}

.paths-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 20px; margin-top: 24px; }
.path-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; background: var(--bg-white); }
.path-card h4 { font-size: 16px; margin-bottom: 8px; color: var(--navy-800); }
.path-card p { font-size: 14.5px; color: var(--text-secondary); }

.stack-strip { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.stack-strip .label { font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.stack-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.stack-pill { font-size: 13px; font-weight: 600; color: var(--navy-700); background: var(--bg-muted); border: 1px solid var(--border); padding: 7px 14px; border-radius: 999px; }

/* ── Positions / About ────────────────────────────────────────────────────── */

.positions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 18px; margin-top: 24px; }
.position-card { border-left: 3px solid var(--cyan-strong); padding: 4px 0 4px 20px; }
.position-card p { font-size: 16px; font-weight: 600; color: var(--text-primary); }

.about-block { max-width: 760px; margin-top: 14px; }
.about-block p { font-size: 16.5px; color: var(--text-secondary); margin-bottom: 14px; }

/* ── CTA band ─────────────────────────────────────────────────────────────── */

.cta-band { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3vw, 36px); margin-bottom: 18px; }
.cta-band .section-inner { display: flex; flex-direction: column; align-items: center; }

/* ── Contact ──────────────────────────────────────────────────────────────── */

.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin-top: 24px; }
.contact-form { display: grid; gap: 16px; }
.contact-form label { font-size: 13.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; display: block; }
.contact-form input, .contact-form textarea {
    width: 100%; font-family: var(--font); font-size: 15px; padding: 12px 14px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-white);
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--navy-600); }
.contact-form button { justify-self: start; margin-top: 6px; border: none; cursor: pointer; }
.contact-form button:disabled { opacity: 0.55; cursor: not-allowed; }
.contact-side p { color: var(--text-secondary); font-size: 15px; margin-bottom: 14px; }
.contact-side a.email { color: var(--navy-700); font-weight: 700; }

.form-footer-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.form-error-msg { font-size: 13px; color: #DC2626; }

.contact-success {
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    padding: 24px; background: var(--bg-subtle); border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.success-icon {
    width: 40px; height: 40px; border-radius: 50%; background: rgba(14,165,233,0.12);
    border: 1px solid var(--cyan-strong); color: var(--navy-700); font-size: 18px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.contact-success h3 { font-size: 19px; }
.contact-success p { color: var(--text-secondary); font-size: 14.5px; margin: 0; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.site-footer { background: var(--navy-950); color: rgba(255,255,255,0.6); padding: 36px 0 22px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-brand { font-weight: 800; color: #fff; font-size: 16px; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.6); }
.footer-links a:hover { color: #fff; }
.footer-legal { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 13px; color: rgba(255,255,255,0.4); max-width: var(--max-w); margin-left: auto; margin-right: auto; padding-left: 32px; padding-right: 32px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .flywheel-layout, .contact-layout { grid-template-columns: 1fr; }
    .pillars-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .nav-links a:not(.nav-link-cta) { display: none; }
    .nav-links { gap: 0; }
    .pillars-row { grid-template-columns: 1fr; }
    :root { --section-pad: 40px; }
}
