/* Figma tokens — file IQTXoSvIH6yAjoppLTlvnV, frame 585:6566 */
:root {
    --night: #383838;
    --text-dimmed: #bfbfbf;
    --background: #ffffff;
    --text-primary: #000000;
    --badge-border: #a6a6a6;
    --page-padding: 40px;
    --menu-padding: 20px;
    --section-gap: 48px;
    --title-size: 128px;
    --story-size: clamp(32px, 5.5vw, 88px);
    --story-block-gap: 120px;
    --footer-text-size: clamp(40px, 6vw, 72px);
    --footer-padding: 48px;
    --footer-top-gap: 40px;
    --reveal-duration: 1.35s;
    --reveal-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --hero-develop-duration: 6.5s;
    --hero-develop-delay: 0.7s;
    --hero-develop-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --nav-fade-delay: calc(var(--hero-develop-delay) + var(--hero-develop-duration) * 0.55);
    --story-develop-duration: calc(var(--hero-develop-duration) / 2);
    --story-develop-delay: calc(var(--hero-develop-delay) / 2);
    --polaroid-text: #f4f4f3;
    --text-develop-duration: var(--hero-develop-duration);
    --footer-develop-duration: calc(var(--text-develop-duration) * 1.5);
    --footer-develop-delay: calc(var(--hero-develop-delay) * 2);
    --footer-reveal-duration: calc(var(--reveal-duration) * 1.5);
    --link-hover-duration: 1.5s;
    --link-hover-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

@font-face {
    font-family: "Instrument Serif";
    src: url("fonts/InstrumentSerif-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    background-color: var(--background);
    color: var(--text-primary);
    overflow-x: hidden;
}

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

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

a {
    color: inherit;
    text-decoration: none;
}

.page {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Figma Desktop frame — nav + hero + title = one viewport */
.top-screen {
    width: 100%;
    height: var(--top-screen-height, 100svh);
    max-height: var(--top-screen-height, 100svh);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    overflow: hidden;
}

/* Section: menu — 579:6534 */
.menu {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--menu-padding);
    padding-bottom: var(--menu-padding);
    flex-shrink: 0;
}

.top-screen:has(.hero-media.is-developing) .menu,
.top-screen:has(.hero-media.is-developing) .title-row .app-store-badge {
    opacity: 0;
    animation: nav-fade-in var(--reveal-duration) var(--reveal-ease) var(--nav-fade-delay) both;
}

html.nav-intro-seen .top-screen:has(.hero-media.is-developing) .menu,
html.nav-intro-seen .top-screen:has(.hero-media.is-developing) .title-row .app-store-badge {
    opacity: 1;
    animation: none;
}

@keyframes nav-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    font-family: "Helvetica Neue", Helvetica, Inter, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-link {
    font-weight: 500;
    transition: color var(--link-hover-duration) var(--link-hover-ease);
}

.nav-link--active {
    color: var(--night);
}

.nav-link--active:hover,
.nav-link--active:focus-visible {
    color: var(--text-dimmed);
}

.nav-link--spent {
    grid-column: 1;
    justify-self: start;
}

.nav-link--spent.nav-link--dimmed {
    grid-column: 1;
    justify-self: start;
}

.nav-spacer {
    grid-column: 2;
}

.nav-link--dimmed {
    color: var(--text-dimmed);
    grid-column: 3;
    justify-self: center;
}

.nav-link--dimmed:hover,
.nav-link--dimmed:focus-visible {
    color: var(--night);
}

.nav-link--about {
    grid-column: 3;
    justify-self: center;
}

.nav-link--dimmed[aria-disabled="true"] {
    cursor: default;
}

.nav-link--dimmed[aria-disabled="true"]:hover,
.nav-link--dimmed[aria-disabled="true"]:focus-visible {
    color: var(--text-dimmed);
}

.nav-link--download {
    grid-column: 4;
    justify-self: end;
}

/* Figma content column — 579:6540 */
.home-frame {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Section: hero — 579:6541 */
.hero {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    opacity: 0.08;
    filter: brightness(0.18) saturate(0.2) sepia(0.12);
}

.hero-develop,
.story-develop {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 1;
    background: linear-gradient(
        180deg,
        rgba(244, 244, 243, 0.96) 0%,
        rgba(244, 244, 243, 0.94) 100%
    );
}

.hero-media.is-developing .hero-image {
    will-change: opacity, filter;
    animation: hero-photo-develop var(--hero-develop-duration) var(--hero-develop-ease) var(--hero-develop-delay) forwards;
}

.hero-media.is-developing .hero-develop {
    animation: hero-wash-clear var(--hero-develop-duration) var(--hero-develop-ease) var(--hero-develop-delay) forwards;
}

.hero-media.is-developed .hero-image {
    opacity: 1;
    filter: none;
}

.hero-media.is-developed .hero-develop {
    opacity: 0;
}

.hero-media--video .hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    opacity: 0.08;
    filter: brightness(0.18) saturate(0.2) sepia(0.12);
}

.hero-media--video.is-developing .hero-video {
    will-change: opacity, filter;
    animation: hero-photo-develop var(--hero-develop-duration) var(--hero-develop-ease) var(--hero-develop-delay) forwards;
}

.hero-media--video.is-developing .hero-develop {
    animation: hero-wash-clear var(--hero-develop-duration) var(--hero-develop-ease) var(--hero-develop-delay) forwards;
}

.hero-media--video.is-developed .hero-video {
    opacity: 1;
    filter: none;
}

.hero-media--video.is-developed .hero-develop {
    opacity: 0;
}

.hero-video--mobile {
    display: none;
}

@media (max-width: 768px) {
    .hero-video--desktop {
        display: none;
    }

    .hero-video--mobile {
        display: block;
    }
}

@keyframes hero-photo-develop {
    from {
        opacity: 0.08;
        filter: brightness(0.18) saturate(0.2) sepia(0.12);
    }

    to {
        opacity: 1;
        filter: brightness(1) saturate(1) sepia(0);
    }
}

@keyframes hero-wash-clear {
    to {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-image,
    .hero-media--video .hero-video {
        opacity: 1;
        filter: none;
    }

    .hero-develop,
    .story-develop {
        display: none;
    }

    .hero-media.is-developing .hero-image,
    .hero-media.is-developing .hero-develop,
    .hero-media--video.is-developing .hero-video,
    .hero-media--video.is-developing .hero-develop,
    .story-media.is-visible .story-image,
    .story-media.is-visible .story-develop {
        animation: none;
    }

    .story-media .story-image {
        opacity: 1;
        filter: none;
    }

    .menu,
    .title-row .app-store-badge {
        opacity: 1;
        animation: none;
    }
}

/* Section: title row — 579:6542 + 579:6544 */
.title-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-shrink: 0;
    padding-top: var(--section-gap);
    padding-bottom: var(--page-padding);
    min-height: calc(var(--title-size) + var(--section-gap) + var(--page-padding));
}

.title {
    font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
    font-size: var(--title-size);
    font-weight: 400;
    line-height: 1;
    color: var(--text-primary);
    word-break: break-word;
}

@media (min-width: 769px) {
    .title {
        /* Serif cap height sits low in the em box at large sizes */
        transform: translateY(-0.06em);
    }
}

/* App Store badge — Component 2, 579:6544 */
.app-store-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    width: 120px;
    height: 40px;
    padding: 0;
    background: #000000;
    border: 1px solid var(--badge-border);
    border-radius: 6px;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.app-store-badge:hover {
    opacity: 0.88;
}

.app-store-badge__icon {
    position: relative;
    width: 20px;
    height: 24px;
    margin-left: 7px;
    flex-shrink: 0;
    overflow: hidden;
}

.app-store-badge__icon img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.app-store-badge__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    margin-left: 8px;
    color: #ffffff;
}

.app-store-badge__line {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
    font-size: 9px;
    font-weight: 500;
    line-height: 9px;
}

.app-store-badge__store {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.47px;
}

@media (max-width: 1200px) {
    :root {
        --title-size: clamp(64px, 8vw, 128px);
        --section-gap: clamp(24px, 3vw, 48px);
    }
}

@media (max-width: 768px) {
    :root {
        --page-padding: 20px;
        --title-size: clamp(48px, 12vw, 96px);
        --section-gap: 24px;
    }

    .menu {
        align-items: center;
        height: auto;
        padding-top: var(--menu-padding);
        padding-bottom: var(--menu-padding);
    }

    .title-row {
        align-items: center;
        gap: 16px;
        min-height: auto;
        padding-top: var(--section-gap);
        padding-bottom: 20px;
    }

    .title {
        transform: translateY(-0.04em);
    }
}

html.compact-top {
    --title-size: clamp(40px, 11vw, 72px);
    --section-gap: 16px;
}

html.compact-top .menu {
    align-items: center;
    height: auto;
    padding-top: var(--menu-padding);
    padding-bottom: var(--menu-padding);
}

html.compact-top .title-row {
    padding-bottom: 16px;
}

@media (max-width: 480px) {
    .nav {
        font-size: 11px;
    }
}

/* Story page — frame 585:6584 */
.story {
    width: 100%;
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
}

/* About page — frame 595:8399 */
.about {
    width: 100%;
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
    padding-bottom: var(--page-padding);
    display: flex;
    flex-direction: column;
    gap: var(--story-block-gap);
}

.about-copy {
    padding-top: var(--story-block-gap);
}

.about-copy .story-copy {
    gap: 0.75em;
}

.about-copy .story-line--lead {
    margin-bottom: 0.75em;
}

.about-copy .story-line--close {
    margin-top: 2.5em;
}

.story-intro {
    padding-top: var(--story-block-gap);
    padding-bottom: var(--story-block-gap);
}

.story-block {
    display: flex;
    flex-direction: column;
    gap: var(--story-block-gap);
    padding-bottom: var(--story-block-gap);
}

.story-block--last {
    padding-bottom: calc(var(--story-block-gap) + var(--page-padding));
}

.story-image {
    width: 100%;
    height: auto;
    max-width: none;
    display: block;
}

.story-media {
    position: relative;
    width: 100%;
}

.story-media .story-image {
    opacity: 0.08;
    filter: brightness(0.18) saturate(0.2) sepia(0.12);
}

.story-media.is-visible .story-image {
    will-change: opacity, filter;
    animation: hero-photo-develop var(--story-develop-duration) var(--hero-develop-ease) var(--story-develop-delay) forwards;
}

.story-media.is-visible .story-develop {
    animation: hero-wash-clear var(--story-develop-duration) var(--hero-develop-ease) var(--story-develop-delay) forwards;
}

.story-media.is-developed .story-image {
    opacity: 1;
    filter: none;
}

.story-media.is-developed .story-develop {
    opacity: 0;
}

.story-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15em;
}

.story-line {
    font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
    font-size: var(--story-size);
    font-weight: 400;
    line-height: 1.15;
    color: var(--polaroid-text);
}

.story-line--lead {
    margin-bottom: 0.35em;
}

.story-line--close {
    margin-top: 0.65em;
}

/* Scroll reveal — polaroid develop on editorial text */
@keyframes text-polaroid-develop {
    from {
        color: var(--polaroid-text);
    }

    to {
        color: var(--text-primary);
    }
}

@keyframes footer-credit-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.story-line.is-visible {
    will-change: color;
    animation: text-polaroid-develop var(--text-develop-duration) var(--hero-develop-ease) var(--reveal-delay, 0ms) forwards;
}

.site-footer__title.is-visible {
    will-change: color;
    animation: text-polaroid-develop var(--footer-develop-duration) var(--hero-develop-ease) var(--footer-develop-delay) forwards;
}

.site-footer__text.is-visible {
    will-change: opacity;
    animation: footer-credit-fade-in var(--footer-develop-duration) var(--hero-develop-ease) var(--footer-develop-delay) forwards;
}

.site-footer__closing .app-store-badge {
    opacity: 0;
    transition: opacity var(--footer-reveal-duration) var(--reveal-ease);
    transition-delay: 0ms;
}

.site-footer__closing .app-store-badge.is-visible {
    opacity: 1;
    transition-delay: var(--footer-develop-delay);
}

@media (prefers-reduced-motion: reduce) {
    .story-line,
    .site-footer__title {
        color: var(--text-primary);
        animation: none;
    }

    .site-footer__text {
        opacity: 1;
        animation: none;
    }

    .site-footer__closing .app-store-badge {
        opacity: 1;
        transition: none;
    }
}

.site-footer {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 0;
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
    display: flex;
    flex-direction: column;
}

.site-footer__credit {
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    min-height: 0;
    margin-top: var(--footer-top-gap);
    padding-right: var(--footer-padding);
    padding-bottom: var(--footer-padding);
    padding-left: var(--footer-padding);
    background: #000000;
}

.site-footer__text {
    font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
    font-size: var(--footer-text-size);
    font-weight: 400;
    line-height: 1.05;
    color: var(--night);
    opacity: 0;
}

.site-footer__closing {
    position: relative;
    width: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: calc(var(--title-size) + var(--section-gap) + var(--menu-padding) * 3);
    padding-top: calc(var(--section-gap) + 12px);
    padding-bottom: calc(var(--menu-padding) + env(safe-area-inset-bottom, 0px));
    background: var(--background);
}

.site-footer__title-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-footer__title {
    word-break: break-word;
    color: var(--polaroid-text);
}

@media (min-width: 769px) {
    .site-footer__title {
        transform: translateY(-0.06em);
    }
}

.site-footer__legal-nav {
    margin-top: auto;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    font-family: "Helvetica Neue", Helvetica, Inter, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-footer__legal-link {
    color: var(--text-dimmed);
    transition: color var(--link-hover-duration) var(--link-hover-ease);
}

.site-footer__legal-link--terms {
    grid-column: 3;
    justify-self: center;
}

.site-footer__legal-link--privacy {
    grid-column: 4;
    justify-self: end;
}

.site-footer__legal-link:hover,
.site-footer__legal-link:focus-visible {
    color: var(--night);
}

@media (max-width: 768px) {
    :root {
        --story-block-gap: 72px;
        --footer-text-size: clamp(32px, 9vw, 48px);
        --footer-top-gap: var(--menu-padding);
    }

    .story-intro {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .site-footer__title {
        transform: translateY(-0.04em);
    }

    .site-footer__credit {
        padding: var(--menu-padding);
        padding-bottom: calc(var(--menu-padding) + env(safe-area-inset-bottom, 0px));
    }

    .site-footer__closing {
        min-height: calc(var(--title-size) + var(--section-gap) + var(--menu-padding) * 2);
        padding-top: var(--section-gap);
        padding-bottom: calc(var(--menu-padding) + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 480px) {
    :root {
        --story-block-gap: 56px;
    }
}
