/* ==========================================================================
   Maplyzer — design tokens
   Palette: asphalt ink, route teal, marker yellow, cool fog greys.
   Type: Space Grotesk (display) / Inter (body) / IBM Plex Mono (data, labels)
   Signature: topographic contour grid + scale-bar section dividers +
              waypoint route line for the process steps.
   ========================================================================== */

:root {
  --ink: #12181f;
  --ink-2: #1b232c;
  --steel: #232d37;
  --fog: #e7eaed;
  --paper: #f4f5f7;
  --white: #ffffff;
  --teal: #1c7a78;
  --teal-deep: #125552;
  --teal-tint: #e3f0ef;
  --yellow: #f2b705;
  --yellow-deep: #c99400;
  --ink-soft: #59636e;
  --ink-faint: #8b95a1;
  --line: rgba(18, 24, 31, 0.12);
  --line-soft: rgba(18, 24, 31, 0.07);
  --line-invert: rgba(255, 255, 255, 0.14);

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 3px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--ink-soft); }

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

/* Faint fixed coordinate grid across the whole page — the cartographic signature */
.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-size: 48px 48px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--white);
  border-bottom: 1px solid var(--line-invert);
}

.bar {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--white);
}
.brand-mark { color: var(--yellow); display: inline-flex; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.brand:hover {
    color:unset !important;
}

    .primary-nav ul {
        list-style: none;
        display: flex;
        gap: 6px;
        margin: 0;
        padding: 0;
        align-items: center;
    }

    .primary-nav > ul > li {
        position: relative;
    }

        .primary-nav > ul > li > a {
            display: block;
            padding: 10px 14px;
            font-size: 0.85rem;
            font-weight: 500;
            letter-spacing: 0.02em;
            color: rgba(255, 255, 255, 0.82);
            border-bottom: 2px solid transparent;
            transition: color 0.15s ease, border-color 0.15s ease;
        }

            .primary-nav > ul > li > a:hover,
            .primary-nav > ul > li > a.active {
                color: var(--white);
                border-color: var(--yellow);
            }

    .has-dropdown .dropdown {
        list-style: none;
        margin: 0;
        padding: 8px;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 230px;
        background: var(--ink-2);
        border: 1px solid var(--line-invert);
        border-radius: var(--radius);
        opacity: 0;
        visibility: hidden;
        transform: translateY(4px);
        transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    }

    .has-dropdown:hover .dropdown,
    .has-dropdown:focus-within .dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .dropdown li a {
        display: block;
        padding: 9px 12px;
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.78);
        border-left: 2px solid transparent;
        border-radius: 2px;
    }

        .dropdown li a:hover {
            color: var(--white);
            border-left-color: var(--teal);
            background: rgba(28, 122, 120, 0.15);
        }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 18px;
    }

    .link-login {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.75);
    }

        .link-login:hover {
            color: var(--white);
        }

    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 10px 20px;
        font-family: var(--font-body);
        font-weight: 600;
        font-size: 0.88rem;
        border-radius: var(--radius);
        border: 1px solid transparent;
        cursor: pointer;
        transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color .15s ease;
    }

    .btn-accent {
        background: var(--yellow) !important;
        color: var(--ink) !important;
    }

        .btn-accent:hover {
            background: var(--yellow-deep) !important;
        }

    .btn-outline {
        background: transparent;
        border-color: rgba(255, 255, 255, 0.35);
        color: var(--white);
    }

        .btn-outline:hover {
            border-color: var(--white);
        }

    .btn-teal {
        background: var(--teal);
        color: var(--white);
    }

        .btn-teal:hover {
            background: var(--teal-deep);
        }

    .btn-dark {
        background: var(--ink);
        color: var(--white);
    }

        .btn-dark:hover {
            background: var(--ink-2);
        }

    .nav-toggle {
        display: none;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
    }

        .nav-toggle span {
            width: 22px;
            height: 2px;
            background: var(--white);
            display: block;
        }
    /* ==========================================================================
   Hero
   ========================================================================== */

    .hero {
        position: relative;
        background: var(--ink);
        color: var(--white);
        overflow: hidden;
        padding: 96px 0 88px;
    }
        /* Topographic contour lines — signature motif */
        .hero::before {
            content: "";
            position: absolute;
            inset: -20% -10%;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%231c7a78' stroke-width='1'%3E%3Cellipse cx='420' cy='180' rx='420' ry='260'/%3E%3Cellipse cx='420' cy='180' rx='330' ry='200'/%3E%3Cellipse cx='420' cy='180' rx='250' ry='150'/%3E%3Cellipse cx='420' cy='180' rx='170' ry='105'/%3E%3Cellipse cx='420' cy='180' rx='95' ry='60'/%3E%3C/g%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: top right;
            background-size: 900px 900px;
            opacity: 0.35;
            pointer-events: none;
        }

    .eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-family: var(--font-mono);
        font-size: 0.72rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: var(--teal);
    }

        .eyebrow::before {
            content: "+";
            color: var(--yellow);
            font-weight: 700;
        }

    .hero .eyebrow {
        color: #6fc9c6;
    }

    .hero-grid {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-columns: 1.1fr 0.9fr;
        gap: 48px;
        align-items: center;
    }

    .hero h1 {
        font-size: clamp(2rem, 3.4vw, 2.9rem);
        margin: 14px 0 18px;
    }

    .hero-lede {
        color: rgba(255, 255, 255, 0.72);
        font-size: 1.05rem;
        max-width: 46ch;
    }

    .hero-links {
        display: flex;
        flex-wrap: wrap;
        gap: 14px;
        margin: 22px 0 30px;
    }

        .hero-links a.text-link {
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.8);
            border-bottom: 1px solid rgba(255, 255, 255, 0.35);
            padding-bottom: 2px;
        }

            .hero-links a.text-link:hover {
                color: var(--white);
                border-color: var(--white);
            }

    .hero-ctas {
        display: flex;
        gap: 14px;
        flex-wrap: wrap;
    }

    .hero-panel {
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid var(--line-invert);
        border-radius: var(--radius);
        overflow: hidden;
    }

        .hero-panel img {
            width: 100%;
        }

        .hero-panel .caption {
            font-family: var(--font-mono);
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.55);
            padding: 10px 14px;
            border-top: 1px solid var(--line-invert);
        }
    /* ==========================================================================
   Scale-bar section divider — cartographic signature detail
   ========================================================================== */

    .scale-divider {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 0 2px;
        color: var(--ink-faint);
    }

        .scale-divider .ticks {
            flex: 1;
            height: 8px;
            background-image: repeating-linear-gradient(90deg, var(--line) 0, var(--line) 1px, transparent 1px, transparent 24px);
            border-top: 1px solid var(--line);
        }

        .scale-divider span {
            font-family: var(--font-mono);
            font-size: 0.68rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            white-space: nowrap;
        }
    /* ==========================================================================
   Sections / generic
   ========================================================================== */

    section {
        padding: 72px 0;
    }

    .section-tight {
        padding: 48px 0;
    }

    .section-head {
        max-width: 640px;
        margin: 0 0 40px;
    }

        .section-head h2 {
            font-size: clamp(1.5rem, 2.4vw, 2.05rem);
        }

    .on-ink {
        background: var(--ink);
        color: var(--white);
    }

        .on-ink p {
            color: rgba(255, 255, 255, 0.68);
        }

        .on-ink .section-head h2 {
            color: var(--white);
        }

    .on-fog {
        background: var(--fog);
    }

    .on-white {
        background: var(--white);
    }
    /* Feature grid */
    .feature-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
        gap: 1px;
        background: var(--line);
        border: 1px solid var(--line);
    }

    .feature-card {
        background: var(--white);
        padding: 26px 24px;
    }

        .feature-card .pin {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            border: 1.5px solid var(--teal);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 16px;
            color: var(--teal);
        }

        .feature-card h3 {
            font-size: 1rem;
            margin-bottom: 8px;
        }

        .feature-card p {
            font-size: 0.92rem;
            margin: 0;
        }

        .feature-card a {
            color: inherit;
        }
    /* Alternating product rows */
    .product-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 56px;
        align-items: center;
        padding: 64px 0;
        border-top: 1px solid var(--line);
    }

        .product-row:first-of-type {
            border-top: none;
        }

        .product-row.reverse .product-media {
            order: 2;
        }

    .product-copy .eyebrow {
        color: var(--teal);
    }

        .product-copy .eyebrow::before {
            color: var(--yellow-deep);
        }

    .product-media {
        border: 1px solid var(--line);
        border-radius: var(--radius);
        overflow: hidden;
        background: var(--white);
    }

        .product-media img {
            width: 100%;
        }

    .product-copy h2, .product-copy h3 {
        margin-top: 10px;
    }

    .product-copy .link-arrow {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-weight: 600;
        font-size: 0.9rem;
        color: var(--teal-deep);
        margin-top: 6px;
    }

        .product-copy .link-arrow:hover {
            text-decoration: underline;
        }
    /* Process / waypoint route */
    .route {
        position: relative;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
        margin-top: 20px;
    }

        .route::before {
            content: "";
            position: absolute;
            top: 21px;
            left: 6%;
            right: 6%;
            height: 0;
            border-top: 2px dashed var(--line);
            z-index: 0;
        }

    .waypoint {
        position: relative;
        z-index: 1;
    }

        .waypoint .node {
            width: 42px;
            height: 42px;
            border-radius: 50%;
            background: var(--ink);
            color: var(--yellow);
            font-family: var(--font-mono);
            font-size: 0.85rem;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 18px;
            border: 3px solid var(--paper);
            box-shadow: 0 0 0 1px var(--line);
        }

        .waypoint h3 {
            font-size: 1rem;
            margin-bottom: 6px;
        }

        .waypoint p {
            font-size: 0.9rem;
        }
    /* Framework-diagram output chips (Home / Platform overview) */
    .outcome-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        margin-top: 36px;
    }

    .outcome-chip {
        font-family: var(--font-mono);
        font-size: 0.78rem;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--teal-deep);
        background: var(--teal-tint);
        border: 1px solid var(--teal);
        border-radius: 20px;
        padding: 8px 18px;
    }
    /* CTA band */
    .cta-band {
        position: relative;
        background: var(--ink);
        color: var(--white);
        text-align: center;
        padding: 64px 0;
        overflow: hidden;
    }

        .cta-band::before {
            content: "";
            position: absolute;
            inset: -40% -10%;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cg fill='none' stroke='%23f2b705' stroke-width='1'%3E%3Ccircle cx='300' cy='300' r='260'/%3E%3Ccircle cx='300' cy='300' r='190'/%3E%3Ccircle cx='300' cy='300' r='120'/%3E%3Ccircle cx='300' cy='300' r='50'/%3E%3C/g%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: center;
            background-size: 700px 700px;
            opacity: 0.12;
        }

        .cta-band > * {
            position: relative;
            z-index: 1;
        }

        .cta-band h2 {
            color: var(--white);
        }

        .cta-band .ctas {
            display: flex;
            justify-content: center;
            gap: 14px;
            flex-wrap: wrap;
            margin-top: 22px;
        }
    /* Stat chips (about page) */
    .stat-row {
        display: flex;
        flex-wrap: wrap;
        gap: 14px;
        margin: 22px 0 8px;
    }

    .stat-chip {
        border: 1px solid var(--line);
        background: var(--white);
        border-radius: var(--radius);
        padding: 14px 18px;
        min-width: 140px;
    }

        .stat-chip .num {
            font-family: var(--font-mono);
            color: var(--teal-deep);
            font-size: 1.3rem;
            display: block;
        }

        .stat-chip .label {
            font-size: 0.78rem;
            color: var(--ink-soft);
        }

    .story-list {
        list-style: none;
        margin: 22px 0;
        padding: 0;
        display: grid;
        gap: 12px;
    }

        .story-list li {
            padding-left: 20px;
            position: relative;
            color: var(--ink-soft);
            font-size: 0.95rem;
        }

            .story-list li::before {
                content: "";
                position: absolute;
                left: 0;
                top: 9px;
                width: 7px;
                height: 7px;
                border-radius: 50%;
                background: var(--teal);
            }
    /* Simple page header (non-hero pages) */
    .page-head {
        background: var(--ink);
        color: var(--white);
        padding: 60px 0 48px;
    }

        .page-head h1 {
            color: var(--white);
            margin-top: 10px;
        }

        .page-head p {
            color: rgba(255,255,255,0.68);
            max-width: 60ch;
        }
    /* Empty state (News / Conferences) */
    .empty-state {
        border: 1px dashed var(--line);
        border-radius: var(--radius);
        padding: 56px 32px;
        text-align: center;
        background: var(--white);
    }

        .empty-state .node {
            width: 46px;
            height: 46px;
            border-radius: 50%;
            border: 1.5px solid var(--teal);
            color: var(--teal);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 18px;
        }

        .empty-state h2 {
            font-size: 1.3rem;
        }

        .empty-state p {
            max-width: 46ch;
            margin-left: auto;
            margin-right: auto;
        }
    /* Contact page */
    .contact-grid {
        display: grid;
        grid-template-columns: 1.1fr 0.9fr;
        gap: 56px;
        align-items: start;
    }

    .form-field {
        margin-bottom: 18px;
    }

        .form-field label {
            display: block;
            font-family: var(--font-mono);
            font-size: 0.72rem;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--ink-soft);
            margin-bottom: 6px;
        }

        .form-field input,
        .form-field textarea {
            width: 100%;
            padding: 12px 14px;
            border: 1px solid var(--line);
            border-radius: var(--radius);
            background: var(--white);
            font-family: var(--font-body);
            font-size: 0.95rem;
            color: var(--ink);
        }

            .form-field input:focus,
            .form-field textarea:focus {
                outline: none;
                border-color: var(--teal);
                box-shadow: 0 0 0 3px var(--teal-tint);
            }

        .form-field textarea {
            min-height: 130px;
            resize: vertical;
        }

    .field-error {
        color: #b3261e;
        font-size: 0.78rem;
        margin-top: 4px;
    }

    .alert-success {
        background: var(--teal-tint);
        border: 1px solid var(--teal);
        color: var(--teal-deep);
        padding: 12px 16px;
        border-radius: var(--radius);
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .contact-card {
        display: flex;
        gap: 14px;
        padding: 20px 0;
        border-top: 1px solid var(--line);
    }

        .contact-card:first-child {
            border-top: none;
        }

        .contact-card .node {
            flex: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 1.5px solid var(--teal);
            color: var(--teal);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .contact-card h3 {
            font-size: 0.98rem;
            margin-bottom: 4px;
        }

        .contact-card p {
            margin: 0;
            font-size: 0.9rem;
        }
    /* ==========================================================================
   Footer
   ========================================================================== */

    .site-footer {
        background: var(--ink-2);
        color: rgba(255, 255, 255, 0.75);
        padding: 56px 0 0;
    }

    .footer-grid {
        max-width: var(--container);
        margin: 0 auto;
        padding: 0 28px;
        display: grid;
        grid-template-columns: 0.85fr 2.4fr;
        gap: 40px;
        padding-bottom: 40px;
    }

    .footer-brand {
        display: flex;
        gap: 12px;
    }

        .footer-brand .brand-mark {
            color: var(--yellow);
        }

    .footer-address {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.55);
        margin: 0;
    }

    .footer-nav {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

        .footer-col .eyebrow {
            color: #6fc9c6;
            margin-bottom: 4px;
        }

        .footer-col a {
            font-size: 0.86rem;
            color: rgba(255, 255, 255, 0.7);
        }

            .footer-col a:hover {
                color: var(--white);
            }

    .footer-base {
        border-top: 1px solid var(--line-invert);
        padding: 16px 28px;
        max-width: var(--container);
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
        font-size: 0.78rem;
        color: rgba(255, 255, 255, 0.4);
    }

        .footer-base .coord {
            font-family: var(--font-mono);
            letter-spacing: 0.04em;
        }
    /* ==========================================================================
   Responsive
   ========================================================================== */

    @media (max-width: 940px) {
        .hero-grid, .product-row, .contact-grid {
            grid-template-columns: 1fr;
        }

            .product-row.reverse .product-media {
                order: 0;
            }

        .route {
            grid-template-columns: repeat(2, 1fr);
            row-gap: 32px;
        }

            .route::before {
                display: none;
            }

        .footer-grid {
            grid-template-columns: 1fr;
        }

        .footer-nav {
            grid-template-columns: repeat(2, 1fr);
        }
    }

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

        .primary-nav {
            position: absolute;
            top: 68px;
            left: 0;
            right: 0;
            background: var(--ink);
            border-bottom: 1px solid var(--line-invert);
            display: none;
        }

            .primary-nav.open {
                display: block;
            }

            .primary-nav ul {
                flex-direction: column;
                align-items: stretch;
                padding: 8px 16px 16px;
            }

        .has-dropdown .dropdown {
            position: static;
            opacity: 1;
            visibility: visible;
            transform: none;
            display: none;
            border: none;
            box-shadow: none;
            background: rgba(255,255,255,0.03);
        }

        .has-dropdown.open .dropdown {
            display: block;
        }

        .header-actions {
            display: none;
        }

        .footer-nav {
            grid-template-columns: 1fr 1fr;
        }
    }

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

        * {
            transition: none !important;
        }
    }

    .dd-vertical {
        display: block !important;
    }

    .process-section {
        padding: 5rem 1rem;
    }

    .process-title {
        font-weight: 700;
        color: #1a1a1a;
        margin-bottom: 4rem;
    }

    .process-card {
        background-color: #ffffff;
        border: none;
        border-radius: 4px;
        padding: 2.5rem 2rem;
        height: 100%;
        box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    }

        .process-card h3 {
            font-size: 1.15rem;
            font-weight: 700;
            color: #1a1a1a;
            text-align: center;
            margin-bottom: 1.75rem;
        }

        .process-card p {
            color: #6b6b6b;
            text-align: center;
            font-size: 0.98rem;
            line-height: 1.7;
            margin-bottom: 0;
        }

    .process-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 1.5rem;
    }

        .process-row > div {
            flex: 1 1 0;
            min-width: 0;
        }

    @media (max-width: 767px) {
        .process-row {
            flex-wrap: wrap;
        }

            .process-row > div {
                flex: 1 1 100%;
            }
    }

    .feature-wrap {
        max-width: 1100px;
        margin: 0 auto;
        padding: 3rem 1rem;
    }

    .feature-row {
        padding: 1.75rem 0;
    }

        .feature-row.shaded {
            background-color: #f7f7f8;
        }

    .feature-item {
        padding: 0 1.25rem;
    }

        .feature-item h3 {
            font-size: 1.05rem;
            font-weight: 700;
            text-decoration: underline;
            color: #1a1a1a;
            margin-bottom: 0.6rem;
        }

        .feature-item p {
            color: #6b6b6b;
            font-size: 0.95rem;
            line-height: 1.6;
            margin-bottom: 0.5rem;
        }

            .feature-item p.truncated {
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                overflow: hidden;
            }

    .read-toggle {
        background: none;
        border: none;
        padding: 0;
        color: #0d6efd;
        font-size: 0.9rem;
        font-weight: 600;
        text-decoration: underline;
        cursor: pointer;
    }

        .read-toggle:hover {
            color: #084298;
        }

    ul.feature-list {
        list-style: none;
        padding-left: 0;
        margin: 0;
    }

    .feature-item {
        position: relative;
        padding-left: 1.5rem;
    }

        .feature-item::before {
            content: "•";
            position: absolute;
            left: 0.25rem;
            top: 0;
            color: #1a1a1a;
            font-size: 1.1rem;
        }