/* ============================================================
   NextPhase Labs — styles.css
   ============================================================ */

/* --- Variables --------------------------------------------- */
:root {
    --color-primary: #080f1e;
    --color-primary-mid: #0f1a30;
    --color-primary-light: #1a2840;
    --color-accent: #2563eb;
    --color-accent-hover: #1d4ed8;
    --color-accent-muted: rgba(37, 99, 235, 0.10);

    --color-bg: #f9fafb;
    --color-bg-card: #ffffff;
    --color-bg-alt: #f1f5f9;
    --color-border: #e2e8f0;

    --color-text: #5a6a7e;
    --color-heading: #1a2840;

    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --container-width: 1200px;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-pill: 100px;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition: 0.2s ease-in-out;
}

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

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

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

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Layout ------------------------------------------------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.75rem;
}

.text-center {
    text-align: center;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4.5rem;
    align-items: center;
}

/* --- Typography -------------------------------------------- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
}

.section-title {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.0625rem;
    color: var(--color-text);
    max-width: 640px;
    margin-bottom: 3rem;
    line-height: 1.75;
}

/* Center subtitle when inside a text-center context */
.text-center .section-subtitle,
.section-subtitle.text-center {
    margin-left: auto;
    margin-right: auto;
}

/* --- Buttons ----------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6875rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition:
        background-color var(--transition),
        box-shadow var(--transition),
        transform 0.15s ease,
        border-color var(--transition);
    letter-spacing: 0.01em;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-large {
    padding: 0.875rem 1.875rem;
    font-size: 1rem;
}

.w-full {
    width: 100%;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25), 0 4px 12px rgba(37, 99, 235, 0.12);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35), 0 8px 20px rgba(37, 99, 235, 0.18);
}

.btn-outline {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.55);
}

/* --- Navbar ------------------------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: padding var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
    padding: 0.75rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--color-heading);
    letter-spacing: -0.01em;
    line-height: 1;
}

.logo-text .accent {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    padding: 0.25rem 0;
}

/* Sliding underline indicator */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s var(--ease-out-expo);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

/* --- Mobile Menu ------------------------------------------- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--color-heading);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu {
    position: fixed;
    inset: 0;
    background-color: var(--color-bg);
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-link {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-heading);
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
}

.mobile-link:hover,
.mobile-link:active {
    color: var(--color-accent);
}

/* CTA in mobile menu */
.mobile-menu .btn {
    margin-top: 1rem;
    min-width: 220px;
}

/* --- Hero -------------------------------------------------- */
.hero {
    position: relative;
    padding-top: 7rem;
    padding-bottom: 6rem;
    background-color: var(--color-primary);
    color: #ffffff;
    min-height: 88vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    /* Dot-grid texture */
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 68% 50%, rgba(37, 99, 235, 0.16) 0%, transparent 56%);
    pointer-events: none;
}

.hero>.container {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

.hero-content {
    max-width: 580px;
}

.hero h1,
.hero h2,
.hero h3 {
    color: #ffffff;
}

.hero-eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: clamp(2.25rem, 4.5vw, 3.25rem);
    font-weight: 800;
    margin-bottom: 1.25rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.hero-title .accent {
    color: var(--color-accent);
}

.hero-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.0625rem);
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
    line-height: 1.75;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2.75rem;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-right: 2rem;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 1.625rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

/* Fix the "/" sitting lower than numbers */
.stat-slash {
    display: inline-block;
    position: relative;
    top: -0.05em;
    margin: 0 0.02em;
    opacity: 0.55;
    font-weight: 400;
}

.stat-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.12);
    margin-right: 2rem;
    flex-shrink: 0;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.network-svg {
    width: 100%;
    max-width: 460px;
    height: auto;
    opacity: 0.85;
}

/* --- Sections Base ----------------------------------------- */
.section {
    padding: 5.5rem 0;
}

.bg-alt {
    background-color: var(--color-bg-alt);
}

/* --- About Section ----------------------------------------- */
.about-text p {
    margin-bottom: 1.25rem;
    font-size: 1.0625rem;
    line-height: 1.8;
}

.about-features {
    display: grid;
    gap: 0.5rem;
}

.feature-item {
    display: flex;
    gap: 1.125rem;
    align-items: flex-start;
    padding: 1.25rem;
    border-radius: var(--radius);
    transition: background-color 0.2s;
}

.feature-item:hover {
    background-color: var(--color-bg-alt);
}

.feature-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background-color: var(--color-accent-muted);
    color: var(--color-accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-text h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.feature-text p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* --- Solutions Grid ---------------------------------------- */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.solution-card {
    background-color: var(--color-bg-card);
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    border-left: 3px solid transparent;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition:
        border-left-color var(--transition),
        box-shadow var(--transition),
        transform 0.2s ease;
}

.solution-card:hover {
    border-left-color: var(--color-accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.card-icon {
    width: 36px;
    height: 36px;
    color: var(--color-accent);
    margin-bottom: 1.125rem;
}

.solution-card h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-heading);
}

.solution-card p {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--color-text);
}

/* --- Web Services Section ---------------------------------- */
.web-services-text p {
    margin-bottom: 1.25rem;
    font-size: 1.0625rem;
    line-height: 1.8;
}

.web-services-features {
    display: grid;
    gap: 0.5rem;
}

/* --- Industries -------------------------------------------- */
.industries-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    justify-content: center;
    margin-top: 2.5rem;
}

.industry-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.5625rem 1.25rem;
    background: var(--color-bg-card);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-heading);
    cursor: default;
    transition:
        border-color var(--transition),
        color var(--transition),
        box-shadow var(--transition),
        background-color var(--transition),
        transform 0.15s ease;
}

.industry-tag:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.08);
    background-color: rgba(37, 99, 235, 0.03);
    transform: translateY(-1px);
}

/* --- Contact Section --------------------------------------- */
.contact-section {
    position: relative;
    background-color: var(--color-primary);
    color: #ffffff;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    overflow: hidden;
}

.contact-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 28% 60%, rgba(37, 99, 235, 0.12) 0%, transparent 55%);
    pointer-events: none;
}

.contact-section .section-title {
    color: #ffffff;
}

.contact-section .section-subtitle {
    color: rgba(255, 255, 255, 0.5);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    justify-content: center;
}

.info-block {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 0.9375rem;
}

.info-block svg {
    color: var(--color-accent);
    flex-shrink: 0;
}

.info-block a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.contact-form {
    background-color: var(--color-bg-card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
}

.form-group {
    margin-bottom: 1.125rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: 0.375rem;
}

.form-input {
    width: 100%;
    padding: 0.6875rem 0.875rem;
    background-color: var(--color-bg);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-heading);
    font-family: var(--font-body);
    font-size: 1rem;
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background-color var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
    background-color: #ffffff;
}

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

/* --- Footer ------------------------------------------------ */
footer {
    padding: 2rem 0;
    background-color: var(--color-primary-light);
    color: rgba(255, 255, 255, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-logo .logo-text {
    color: #ffffff;
    font-size: 1.25rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.8125rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: rgba(255, 255, 255, 0.75);
}

.footer-copy {
    font-size: 0.8125rem;
}

/* --- Scroll Animations ------------------------------------- */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.6s var(--ease-out-expo),
        transform 0.6s var(--ease-out-expo);
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive -------------------------------------------- */

/* Tablet landscape */
@media (max-width: 1024px) {
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet / small desktop */
@media (max-width: 900px) {

    .hero-grid,
    .two-col,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-visual {
        display: none;
    }

    .hero-content {
        max-width: none;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding-top: 6rem;
        padding-bottom: 4rem;
        min-height: auto;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        text-align: center;
    }

    .section {
        padding: 4rem 0;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

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

    /* Contact info centered on single column */
    .contact-info {
        text-align: center;
        align-items: center;
    }

    .info-block {
        justify-content: center;
    }

    /* Contact form full width */
    .contact-form {
        max-width: 520px;
        margin: 0 auto;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .container {
        padding: 0 1.25rem;
    }

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

    .hero-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .stat-divider {
        display: none;
    }

    .stat-item {
        padding-right: 0;
    }

    .section {
        padding: 3.5rem 0;
    }

    .section-title {
        font-size: clamp(1.625rem, 6vw, 2rem);
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* Hero compact mobile */
    .hero {
        padding-top: 5.5rem;
        padding-bottom: 3rem;
    }

    .hero-title {
        font-size: clamp(1.75rem, 7vw, 2.25rem);
    }

    .hero-eyebrow {
        font-size: 0.75rem;
    }

    .hero-subtitle {
        font-size: 0.9375rem;
    }

    .hero-actions {
        margin-bottom: 2rem;
    }

    /* About section text */
    .about-text p {
        font-size: 1rem;
    }

    /* Feature items */
    .feature-item {
        padding: 1rem;
    }

    .feature-text h3 {
        font-size: 0.875rem;
    }

    .feature-text p {
        font-size: 0.875rem;
    }

    /* Solution cards */
    .solution-card {
        padding: 1.5rem;
    }

    /* Industry tags wrap nicely */
    .industries-list {
        gap: 0.5rem;
        margin-top: 1.5rem;
    }

    .industry-tag {
        font-size: 0.8125rem;
        padding: 0.5rem 1rem;
    }

    /* Contact form */
    .contact-form {
        padding: 1.5rem;
    }

    .contact-section .section-subtitle {
        margin-bottom: 1.5rem;
    }

    /* Footer */
    .footer-content {
        gap: 1rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    /* Mobile menu links */
    .mobile-link {
        font-size: 1.25rem;
    }

    .mobile-menu {
        gap: 1.5rem;
    }
}

/* Small mobile */
@media (max-width: 380px) {
    .container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 1.625rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-num {
        font-size: 1.375rem;
    }

    .btn-large {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }

    .industry-tag {
        font-size: 0.75rem;
        padding: 0.4375rem 0.875rem;
    }
}

/* --- Touch device helpers ---------------------------------- */
@media (hover: none) {
    .btn:hover {
        transform: none;
    }

    .solution-card:hover {
        transform: none;
    }

    .industry-tag:hover {
        transform: none;
    }
}

/* --- Accessibility (WCAG) --- */
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    clip: auto;
    white-space: normal;
    background: var(--color-accent);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    display: block;
    text-align: center;
    font-weight: 700;
    z-index: 9999;
}

*:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}