/* Sesh Score marketing site (KAN-971 round 2).
 * One design system with css/landing.css: tokens, dark by default, light when the
 * browser asks for it. Plain sections, one primary button each, real screenshots. */

.page-marketing {
    --m-bg: #0B0F0E;
    --m-bg-alt: #101614;
    --m-surface: #141A18;
    --m-text: #F3F5F4;
    --m-muted: #A1ABA7;
    --m-border: rgba(255, 255, 255, 0.1);
    --m-accent: #22C55E;
    --m-btn: #15803D;
    --m-btn-hover: #166534;
    --m-nav-bg: rgba(11, 15, 14, 0.92);
    --m-frame: #2A332F;
    --m-mypass-bg: #121212;
    --m-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
    --m-font: 'Inter', 'Helvetica Neue', Helvetica, Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --m-container: 1120px;
    --m-nav-height: 68px;
    color-scheme: dark;
}

@media (prefers-color-scheme: light) {
    .page-marketing {
        --m-bg: #FFFFFF;
        --m-bg-alt: #F6F7F6;
        --m-surface: #F1F3F2;
        --m-text: #111827;
        --m-muted: #4B5563;
        --m-border: rgba(0, 0, 0, 0.1);
        --m-accent: #15803D;
        --m-nav-bg: rgba(255, 255, 255, 0.92);
        --m-frame: #1F2937;
        --m-mypass-bg: #F7F8F9;
        --m-shadow: 0 24px 50px rgba(0, 0, 0, 0.18);
        color-scheme: light;
    }
}

.page-marketing {
    margin: 0;
    font-family: var(--m-font);
    background: var(--m-bg);
    color: var(--m-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
.page-marketing *, .page-marketing *::before, .page-marketing *::after { box-sizing: border-box; margin: 0; padding: 0; }
.page-marketing img { max-width: 100%; display: block; }
.page-marketing ul, .page-marketing ol { list-style: none; }
:where(.page-marketing) a { color: inherit; }
.m-container { width: 100%; max-width: var(--m-container); margin: 0 auto; padding: 0 1.5rem; }

/* ===== Nav ===== */
.m-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: var(--m-nav-height);
    display: flex; align-items: center;
    border-bottom: 1px solid var(--m-border);
}
/* The blur sits on a pseudo-element: backdrop-filter on .m-nav itself would make it the
   containing block of the fixed mobile menu and shrink the overlay to the nav bar. */
.m-nav::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--m-nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.m-nav .m-container { display: flex; align-items: center; justify-content: space-between; }
.m-nav-brand { display: flex; align-items: center; }
.m-nav-brand img { height: 34px; width: auto; max-width: 60vw; }
.m-nav-menu { display: flex; align-items: center; gap: 2rem; }
.m-nav-links { display: flex; align-items: center; gap: 1.75rem; }
.m-nav-links a { color: var(--m-muted); text-decoration: none; font-size: 0.9375rem; font-weight: 500; transition: color 0.2s; }
.m-nav-links a:hover, .m-nav-links a.active { color: var(--m-text); }
/* Store login: same weight and colour as the other links, on both themes. */
.m-nav-links a.m-nav-login { color: var(--m-text); }
.m-nav-actions { display: flex; align-items: center; }
.m-nav-cta {
    display: inline-flex; align-items: center; padding: 0.5rem 1.1rem;
    background: var(--m-btn); color: #fff; text-decoration: none; font-size: 0.875rem; font-weight: 600;
    border-radius: 8px; transition: background 0.2s;
}
.m-nav-cta:hover { background: var(--m-btn-hover); }
.m-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.m-hamburger span { display: block; width: 22px; height: 2px; background: var(--m-text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.m-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.m-hamburger.open span:nth-child(2) { opacity: 0; }
.m-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu. Held to 1023px (KAN-863). KAN-971: the overlay now takes its colours from the
   tokens, so every link, Store login included, follows the theme and stays readable. */
@media (max-width: 1023px) {
    .m-hamburger { display: flex; }
    .m-nav-menu {
        position: fixed; top: var(--m-nav-height); left: 0; right: 0; bottom: 0;
        background: var(--m-bg); flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
        opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
    }
    .m-nav-menu.open { opacity: 1; visibility: visible; }
    .m-nav-links, .m-nav-actions { flex-direction: column; gap: 1.5rem; text-align: center; }
    .m-nav-links a, .m-nav-links a.m-nav-login { color: var(--m-text); font-size: 1.25rem; font-weight: 500; }
    .m-nav-cta { font-size: 1rem; padding: 0.7rem 2rem; }
}

/* ===== Buttons and links ===== */
.m-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.8rem 1.5rem; font: inherit; font-size: 1rem; font-weight: 600; text-decoration: none; border: 0; border-radius: 8px; cursor: pointer; transition: background 0.2s; }
.m-btn-primary { background: var(--m-btn); color: #fff; }
.m-btn-primary:hover { background: var(--m-btn-hover); }
.m-link, .m-link-quiet { color: var(--m-accent); font-weight: 500; text-decoration: none; }
.m-link:hover, .m-link-quiet:hover { text-decoration: underline; }

/* ===== Hero ===== */
.m-hero { min-height: 92vh; display: flex; align-items: center; padding-top: var(--m-nav-height); overflow: hidden; }
.m-hero .m-container { display: flex; align-items: center; gap: 3rem; padding-top: 2rem; padding-bottom: 2rem; }
.m-hero-content { flex: 1; max-width: 560px; position: relative; z-index: 20; }
.m-hero h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; margin-bottom: 1.25rem; }
.m-hero-subtitle { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--m-muted); margin-bottom: 2rem; }
.m-hero-actions { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.m-hero-stores-link { display: inline-block; margin-top: 1.5rem; color: var(--m-accent); font-weight: 500; text-decoration: none; }
.m-hero-stores-link:hover { text-decoration: underline; }
.m-hero-visual { flex: 1; display: flex; justify-content: center; align-items: center; position: relative; z-index: 10; }

/* Real screenshots in a device frame, tilted */
.m-device { position: relative; overflow: hidden; border: 7px solid var(--m-frame); border-radius: 34px; background: var(--m-surface); box-shadow: var(--m-shadow); }
.m-device img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.m-device picture { display: block; width: 100%; height: 100%; }
.m-mockup-group { position: relative; width: 270px; height: 585px; transform: rotateX(50deg) rotateZ(-40deg); transform-style: preserve-3d; margin-top: -60px; }
.m-mockup-back, .m-mockup-front { position: absolute; width: 100%; height: 100%; }
.m-mockup-back { top: -90px; left: 110px; transform: translateZ(-40px); opacity: 0.85; }
.m-mockup-front { top: 30px; left: -30px; background: var(--m-mypass-bg); transform: translateZ(40px); }
.m-mockup-front picture, .m-mockup-front img { height: auto; width: 100%; }
@media (max-width: 900px) {
    .m-hero { min-height: auto; }
    .m-hero .m-container { flex-direction: column; text-align: center; gap: 1rem; }
    .m-hero-content { max-width: 100%; }
    .m-hero-actions { justify-content: center; }
    .m-mockup-group { width: 220px; height: 476px; margin: 1rem 0 2rem; transform: rotateX(50deg) rotateZ(-40deg) scale(0.85); }
}

/* ===== Sections ===== */
.m-section { padding: 5.5rem 0; }
.m-section-alt { background: var(--m-bg-alt); border-top: 1px solid var(--m-border); border-bottom: 1px solid var(--m-border); }
.m-section-header { max-width: 40rem; margin-bottom: 3rem; }
.m-section-label { display: block; margin-bottom: 0.6rem; color: var(--m-accent); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.m-section-header h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
@media (max-width: 767px) { .m-section { padding: 3.5rem 0; } }

/* Features: plain columns, no cards or icons */
.m-features-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.m-feature { border-top: 1px solid var(--m-border); padding-top: 1.25rem; }
.m-feature h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.4rem; }
.m-feature p { color: var(--m-muted); font-size: 0.975rem; }
@media (min-width: 768px) { .m-features-grid { grid-template-columns: repeat(4, 1fr); gap: 2rem; } }

/* ===== Scroll story ===== */
.m-story-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.m-story-steps { display: grid; gap: 3rem; }
.m-story-n { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; margin-right: 0.6rem; border: 1px solid var(--m-accent); border-radius: 50%; color: var(--m-accent); font-size: 0.8125rem; font-weight: 600; vertical-align: 0.1em; }
.m-story-copy h3 { font-size: 1.375rem; font-weight: 600; margin-bottom: 0.4rem; }
.m-story-copy p { color: var(--m-muted); font-size: 1.0625rem; max-width: 30rem; }
.m-story-static { margin-top: 1.25rem; }
.m-story-static.m-device-flat { aspect-ratio: auto; }
.m-story-static img { height: auto; }
.m-device-flat { width: 100%; max-width: 250px; aspect-ratio: 9 / 19.5; margin: 0; }
.m-story-device { display: none; }

@media (min-width: 900px) {
    .m-story.is-live .m-story-grid { grid-template-columns: 1fr 1fr; align-items: start; }
    .m-story.is-live .m-story-device { display: block; position: sticky; top: calc(var(--m-nav-height) + 1rem); height: 78vh; order: 2; }
    .m-story.is-live .m-story-steps { order: 1; gap: 0; }
    .m-story.is-live .m-story-step { min-height: 70vh; display: flex; align-items: center; opacity: 0.35; transition: opacity 0.3s; }
    .m-story.is-live .m-story-step.active { opacity: 1; }
    .m-story.is-live .m-story-static { display: none; }
    .m-story-tilt { height: 100%; display: flex; align-items: center; justify-content: center; perspective: 1400px; }
    .m-story-tilt .m-device { height: min(64vh, 560px); aspect-ratio: 9 / 19.5; transform: rotateX(14deg) rotateZ(-10deg) rotateY(14deg); }
    .m-story-live { position: absolute; inset: 0; }
    /* One size for the live device at every step. A shorter screenshot (My Pass, 9:16) is shown
       top-aligned at full width, and the rest of the screen is its own background colour. */
    .m-story-live picture, .m-story-live img { height: auto; width: 100%; }
    .m-story-live[data-shot="04-my-pass"] { background: var(--m-mypass-bg); }
    .m-story-live picture { animation: mIn 0.35s ease; }
}
@keyframes mIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== For stores ===== */
.m-stores { background: var(--m-bg-alt); border-top: 1px solid var(--m-border); border-bottom: 1px solid var(--m-border); }
.m-beats { display: grid; grid-template-columns: 1fr; gap: 3rem 2rem; }
/* KAN-971 round 6: each beat spans three rows (title / caption / phone) of the shared grid,
   so every phone top sits on one line whatever the caption length, and every frame has the
   same width and aspect ratio. The screenshot is cropped to the frame, top-aligned. */
.m-beat { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
.m-beat h3 { font-size: 1.125rem; font-weight: 600; margin: 0 0 0.4rem; }
.m-beat p { color: var(--m-muted); max-width: 22rem; margin-bottom: 1.25rem; }
.m-beat .m-device-flat { width: 100%; max-width: 230px; aspect-ratio: 9 / 16; align-self: start; }
.m-device-shot img, .m-device-shot picture { height: 100%; width: 100%; object-fit: cover; object-position: top; }
@media (min-width: 640px) { .m-beats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .m-beats { grid-template-columns: repeat(4, 1fr); } }
.m-placeholder { display: flex; align-items: center; justify-content: center; text-align: center; border-style: dashed; color: var(--m-muted); font-size: 0.8125rem; line-height: 1.6; background: var(--m-surface); }
.m-stores-free { margin: 3rem 0 1.5rem; font-size: 1.0625rem; max-width: 40rem; }
.m-stores-actions { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }

/* ===== Stats ===== */
.m-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; }
@media (min-width: 768px) { .m-stats-grid { grid-template-columns: repeat(4, 1fr); } }
.m-stat { border-top: 1px solid var(--m-border); padding-top: 1rem; }
.m-stat-value { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 600; letter-spacing: -0.02em; }
.m-stat-label { color: var(--m-muted); font-size: 0.9375rem; }

/* ===== Download ===== */
.m-download { text-align: left; border-top: 1px solid var(--m-border); }
.m-download h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.m-download p { color: var(--m-muted); margin-bottom: 1.75rem; }
.m-download-badges { display: flex; flex-wrap: wrap; gap: 1rem; }
.m-badge { display: inline-flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1.25rem; border: 1px solid var(--m-border); border-radius: 10px; text-decoration: none; background: var(--m-surface); }
.m-badge svg { width: 24px; height: 24px; }
.m-badge-text { display: flex; flex-direction: column; line-height: 1.2; }
.m-badge-text small { font-size: 0.6875rem; color: var(--m-muted); }
.m-badge-text strong { font-size: 1rem; font-weight: 600; }

/* ===== Footer ===== */
.m-footer { border-top: 1px solid var(--m-border); padding: 2.5rem 0; }
.m-footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.m-footer-brand img { height: 28px; width: auto; }
.m-footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.m-footer-links a { color: var(--m-muted); text-decoration: none; font-size: 0.9375rem; }
.m-footer-links a:hover { color: var(--m-text); }
.m-footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; color: var(--m-muted); font-size: 0.8125rem; }

/* ===== Motion ===== */
.m-fade-in { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.m-fade-in.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .m-fade-in { opacity: 1; transform: none; transition: none; }
    .m-story-live picture { animation: none; }
    .m-story-step, .m-nav-menu { transition: none; }
}
