:root {
    --home-bg: #f8f5ef;
    --home-surface: #fffdf9;
    --home-surface-2: #eee8df;
    --home-ink: #181512;
    --home-muted: #655f57;
    --home-border: rgba(61, 48, 32, 0.16);
    --home-accent: #a65b08;
    --home-accent-strong: #814103;
    --home-accent-soft: #ffead0;
    --home-dark: #111113;
    --home-dark-surface: #1b1b1e;
    --home-dark-text: #f4f0e9;
    --home-radius: 28px;
    color-scheme: light dark;
}

html {
    scroll-padding-top: 84px;
}

body.video-home {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    background: var(--home-bg);
    color: var(--home-ink);
    font-family: 'Be Vietnam Pro', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.video-home *,
.video-home *::before,
.video-home *::after {
    box-sizing: border-box;
}

.video-home a {
    color: inherit;
    text-decoration: none;
}

.video-home img {
    display: block;
    max-width: 100%;
}

.home-container {
    width: min(100% - 40px, 1240px);
    margin-inline: auto;
}

.home-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 0;
    border-bottom: 1px solid var(--home-border);
    background: rgba(248, 245, 239, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.home-nav {
    display: grid;
    min-height: 72px;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 28px;
}

.home-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    font-family: 'Space Grotesk', 'Be Vietnam Pro', system-ui, sans-serif;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.home-brand img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    box-shadow: 0 9px 24px rgba(175, 80, 5, 0.16);
}

.home-nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    color: var(--home-muted);
    font-size: 14px;
    font-weight: 650;
}

.home-nav-links a,
.header-status {
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.home-nav-links a:hover {
    color: var(--home-ink);
}

.header-status {
    justify-self: end;
    padding: 10px 15px;
    border: 1px solid var(--home-border);
    border-radius: 12px;
    background: var(--home-surface);
    font-size: 13px;
    font-weight: 750;
    white-space: nowrap;
}

.header-status:hover {
    border-color: rgba(200, 108, 18, 0.42);
    background: var(--home-accent-soft);
}

.header-status:active,
.button:active,
.youtube-layout > a:active {
    transform: translateY(1px);
}

.video-home a:focus-visible {
    outline: 3px solid rgba(200, 108, 18, 0.42);
    outline-offset: 3px;
}

.home-hero {
    position: relative;
    isolation: isolate;
    min-height: calc(100dvh - 72px);
    overflow: hidden;
    border-bottom: 1px solid var(--home-border);
}

.home-hero::before {
    position: absolute;
    z-index: -1;
    width: 620px;
    height: 620px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 163, 61, 0.22), rgba(232, 163, 61, 0) 70%);
    content: '';
    inset: -200px -120px auto auto;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    min-height: calc(100dvh - 72px);
    grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
    align-items: center;
    gap: clamp(46px, 7vw, 104px);
    padding-block: 48px;
}

.hero-copy {
    display: grid;
    gap: 26px;
    max-width: 620px;
    animation: hero-enter 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-copy h1,
.section-heading h2,
.story-copy h2,
.private-copy h2,
.youtube-layout h2,
.android-layout h2 {
    margin: 0;
    font-family: 'Space Grotesk', 'Be Vietnam Pro', system-ui, sans-serif;
    letter-spacing: -0.055em;
}

.hero-copy h1 {
    max-width: 10ch;
    font-size: clamp(52px, 6.4vw, 84px);
    line-height: 0.95;
}

.hero-copy > p {
    max-width: 570px;
    margin: 0;
    color: var(--home-muted);
    font-size: clamp(17px, 1.7vw, 20px);
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 0 21px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button-primary {
    background: var(--home-accent);
    color: #fff9ef;
}

.button-primary:hover {
    background: var(--home-accent-strong);
}

.button-secondary {
    border-color: var(--home-border);
    background: var(--home-surface);
    color: var(--home-ink);
}

.button-secondary:hover {
    border-color: rgba(200, 108, 18, 0.42);
    background: var(--home-accent-soft);
}

.hero-visual {
    position: relative;
    min-height: min(720px, calc(100dvh - 120px));
    animation: visual-enter 820ms 80ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.phone-frame {
    position: absolute;
    overflow: hidden;
    border: 8px solid #2b2b2e;
    border-radius: 44px;
    background: #111;
    box-shadow: 0 36px 76px rgba(48, 30, 10, 0.24);
}

.phone-frame img,
.story-phone img,
.workflow-panel img,
.library-main img,
.player-main img,
.private-phone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phone-front {
    z-index: 2;
    width: min(335px, 52%);
    aspect-ratio: 9 / 19.45;
    right: 8%;
    bottom: -16%;
    transform: rotate(3deg);
}

.phone-back {
    z-index: 1;
    width: min(285px, 44%);
    aspect-ratio: 9 / 19.45;
    top: 8%;
    left: 5%;
    opacity: 0.82;
    transform: rotate(-6deg);
}

.proof-strip {
    border-bottom: 1px solid var(--home-border);
    background: var(--home-surface);
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.proof-grid p {
    display: grid;
    gap: 4px;
    min-height: 116px;
    align-content: center;
    margin: 0;
    padding: 20px 28px;
    border-right: 1px solid var(--home-border);
}

.proof-grid p:first-child {
    border-left: 1px solid var(--home-border);
}

.proof-grid strong {
    color: var(--home-ink);
    font-size: 15px;
}

.proof-grid span {
    color: var(--home-muted);
    font-size: 13px;
    line-height: 1.5;
}

.story-section,
.library-section,
.private-section {
    padding-block: clamp(88px, 11vw, 152px);
}

.story-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(390px, 0.8fr);
    align-items: center;
    gap: clamp(56px, 10vw, 150px);
}

.story-copy,
.private-copy {
    display: grid;
    gap: 22px;
}

.section-kicker {
    margin: 0;
    color: var(--home-accent-strong);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.story-copy h2,
.private-copy h2 {
    max-width: 12ch;
    font-size: clamp(42px, 5.6vw, 70px);
    line-height: 1;
}

.story-copy > p:not(.section-kicker),
.private-copy > p:not(.section-kicker),
.section-heading p,
.youtube-layout p,
.android-layout p {
    max-width: 620px;
    margin: 0;
    color: var(--home-muted);
    font-size: 17px;
    line-height: 1.7;
}

.policy-note {
    display: grid;
    gap: 6px;
    max-width: 540px;
    padding: 20px 0 0;
    border-top: 1px solid var(--home-border);
}

.policy-note strong {
    font-size: 15px;
}

.policy-note span {
    color: var(--home-muted);
    font-size: 14px;
    line-height: 1.6;
}

.story-phone,
.private-phone {
    width: min(100%, 420px);
    aspect-ratio: 9 / 19.45;
    margin: 0;
    overflow: hidden;
    border: 8px solid #2b2b2e;
    border-radius: 44px;
    background: #111;
    box-shadow: 0 32px 80px rgba(61, 39, 13, 0.2);
    transform: rotate(2deg);
}

.workflow-section {
    padding-block: clamp(88px, 10vw, 138px);
    background: var(--home-surface-2);
    color: var(--home-ink);
}

.section-heading {
    display: grid;
    gap: 18px;
    margin-bottom: 56px;
}

.section-heading h2 {
    max-width: 13ch;
    font-size: clamp(43px, 6vw, 74px);
    line-height: 0.98;
}

.workflow-section .section-heading p,
.workflow-panel p {
    color: var(--home-muted);
}

.workflow-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.82fr);
    gap: 26px;
    align-items: start;
}

.workflow-panel {
    position: relative;
    display: grid;
    overflow: hidden;
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    background: var(--home-surface);
}

.panel-copy {
    display: grid;
    gap: 10px;
    padding: clamp(26px, 4vw, 44px);
}

.panel-copy h3,
.player-copy h3 {
    margin: 0;
    font-family: 'Space Grotesk', 'Be Vietnam Pro', system-ui, sans-serif;
    font-size: clamp(25px, 3vw, 36px);
    letter-spacing: -0.035em;
}

.panel-copy p,
.player-copy p {
    max-width: 46ch;
    margin: 0;
    color: var(--home-muted);
    font-size: 15px;
    line-height: 1.65;
}

.workflow-panel img {
    justify-self: center;
    width: min(82%, 430px);
    height: auto;
    border: 7px solid #303034;
    border-bottom: 0;
    border-radius: 38px 38px 0 0;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.26);
}

.progress-panel {
    margin-top: 92px;
}

.library-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.62fr) minmax(260px, 0.56fr);
    grid-template-rows: auto 1fr auto;
    gap: 28px;
    align-items: start;
}

.library-heading {
    grid-column: 1 / -1;
    margin-bottom: 30px;
}

.library-main,
.player-main {
    margin: 0;
    overflow: hidden;
    border: 7px solid #2b2b2e;
    background: #111;
    box-shadow: 0 26px 70px rgba(57, 37, 12, 0.18);
}

.library-main {
    grid-row: 2 / 4;
    width: min(100%, 470px);
    aspect-ratio: 9 / 19.45;
    border-radius: 42px;
}

.player-main {
    grid-column: 2 / 4;
    width: 100%;
    height: 560px;
    border-radius: var(--home-radius);
}

.player-main img {
    object-position: center 35%;
}

.player-copy {
    display: grid;
    grid-column: 2 / 4;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    padding-top: 8px;
}

.private-section {
    border-top: 1px solid var(--home-border);
    background:
        radial-gradient(circle at 16% 72%, rgba(232, 163, 61, 0.18), transparent 30rem),
        var(--home-surface-2);
}

.private-grid {
    display: grid;
    grid-template-columns: minmax(330px, 0.7fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(54px, 10vw, 148px);
}

.private-phone {
    justify-self: end;
    transform: rotate(-2deg);
}

.private-detail {
    max-width: 550px;
    padding-top: 20px;
    border-top: 1px solid var(--home-border);
    font-size: 14px !important;
}

.youtube-section {
    padding-block: 34px;
    background: #9b4d05;
    color: #fff9ef;
}

.youtube-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;
}

.youtube-layout > div {
    display: grid;
    gap: 8px;
}

.youtube-layout h2 {
    font-size: clamp(26px, 3.2vw, 40px);
    letter-spacing: -0.035em;
}

.youtube-layout p {
    color: #fff1df;
    font-size: 15px;
}

.youtube-layout > a {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 13px;
    background: rgba(96, 42, 1, 0.18);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    transition: transform 160ms ease, background-color 160ms ease;
}

.youtube-layout > a:hover {
    background: rgba(96, 42, 1, 0.32);
}

.android-section {
    padding-block: clamp(72px, 9vw, 112px);
    background: var(--home-surface-2);
    color: var(--home-ink);
}

.android-layout {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 30px;
}

.android-icon {
    width: 112px;
    height: 112px;
    border-radius: 28px;
    box-shadow: 0 24px 54px rgba(232, 124, 25, 0.24);
}

.android-layout > div {
    display: grid;
    gap: 9px;
}

.android-layout h2 {
    font-size: clamp(37px, 5vw, 62px);
    line-height: 1;
}

.android-layout p {
    max-width: 600px;
    color: var(--home-muted);
    font-size: 15px;
}

.release-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 17px;
    border: 1px solid var(--home-border);
    border-radius: 14px;
    background: var(--home-surface);
    color: var(--home-accent-strong);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 180ms ease, transform 180ms ease;
}

.release-status:hover {
    border-color: var(--home-accent);
    transform: translateY(-2px);
}

.home-footer {
    padding-top: 60px;
    border-top: 1px solid var(--home-border);
    background: var(--home-surface);
    color: var(--home-muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(150px, 0.5fr) minmax(240px, 0.8fr);
    gap: 50px;
    padding-bottom: 54px;
}

.footer-brand,
.footer-grid > div:not(.footer-brand) {
    display: grid;
    align-content: start;
    gap: 12px;
}

.footer-brand .home-brand {
    color: var(--home-ink);
}

.footer-brand .home-brand img {
    width: 40px;
    height: 40px;
}

.footer-brand p,
.footer-bottom p {
    margin: 0;
    color: var(--home-muted);
    font-size: 13px;
}

.footer-grid strong {
    color: var(--home-ink);
    font-size: 13px;
}

.footer-grid > div:not(.footer-brand) a {
    color: var(--home-muted);
    font-size: 13px;
}

.footer-grid a:hover {
    color: #efb65f !important;
}

.footer-bottom {
    padding-block: 20px;
    border-top: 1px solid var(--home-border);
}

@keyframes hero-enter {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes visual-enter {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@supports (animation-timeline: view()) {
    .reveal-item {
        animation: reveal-item 1ms linear both;
        animation-range: entry 8% cover 28%;
        animation-timeline: view();
    }

    @keyframes reveal-item {
        from { opacity: 0; transform: translateY(24px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

@media (max-width: 980px) {
    .home-nav {
        grid-template-columns: 1fr auto;
    }

    .home-nav-links {
        display: none;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 0.9fr) minmax(350px, 1.1fr);
        gap: 30px;
    }

    .proof-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .proof-grid p:nth-child(3) {
        border-left: 1px solid var(--home-border);
    }

    .proof-grid p:nth-child(-n + 2) {
        border-bottom: 1px solid var(--home-border);
    }

    .library-layout {
        grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1fr);
    }

    .library-main {
        grid-row: 2 / 4;
    }

    .player-main,
    .player-copy {
        grid-column: 2;
    }

    .player-copy {
        grid-template-columns: 1fr;
    }

    .android-layout {
        grid-template-columns: auto 1fr;
    }

    .release-status {
        grid-column: 2;
        justify-self: start;
    }
}

@media (max-width: 760px) {
    .home-container {
        width: min(100% - 32px, 1240px);
    }

    .home-nav {
        min-height: 68px;
    }

    .home-brand {
        gap: 9px;
        font-size: 17px;
    }

    .home-brand img {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .header-status {
        padding: 9px 12px;
        font-size: 12px;
    }

    .home-hero,
    .hero-grid {
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-block: 50px 0;
    }

    .hero-copy {
        gap: 20px;
    }

    .hero-copy h1 {
        max-width: 10ch;
        font-size: clamp(48px, 14vw, 66px);
    }

    .hero-copy > p {
        max-width: 34ch;
        font-size: 16px;
    }

    .hero-visual {
        min-height: 360px;
    }

    .phone-front {
        right: -3%;
        bottom: -18%;
        width: 52%;
    }

    .phone-back {
        top: 9%;
        left: -2%;
        width: 42%;
    }

    .proof-grid {
        grid-template-columns: 1fr;
    }

    .proof-grid p,
    .proof-grid p:first-child,
    .proof-grid p:nth-child(3) {
        min-height: 88px;
        padding-inline: 16px;
        border-right: 1px solid var(--home-border);
        border-bottom: 1px solid var(--home-border);
        border-left: 1px solid var(--home-border);
    }

    .proof-grid p:last-child {
        border-bottom: 0;
    }

    .story-grid,
    .workflow-grid,
    .private-grid {
        grid-template-columns: 1fr;
    }

    .story-grid,
    .private-grid {
        gap: 50px;
    }

    .story-copy h2,
    .private-copy h2,
    .section-heading h2 {
        font-size: clamp(40px, 12vw, 56px);
    }

    .story-phone,
    .private-phone {
        width: min(88%, 390px);
        justify-self: center;
    }

    .progress-panel {
        margin-top: 0;
    }

    .workflow-panel img {
        width: min(88%, 390px);
    }

    .library-layout {
        grid-template-columns: 1fr;
    }

    .library-heading,
    .library-main,
    .player-main,
    .player-copy {
        grid-column: 1;
        grid-row: auto;
    }

    .library-main {
        width: min(88%, 400px);
        justify-self: center;
    }

    .player-main {
        height: min(620px, 145vw);
    }

    .player-copy {
        grid-template-columns: 1fr;
        padding-top: 0;
    }

    .private-phone {
        order: 2;
    }

    .private-copy {
        order: 1;
    }

    .youtube-layout,
    .android-layout {
        grid-template-columns: 1fr;
    }

    .youtube-layout > a,
    .release-status {
        justify-self: start;
    }

    .android-icon {
        width: 88px;
        height: 88px;
        border-radius: 23px;
    }

    .release-status {
        grid-column: 1;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }
}

@media (max-width: 390px) {
    .home-brand span {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .button {
        width: 100%;
    }

    .hero-visual {
        min-height: 350px;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --home-bg: #0f0f11;
        --home-surface: #18181b;
        --home-surface-2: #151517;
        --home-ink: #f4f0e9;
        --home-muted: #bcb5ac;
        --home-border: rgba(239, 192, 124, 0.16);
        --home-accent: #dc8b28;
        --home-accent-strong: #f0b056;
        --home-accent-soft: rgba(220, 139, 40, 0.16);
    }

    .home-header {
        background: rgba(15, 15, 17, 0.9);
    }

    .button-primary {
        color: #18120c;
    }

    .button-primary:hover {
        background: #f0ad4f;
    }

    .private-section {
        background:
            radial-gradient(circle at 16% 72%, rgba(220, 139, 40, 0.16), transparent 30rem),
            var(--home-surface-2);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-copy,
    .hero-visual,
    .reveal-item {
        animation: none !important;
    }

    .home-nav-links a,
    .header-status,
    .button,
    .youtube-layout > a {
        transition: none;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .home-header {
        background: var(--home-bg);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}
