/* ============================================================
   Nimaxiom Corporate Site Styles
   All classes prefixed with nxm- to avoid collisions with
   NimeDocs page styles.
   ============================================================ */

/* ── Utility: subtle section background ── */
.section--subtle {
    background-color: var(--color-bg-off-white);
}

/* ── Utility: required field marker ── */
.required {
    color: var(--color-coral);
}

/* ════════════════════════════════════════════════════════════════
   HERO — Homepage
   ════════════════════════════════════════════════════════════════ */
.nxm-hero {
    padding: calc(var(--nav-height) + var(--space-20)) 0 var(--space-24);
    text-align: center;
    position: relative;
    overflow: hidden;
    background-color: var(--color-primary-pale);
}

.nxm-hero__content {
    position: relative;
    z-index: 1;
}

.nxm-hero__badge {
    margin-bottom: var(--space-6);
}

.nxm-hero__title {
    font-size: var(--text-hero);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    max-width: 780px;
    margin: 0 auto var(--space-5);
    color: var(--color-charcoal);
}

.nxm-hero__accent {
    color: var(--color-primary);
}

.nxm-hero__subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 560px;
    margin: 0 auto var(--space-8);
    line-height: var(--leading-loose);
}

.nxm-hero__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* Subtle grid pattern */
.nxm-hero__pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(var(--color-primary-rgb), 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

/* Hero entrance animation */
.nxm-hero .hero-animate {
    opacity: 0;
    transform: translateY(20px);
    animation: nxmHeroFadeUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: var(--hero-delay, 0s);
    animation-fill-mode: both;
}

@keyframes nxmHeroFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .nxm-hero .hero-animate {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}

/* ════════════════════════════════════════════════════════════════
   PAGE HERO — Sub-pages (about, products, contact)
   ════════════════════════════════════════════════════════════════ */
.nxm-page-hero {
    padding: calc(var(--nav-height) + var(--space-16)) 0 var(--space-16);
    text-align: center;
    background-color: var(--color-primary-pale);
}

.nxm-page-hero h1 {
    max-width: 700px;
    margin: var(--space-5) auto var(--space-4);
}

.nxm-page-hero .subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: var(--leading-loose);
}

/* ════════════════════════════════════════════════════════════════
   PRINCIPLES — Homepage 3-column
   ════════════════════════════════════════════════════════════════ */
.nxm-principles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
}

.nxm-principle {
    text-align: center;
    padding: var(--space-8) var(--space-6);
}

.nxm-principle__icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    background: var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-5);
    font-size: 24px;
    color: var(--color-primary);
}

.nxm-principle h3 {
    margin-bottom: var(--space-3);
}

.nxm-principle p {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    max-width: 320px;
    margin: 0 auto;
}

/* ════════════════════════════════════════════════════════════════
   PRODUCT CARD — Homepage flagship showcase
   ════════════════════════════════════════════════════════════════ */
.nxm-product-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-10);
    transition: box-shadow var(--duration-normal) var(--ease-out);
}

.nxm-product-card:hover {
    box-shadow: var(--shadow-lg);
}

.nxm-product-card__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-5);
    font-size: 24px;
    color: var(--color-primary);
}

.nxm-product-card__content h3 {
    font-size: var(--text-h3);
    margin-bottom: var(--space-3);
}

.nxm-product-card__content > p {
    color: var(--color-text-secondary);
    line-height: var(--leading-normal);
    max-width: 640px;
    margin-bottom: var(--space-8);
}

.nxm-product-card__actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-top: var(--space-8);
}

/* ── Product stats row ── */
.nxm-product-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    padding: var(--space-6) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-6);
}

/* ── Format badges ── */
.nxm-product-formats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.nxm-format {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: 0.04em;
}

.nxm-format--docx { background: #dbeafe; color: #1d4ed8; }
.nxm-format--pptx { background: #fee2e2; color: #dc2626; }
.nxm-format--xlsx { background: #dcfce7; color: #16a34a; }
.nxm-format--pdf  { background: #fef3c7; color: #d97706; }
.nxm-format--html { background: #ede9fe; color: #7c3aed; }
.nxm-format--csv  { background: #e0e7ff; color: #4f46e5; }

/* Dark mode format badges */
[data-theme="dark"] .nxm-format--docx { background: rgba(59, 130, 246, 0.15); color: #93bbfd; }
[data-theme="dark"] .nxm-format--pptx { background: rgba(220, 38, 38, 0.15); color: #fca5a5; }
[data-theme="dark"] .nxm-format--xlsx { background: rgba(22, 163, 74, 0.15); color: #86efac; }
[data-theme="dark"] .nxm-format--pdf  { background: rgba(217, 119, 6, 0.15); color: #fcd34d; }
[data-theme="dark"] .nxm-format--html { background: rgba(124, 58, 237, 0.15); color: #c4b5fd; }
[data-theme="dark"] .nxm-format--csv  { background: rgba(79, 70, 229, 0.15); color: #a5b4fc; }

/* ════════════════════════════════════════════════════════════════
   INDUSTRIES — Homepage 4-column card grid
   ════════════════════════════════════════════════════════════════ */
.nxm-industries {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
}

/* ════════════════════════════════════════════════════════════════
   FOUNDER — Blockquote section
   ════════════════════════════════════════════════════════════════ */
.nxm-founder {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.nxm-founder__quote {
    font-size: var(--text-lg);
    line-height: var(--leading-loose);
    color: var(--color-text);
    margin: var(--space-6) 0 var(--space-6);
    font-style: italic;
    position: relative;
    padding: 0 var(--space-4);
}

.nxm-founder__quote::before {
    content: '\201C';
    position: absolute;
    top: -16px;
    left: -8px;
    font-size: 4rem;
    color: var(--color-primary);
    opacity: 0.2;
    font-style: normal;
    line-height: 1;
}

.nxm-founder__name {
    font-weight: var(--weight-semibold);
    color: var(--color-charcoal);
}

.nxm-founder__role {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-1);
}

/* ════════════════════════════════════════════════════════════════
   TRUST — 3-column on teal section
   ════════════════════════════════════════════════════════════════ */
.nxm-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
    text-align: center;
}

.nxm-trust__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
    font-size: 24px;
    color: var(--color-white);
}

.nxm-trust__item h3 {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    margin-bottom: var(--space-2);
}

.nxm-trust__item p {
    font-size: var(--text-sm);
    opacity: 0.8;
    max-width: 300px;
    margin: 0 auto;
}

/* ════════════════════════════════════════════════════════════════
   FACTS — 2x3 grid of company data
   ════════════════════════════════════════════════════════════════ */
.nxm-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
}

.nxm-fact {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: box-shadow var(--duration-normal) var(--ease-out);
}

.nxm-fact:hover {
    box-shadow: var(--shadow-md);
}

.nxm-fact__label {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

.nxm-fact__value {
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
    color: var(--color-charcoal);
}

/* ════════════════════════════════════════════════════════════════
   STORY — About page timeline
   ════════════════════════════════════════════════════════════════ */
.nxm-story {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--space-8);
    max-width: 800px;
    margin: 0 auto;
}

.nxm-story__timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: var(--space-2);
}

.nxm-story__year {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
}

.nxm-story__marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-light);
}

.nxm-story__date {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-primary);
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.nxm-story__content h2 {
    font-size: var(--text-h3);
    margin-bottom: var(--space-3);
    margin-top: var(--space-8);
}

.nxm-story__content h2:first-child {
    margin-top: 0;
}

.nxm-story__content p {
    color: var(--color-text-secondary);
    line-height: var(--leading-loose);
    margin-bottom: var(--space-4);
}

.nxm-story__content em {
    color: var(--color-primary);
    font-style: italic;
}

.nxm-story__content strong {
    color: var(--color-charcoal);
    font-weight: var(--weight-semibold);
}

/* ════════════════════════════════════════════════════════════════
   VALUES — About page 2x2 grid
   ════════════════════════════════════════════════════════════════ */
.nxm-values {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
    max-width: 900px;
    margin: 0 auto;
}

.nxm-value {
    padding: var(--space-6);
}

.nxm-value__number {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-3);
    letter-spacing: 0.05em;
}

.nxm-value h3 {
    margin-bottom: var(--space-3);
}

.nxm-value p {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

/* ════════════════════════════════════════════════════════════════
   TEAM — About page leadership
   ════════════════════════════════════════════════════════════════ */
.nxm-team {
    display: flex;
    justify-content: center;
}

.nxm-team__member {
    text-align: center;
    max-width: 400px;
}

.nxm-team__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-5);
    font-size: 36px;
    color: var(--color-primary);
}

.nxm-team__name {
    font-size: var(--text-h4);
    margin-bottom: var(--space-1);
}

.nxm-team__role {
    font-size: var(--text-sm);
    color: var(--color-primary);
    font-weight: var(--weight-medium);
    margin-bottom: var(--space-4);
}

.nxm-team__bio {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

/* ════════════════════════════════════════════════════════════════
   PRODUCT SPOTLIGHT — Products page
   ════════════════════════════════════════════════════════════════ */
.nxm-product-spotlight__header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.nxm-product-spotlight__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-10);
}

.nxm-feature-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all var(--duration-normal) var(--ease-out);
}

.nxm-feature-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

.nxm-feature-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    font-size: 20px;
    color: var(--color-primary);
}

.nxm-feature-card h3 {
    font-size: var(--text-h4);
    margin-bottom: var(--space-3);
}

.nxm-feature-card p {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

.nxm-product-spotlight__formats {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.nxm-product-spotlight__formats-label {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-secondary);
    margin-right: var(--space-2);
}

.nxm-product-spotlight__cta {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* ── Coming soon cards ── */
.nxm-coming-soon {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
    max-width: 800px;
    margin: 0 auto;
}

.nxm-coming-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    border-left: 3px solid var(--color-primary);
}

.nxm-coming-card__status {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.nxm-coming-card h3 {
    font-size: var(--text-h4);
    margin-bottom: var(--space-3);
}

.nxm-coming-card p {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

/* ════════════════════════════════════════════════════════════════
   CONTACT — Contact page form + info grid
   ════════════════════════════════════════════════════════════════ */
.nxm-contact-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: var(--space-12);
    align-items: flex-start;
}

.nxm-contact-form h3 {
    font-size: var(--text-h3);
    margin-bottom: var(--space-2);
}

.nxm-contact-form__subtitle {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
}

.nxm-contact-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.nxm-contact-form__submit {
    margin-top: var(--space-4);
    width: 100%;
}

/* ── Contact info cards ── */
.nxm-contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.nxm-contact-info__card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: box-shadow var(--duration-normal) var(--ease-out);
}

.nxm-contact-info__card:hover {
    box-shadow: var(--shadow-md);
}

.nxm-contact-info__icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: var(--radius-md);
    background: var(--color-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--color-primary);
}

.nxm-contact-info__title {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-charcoal);
    margin-bottom: var(--space-1);
}

a.nxm-contact-info__value {
    color: var(--color-primary);
    text-decoration: none;
    font-size: var(--text-sm);
}

a.nxm-contact-info__value:hover {
    text-decoration: underline;
}

div.nxm-contact-info__value {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* ════════════════════════════════════════════════════════════════
   CTA SECTION — Shared bottom CTA
   ════════════════════════════════════════════════════════════════ */
.cta-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-section__subtitle {
    font-size: var(--text-lg);
    opacity: 0.85;
    margin-bottom: var(--space-8);
}

.cta-section__actions {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.cta-section__proof {
    margin-top: var(--space-6);
    font-size: var(--text-sm);
    opacity: 0.6;
}

/* ════════════════════════════════════════════════════════════════
   DARK MODE — Nimaxiom-specific overrides
   ════════════════════════════════════════════════════════════════ */
[data-theme="dark"] .nxm-hero {
    background-color: #0f172a;
}

[data-theme="dark"] .nxm-hero__pattern {
    background-image:
        linear-gradient(rgba(45, 212, 168, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 212, 168, 0.04) 1px, transparent 1px);
}

[data-theme="dark"] .nxm-page-hero {
    background-color: #0f172a;
}

[data-theme="dark"] .nxm-product-card,
[data-theme="dark"] .nxm-feature-card,
[data-theme="dark"] .nxm-fact,
[data-theme="dark"] .nxm-coming-card,
[data-theme="dark"] .nxm-contact-info__card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .nxm-fact__value,
[data-theme="dark"] .nxm-contact-info__title {
    color: #f1f5f9;
}

[data-theme="dark"] .nxm-story__content strong {
    color: #f1f5f9;
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
    .nxm-principles {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }

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

    .nxm-trust {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
        gap: var(--space-10);
    }

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

    .nxm-product-spotlight__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nxm-contact-grid {
        grid-template-columns: 1fr;
    }

    .nxm-product-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .nxm-hero {
        padding: calc(var(--nav-height) + var(--space-12)) 0 var(--space-16);
    }

    .nxm-hero__actions {
        flex-direction: column;
    }

    .nxm-industries {
        grid-template-columns: 1fr;
    }

    .nxm-facts {
        grid-template-columns: 1fr;
    }

    .nxm-values {
        grid-template-columns: 1fr;
    }

    .nxm-product-spotlight__grid {
        grid-template-columns: 1fr;
    }

    .nxm-coming-soon {
        grid-template-columns: 1fr;
    }

    .nxm-contact-form__row {
        grid-template-columns: 1fr;
    }

    .nxm-story {
        grid-template-columns: 1fr;
    }

    .nxm-story__timeline {
        display: none;
    }

    .nxm-founder__quote {
        font-size: var(--text-base);
    }
}
