/*
 * aptient.com -- Stylesheet
 * Design tokens anchored to 2023 logo colours.
 */

/* -- Tokens -- */

:root {
    --bg:             #090e13;
    --bg-mid:         #0f1620;
    --bg-elevated:    #161f2b;
    --surface:        #1e2629;
    --accent:         #4ab0ff;
    --accent-light:   #96d1fe;
    --accent-glow:    rgba(74, 176, 255, 0.12);
    --text:           #f0f4f8;
    --text-secondary: #8899aa;
    --text-muted:     #546270;
    --border:         rgba(255, 255, 255, 0.07);
    --border-accent:  rgba(74, 176, 255, 0.28);
    --radius:         8px;
    --nav-h:          64px;
    --max-w:          1200px;
    --pad-x:          24px;
    --section-pad:    96px;
    --transition:     200ms ease;
}

/* -- Reset -- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Open Sans', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: 'Roboto Mono', monospace; font-size: 0.875em; }

/* -- Layout utilities -- */

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--pad-x);
}

.section { padding: var(--section-pad) 0; }
.section--mid     { background: var(--bg-mid); }
.section--surface { background: var(--surface); }

.section-header { max-width: 640px; }
.section-header--center { max-width: 640px; margin: 0 auto; text-align: center; }

.section-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.section-intro {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 16px;
    line-height: 1.7;
}

/* -- Buttons -- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), box-shadow var(--transition);
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #05090e;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    text-decoration: none;
    box-shadow: 0 0 20px rgba(74, 176, 255, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.btn-outline:hover {
    background: var(--accent-glow);
    text-decoration: none;
}

.btn-outline-sm {
    padding: 8px 18px;
    font-size: 0.875rem;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border-accent);
    border-radius: 6px;
    font-weight: 600;
    transition: background var(--transition), border-color var(--transition);
    white-space: nowrap;
}
.btn-outline-sm:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    text-decoration: none;
}

/* -- Nav -- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--transition);
}

.nav.is-scrolled {
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.35);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
}

.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 30px; width: auto; }
.nav-logo:hover { opacity: 0.85; text-decoration: none; }

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color var(--transition);
    text-decoration: none;
}
.nav-links a:hover { color: var(--text); }
.nav-links .btn-outline-sm { color: var(--accent); }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -- Hero -- */

.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-h);
    overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(74, 176, 255, 0.06) 0%, transparent 60%),
        linear-gradient(180deg, #0d1520 0%, var(--bg) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(74, 176, 255, 0.07) 1.5px, transparent 1.5px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 80px 0 96px;
    max-width: 800px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 28px;
}
.hero-eyebrow::before {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: var(--accent);
    flex-shrink: 0;
}

.hero-title {
    font-size: clamp(2.5rem, 5.5vw, 4.25rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.08;
    color: var(--text);
}

.hero-title em {
    font-style: normal;
    color: var(--accent);
}

.hero-desc {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    color: var(--text-secondary);
    max-width: 620px;
    margin-top: 28px;
    line-height: 1.75;
}

.hero-ctas {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 44px;
    flex-wrap: wrap;
}

/* -- Services -- */

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 56px;
}

.service-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.service-card:hover {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 1px rgba(74, 176, 255, 0.08), 0 12px 40px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.service-icon {
    width: 42px;
    height: 42px;
    color: var(--accent);
    margin-bottom: 22px;
    flex-shrink: 0;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.65;
    flex: 1;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 24px;
    transition: gap var(--transition);
}
.service-card:hover .service-link { gap: 10px; }

/* -- Credentials strip -- */

.credentials {
    border-top: 2px solid var(--accent);
}

.credentials-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 56px var(--pad-x);
    gap: 24px;
    flex-wrap: wrap;
}

.credential {
    text-align: center;
    flex: 1;
    min-width: 140px;
}

.credential-number {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.02em;
}

.credential-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 10px;
    line-height: 1.4;
}

/* -- Ventures -- */

.ventures-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 56px;
}

.venture-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition), box-shadow var(--transition);
    text-decoration: none;
    color: inherit;
}
.venture-card:hover {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 1px rgba(74, 176, 255, 0.06), 0 8px 32px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}

.venture-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(74, 176, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 16px;
    align-self: flex-start;
}

.venture-name {
    font-size: 1.1875rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.venture-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    flex: 1;
}

.venture-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-top: 20px;
    transition: gap var(--transition);
}
.venture-card:hover .venture-arrow { gap: 10px; }

/* -- Map section -- */

.map-section { overflow: hidden; }

.map-heading {
    text-align: center;
    margin-bottom: 40px;
}

#map {
    width: 100%;
    height: 420px;
    border-radius: var(--radius);
    overflow: hidden;
}

/* Override jsvectormap region/label colours */
.jvectormap-zoomin,
.jvectormap-zoomout { display: none; }

.map-callout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    margin-top: 64px;
    align-items: center;
}

.map-callout-text p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.eh-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: 0 0 40px rgba(74, 176, 255, 0.06);
}

.eh-card-tag {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.eh-card-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
}

.eh-card-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 28px;
}

/* -- Contact -- */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 72px;
    align-items: start;
}

.contact-info h2 { margin-bottom: 12px; }
.contact-tagline { color: var(--text-secondary); margin-bottom: 32px; }

.contact-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

.contact-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    margin-top: 20px;
}
.contact-label:first-of-type { margin-top: 0; }

.contact-value {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* Form */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    display: block;
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    resize: none;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74, 176, 255, 0.12);
}

.form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

.form-msg {
    display: none;
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.form-msg.is-success {
    display: block;
    background: rgba(74, 176, 255, 0.1);
    border: 1px solid var(--border-accent);
    color: var(--accent-light);
}
.form-msg.is-error {
    display: block;
    background: rgba(255, 80, 80, 0.08);
    border: 1px solid rgba(255, 80, 80, 0.3);
    color: #ff9090;
}

.btn.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Turnstile widget spacing */
.cf-turnstile { margin-bottom: 20px; }

/* -- Footer -- */

.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 40px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-logo { opacity: 0.75; transition: opacity var(--transition); }
.footer-logo:hover { opacity: 1; }
.footer-logo img { height: 32px; width: auto; }

.footer-copy {
    font-size: 0.8125rem;
    color: var(--text-muted);
    flex: 1;
    text-align: center;
}

.footer-links {
    display: flex;
    gap: 24px;
}
.footer-links a {
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--text); text-decoration: none; }

/* -- Page hero (service pages, FAQ, privacy) -- */

.page-hero {
    background: var(--bg-mid);
    border-bottom: 1px solid var(--border);
    padding: calc(var(--nav-h) + 72px) 0 72px;
}

.page-hero-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.page-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.page-hero p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 28px;
}

/* -- Service overview page -- */

.services-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    margin-top: 56px;
}

.service-overview-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.service-overview-card:hover {
    border-color: var(--border-accent);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.service-overview-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 14px;
}
.service-overview-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.65;
    flex: 1;
}
.service-overview-card .service-link { margin-top: 28px; }

/* -- Service detail pages -- */

.service-body { max-width: 760px; }
.service-body p {
    font-size: 1.0125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}
.service-body p:last-child { margin-bottom: 0; }

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.capability-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
}

.capability-item h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.capability-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tech-strip {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 40px;
    margin-top: 56px;
}
.tech-strip h3 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}
.tech-strip p { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.65; }

.use-cases { margin-top: 56px; }
.use-cases h2 { margin-bottom: 32px; }

.use-case-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 28px 32px;
    margin-bottom: 16px;
}
.use-case-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.cta-block {
    background: linear-gradient(135deg, var(--bg-elevated) 0%, rgba(74, 176, 255, 0.05) 100%);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 64px;
    text-align: center;
    margin-top: 56px;
}
.cta-block h2 { margin-bottom: 12px; }
.cta-block p { color: var(--text-secondary); margin-bottom: 32px; }

/* -- FAQ page -- */

.faq-section { margin-bottom: 56px; }
.faq-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text);
    user-select: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    transition: color var(--transition);
}
.faq-question:hover { color: var(--accent); }

.faq-chevron {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform var(--transition);
}
.faq-item.is-open .faq-chevron { transform: rotate(180deg); }
.faq-item.is-open .faq-question { color: var(--accent); }

.faq-answer {
    display: none;
    padding: 0 0 20px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.75;
}
.faq-item.is-open .faq-answer { display: block; }

/* -- Privacy page -- */

.prose {
    max-width: 720px;
}
.prose h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 40px 0 12px;
    color: var(--text);
}
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 14px;
}
.prose ul { padding-left: 20px; }
.prose a { color: var(--accent); }

/* -- Utilities -- */
/* Externalised from inline style="" attributes so the enforced CSP can run with
   no 'unsafe-inline' in style-src. */
.is-hidden      { display: none; }              /* form honeypot */
.text-secondary { color: var(--text-secondary); }
.mt-64          { margin-top: 64px; }
.mt-72          { margin-top: 72px; }

/* -- Responsive -- */

@media (max-width: 1024px) {
    .ventures-grid { grid-template-columns: repeat(2, 1fr); }
    .capabilities-grid { grid-template-columns: repeat(2, 1fr); }
}

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

    /* Nav mobile */
    .nav-toggle { display: flex; }

    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        right: 0;
        background: var(--surface);
        border-top: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0 16px;
    }
    .nav-links.is-open { display: flex; }
    .nav-links a {
        padding: 14px var(--pad-x);
        font-size: 1rem;
        border-radius: 0;
    }
    .nav-links .btn-outline-sm {
        margin: 8px var(--pad-x) 0;
        text-align: center;
        justify-content: center;
    }

    /* Hero */
    .hero::before { display: none; }
    .hero-content { padding: 64px 0 80px; }

    /* Grids → single column */
    .services-grid        { grid-template-columns: 1fr; }
    .ventures-grid        { grid-template-columns: 1fr; }
    .services-overview-grid { grid-template-columns: 1fr; }
    .capabilities-grid    { grid-template-columns: 1fr; }
    .map-callout          { grid-template-columns: 1fr; gap: 32px; }
    .contact-grid         { grid-template-columns: 1fr; gap: 40px; }

    /* Map height */
    #map { height: 280px; }

    /* Credentials */
    .credentials-inner { justify-content: center; gap: 32px; padding: 40px var(--pad-x); }

    /* CTA block */
    .cta-block { padding: 40px 24px; }

    /* Footer */
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-copy { text-align: center; }
}

@media (max-width: 480px) {
    .hero-ctas { flex-direction: column; align-items: flex-start; }
    .hero-ctas .btn { width: 100%; justify-content: center; }
}
