
/* ============================================
   CSS VARIABLES - Dark Theme
   ============================================ */
:root {
    /* Primary blues - pulled from logo */
    --blue-primary: #00B4D8;
    --blue-dark: #0077B6;
    --blue-light: #90E0EF;
    
    /* Dark theme colors */
    --dark-900: #0a0a0f;
    --dark-800: #12121a;
    --dark-700: #1a1a24;
    --dark-600: #24242f;
    --dark-500: #2e2e3a;
    
    /* Light colors for text */
    --light-100: #ffffff;
    --light-200: #f0f0f5;
    --light-300: #d0d0d8;
    --light-400: #a0a0ad;
    --light-500: #707080;
    --light-600: #505060;
    
    /* Typography */
    --font-primary: 'IBM Plex Sans', -apple-system, sans-serif;
    --font-accent: 'IBM Plex Serif', Georgia, serif;
    
    /* Spacing */
    --section-padding: 80px;
    --section-padding-compact: 56px;
    --container-width: 1100px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-size: 18px;
    line-height: 1.7;
    color: var(--light-300);
    background-color: var(--dark-900);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

@supports (overflow: clip) {
    html,
    body {
        overflow-x: clip;
    }
}

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

.container-narrow {
    max-width: 720px;
}

section {
    padding: var(--section-padding) 0;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3 {
    font-weight: 600;
    color: var(--light-100);
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 24px;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

p {
    margin-bottom: 20px;
}

p:last-child {
    margin-bottom: 0;
}

.accent-text {
    font-family: var(--font-accent);
    font-style: italic;
    color: var(--light-400);
}

.bold {
    font-weight: 600;
    color: var(--light-200);
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-mark {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--light-100);
    letter-spacing: -0.01em;
}

.logo-text span {
    color: var(--light-500);
    font-weight: 400;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--light-400);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--light-100);
}

.nav-cta {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue-primary));
    color: var(--light-100) !important;
    padding: 10px 20px;
    border-radius: 6px;
    transition: all 0.3s ease !important;
}

.nav-cta:hover {
    box-shadow: 0 4px 20px rgba(0, 180, 216, 0.3);
    transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--light-100);
    margin: 5px 0;
    transition: 0.3s;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--dark-900);
    padding: 36px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, auto);
    align-items: center;
    gap: 20px 28px;
    margin-bottom: 24px;
}

.footer-logo {
    display: flex;
    align-items: center;
    min-width: 0;
}

.footer-logo svg {
    width: 32px;
    height: 32px;
}

.footer-logo-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--light-300);
    line-height: 1.35;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 16px;
}

.footer-links a {
    color: var(--light-400);
    text-decoration: none;
    font-size: 0.88rem;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--light-100);
}

.footer-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px 12px;
    min-width: 0;
}

.footer-contact a {
    color: var(--light-400);
    text-decoration: none;
    font-size: 0.88rem;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.footer-contact a:hover {
    color: var(--blue-primary);
}

.footer-contact-sep {
    color: var(--light-500);
    font-size: 0.88rem;
    line-height: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.82rem;
    color: var(--light-500);
}

@media (max-width: 960px) {
    .footer-content {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 16px;
    }

    .footer-links {
        justify-content: center;
        max-width: 100%;
    }

    .footer-contact {
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .footer-contact {
        flex-direction: column;
        gap: 8px;
    }

    .footer-contact-sep {
        display: none;
    }

    .footer-contact a {
        white-space: normal;
    }
}

/* ============================================
   MOBILE & TABLET (site-wide)
   ============================================ */
html {
    -webkit-text-size-adjust: 100%;
}

body.nav-open {
    overflow: hidden;
}

a,
button,
.nav-toggle,
.results-arrow,
.services-banner-item,
.pillar-tile {
    -webkit-tap-highlight-color: rgba(0, 180, 216, 0.15);
}

@media (max-width: 1024px) {
    section {
        padding: var(--section-padding-compact) 0;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    .results-arrow {
        width: 44px;
        height: 44px;
    }

    .page-hero {
        padding: 44px 0 32px;
    }

    .page-hero h1 {
        font-size: clamp(1.65rem, 5vw, 2.25rem);
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .slot-row {
        gap: 12px;
    }

    .pillar-tile {
        min-height: 44px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 64px;
        --section-padding-compact: 40px;
    }

    h1 { font-size: clamp(1.75rem, 6vw, 2.5rem); }
    h2 { font-size: clamp(1.45rem, 5vw, 2rem); }

    .expect-list li {
        padding-left: 1.5rem;
    }
}

/* Inner pages — homepage section styles live in home.css */

/* Page shell */
.page-main { padding-top: 72px; }

.page-hero {
    padding: 56px 0 40px;
    background: linear-gradient(180deg, var(--dark-800) 0%, var(--dark-900) 100%);
    border-bottom: 1px solid rgba(0, 180, 216, 0.1);
}

.page-hero p {
    color: var(--light-400);
    font-size: 1.1rem;
    max-width: 560px;
    margin-top: 12px;
}

.eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--blue-primary);
    margin-bottom: 12px;
}

.section-block {
    padding: var(--section-padding) 0;
}

.section-block.alt { background: var(--dark-800); }

/* Resources / blog */
.resources-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resources-list li {
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.resources-list li:first-child {
    padding-top: 0;
}

.resources-list a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.resources-list a:hover h3 {
    color: var(--blue-primary);
}

.resources-list h3 {
    font-size: 1.35rem;
    margin-bottom: 8px;
    transition: color 0.2s ease;
}

.resources-meta {
    font-size: 0.85rem;
    color: var(--light-500);
    margin-bottom: 8px;
}

.resources-excerpt {
    color: var(--light-400);
    margin-bottom: 0;
}

.article-body h2 {
    margin-top: 40px;
}

.article-body h2:first-child {
    margin-top: 0;
}

.article-body ul,
.article-body ol {
    margin: 0 0 20px 1.25rem;
    color: var(--light-300);
}

.article-body li {
    margin-bottom: 10px;
}

.article-body blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    border-left: 3px solid var(--blue-primary);
    background: var(--dark-700);
    color: var(--light-200);
    font-style: italic;
}

.article-back {
    margin-bottom: 24px;
}

.article-back a {
    color: var(--blue-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}

.article-back a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-dark), var(--blue-primary));
    color: var(--light-100);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 180, 216, 0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--light-200);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Process steps */
.steps { max-width: 720px; }

.step {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 24px;
    padding: 32px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.step:last-child { border-bottom: none; }

.step-num {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--blue-primary);
    opacity: 0.9;
}

.step ul {
    margin: 12px 0 16px 1.2rem;
    color: var(--light-400);
}

.step li { margin-bottom: 6px; }

.step-outcome {
    font-size: 0.95rem;
    color: var(--light-200);
    padding: 12px 16px;
    background: rgba(0, 180, 216, 0.06);
    border-left: 3px solid var(--blue-primary);
    border-radius: 0 8px 8px 0;
}

.step-outcome strong { color: var(--blue-primary); }

/* Table */
.data-table-wrap { overflow-x: auto; }

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.data-table th {
    color: var(--light-200);
    font-weight: 600;
    background: var(--dark-700);
}

.data-table td { color: var(--light-400); }

/* FAQ */
.faq-item {
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.faq-item h3 { margin-bottom: 8px; }
.faq-item p { color: var(--light-400); font-size: 0.95rem; }

/* Form */
.form-grid {
    display: grid;
    gap: 20px;
    max-width: 520px;
}

.form-row label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--light-200);
    margin-bottom: 6px;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--dark-700);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: var(--light-100);
    font-family: inherit;
    font-size: 0.95rem;
}

.form-row textarea { min-height: 100px; resize: vertical; }

.form-hint {
    font-size: 0.85rem;
    color: var(--light-500);
    margin-top: 16px;
}

.slot-group {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 16px;
    margin: 0;
}

.slot-group legend {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue-primary);
    padding: 0 6px;
}

.slot-group-optional legend {
    color: var(--light-400);
}

.slot-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-message {
    font-size: 0.9rem;
    margin: 0;
}

.form-message-error {
    color: #f87171;
}

.form-success-panel {
    max-width: 520px;
    padding: 24px;
    border-radius: 10px;
    background: rgba(0, 180, 216, 0.08);
    border: 1px solid rgba(0, 180, 216, 0.25);
}

.form-success-panel h3 {
    margin-bottom: 10px;
}

.form-success-panel p {
    color: var(--light-300);
    margin: 0;
}

.expect-list {
    list-style: none;
    margin: 20px 0;
}

.expect-list li {
    padding: 8px 0 8px 28px;
    position: relative;
    color: var(--light-300);
}

.expect-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--blue-primary);
    font-weight: 600;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* CTA band */
.cta-band {
    padding: var(--section-padding) 0;
    text-align: center;
    background: var(--dark-800);
}

.cta-band h2 { margin-bottom: 12px; }

.cta-band .btn { margin-top: 20px; }

.cta-band .contact-line {
    margin-top: 20px;
    font-size: 0.95rem;
    color: var(--light-500);
}

/* Case study */
.case-meta {
    font-size: 0.85rem;
    color: var(--blue-primary);
    margin-bottom: 12px;
}

blockquote {
    border-left: 3px solid var(--blue-primary);
    padding: 16px 20px;
    margin: 24px 0;
    color: var(--light-400);
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.pill {
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--light-300);
}

/* ============================================
   SCROLL REVEAL (inner pages)
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ============================================
   PILLAR HOVER TILES (Proof page)
   ============================================ */
.pillar-tiles-hint {
    font-size: 0.88rem;
    color: var(--light-500);
    margin: 8px 0 22px;
    letter-spacing: 0.02em;
}

.pillar-tiles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 8px;
}

.pillar-tile {
    position: relative;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    min-height: 108px;
    padding: 20px 20px 20px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
    cursor: default;
    overflow: hidden;
    transition:
        border-color 0.35s ease,
        background 0.35s ease,
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.pillar-tile::before {
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 2px;
    border-radius: 2px;
    background: rgba(0, 180, 216, 0.25);
    transition: background 0.35s ease, height 0.35s ease, top 0.35s ease, bottom 0.35s ease;
}

.pillar-tile-index {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.12em;
    color: var(--blue-primary);
    opacity: 0.7;
    padding-top: 4px;
}

.pillar-tile-body {
    position: relative;
    flex: 1;
    min-height: 3.25rem;
}

.pillar-tile-title,
.pillar-tile-desc {
    margin: 0;
    transition: opacity 0.38s ease, transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.pillar-tile-title {
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--light-100);
    letter-spacing: -0.02em;
}

.pillar-tile-desc {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--light-300);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
}

@media (min-width: 640px) {
    .pillar-tiles {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .pillar-tile {
        min-height: 118px;
    }

    .pillar-tile-wide {
        grid-column: 1 / -1;
    }
}

@media (min-width: 900px) {
    #disciplines .container-narrow {
        max-width: 820px;
    }

    .pillar-tiles {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
    }

    .pillar-tile {
        grid-column: span 2;
        min-height: 124px;
    }

    .pillar-tile-wide {
        grid-column: 2 / span 4;
    }
}

@media (hover: hover) {
    .pillar-tile:hover,
    .pillar-tile:focus-within {
        border-color: rgba(0, 180, 216, 0.32);
        background: rgba(0, 180, 216, 0.05);
        transform: translateY(-2px);
    }

    .pillar-tile:hover::before,
    .pillar-tile:focus-within::before {
        top: 12px;
        bottom: 12px;
        background: var(--blue-primary);
    }

    .pillar-tile:hover .pillar-tile-index,
    .pillar-tile:focus-within .pillar-tile-index {
        opacity: 1;
    }

    .pillar-tile:hover .pillar-tile-title,
    .pillar-tile:focus-within .pillar-tile-title {
        opacity: 0;
        transform: translateY(-8px);
    }

    .pillar-tile:hover .pillar-tile-desc,
    .pillar-tile:focus-within .pillar-tile-desc {
        opacity: 1;
        transform: translateY(0);
    }
}

.pillar-tile:focus-visible {
    outline: 2px solid var(--blue-primary);
    outline-offset: 3px;
}

@media (hover: none) {
    .pillar-tiles-hint::after {
        content: " Tap a tile to read more.";
    }

    .pillar-tile {
        min-height: auto;
    }

    .pillar-tile.is-open {
        border-color: rgba(0, 180, 216, 0.32);
        background: rgba(0, 180, 216, 0.05);
    }

    .pillar-tile.is-open::before {
        background: var(--blue-primary);
    }

    .pillar-tile.is-open .pillar-tile-body {
        min-height: auto;
    }

    .pillar-tile.is-open .pillar-tile-title {
        opacity: 0;
        height: 0;
        overflow: hidden;
        transform: none;
    }

    .pillar-tile.is-open .pillar-tile-desc {
        position: static;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        margin-top: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pillar-tile {
        transition: border-color 0.2s ease, background 0.2s ease;
    }

    .pillar-tile::before {
        transition: none;
    }

    .pillar-tile-title,
    .pillar-tile-desc {
        transition: none;
    }

    .pillar-tile-desc {
        position: static;
        opacity: 1;
        transform: none;
        margin-top: 8px;
        font-size: 0.88rem;
    }

    .pillar-tile-title {
        color: var(--light-100);
    }
}

@media (max-width: 1024px) {
    .nav-toggle { display: block; }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--dark-900);
        flex-direction: column;
        align-items: stretch;
        padding: 20px 24px 28px;
        gap: 4px;
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links a {
        display: block;
        padding: 12px 0;
        font-size: 1rem;
        line-height: 1.3;
    }

    .nav-links .nav-cta {
        margin-top: 8px;
        text-align: center;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
}

@media (max-width: 768px) {
    .slot-row { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
    .step { grid-template-columns: 40px 1fr; gap: 16px; }
}
