/* Viewport-sized storytelling sections */
html {
    scroll-snap-type: y mandatory;
    scroll-padding-top: 0;
}

body {
    overscroll-behavior-y: none;
}

main > section {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    position: relative;
}

@media (min-width: 901px) and (min-height: 620px) and (pointer: fine) {
    main > section,
    .site-footer {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }

    .section-heading { margin-bottom: clamp(22px, 4vh, 42px); }
    .direction-card { min-height: clamp(350px, 47vh, 470px); }
    .direction-symbol,
    .play-dots { height: clamp(130px, 20vh, 185px); }
    .direction-symbol { width: clamp(150px, 20vh, 185px); }
}

main > section > .container {
    position: relative;
    z-index: 2;
}

main > .hero,
main > .subhero {
    height: 100vh;
    height: 100svh;
    min-height: 0;
    padding-top: clamp(92px, 12vh, 150px);
    padding-bottom: clamp(34px, 7vh, 90px);
}

main > .statement,
main > .section,
main > .manifesto,
main > .closing {
    padding-top: clamp(68px, 9vh, 120px);
    padding-bottom: clamp(48px, 8vh, 120px);
}

.site-footer {
    min-height: 100vh;
    min-height: 100svh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.screen-pagination {
    position: fixed;
    z-index: 90;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 10px 7px;
    border-radius: 99px;
    background: rgba(7, 16, 32, .22);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity .3s;
}

.screen-pagination.ready { opacity: 1; }

.screen-pagination button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(126, 142, 164, .55);
    cursor: pointer;
    transition: transform .25s, background .25s, box-shadow .25s;
}

.screen-pagination button:hover,
.screen-pagination button:focus-visible {
    background: #f2c96d;
    outline: none;
}

.screen-pagination button.active {
    background: #35c8f0;
    transform: scale(1.65);
    box-shadow: 0 0 10px rgba(53, 200, 240, .65);
}

.screen-hint {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: rgba(164, 180, 203, .72);
    font-size: 8px;
    letter-spacing: 2px;
    pointer-events: none;
}

.screen-hint::after {
    content: "";
    width: 1px;
    height: 22px;
    background: linear-gradient(#35c8f0, transparent);
    animation: screen-hint 1.8s ease-in-out infinite;
}

@keyframes screen-hint {
    0%, 100% { transform: scaleY(.35); transform-origin: top; opacity: .4; }
    50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
}

/* Short desktop screens: keep every story within one viewport. */
@media (min-width: 901px) and (max-height: 820px) {
    .header-inner { height: 68px; }
    .hero h1, .subhero h1 { font-size: clamp(54px, 7vh, 76px); margin-bottom: 14px; }
    .hero-lead { font-size: 19px; margin-bottom: 7px; }
    .hero-text, .subhero p:not(.eyebrow) { font-size: 14px; line-height: 1.6; }
    .button-row { margin-top: 22px; }
    .trust-row { margin-top: 22px; }
    .hero-visual { height: min(62vh, 500px); transform: scale(.86); transform-origin: center; }
    .section-heading { margin-bottom: 30px; }
    .statement h2, .section-heading h2, .human h2, .story h2 { font-size: clamp(34px, 5.5vh, 52px); }
    .capability-card { min-height: 190px; padding: 24px; }
    .cap-icon { height: 38px; }
    .capability-card h3 { margin: 9px 0 6px; }
    .direction-card { min-height: min(43vh, 350px); padding: 25px; }
    .direction-symbol, .play-dots { height: 105px; }
    .direction-symbol { width: 105px; }
    .direction-symbol b { font-size: 24px; }
    .direction-card h3 { font-size: 30px; }
    .human-visual { min-height: 62vh; transform: scale(.82); }
    .principles { margin: 20px 0; }
    .principles li { padding: 9px 0; }
    .game-board { height: min(64vh, 470px); }
    .play-value-grid article { min-height: 230px; padding: 24px; }
    .play-mini-icon { margin: 18px 0; }
    .lab-heading { margin-bottom: 24px; }
    .lab-heading h2 { font-size: 42px; }
    .lab-art { height: 160px; }
    .foundation-lead { min-height: 68vh; }
    .foundation-grid article { padding: 28px; }
    .culture-value-list article { padding: 16px 0; }
    .closing h2 { font-size: clamp(46px, 8vh, 72px); }
}

@media (min-width: 901px) and (max-height: 700px) {
    main > .statement,
    main > .section,
    main > .manifesto,
    main > .closing { padding-top: 52px; padding-bottom: 38px; }
    .section-heading { margin-bottom: 18px; }
    .statement h2, .section-heading h2, .human h2, .story h2 { font-size: 34px; }
    .section-heading > p { font-size: 13px; line-height: 1.5; }
    .capability-card { min-height: 150px; padding: 16px 20px; }
    .cap-icon { height: 24px; font-size: 22px; }
    .capability-card h3 { margin: 4px 0; font-size: 17px; }
    .capability-card p { font-size: 12px; line-height: 1.45; }
    .direction-card { min-height: min(39vh, 285px); }
    .human-visual { min-height: 58vh; }
    .human-copy > p:not(.eyebrow) { margin: 14px 0; font-size: 13px; }
    .principles { margin: 12px 0; }
    .principles li { padding: 5px 0; }
    .play-value-grid article { min-height: 180px; padding: 18px; }
    .play-mini-icon { margin: 8px 0; font-size: 28px; }
    .play-value-grid h3 { font-size: 20px; }
    .lab-heading { margin-bottom: 15px; }
    .lab-heading h2 { font-size: 34px; margin: 6px 0; }
    .lab-art { height: 125px; margin-bottom: 14px; }
    .lab-card { padding: 16px; }
    .play-ethics h2 { font-size: 36px; }
    .ethics-list article { padding: 12px 0; }
    .foundation-lead { min-height: 60vh; }
    .foundation-grid article { padding: 20px 24px; }
    .foundation-item h3 { margin: 8px 0 4px; font-size: 22px; }
    .culture-value-list article { padding: 9px 0; }
    .culture-value-list b { font-size: 38px; }
    .culture-value-list h3 { font-size: 19px; }
    .value-list article { padding: 10px 0; }
    .value-list h3 { font-size: 20px; }
    .value-list p { font-size: 12px; line-height: 1.45; }
    .principle-matrix article { padding: 22px; }
    .feature-panel { min-height: 180px; padding: 22px; }
    .feature-panel h3 { margin: 20px 0 8px; }
    .workflow h2 { margin: 12px 0 25px; }
    .closing h2 { font-size: 46px; margin-bottom: 14px; }
}

@media (min-width: 901px) and (max-height: 619px) {
    html { scroll-snap-type: y proximity; }
    main > section,
    .site-footer {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: visible;
    }
    .screen-pagination { display: none; }
}

/* Touch and narrow screens use native snapping with content-safe heights. */
@media (max-width: 900px), (pointer: coarse) {
    html { scroll-snap-type: y proximity; }
    main > section {
        height: auto;
        min-height: 100svh;
        overflow: hidden;
    }
    main > .hero,
    main > .subhero {
        height: auto;
        min-height: 100svh;
    }
    .screen-pagination { display: none; }
    .screen-hint { bottom: 9px; }
}

@media (max-width: 580px) {
    main > .statement,
    main > .section,
    main > .manifesto,
    main > .closing { padding-top: 72px; padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .screen-hint::after { animation: none; }
}

html[data-fullpage-scroll="false"] {
    scroll-snap-type: none;
}

html[data-fullpage-scroll="false"] main > section,
html[data-fullpage-scroll="false"] .site-footer {
    height: auto;
    min-height: 100svh;
    overflow: visible;
    scroll-snap-align: none;
}

html[data-fullpage-scroll="false"] .screen-pagination,
html[data-fullpage-scroll="false"] .screen-hint {
    display: none;
}
