/* ------------------------------------------------------------------
   sarria.ca — hand-written stylesheet.
   Design language: quiet, Apple-like. Black canvas, one accent,
   system type, generous whitespace, motion only on scroll.
   ------------------------------------------------------------------ */

:root {
    --bg: #000;
    --bg-2: #161617;
    --bg-3: #1d1d1f;
    --fg: #f5f5f7;
    --fg-2: #86868b;
    --fg-3: #6e6e73;
    --rule: rgba(255, 255, 255, 0.12);
    --link: #2997ff;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --danger: #ff453a;
    --nav-h: 48px;
    --radius: 18px;
    --radius-lg: 28px;
    --content: 1024px;
    --gutter: 22px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --font:
        -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
        'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
    color-scheme: dark;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.47;
    letter-spacing: -0.022em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

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

img {
    height: auto;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button {
    font: inherit;
    color: inherit;
    letter-spacing: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 3px;
    border-radius: 6px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- layout ---------- */

.wrap {
    width: 100%;
    max-width: var(--content);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.wrap--wide {
    max-width: 1440px;
}

main {
    padding-top: var(--nav-h);
}

.section {
    padding-block: clamp(88px, 12vw, 150px);
}

.section--tint {
    background: var(--bg-2);
}

/* ---------- type ---------- */

.display {
    font-size: clamp(44px, 8vw, 96px);
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.headline {
    font-size: clamp(32px, 5.2vw, 56px);
    line-height: 1.07;
    font-weight: 600;
    letter-spacing: -0.005em;
}

.title {
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.125;
    font-weight: 600;
    letter-spacing: 0.004em;
}

.eyebrow {
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.19;
    font-weight: 600;
    letter-spacing: 0.011em;
    color: var(--fg-2);
}

.lede {
    font-size: clamp(19px, 2.4vw, 28px);
    line-height: 1.14;
    font-weight: 600;
    letter-spacing: 0.007em;
    color: var(--fg-2);
}

.body {
    font-size: clamp(17px, 1.6vw, 19px);
    line-height: 1.42;
    color: var(--fg-2);
}

.muted {
    color: var(--fg-2);
}

.gradient-text {
    background: linear-gradient(90deg, #6ab5ff 0%, #c58fff 50%, #ff8a8a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.chev::after {
    content: '\00a0\203A';
    display: inline-block;
    transition: transform 0.25s var(--ease);
}

.chev:hover {
    text-decoration: none;
}

.chev:hover::after {
    transform: translateX(3px);
}

.link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 32px;
    font-size: clamp(17px, 1.8vw, 21px);
    font-weight: 400;
}

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 980px;
    font-size: 17px;
    font-weight: 500;
    line-height: 1;
    background: var(--accent);
    color: #fff;
    transition:
        background 0.2s var(--ease),
        transform 0.2s var(--ease),
        opacity 0.2s var(--ease);
}

.btn:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.1);
    color: var(--fg);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.16);
}

.btn--sm {
    min-height: 36px;
    padding: 0 16px;
    font-size: 14px;
}

.btn .spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    display: none;
}

.btn.is-loading .spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- nav ---------- */

.nav {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav__logo {
    display: inline-flex;
    align-items: center;
    color: var(--fg);
    opacity: 0.9;
    transition: opacity 0.2s;
}

.nav__logo:hover {
    opacity: 1;
}

.nav__logo svg {
    width: 22px;
    height: 22px;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 36px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav__links a {
    font-size: 12px;
    letter-spacing: -0.01em;
    color: rgba(245, 245, 247, 0.8);
    transition: color 0.2s;
}

.nav__links a:hover,
.nav__links a[aria-current='page'] {
    color: #fff;
    text-decoration: none;
}

.nav__links .nav__icon {
    display: inline-flex;
}

.nav__links .nav__icon svg {
    width: 15px;
    height: 15px;
}

.nav__burger {
    display: none;
    width: 44px;
    height: 44px;
    margin-right: -12px;
    align-items: center;
    justify-content: center;
    color: var(--fg);
}

.nav__burger span {
    position: relative;
    display: block;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    transition: transform 0.3s var(--ease);
}

.nav__burger span::before,
.nav__burger span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    background: currentColor;
    transition: transform 0.3s var(--ease);
}

.nav__burger span::before {
    transform: translateY(-5.5px);
}

.nav__burger span::after {
    transform: translateY(5.5px);
}

.nav__menu {
    display: none;
}

@media (max-width: 734px) {
    .nav__links {
        display: none;
    }

    .nav__burger {
        display: inline-flex;
    }

    .nav__menu {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 99;
        padding: calc(var(--nav-h) + 12px) var(--gutter) 40px;
        background: #000;
        overflow-y: auto;
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition:
            opacity 0.3s var(--ease),
            transform 0.3s var(--ease),
            visibility 0s 0.3s;
    }

    .nav__menu ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav__menu li {
        border-bottom: 1px solid var(--rule);
        transform: translateY(12px);
        opacity: 0;
        transition:
            opacity 0.4s var(--ease),
            transform 0.4s var(--ease);
        transition-delay: var(--d, 0s);
    }

    .nav__menu a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 0;
        font-size: 24px;
        font-weight: 600;
        color: var(--fg);
    }

    .nav__menu a:hover {
        text-decoration: none;
        color: #fff;
    }

    .nav__menu a svg {
        width: 20px;
        height: 20px;
        opacity: 0.6;
    }

    body.menu-open {
        overflow: hidden;
    }

    body.menu-open .nav__menu {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition-delay: 0s;
    }

    body.menu-open .nav__menu li {
        opacity: 1;
        transform: none;
    }

    body.menu-open .nav__burger span {
        background: transparent;
    }

    body.menu-open .nav__burger span::before {
        transform: rotate(45deg);
    }

    body.menu-open .nav__burger span::after {
        transform: rotate(-45deg);
    }
}

/* ---------- hero ---------- */

.hero {
    position: relative;
    min-height: calc(100svh - var(--nav-h));
    display: grid;
    align-content: start;
    padding-top: clamp(64px, 12vh, 140px);
    overflow: hidden;
}

.hero__copy {
    text-align: center;
    max-width: 820px;
    margin-inline: auto;
    will-change: transform, opacity;
}

.hero__copy .eyebrow {
    margin-bottom: 14px;
}

.hero__copy .display {
    margin-bottom: 18px;
}

.hero__copy .lede {
    max-width: 640px;
    margin-inline: auto;
    margin-bottom: 26px;
}

.hero__copy .link-row {
    justify-content: center;
}

.hero__art {
    position: relative;
    height: clamp(320px, 52vw, 640px);
    margin-top: clamp(40px, 8vh, 90px);
    max-width: 1100px;
    width: 100%;
    margin-inline: auto;
}

.hero__art img {
    position: absolute;
    bottom: 0;
    will-change: transform;
    filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.6));
}

.hero__art .art-main {
    left: 50%;
    width: clamp(240px, 36%, 420px);
    translate: -50% 0;
    z-index: 3;
}

.hero__art .art-left {
    left: 6%;
    bottom: 8%;
    width: clamp(200px, 32%, 380px);
    opacity: 0.85;
    z-index: 2;
}

.hero__art .art-right {
    right: 5%;
    bottom: 10%;
    width: clamp(160px, 28%, 330px);
    opacity: 0.85;
    z-index: 1;
}

.hero__fade {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 160px;
    background: linear-gradient(to bottom, transparent, var(--bg));
    pointer-events: none;
    z-index: 4;
}

@media (max-width: 734px) {
    .hero__art {
        height: 92vw;
    }

    .hero__art .art-left {
        left: -6%;
    }

    .hero__art .art-right {
        right: -6%;
    }
}

/* ---------- feature (text + image) ---------- */

.feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(32px, 6vw, 96px);
    padding-block: clamp(64px, 9vw, 120px);
}

.feature + .feature {
    border-top: 1px solid var(--rule);
}

.feature--flip .feature__copy {
    order: 2;
}

.feature__copy .eyebrow {
    margin-bottom: 10px;
}

.feature__copy .headline {
    margin-bottom: 18px;
}

.feature__copy .body {
    margin-bottom: 22px;
    max-width: 440px;
}

.feature__art {
    position: relative;
    display: grid;
    place-items: center;
}

.feature__art img {
    width: min(100%, 480px);
    filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.55));
    will-change: transform;
}

.feature__art::before {
    content: '';
    position: absolute;
    inset: 15% 10%;
    border-radius: 50%;
    background: radial-gradient(
        closest-side,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    filter: blur(20px);
    opacity: calc(1 - var(--q, 0));
}

@media (max-width: 734px) {
    .feature {
        grid-template-columns: 1fr;
        gap: 36px;
        text-align: center;
    }

    .feature--flip .feature__copy {
        order: 0;
    }

    .feature__copy .body {
        margin-inline: auto;
    }

    .feature__copy .link-row {
        justify-content: center;
    }
}

/* ---------- section intro ---------- */

.intro {
    text-align: center;
    max-width: 760px;
    margin-inline: auto;
    margin-bottom: clamp(44px, 7vw, 80px);
}

.intro .eyebrow {
    margin-bottom: 12px;
}

.intro .lede {
    margin-top: 16px;
}

.intro--left {
    text-align: left;
    margin-inline: 0;
}

/* ---------- logo grid ---------- */

.logos {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.logos li {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 26px 10px 20px;
    border-radius: var(--radius);
    background: var(--bg-3);
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-2);
    transition:
        color 0.3s var(--ease),
        transform 0.4s var(--ease-out);
}

.logos img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: grayscale(1) brightness(1.5) contrast(0.9);
    opacity: 0.8;
    transition:
        filter 0.4s var(--ease),
        opacity 0.4s var(--ease),
        transform 0.4s var(--ease-out);
}

.logos li:hover {
    color: var(--fg);
    transform: translateY(-3px);
}

.logos li:hover img {
    filter: none;
    opacity: 1;
    transform: scale(1.08);
}

@media (max-width: 734px) {
    .logos {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .logos li {
        gap: 8px;
        padding: 16px 4px 12px;
        border-radius: 14px;
        font-size: 11px;
    }

    .logos img {
        width: 28px;
        height: 28px;
    }
}

/* ---------- carousel ---------- */

.carousel {
    position: relative;
    margin-top: clamp(44px, 7vw, 80px);
}

.carousel__track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    padding-inline: var(--gutter);
    padding-block: 8px 24px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel__track::-webkit-scrollbar {
    display: none;
}

.card {
    flex: 0 0 min(405px, 82vw);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 420px;
    padding: 36px 32px;
    border-radius: var(--radius-lg);
    background: var(--bg-3);
    transition: transform 0.5s var(--ease-out);
}

.card:hover {
    transform: translateY(-4px);
}

.card__logos {
    display: flex;
    gap: 10px;
}

.card__logos img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    padding: 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}

.card .title {
    margin-top: auto;
}

.card .body {
    font-size: 17px;
}

.card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.card__tags li {
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 980px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--fg-2);
}

.carousel__nav {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-inline: var(--gutter);
}

.carousel__btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--fg);
    transition:
        background 0.2s,
        opacity 0.2s;
}

.carousel__btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.carousel__btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.carousel__btn svg {
    width: 14px;
    height: 14px;
}

/* ---------- scrolly (sticky stage + steps) ---------- */

.scrolly {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(32px, 6vw, 96px);
    align-items: start;
}

.scrolly__stage {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    height: calc(100svh - var(--nav-h) - 48px);
    display: grid;
    place-items: center;
}

.scrolly__steps {
    display: grid;
}

.step {
    min-height: 80svh;
    display: grid;
    align-content: center;
    padding-block: 10vh;
}

.step .title {
    margin-bottom: 12px;
    transition: color 0.4s var(--ease);
}

.step .body {
    max-width: 380px;
}

.step__num {
    display: block;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--fg-3);
}

.step__shots {
    display: none;
}

.scrolly__steps .step:not(.is-active) .title {
    color: var(--fg-3);
}

/* phone fan */

.phones {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 760px;
    display: grid;
    place-items: center;
    perspective: 1400px;
}

.phones__scene {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: scale(0.96);
    transition:
        opacity 0.55s var(--ease),
        transform 0.7s var(--ease-out);
    pointer-events: none;
}

.phones__scene.is-active {
    opacity: 1;
    transform: none;
}

.phones__scene img {
    position: absolute;
    height: 78%;
    width: auto;
    max-width: none;
    filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.7));
    transition: transform 0.9s var(--ease-out);
}

.phones__scene img:nth-child(1) {
    transform: translateX(-66%) scale(0.86) rotateY(18deg);
    z-index: 1;
    opacity: 0.9;
}

.phones__scene img:nth-child(2) {
    z-index: 2;
}

.phones__scene img:nth-child(3) {
    transform: translateX(66%) scale(0.86) rotateY(-18deg);
    z-index: 1;
    opacity: 0.9;
}

.phones__scene:not(.is-active) img:nth-child(1) {
    transform: translateX(-40%) scale(0.8);
}

.phones__scene:not(.is-active) img:nth-child(3) {
    transform: translateX(40%) scale(0.8);
}

@media (max-width: 1068px) {
    .phones__scene img {
        height: 66%;
    }
}

@media (max-width: 734px) {
    .scrolly {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .scrolly__stage {
        display: none;
    }

    .step {
        min-height: 0;
        padding-block: 40px;
        text-align: center;
        border-top: 1px solid var(--rule);
    }

    .step:first-child {
        border-top: 0;
    }

    .step .body {
        margin-inline: auto;
    }

    .step__shots {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 28px;
    }

    .step__shots img {
        width: calc((100% - 20px) / 3);
        filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.6));
    }

    .scrolly__steps .step:not(.is-active) .title {
        color: var(--fg);
    }
}

/* ---------- chat mock ---------- */

.chat {
    width: min(100%, 520px);
    aspect-ratio: 4 / 5;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    background: var(--bg-3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.chat__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--rule);
    font-size: 13px;
    color: var(--fg-2);
}

.chat__bar i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.chat__bar span {
    margin-left: 8px;
}

.chat__body {
    position: relative;
    flex: 1;
    min-height: 0;
}

.chat__scene {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    opacity: 0;
    transform: translateY(12px);
    transition:
        opacity 0.5s var(--ease),
        transform 0.6s var(--ease-out);
    pointer-events: none;
}

.chat__scene.is-active {
    opacity: 1;
    transform: none;
}

.bubble {
    max-width: 86%;
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.bubble--user {
    align-self: flex-end;
    background: var(--accent);
    color: #fff;
    border-bottom-right-radius: 6px;
}

.bubble--user img {
    width: 180px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.bubble--ai {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 6px;
}

.bubble--ai b {
    font-weight: 600;
}

.bubble--ai a {
    color: var(--link);
}

.bubble--tool {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--fg-2);
    padding: 6px 12px;
    border-radius: 980px;
    border: 1px solid var(--rule);
}

.bubble--tool i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #30d158;
}

.weather {
    display: grid;
    gap: 10px;
}

.weather__now {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.weather__now strong {
    font-size: 40px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.03em;
}

.weather__days {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.weather__days li {
    flex: 1;
    display: grid;
    gap: 4px;
    text-align: center;
    font-size: 12px;
    padding: 8px 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
}

.weather__days b {
    font-weight: 600;
}

.weather__days span {
    color: var(--fg-2);
    font-size: 11px;
    white-space: nowrap;
}

.chat__input {
    margin: 0 20px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px 10px 16px;
    border-radius: 980px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 14px;
    color: var(--fg-3);
}

.chat__input i {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--fg);
    display: grid;
    place-items: center;
}

.chat__input svg {
    width: 12px;
    height: 12px;
    color: var(--bg);
}

/* ---------- tools ---------- */

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.tile {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 28px;
    min-height: 160px;
    border-radius: var(--radius-lg);
    background: var(--bg-3);
    color: var(--fg);
    transition:
        transform 0.5s var(--ease-out),
        background 0.3s var(--ease);
}

.tile:hover {
    text-decoration: none;
    background: #222224;
    transform: translateY(-4px);
}

.tile h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 6px;
}

.tile p {
    color: var(--fg-2);
}

.tile__arrow {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.1);
    transition: transform 0.3s var(--ease);
}

.tile__arrow svg {
    width: 14px;
    height: 14px;
}

.tile:hover .tile__arrow {
    transform: translateX(4px);
}

/* ---------- device mockup tool ---------- */

.mockup {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 734px) {
    .mockup {
        grid-template-columns: 1fr;
    }
}

.panel {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-3);
}

.frame-preview {
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 24px;
}

.frame-preview img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s;
}

.frames {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.frames button {
    display: grid;
    gap: 10px;
    justify-items: center;
    padding: 12px 8px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--fg-2);
    transition:
        border-color 0.2s,
        background 0.2s,
        color 0.2s;
}

.frames button img {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.frames button:hover {
    background: rgba(255, 255, 255, 0.05);
}

.frames button[aria-pressed='true'] {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: var(--fg);
}

.drop {
    position: relative;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1.5px dashed rgba(255, 255, 255, 0.2);
    background: var(--bg-3);
    color: var(--fg-2);
    cursor: pointer;
    transition:
        border-color 0.2s,
        background 0.2s;
}

.drop:hover,
.drop.is-dragging {
    border-color: rgba(255, 255, 255, 0.45);
    background: #222224;
}

.drop.has-image {
    cursor: default;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.08);
}

.drop__hint {
    display: grid;
    gap: 10px;
    justify-items: center;
}

.drop__hint svg {
    width: 36px;
    height: 36px;
    opacity: 0.5;
}

.drop__preview {
    position: absolute;
    inset: 24px;
    display: none;
}

.drop.has-image .drop__hint {
    display: none;
}

.drop.has-image .drop__preview {
    display: block;
}

.drop__preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.drop__remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.drop__remove svg {
    width: 11px;
    height: 11px;
}

.segmented {
    display: flex;
    position: relative;
    padding: 3px;
    margin-top: 20px;
    border-radius: 980px;
    background: rgba(255, 255, 255, 0.08);
}

.segmented button {
    flex: 1;
    position: relative;
    z-index: 1;
    padding: 9px 12px;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 500;
    text-transform: capitalize;
    color: var(--fg-2);
    transition: color 0.25s;
}

.segmented button[aria-pressed='true'] {
    color: var(--bg);
}

.segmented__thumb {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    border-radius: 980px;
    background: var(--fg);
    transition: transform 0.3s var(--ease);
}

.segmented[data-active='1'] .segmented__thumb {
    transform: translateX(100%);
}

.segmented__desc {
    margin-top: 12px;
    min-height: 2.8em;
    text-align: center;
    font-size: 15px;
    color: var(--fg-2);
}

.mockup__actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 110;
    transform: translate(-50%, 20px);
    max-width: min(92vw, 480px);
    padding: 12px 18px;
    border-radius: 14px;
    background: rgba(255, 69, 58, 0.18);
    border: 1px solid rgba(255, 69, 58, 0.35);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    color: #ffb4ae;
    font-size: 15px;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s,
        transform 0.3s var(--ease),
        visibility 0s 0.3s;
}

.toast.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition-delay: 0s;
}

/* ---------- simple pages ---------- */

.page-hero {
    padding-block: clamp(56px, 9vw, 110px) clamp(32px, 5vw, 56px);
}

.page-hero .display {
    margin-bottom: 10px;
}

.empty {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(24px, 6vw, 80px);
    min-height: calc(100svh - var(--nav-h));
    padding-block: 40px;
}

.empty__art {
    display: grid;
    place-items: center;
}

.empty__art img {
    width: min(100%, 420px);
    -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 72%);
    mask-image: radial-gradient(circle, #000 30%, transparent 72%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-14px);
    }
}

.empty__copy .display {
    margin-bottom: 12px;
}

.empty__copy .lede {
    margin-bottom: 28px;
}

@media (max-width: 734px) {
    .empty {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .empty__art {
        order: -1;
    }
}

.redirect {
    min-height: 100svh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 20px;
    text-align: center;
    padding: var(--gutter);
}

.redirect .spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--fg);
    animation: spin 0.9s linear infinite;
}

/* ---------- footer ---------- */

.footer {
    padding-block: 36px 40px;
    border-top: 1px solid var(--rule);
    background: var(--bg);
    font-size: 12px;
    color: var(--fg-2);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--rule);
}

.footer__brand svg {
    width: 26px;
    height: 26px;
    color: var(--fg);
    margin-bottom: 14px;
}

.footer__brand p {
    max-width: 280px;
    line-height: 1.5;
}

.footer h2 {
    font-size: 12px;
    font-weight: 600;
    color: var(--fg);
    margin-bottom: 12px;
}

.footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.footer a {
    color: var(--fg-2);
}

.footer a:hover {
    color: var(--fg);
    text-decoration: underline;
}

.footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    padding-top: 18px;
}

@media (max-width: 734px) {
    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer__brand {
        grid-column: 1 / -1;
    }
}

/* ---------- scroll-driven background (home) ---------- */

.bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.has-bg main,
.has-bg .footer {
    position: relative;
    z-index: 1;
}

.has-bg .footer {
    background: transparent;
}

[data-well] {
    perspective: 1200px;
}

[data-swallow] {
    transform-origin: 50% 50%;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* ---------- motion ---------- */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.9s var(--ease),
        transform 1s var(--ease-out);
    transition-delay: var(--d, 0s);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

.reveal--scale {
    transform: translateY(28px) scale(0.96);
}

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

    .reveal,
    .reveal--scale {
        opacity: 1;
        transform: none;
        transition: none;
    }

    [data-parallax],
    [data-swallow] {
        transform: none !important;
    }

    .empty__art img {
        animation: none;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}

/* chat scrolly keeps its stage on mobile, pinned under the nav */
@media (max-width: 734px) {
    .scrolly--chat .scrolly__stage {
        display: grid;
        position: sticky;
        top: var(--nav-h);
        z-index: 1;
        height: 62svh;
        padding-bottom: 16px;
        background: linear-gradient(var(--bg) 88%, transparent);
    }

    .scrolly--chat .chat {
        width: auto;
        height: 100%;
        max-width: 100%;
        aspect-ratio: 4 / 5;
    }

    .scrolly--chat .chat__body {
        overflow: hidden;
    }

    .scrolly--chat .chat__scene {
        gap: 10px;
        padding: 14px;
    }

    .scrolly--chat .bubble {
        font-size: 13px;
        padding: 9px 12px;
    }

    .scrolly--chat .chat__input {
        margin: 0 14px 14px;
    }

    .scrolly--chat .bubble--user img {
        width: 140px;
    }

    .scrolly--chat .step {
        min-height: 34svh;
        border-top: 0;
        padding-block: 32px;
    }
}

/* ---------- cars: studio render ---------- */

.car-stage {
    position: relative;
    height: calc(100svh - var(--nav-h));
    min-height: 520px;
    background: var(--bg);
    overflow: hidden;
    isolation: isolate;
}

.car-stage__canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: grab;
    opacity: 0;
    transition: opacity 1.2s var(--ease);
}

.car-stage__canvas:active {
    cursor: grabbing;
}

.car-stage.is-ready .car-stage__canvas {
    opacity: 1;
}

.car-stage__title {
    position: absolute;
    top: clamp(24px, 5vh, 56px);
    left: max(var(--gutter), calc((100% - var(--content)) / 2));
    pointer-events: none;
}

.car-stage__title .title {
    font-size: clamp(28px, 4vw, 44px);
    margin-top: 2px;
}

.car-stage__title .muted {
    margin-top: 6px;
    font-size: 14px;
}

.car-stage__hint {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s var(--ease) 1.2s;
}

.car-stage.is-ready .car-stage__hint {
    opacity: 1;
}

.car-stage__loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--fg-2);
    font-size: 14px;
    letter-spacing: 0.02em;
}

/* side tab rail with the camera views */
.car-views {
    position: absolute;
    top: 50%;
    right: max(var(--gutter), calc((100% - var(--content)) / 2 - 40px));
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    border-radius: 16px;
    background: rgba(29, 29, 31, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--rule);
}

.car-views__btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px 9px 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fg-2);
    text-align: left;
    white-space: nowrap;
    transition:
        background 0.25s var(--ease),
        color 0.25s var(--ease);
}

.car-views__btn:hover {
    color: var(--fg);
}

.car-views__btn.is-active {
    color: var(--fg);
    background: rgba(255, 255, 255, 0.1);
}

.car-views__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.35;
    transition: opacity 0.25s var(--ease);
}

.car-views__btn.is-active .car-views__dot {
    opacity: 1;
    background: var(--link);
}

.car-paints {
    position: absolute;
    left: max(var(--gutter), calc((100% - var(--content)) / 2));
    bottom: 56px;
    display: flex;
    gap: 12px;
}

.car-paints__swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--swatch);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.35),
        inset 0 -6px 10px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.12);
    transition: transform 0.3s var(--ease-out);
}

.car-paints__swatch:hover {
    transform: scale(1.1);
}

.car-paints__swatch[aria-checked='true'] {
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.35),
        inset 0 -6px 10px rgba(0, 0, 0, 0.45),
        0 0 0 2px var(--bg),
        0 0 0 4px var(--fg);
}

.car-notes {
    padding-block: clamp(64px, 9vw, 120px);
}

.car-notes__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 6vw, 80px);
}

.car-notes .headline {
    margin-block: 8px 14px;
}

.car-specs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin: clamp(40px, 6vw, 72px) 0 0;
    padding-top: 28px;
    border-top: 1px solid var(--rule);
}

.car-specs div {
    display: grid;
    gap: 4px;
}

.car-specs dt {
    font-size: 13px;
    color: var(--fg-2);
}

.car-specs dd {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

@media (max-width: 1068px) {
    .car-views {
        right: var(--gutter);
    }
}

@media (max-width: 734px) {
    .car-stage {
        height: calc(100svh - var(--nav-h));
        min-height: 560px;
    }

    .car-stage__title .muted {
        display: none;
    }

    .car-views {
        top: auto;
        right: auto;
        left: 0;
        bottom: 0;
        width: 100%;
        transform: none;
        flex-direction: row;
        gap: 0;
        padding: 10px var(--gutter) 14px;
        border: 0;
        border-radius: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .car-views::-webkit-scrollbar {
        display: none;
    }

    .car-views__btn {
        flex: 0 0 auto;
        padding: 8px 12px;
        font-size: 12px;
        background: rgba(29, 29, 31, 0.8);
        border: 1px solid var(--rule);
        margin-right: 6px;
    }

    .car-views__btn.is-active {
        background: var(--fg);
        color: var(--bg);
    }

    .car-views__btn.is-active .car-views__dot {
        background: var(--bg);
    }

    .car-paints {
        bottom: 76px;
        gap: 10px;
    }

    .car-paints__swatch {
        width: 26px;
        height: 26px;
    }

    .car-stage__hint {
        display: none;
    }

    .car-notes__grid {
        grid-template-columns: 1fr;
    }

    .car-specs {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .car-stage__canvas,
    .car-stage__hint {
        transition: none;
    }
}
