:root {
    color-scheme: dark;
    --mx-font: "Inter", "Segoe UI", Arial, sans-serif;
    --mx-radius-lg: 34px;
    --mx-radius-md: 22px;
    --mx-radius-sm: 14px;
    --mx-max: 1180px;
    --mx-header-h: 78px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--mx-header-h) + 28px);
}

html[data-theme="dark"] body {
    background: #050505;
}

html[data-theme="light"] body {
    background: #f7f7f3;
}

body {
    margin: 0;
    font-family: var(--mx-font);
}

body,
button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img,
video,
svg {
    max-width: 100%;
}

.site-root {
    min-height: 100vh;

    --bg: #050505;
    --panel: rgba(255, 255, 255, .055);
    --panel-strong: rgba(255, 255, 255, .095);
    --text: #f7f7f7;
    --muted: rgba(247, 247, 247, .68);
    --soft: rgba(247, 247, 247, .10);
    --line: rgba(247, 247, 247, .16);
    --line-strong: rgba(247, 247, 247, .28);
    --accent: #ffffff;
    --accent-2: #9ee7ff;
    --shadow: 0 24px 90px rgba(0, 0, 0, .42);

    color: var(--text);
    background:
        radial-gradient(circle at 20% 10%, rgba(255,255,255,.08), transparent 28rem),
        radial-gradient(circle at 80% 30%, rgba(158,231,255,.08), transparent 26rem),
        linear-gradient(180deg, #020202 0%, var(--bg) 42%, #090909 100%);
    overflow-x: hidden;
}

.site-root.theme-light {
    color-scheme: light;

    --bg: #f7f7f3;
    --panel: rgba(0, 0, 0, .045);
    --panel-strong: rgba(0, 0, 0, .075);
    --text: #070707;
    --muted: rgba(7, 7, 7, .66);
    --soft: rgba(7, 7, 7, .08);
    --line: rgba(7, 7, 7, .14);
    --line-strong: rgba(7, 7, 7, .25);
    --accent: #000000;
    --accent-2: #005f73;
    --shadow: 0 24px 90px rgba(0, 0, 0, .14);

    background:
        radial-gradient(circle at 15% 10%, rgba(0,0,0,.07), transparent 28rem),
        radial-gradient(circle at 85% 30%, rgba(0,95,115,.10), transparent 26rem),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #ededeb 100%);
}

.site-root[dir="rtl"] {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.site-root :where(section, [id]) {
    scroll-margin-top: calc(var(--mx-header-h) + 28px);
}

.container {
    width: min(var(--mx-max), calc(100% - 40px));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 999;
    transform: translateY(-160%);
    background: var(--text);
    color: var(--bg);
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
}

.site-root[dir="rtl"] .skip-link {
    left: auto;
    right: 16px;
}

.skip-link:focus {
    transform: translateY(0);
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    padding: 14px 0;
    pointer-events: none;
}

.header-inner {
    width: min(1320px, calc(100% - 32px));
    margin-inline: auto;
    min-height: 58px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(18px);
    border-radius: 999px;
    box-shadow: var(--shadow);
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

.mobile-nav-backdrop {
    display: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.main-nav a,
.language-switch button,
.icon-button {
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--line);
    text-decoration: none;
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    transition:
        border-color .18s ease,
        background .18s ease,
        transform .18s ease;
}

.main-nav a:hover,
.language-switch button:hover,
.icon-button:hover {
    border-color: var(--line-strong);
    background: var(--panel-strong);
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--soft);
}

.language-switch button {
    padding: 8px 9px;
    font-size: .78rem;
    border: 0;
    background: transparent;
}

.language-switch button.active {
    background: var(--text);
    color: var(--bg);
}

.icon-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
}

.mobile-menu-button {
    display: none;
    border: 1px solid var(--line);
    background: var(--panel);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    border: 1px solid var(--line);
    transition:
        transform .18s ease,
        background .18s ease,
        border-color .18s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

/* ---------------------------------------------------------
   Official merazonastudio logo lockup
   --------------------------------------------------------- */

.mz-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    min-width: 0;
}

.brand .mz-brand-logo {
    color: var(--text);
}

.mz-brand-logo__mark {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 48px;
    height: 42px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 38% 22%, rgba(255,255,255,.28), transparent 28%),
        linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.03) 48%, rgba(255,255,255,.10));
    border: 1px solid color-mix(in srgb, var(--text) 24%, transparent);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        0 14px 34px rgba(0,0,0,.28);
    overflow: hidden;
}

.mz-brand-logo__mark::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.20), transparent 42%);
    opacity: .7;
    pointer-events: none;
}

.mz-brand-logo__svg {
    position: relative;
    z-index: 1;
    width: 82%;
    height: 82%;
    overflow: visible;
    filter: drop-shadow(0 0 8px rgba(255,255,255,.16));
}

.mz-brand-logo__plane {
    fill: rgba(255,255,255,.055);
    stroke: none;
}

.mz-brand-logo__edge {
    fill: none;
    stroke: color-mix(in srgb, var(--text) 86%, #97a1aa 14%);
    stroke-width: 5.3;
    stroke-linejoin: miter;
    stroke-linecap: square;
}

.mz-brand-logo__copy {
    display: grid;
    line-height: 1;
    min-width: 0;
}

.mz-brand-logo__copy strong {
    font-size: .98rem;
    font-weight: 800;
    letter-spacing: -.055em;
    color: var(--text);
    white-space: nowrap;
}

.mz-brand-logo__copy small {
    margin-top: 5px;
    font-size: .55rem;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}

.mz-brand-logo--footer {
    align-items: flex-start;
    gap: 16px;
}

.mz-brand-logo--footer .mz-brand-logo__mark {
    width: 74px;
    height: 62px;
    border-radius: 18px;
}

.mz-brand-logo--footer .mz-brand-logo__copy strong {
    font-size: 1.12rem;
}

.mz-brand-logo--footer .mz-brand-logo__copy small {
    margin-top: 8px;
    font-size: .62rem;
    letter-spacing: .24em;
}

.site-root.theme-light .mz-brand-logo__mark {
    background:
        radial-gradient(circle at 36% 20%, rgba(255,255,255,.68), transparent 30%),
        linear-gradient(135deg, rgba(10,12,13,.14), rgba(255,255,255,.72) 45%, rgba(10,12,13,.10));
    border-color: rgba(12,17,19,.20);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.70),
        0 12px 26px rgba(10,17,20,.10);
}

.site-root.theme-light .mz-brand-logo__edge {
    stroke: color-mix(in srgb, var(--text) 74%, #f8fafc 26%);
}

/* ---------------------------------------------------------
   Temporary Phase 3 validation page
   --------------------------------------------------------- */

.phase-foundation-page {
    min-height: 76vh;
    padding: calc(var(--mx-header-h) + 118px) 0 110px;
}

.phase-foundation-page--compact {
    min-height: 62vh;
}

.foundation-hero-card,
.foundation-test-card {
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 82% 10%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 28rem),
        linear-gradient(145deg, var(--panel-strong), var(--panel));
    border-radius: var(--mx-radius-lg);
    box-shadow: var(--shadow);
}

.foundation-hero-card {
    padding: clamp(28px, 6vw, 72px);
}

.foundation-test-card {
    max-width: 760px;
    padding: clamp(28px, 5vw, 56px);
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--accent-2);
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.foundation-hero-card h1,
.foundation-test-card h1 {
    margin: 0 0 24px;
    max-width: 930px;
    font-size: clamp(3rem, 7vw, 7rem);
    line-height: .94;
    letter-spacing: -.075em;
}

.foundation-test-card h1 {
    font-size: clamp(2.6rem, 5vw, 5.2rem);
}

.foundation-lead {
    max-width: 790px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
    font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.foundation-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 38px;
}

.foundation-status-grid article {
    min-height: 150px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid var(--line);
    border-radius: var(--mx-radius-md);
    background: linear-gradient(145deg, var(--panel), transparent);
}

.foundation-status-grid article > span {
    margin-bottom: auto;
    color: var(--muted);
    font-size: .78rem;
    letter-spacing: .12em;
}

.foundation-status-grid strong {
    display: block;
    margin-top: 26px;
    font-size: 1.05rem;
}

.foundation-status-grid small {
    margin-top: 5px;
    color: var(--muted);
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.site-footer {
    position: relative;
    padding: 100px 0 36px;
    overflow: hidden;
    border-top: 1px solid var(--line);
}

.footer-watermark {
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    font-weight: 1000;
    letter-spacing: -.085em;
    font-size: clamp(3.2rem, 11vw, 12rem);
    color: var(--soft);
    opacity: .72;
    pointer-events: none;
    white-space: nowrap;
}

.footer-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.4fr .7fr .8fr;
    gap: 44px;
}

.footer-grid h3 {
    margin: 0 0 18px;
}

.footer-grid p,
.footer-grid a,
.footer-grid span {
    color: var(--muted);
    line-height: 1.7;
}

.footer-grid p {
    margin-top: 0;
}

.footer-grid a,
.footer-grid span {
    display: block;
    margin-bottom: 10px;
    text-decoration: none;
}

.site-footer .site-footer-logo.mz-brand-logo--footer {
    display: grid;
    grid-template-columns: clamp(62px, 4.5vw, 78px) minmax(0, auto);
    align-items: center;
    gap: 16px;
    width: fit-content;
    max-width: min(100%, 420px);
    margin-bottom: 22px;
}

.site-footer .mz-brand-logo--footer .mz-brand-logo__mark {
    width: clamp(62px, 4.5vw, 78px);
    height: clamp(52px, 3.7vw, 66px);
    border-radius: 18px;
}

.site-footer .mz-brand-logo--footer .mz-brand-logo__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    line-height: 1;
}

.site-footer .mz-brand-logo--footer .mz-brand-logo__copy strong,
.site-footer .mz-brand-logo--footer .mz-brand-logo__copy small {
    display: block;
    width: max-content;
    max-width: 100%;
    margin: 0;
}

.site-footer .mz-brand-logo--footer .mz-brand-logo__copy strong {
    font-size: clamp(1.05rem, 1.1vw, 1.24rem);
    letter-spacing: -.06em;
}

.site-footer .mz-brand-logo--footer .mz-brand-logo__copy small {
    color: var(--accent);
    font-size: clamp(.56rem, .58vw, .66rem);
    letter-spacing: .28em;
    text-transform: uppercase;
}

.site-footer .mz-brand-logo--footer + p {
    max-width: 520px;
    margin-top: 0;
}

.footer-bottom {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 34px;
    margin-top: 40px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .86rem;
}

/* ---------------------------------------------------------
   Blazor error UI
   --------------------------------------------------------- */

#blazor-error-ui {
    background: #fff3cd;
    color: #241f12;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui a {
    color: #241f12;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: .75rem;
    top: .5rem;
}

.site-root[dir="rtl"] #blazor-error-ui .dismiss {
    right: auto;
    left: .75rem;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 1080px) {
    .header-inner {
        grid-template-columns: auto auto 1fr;
    }

    .mobile-menu-button {
        display: block;
        order: 2;
    }

    .mobile-nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: color-mix(in srgb, #000 8%, transparent);
        cursor: default;
        pointer-events: auto;
        touch-action: manipulation;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 10px);
        left: 16px;
        right: 16px;
        z-index: 4;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 26px;
        background: color-mix(in srgb, var(--bg) 94%, transparent);
        backdrop-filter: blur(18px);
        pointer-events: auto;
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        position: relative;
        text-align: center;
        cursor: pointer;
        pointer-events: auto;
        touch-action: manipulation;
        user-select: none;
    }

    .main-nav a:hover,
    .main-nav a:focus-visible {
        color: var(--bg);
        background: var(--text);
        border-color: var(--text);
        transform: translateY(-1px);
        box-shadow: 0 10px 28px color-mix(in srgb, #000 18%, transparent);
    }

    .header-actions {
        justify-self: end;
    }

    .header-cta {
        display: none;
    }

    .foundation-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    :root {
        --mx-header-h: 68px;
    }

    .container,
    .header-inner {
        width: min(100% - 24px, var(--mx-max));
    }

    .site-header {
        padding-top: 10px;
    }

    .header-inner {
        grid-template-columns: auto auto;
        border-radius: 24px;
    }

    .header-actions {
        grid-column: 1 / -1;
        width: 100%;
        justify-content: space-between;
    }

    .language-switch {
        flex: 1;
        justify-content: center;
    }

    .phase-foundation-page {
        padding-top: 176px;
        padding-bottom: 78px;
    }

    .foundation-hero-card h1,
    .foundation-test-card h1 {
        font-size: clamp(2.7rem, 13vw, 4.6rem);
    }

    .foundation-status-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .site-footer .site-footer-logo.mz-brand-logo--footer {
        grid-template-columns: 62px minmax(0, auto);
        align-items: center;
    }

    .site-footer .mz-brand-logo--footer .mz-brand-logo__copy strong {
        font-size: 1.02rem;
    }

    .site-footer .mz-brand-logo--footer .mz-brand-logo__copy small {
        font-size: .52rem;
        letter-spacing: .22em;
    }
}

@media (max-width: 430px) {
    .site-header-logo .mz-brand-logo__copy strong {
        max-width: 116px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .site-header-logo .mz-brand-logo__copy small {
        display: none;
    }

    .foundation-hero-card,
    .foundation-test-card {
        border-radius: 24px;
        padding: 24px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* === PHASE6_HF2_GLOBAL_PAGE_GUTTERS_START === */
/* =========================================================
   PHASE 6 HF2 — Global Page Gutters Tuning
   Goal: preserve the wider full-site layout introduced in HF1,
   but add a slightly more comfortable outer breathing space.
   ========================================================= */

:root {
    --mx-max: 2200px;
    --mx-page-gutter: clamp(18px, 2vw, 32px);
}

/* Shared shell used across the site. */
.site-root .container {
    width: min(var(--mx-max), calc(100% - (var(--mx-page-gutter) * 2)));
    max-width: none;
    margin-inline: auto;
}

/* Keep the floating global header aligned with the same site gutter. */
.site-root .header-inner {
    width: min(var(--mx-max), calc(100% - (var(--mx-page-gutter) * 2)));
    max-width: none;
}

/* Keep older page-specific shells aligned with the global rule. */
.site-root .services-page .container,
.site-root .service-detail-page .container,
.site-root .stand-service-page .container,
.site-root .showroom-service-page .container,
.site-root .solution-service-page .container,
.site-root .solution-campaign-service-page .container,
.site-root .launch-service-page .container,
.site-root .product-launch-service-page .container {
    width: min(var(--mx-max), calc(100% - (var(--mx-page-gutter) * 2)));
    max-width: none;
    margin-inline: auto;
}

/* Wide visual boards still use the available width. */
.site-root .services-explorer-shell,
.site-root .services-system-board,
.site-root .service-active-module {
    max-width: none;
}

/* Tablet/mobile: keep a comfortable but still compact edge. */
@media (max-width: 900px) {
    :root {
        --mx-page-gutter: 16px;
    }
}

@media (max-width: 520px) {
    :root {
        --mx-page-gutter: 14px;
    }
}
/* === PHASE6_HF2_GLOBAL_PAGE_GUTTERS_END === */
/* HOME-S1-R1-HF1 SALES READY PROOF START */
/*
   Single-section refinement.
   Deliberately avoids grid/flex/card/media sizing rules.
*/
section[data-home-proof-r1="true"] {
    position: relative;
    isolation: isolate;
    padding-top: clamp(54px, 6vw, 88px);
    padding-bottom: clamp(54px, 6vw, 88px);
    border-top: 1px solid rgba(127, 127, 127, 0.16);
    border-bottom: 1px solid rgba(127, 127, 127, 0.12);
    background:
        radial-gradient(
            70% 90% at 50% 0%,
            rgba(127, 127, 127, 0.055) 0%,
            rgba(127, 127, 127, 0.018) 46%,
            rgba(127, 127, 127, 0) 76%
        );
    scroll-margin-top: 92px;
}

section[data-home-proof-r1="true"] h1,
section[data-home-proof-r1="true"] h2 {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    line-height: 0.98;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

section[data-home-proof-r1="true"] h1 + p,
section[data-home-proof-r1="true"] h2 + p {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55;
    text-wrap: pretty;
}

@media (max-width: 640px) {
    section[data-home-proof-r1="true"] {
        padding-top: 44px;
        padding-bottom: 44px;
        scroll-margin-top: 76px;
    }

    section[data-home-proof-r1="true"] h1,
    section[data-home-proof-r1="true"] h2 {
        letter-spacing: -0.035em;
        line-height: 1.02;
    }
}
/* HOME-S1-R1-HF1 SALES READY PROOF END */
