/* =========================================================
   XevoNet — Marketing surfaces (landing + product pages)
   ========================================================= */

/* ---------- Hero (full-bleed, black, oversize type) ---------- */
.m-hero {
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14vh var(--gutter) 12vh;
    background: var(--surface-0);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.m-hero-inner { max-width: 1080px; margin: 0 auto; }
.m-hero h1 {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: clamp(48px, 8.4vw, 112px);
    line-height: 1.02;
    letter-spacing: -0.028em;
    margin: 0 0 24px;
    color: var(--ink);
}
.m-hero h1 .accent { color: var(--accent); }
.m-hero h1 .italic { display: inline-block; }
.m-hero .m-sub {
    max-width: 720px;
    margin: 0 auto;
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.45;
    color: var(--ink-dim);
}
.m-hero .m-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    flex-wrap: wrap;
    justify-content: center;
}
.m-hero .m-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--accent);
    margin-bottom: 24px;
}

/* ---------- Section scaffolding ---------- */
.m-section {
    padding: clamp(96px, 14vw, 168px) var(--gutter);
    position: relative;
}
/* Theme-aware section variants (resolve from theme.css):
   .dark/.darker  → forced black + light ink (hero moments)
   .light/.lighter → adapt to theme  */
.m-section.dark    { background: var(--section-dark-bg);    color: var(--section-dark-ink); }
.m-section.darker  { background: var(--section-darker-bg);  color: var(--section-dark-ink); }
.m-section.light   { background: var(--section-light-bg);   color: var(--txt); }
.m-section.lighter { background: var(--section-lighter-bg); color: var(--txt); }

.m-section .m-head {
    max-width: 1040px;
    margin: 0 auto 64px;
    text-align: center;
}
.m-section .m-head h2 {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: clamp(36px, 5.4vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.024em;
    margin: 0 0 20px;
}
.m-section .m-head p {
    max-width: 720px;
    margin: 0 auto;
    font-size: clamp(17px, 1.6vw, 22px);
    line-height: 1.5;
}
.m-section.dark .m-head p,
.m-section.darker .m-head p { color: var(--ink-dim); }
.m-section.light .m-head p,
.m-section.lighter .m-head p { color: var(--txt-dim); }

.m-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: 0;
}

/* ---------- Pinned scroll-scene (Apple-style sticky reveal) ----------
   The .m-scene wrapper MUST NOT have its own padding — the section's
   padding rules ruin sticky math (the .m-sticky needs to live in a
   minimal-padding parent).  We override .m-section padding here. */
.m-scene {
    height: 280vh;
    position: relative;
    padding: 0 !important;
}
.m-scene .m-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0 var(--gutter);
    /* Keep its own GPU layer so scaling children don't cause page repaint */
    will-change: transform;
    transform: translateZ(0);
}
.m-scene .m-stage {
    position: relative;
    width: 100%;
    max-width: 1100px;
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--line);
    box-shadow: 0 60px 120px rgba(0, 0, 0, 0.6);
    transform-origin: center center;
    /* Force GPU layer so JS-driven scale never triggers a paint */
    will-change: transform, opacity;
    /* Initial state matches the JS state at p=0 to avoid first-paint flash */
    transform: translate3d(0, 0, 0) scale(0.94);
    opacity: 0.6;
    backface-visibility: hidden;
}
.m-section.light .m-scene .m-stage,
.m-section.lighter .m-scene .m-stage {
    background: #fff;
    border-color: var(--line-dark);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.10);
}

/* ---------- Product grid (tiles, restrained) ---------- */
.m-tiles {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
    max-width: 1240px;
    margin: 0 auto;
}
.m-tile {
    grid-column: span 6;
    position: relative;
    background: var(--bg-elev-2);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-xl);
    padding: 56px 48px;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: var(--txt);
    overflow: hidden;
    isolation: isolate;
    /* contain layout/paint so tile hover doesn't trigger page-wide reflow */
    contain: layout paint;
    transition: transform var(--dur) var(--ease-out),
                border-color var(--dur) var(--ease-out);
}
.m-section.dark .m-tile,
.m-section.darker .m-tile {
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--ink);
}
.m-tile.span-4 { grid-column: span 4; }
.m-tile.span-8 { grid-column: span 8; }
.m-tile.span-12 { grid-column: span 12; }

.m-tile:hover {
    transform: translateY(-4px);
    border-color: var(--hairline-strong);
}

.m-tile .m-tile-eyebrow {
    position: absolute;
    top: 36px;
    left: 48px;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.m-tile h3 {
    font-family: var(--font-sans);
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.018em;
    font-weight: 600;
    margin: 0 0 12px;
}
.m-tile p {
    font-size: 17px;
    line-height: 1.5;
    margin: 0;
    color: var(--txt-dim);
    max-width: 460px;
}
.m-section.dark .m-tile p,
.m-section.darker .m-tile p { color: var(--ink-dim); }
.m-tile .m-tile-cta {
    margin-top: 24px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.m-tile .m-tile-cta svg {
    transition: transform var(--dur) var(--ease-out);
}
.m-tile:hover .m-tile-cta svg { transform: translateX(4px); }

/* Tile visual area (each product page renders its own viz) */
.m-tile-viz {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

/* ---------- Pricing ---------- */
.m-pricing {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    max-width: 1240px;
    margin: 0 auto;
}
.m-price-card {
    background: var(--bg-elev-2);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-lg);
    padding: 32px 26px;
    display: flex;
    flex-direction: column;
    color: var(--txt);
    min-height: 460px;
}
.m-section.dark .m-price-card,
.m-section.darker .m-price-card {
    background: var(--surface-2);
    border-color: var(--line);
    color: var(--ink);
}
.m-price-card.featured {
    background: var(--bg-elev-3);
    border-color: var(--accent);
}
.m-section.dark .m-price-card.featured,
.m-section.darker .m-price-card.featured {
    background: var(--surface-3);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}
.m-price-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    letter-spacing: -0.005em;
}
.m-price-card .m-price {
    font-size: 40px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    margin: 0 0 24px;
}
.m-price-card .m-price .per {
    font-size: 14px;
    color: var(--txt-soft);
    font-weight: 400;
    margin-left: 4px;
}
.m-section.dark .m-price-card .m-price .per,
.m-section.darker .m-price-card .m-price .per { color: var(--ink-soft); }
.m-price-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    flex: 1;
}
.m-price-card li {
    font-size: 14px;
    line-height: 1.5;
    padding: 6px 0;
    color: var(--txt-dim);
    border-bottom: 1px solid var(--hairline);
}
.m-section.dark .m-price-card li,
.m-section.darker .m-price-card li {
    color: var(--ink-dim);
    border-bottom-color: var(--line);
}
.m-price-card .m-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.m-price-card { position: relative; }

/* ---------- Big-text CTA (assumes a wrapping .m-section already has padding) ---------- */
.m-bigcta {
    text-align: center;
    padding: 0;
}
.m-bigcta h2 {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: clamp(40px, 6.4vw, 88px);
    line-height: 1.04;
    letter-spacing: -0.025em;
    margin: 0 0 32px;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}
.m-bigcta p {
    max-width: 640px;
    margin: 0 auto 32px;
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.5;
}
.m-section.dark .m-bigcta p,
.m-section.darker .m-bigcta p { color: var(--ink-dim); }
.m-section.light .m-bigcta p,
.m-section.lighter .m-bigcta p { color: var(--ink-dark-dim); }

/* ---------- Marquee of trust logos (subdued) ---------- */
.m-trust {
    padding: 32px var(--gutter) 64px;
    text-align: center;
    border-top: 1px solid var(--line);
    background: var(--surface-0);
}
.m-trust .m-trust-label {
    font-size: 12px;
    color: var(--ink-soft);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.m-trust-logos {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
    color: var(--ink-soft);
    font-size: 18px;
    font-family: var(--font-serif);
    font-style: italic;
}

/* ---------- Pinned-scene stage chrome ---------- */
.m-stage-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 36px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid var(--line);
    z-index: 3;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.m-section.light .m-stage-bar,
.m-section.lighter .m-stage-bar {
    background: rgba(255, 255, 255, 0.7);
    border-bottom-color: var(--line-dark);
}
.m-stage-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}
.m-stage-title {
    margin-left: 12px;
    font-size: 11px;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
}
.m-stage-content {
    position: absolute;
    inset: 36px 0 0 0;
}
.m-stage-screen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    will-change: opacity, transform;
}

/* ---------- Scene caption (under stage) ---------- */
.m-scene-caption {
    position: absolute;
    bottom: 6vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(720px, calc(100% - 2 * var(--gutter)));
    height: 4em;
    pointer-events: none;
    text-align: center;
}
.m-scene-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    transform: translate3d(0, var(--scene-y, 0px), 0);
    font-family: var(--font-sans);
    font-size: clamp(20px, 2.4vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.012em;
    font-weight: 500;
    color: var(--ink);
    opacity: 0;
    will-change: transform, opacity;
    backface-visibility: hidden;
}
.m-section.light .m-scene-line,
.m-section.lighter .m-scene-line { color: var(--ink-dark); }

/* ---------- Doc mockup (inside stage) ---------- */
.ms-doc {
    width: min(640px, 70%);
    background: #fff;
    color: var(--ink-dark);
    border-radius: 8px;
    padding: 36px 44px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--line-dark);
    aspect-ratio: 4 / 5;
    text-align: left;
    position: relative;
}
.ms-doc-title {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 22px;
    letter-spacing: -0.012em;
    margin-bottom: 4px;
}
.ms-doc-meta {
    font-size: 11px;
    color: var(--ink-dark-soft);
    margin-bottom: 28px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ms-doc-line {
    height: 8px;
    background: rgba(0, 0, 0, 0.14);
    border-radius: 4px;
    margin-bottom: 12px;
}
.ms-doc-line.w-50 { width: 50%; }
.ms-doc-line.w-60 { width: 60%; }
.ms-doc-line.w-65 { width: 65%; }
.ms-doc-line.w-75 { width: 75%; }
.ms-doc-line.w-80 { width: 80%; }
.ms-doc-line.w-85 { width: 85%; }
.ms-doc-line.w-90 { width: 90%; }
.ms-doc-cursor {
    position: absolute;
    left: 44px;
    bottom: 44px;
    width: 2px;
    height: 14px;
    background: var(--accent);
    animation: blink 1s steps(2) infinite;
}

/* ---------- Sheet mockup ---------- */
.ms-sheet {
    width: min(720px, 80%);
    background: #fff;
    color: var(--ink-dark);
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--line-dark);
    font-family: var(--font-mono);
    font-size: 12px;
}
.ms-sheet-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line-dark);
}
.ms-sheet-row.ms-sheet-head {
    font-weight: 600;
    color: var(--ink-dark-soft);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.06em;
}
.ms-sheet-row.ms-sheet-total {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    border: none;
    border-radius: 4px;
    margin-top: 4px;
}
.ms-sheet-row span:last-child { text-align: right; }

/* ---------- Deck mockup ---------- */
.ms-deck {
    width: min(720px, 78%);
    aspect-ratio: 16 / 10;
    background: #fff;
    color: var(--ink-dark);
    border-radius: 12px;
    padding: 40px 44px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--line-dark);
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.ms-deck-eyebrow {
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 12px;
}
.ms-deck-title {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -0.018em;
    line-height: 1.05;
    margin-bottom: 6px;
}
.ms-deck-sub {
    font-size: 14px;
    color: var(--ink-dark-soft);
    margin-bottom: 16px;
}
.ms-deck-chart {
    flex: 1;
    display: flex;
    align-items: end;
    gap: 10px;
    margin-top: 12px;
}
.ms-deck-chart span {
    flex: 1;
    background: var(--accent);
    border-radius: 4px 4px 0 0;
    opacity: 0.85;
}
.ms-deck-chart span:last-child { background: var(--ink-dark); }
.ms-deck-strip {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.ms-deck-tile {
    width: 56px; height: 32px;
    border-radius: 4px;
    background: var(--surface-light-2);
}
.ms-deck-tile.active { background: var(--accent); }

/* ---------- Tile vizes (small ornamental visuals) ---------- */
.m-tile-viz { opacity: 0.92; }

/* Docs */
.viz-docs { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-end; padding: 24px; }
.viz-docs-paper {
    width: 64%;
    aspect-ratio: 5 / 4;
    background: #fff;
    border-radius: 6px 6px 0 0;
    padding: 28px;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.10);
    transform: rotate(-2deg) translateY(20%);
}
.viz-docs-title { width: 50%; height: 14px; background: var(--ink-dark); border-radius: 3px; margin-bottom: 16px; }
.viz-docs-line  { height: 8px; background: rgba(0, 0, 0, 0.18); border-radius: 3px; margin-bottom: 8px; }
.viz-docs-line.w-60 { width: 60%; }
.viz-docs-line.w-75 { width: 75%; }
.viz-docs-line.w-85 { width: 85%; }
.viz-docs-line.w-90 { width: 90%; }

/* Drive */
.viz-drive { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 12px; padding: 32px; }
.viz-drive-folder {
    width: 64px; aspect-ratio: 5 / 4;
    background: var(--accent);
    border-radius: 8px 8px 4px 4px;
    opacity: 0.16;
}
.viz-drive-folder:nth-child(2) { opacity: 0.36; transform: translateY(-12px); }
.viz-drive-folder:nth-child(3) { opacity: 0.72; transform: translateY(-24px); }

/* Spreads */
.viz-spreads { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 8px; padding: 32px 24px; }
.viz-spreads span { flex: 1; background: var(--accent); opacity: 0.16; border-radius: 4px 4px 0 0; }
.viz-spreads span:nth-child(4) { opacity: 0.32; }
.viz-spreads span:nth-child(6) { opacity: 0.6; }

/* Slides */
.viz-slides { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding: 32px; }
.viz-slides-page {
    width: 60%;
    aspect-ratio: 16 / 10;
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.10);
    transform: rotate(-3deg) translateY(20%);
}
.viz-slides-line { height: 10px; background: rgba(0, 0, 0, 0.20); border-radius: 4px; margin-bottom: 8px; }
.viz-slides-line.w-40 { width: 40%; }
.viz-slides-line.w-70 { width: 70%; }

/* PDF */
.viz-pdf { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-end; padding: 32px; gap: 8px; }
.viz-pdf-page {
    width: 110px; aspect-ratio: 3 / 4;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.10);
    transform: rotate(-4deg) translateY(20%);
}
.viz-pdf-page.b { transform: rotate(2deg) translateY(20%); }

/* CRM */
.viz-crm { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 8px; padding: 28px; }
.viz-crm-col {
    flex: 1; display: flex; flex-direction: column; gap: 4px;
    padding: 8px;
    background: rgba(124, 92, 255, 0.08);
    border-radius: 6px;
    transform: translateY(20%);
}
.viz-crm-col i {
    height: 28px;
    background: rgba(124, 92, 255, 0.20);
    border-radius: 3px;
}

/* ECard */
.viz-ecard { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding: 40px 80px; gap: -24px; }
.viz-ecard-card {
    width: 200px; aspect-ratio: 4 / 5;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.10);
    transform: rotate(-6deg);
    margin-left: -60px;
}
.viz-ecard-card.b { transform: rotate(0); background: var(--accent); margin-left: -60px; }
.viz-ecard-card.c { transform: rotate(6deg); margin-left: -60px; }

/* ---------- Mobile ---------- */
@media (max-width: 980px) {
    .m-tile, .m-tile.span-4, .m-tile.span-8, .m-tile.span-12 {
        grid-column: span 12;
        min-height: 420px;
    }
    .m-pricing { grid-template-columns: 1fr; gap: 8px; }
    .m-price-card { min-height: 0; }
    .m-scene { height: auto; }
    .m-scene .m-sticky { position: relative; height: auto; padding: 64px var(--gutter); }
}
