/* ==========================================================================
   Piezza — landing page
   ========================================================================== */

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

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    color: #1a0f05;
}

.hero .shapes svg {
    fill: rgba(0, 0, 0, 0.1);
}

.hero .shape-plus,
.hero .shape-squiggle,
.hero .shape-piggy {
    color: rgba(0, 0, 0, 0.12);
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 48px;
}

.hero-copy h1 {
    font-size: clamp(40px, 5.6vw, 70px);
    margin: 22px 0 22px;
    color: #121212;
}

.hero .accent {
    position: relative;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.hero .accent::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.04em;
    height: 0.14em;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.55);
    transform-origin: left;
    transform: scaleX(0);
    animation: underline 1s 0.7s var(--ease-out) forwards;
}

@keyframes underline {
    to {
        transform: scaleX(1);
    }
}

.hero .lead {
    font-size: clamp(17px, 1.5vw, 20px);
    max-width: 560px;
    margin: 0 0 18px;
    color: rgba(18, 18, 18, 0.78);
}

.hero .lead strong {
    color: #121212;
}

.pill-on-tint {
    color: #1a0f05;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.pill-on-tint .dot-live {
    background: #1a7a3c;
    box-shadow: 0 0 0 0 rgba(26, 122, 60, 0.5);
}

.currency-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: rgba(18, 18, 18, 0.6);
    margin: 0 0 32px;
}

.currency-rotator {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 38px;
    min-width: 170px;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    transition: min-width 0.35s var(--ease-out);
}

.currency-word {
    display: inline-block;
    font-weight: 800;
    color: #121212;
    white-space: nowrap;
    animation: word-in 0.5s var(--ease-out);
}

.currency-word.out {
    animation: word-out 0.35s ease-in forwards;
}

@keyframes word-in {
    from {
        transform: translateY(110%);
        opacity: 0;
    }
}
@keyframes word-out {
    to {
        transform: translateY(-110%);
        opacity: 0;
    }
}

.play-pill-on-tint {
    border-color: rgba(18, 18, 18, 0.25);
    color: rgba(18, 18, 18, 0.65);
    background: rgba(255, 255, 255, 0.28);
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.hero-spendable {
    position: absolute;
    z-index: 5;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    pointer-events: none;
}

.hero-spendable.show {
    opacity: 1;
}

.hero-spendable small {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(18, 18, 18, 0.55);
}

.hero-spendable b {
    font-size: 22px;
    letter-spacing: -0.02em;
    color: #121212;
}

.hero-phone-wrap {
    will-change: transform;
}

.hero-phone-wrap .phone {
    animation: hero-float 7s ease-in-out infinite;
}

@keyframes hero-float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-12px) rotate(0.6deg);
    }
}

.chip-wrap {
    position: absolute;
    z-index: 4;
    will-change: transform;
}

.chip-1 {
    top: 14%;
    left: calc(50% - 270px);
}
.chip-2 {
    top: 38%;
    right: calc(50% - 280px);
}
.chip-3 {
    bottom: 28%;
    left: calc(50% - 290px);
}
.chip-4 {
    bottom: 10%;
    right: calc(50% - 250px);
}

.chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 10px 10px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-md);
    opacity: 0;
    filter: blur(8px);
    transform: scale(0.92) translateY(12px);
    transition:
        opacity 0.7s var(--ease-out),
        transform 0.8s var(--ease-out),
        filter 0.7s ease;
    transition-delay: calc(0.5s + var(--i, 0) * 0.12s);
}

.chip.materialized {
    opacity: 1;
    filter: none;
    transform: none;
    animation: chip-bob 5.5s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * -1.4s);
}

.chip-1 .chip.materialized {
    animation-duration: 6.2s;
}
.chip-2 .chip.materialized {
    animation-duration: 5.4s;
}
.chip-3 .chip.materialized {
    animation-duration: 7s;
}
.chip-4 .chip.materialized {
    animation-duration: 5.8s;
}

@keyframes chip-bob {
    0%,
    100% {
        translate: 0 0;
    }
    50% {
        translate: 0 -10px;
    }
}

.chip-emoji {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    font-size: 20px;
    border-radius: 12px;
    background: var(--bg-mid);
}

.chip-body {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    font-size: 14px;
}

.chip-body b {
    color: var(--txt-bright);
    white-space: nowrap;
}

.chip-body small {
    color: var(--txt-light);
    font-size: 12px;
    white-space: nowrap;
}

.scroll-cue {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 26px;
    width: 26px;
    height: 42px;
    margin-left: -13px;
    border-radius: 14px;
    border: 2px solid rgba(18, 18, 18, 0.3);
}

.scroll-cue span {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: #121212;
    animation: cue 1.8s ease-in-out infinite;
}

@keyframes cue {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    100% {
        transform: translateY(14px);
        opacity: 0;
    }
}

/* ---------------------------------------------------------------- problem: calendar */

.calendar-card {
    --label-w: 190px;
    position: relative;
    padding: 34px 34px 26px;
    overflow: hidden;
}

.cal-months,
.cal-row {
    display: grid;
    grid-template-columns: var(--label-w) 1fr;
    align-items: center;
}

.cal-months .track {
    display: flex;
    font-size: 13px;
    font-weight: 700;
    color: var(--txt-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cal-months .track span {
    flex: var(--days);
    padding-left: 10px;
}

.cal-rows {
    position: relative;
    margin-top: 10px;
}

.cal-row {
    height: 58px;
    border-top: 1px solid var(--card-border);
}

.cal-label b {
    display: block;
    font-size: 15px;
    line-height: 1.2;
    color: var(--txt-bright);
}

.cal-label small {
    color: var(--txt-light);
    font-size: 13px;
}

.track {
    position: relative;
    height: 100%;
}

.cal-row .track::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: var(--bg-mid);
    border-radius: 2px;
}

.month-line {
    position: absolute;
    top: -6px;
    bottom: 0;
    width: 0;
    border-left: 2px dashed var(--bg-higher);
    pointer-events: none;
}

.due-dot {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--orange-soft);
}

.due-dot.oneoff {
    background: #ff5a4f;
    box-shadow: 0 0 0 4px var(--red-soft);
}

.calendar-card.run .due-dot {
    animation: ping var(--T) linear infinite;
    animation-delay: var(--delay);
}

@keyframes ping {
    0% {
        transform: scale(1.7);
        filter: brightness(1.3);
    }
    5% {
        transform: scale(1);
        filter: none;
    }
}

.playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--label-w);
    right: 0;
    pointer-events: none;
}

.playhead i {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--primary), transparent);
    box-shadow: 0 0 18px var(--primary);
    opacity: 0;
}

.calendar-card.run .playhead i {
    opacity: 1;
    animation: sweep var(--T) linear infinite;
}

@keyframes sweep {
    from {
        left: 0;
    }
    to {
        left: 100%;
    }
}

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--card-border);
    font-size: 14px;
    color: var(--txt-light);
}

.lg {
    display: inline-block;
    vertical-align: -2px;
    margin-right: 8px;
}

.lg-month {
    width: 0;
    height: 14px;
    border-left: 2px dashed var(--bg-higher);
}

.lg-due {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
}

/* ---------------------------------------------------------------- how Needs work */

.needs-story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.story-card {
    padding: 28px 26px 26px;
    overflow: hidden;
}

.story-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 10px;
}

.story-card > h3 {
    font-size: clamp(22px, 2.4vw, 28px);
    margin: 0 0 10px;
}

.story-lead {
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--txt-secondary);
}

.builder-form {
    display: grid;
    gap: 12px;
}

.builder-title > *,
.builder-value,
.refill-explain {
    transition:
        opacity 0.22s ease,
        filter 0.22s ease;
}

.builder-form.swapping .builder-title > *,
.builder-form.swapping .builder-value,
.builder-form.swapping .refill-explain {
    opacity: 0;
    filter: blur(4px);
}

.builder-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.builder-emoji {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    font-size: 22px;
    border-radius: 14px;
    background: var(--bg-mid);
}

.builder-title b {
    font-size: 20px;
    color: var(--txt-bright);
}

.builder-field {
    display: grid;
    gap: 6px;
}

.builder-field > span {
    font-size: 13px;
    font-weight: 600;
    color: var(--txt-light);
}

.builder-input {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    background: var(--bg-mid);
    color: var(--txt-bright);
    font-weight: 700;
    font-size: 15px;
}

.builder-ico {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: none;
    color: var(--txt-light);
}

.builder-ico svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.builder-value {
    flex: 1;
    min-width: 0;
}

.builder-chev {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--txt-light);
    border-bottom: 2px solid var(--txt-light);
    transform: rotate(45deg);
    margin-bottom: 4px;
    flex: none;
}

.refill-switch {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--bg-mid);
}

.refill-thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 6px);
    border-radius: 11px;
    background: var(--card);
    box-shadow: var(--shadow-sm);
    pointer-events: none;
    will-change: transform;
}

.refill-switch button {
    position: relative;
    z-index: 1;
    height: 40px;
    border: 0;
    background: transparent;
    border-radius: 11px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--txt-light);
    cursor: pointer;
    transition:
        color 0.25s ease,
        transform 100ms ease-out;
}

.refill-switch button.active {
    color: var(--txt-bright);
}

.refill-switch button:active {
    transform: scale(0.97);
}

.refill-explain {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--txt-secondary);
    font-weight: 600;
    min-height: 2.9em;
}

.q-emoji {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: none;
    font-size: 24px;
    border-radius: 14px;
    background: var(--bg-mid);
}

.bar {
    height: 10px;
    margin: 20px 0 14px;
    border-radius: var(--radius-pill);
    background: var(--progress-track);
    overflow: hidden;
}

.bar i {
    display: block;
    height: 100%;
    width: var(--p);
    border-radius: inherit;
    background: var(--c);
    transform-origin: left;
    transition: width 0.7s var(--ease-out);
}

/* tracker card */

.tracker-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    transition: opacity 0.3s ease;
}

.tracker-rows.resetting {
    opacity: 0;
}

.tracker-rows.resetting * {
    transition: none !important;
}

.tracker-row {
    padding: 14px;
    border-radius: 16px;
    background: var(--bg-mid);
}

.tracker-row header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tracker-row header > div {
    flex: 1;
    min-width: 0;
}

.tracker-row h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--txt-bright);
    letter-spacing: -0.01em;
}

.tracker-row small {
    display: block;
    color: var(--txt-light);
    font-size: 12px;
    line-height: 1.35;
}

.tracker-row .q-emoji {
    width: 40px;
    height: 40px;
    font-size: 18px;
    border-radius: 12px;
    background: var(--card);
}

.tracker-row .bar {
    margin: 12px 0 0;
}

.tracker-row .status {
    flex: none;
    transition:
        color 0.3s ease,
        background-color 0.3s ease;
}

.status.pop {
    animation: status-pop 0.5s var(--ease-out);
}

@keyframes status-pop {
    40% {
        transform: scale(1.08);
    }
}

.tracker-note {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 10px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--txt-light);
}

.tracker-note b {
    color: var(--txt-bright);
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}

.tracker-row.done[data-track="fund"] .tracker-note b {
    color: var(--green);
}

.tracker-row.done[data-track="overdue"] .tracker-note b {
    color: var(--primary);
}

.tracker-spends {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tracker-spends li {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--txt-secondary);
    opacity: 0;
    transform: translateY(-6px);
    transition:
        opacity 0.35s ease,
        transform 0.45s var(--ease-out);
}

.tracker-spends li.show {
    opacity: 1;
    transform: none;
}

.tracker-spends b {
    color: var(--error);
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- unexpected expenses */

.unexpected-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.unexpected-visual {
    display: flex;
    justify-content: center;
    perspective: 1200px;
}

.tilt.tilt-mirror {
    transform: rotateY(12deg) rotateX(4deg);
}

.unexpected-copy .section-head {
    margin-bottom: 0;
}

/* ---------------------------------------------------------------- how it works */

.how {
    --how-tint: var(--tint-needs);
    overflow: clip;
}

.how-tint {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--how-tint) 14%, transparent);
    transition: background-color 0.7s ease;
    pointer-events: none;
}

.how[data-how-tint="needs"] {
    --how-tint: var(--tint-needs);
}
.how[data-how-tint="income"] {
    --how-tint: var(--tint-income);
}
.how[data-how-tint="expense"] {
    --how-tint: var(--tint-expense);
}
.how[data-how-tint="transactions"] {
    --how-tint: #9a9a9a;
}
.how[data-how-tint="insights"] {
    --how-tint: var(--tint-insights);
}

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

.how-phone-col {
    position: sticky;
    top: max(90px, calc(50vh - 324px));
    display: flex;
    justify-content: center;
}

.how-phone {
    display: grid;
}

.how-phone img {
    grid-area: 1 / 1;
    opacity: 0;
    transform: scale(0.97);
    transition:
        opacity 0.55s ease,
        transform 0.75s var(--ease-out);
}

.how-phone img.active {
    opacity: 1;
    transform: none;
}

.steps {
    list-style: none;
    margin: 0;
    padding: 12vh 0;
}

.step {
    position: relative;
    min-height: 48vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 34px;
    border-left: 2px solid var(--bg-high);
    opacity: 0.35;
    transition: opacity 0.5s ease;
}

.step::before {
    content: "";
    position: absolute;
    left: -2px;
    top: 50%;
    height: 0;
    width: 2px;
    transform: translateY(-50%);
    background: var(--primary);
    transition: height 0.6s var(--ease-out);
}

.step.active {
    opacity: 1;
}

.step.active::before {
    height: 70%;
}

.step-num {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.1em;
}

.step h3 {
    font-size: clamp(26px, 2.6vw, 34px);
    margin: 8px 0 12px;
}

.step p {
    margin: 0;
    max-width: 440px;
    font-size: 18px;
}

/* carousel (mobile / tablet) */

.how-carousel {
    margin-top: 8px;
}

.carousel-viewport {
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
    margin: 0 -18px;
    padding: 0 18px;
}

.carousel-viewport.grabbing {
    cursor: grabbing;
}

.carousel-track {
    display: flex;
    gap: 18px;
    will-change: transform;
    user-select: none;
}

.carousel-card {
    flex: 0 0 min(320px, 82vw);
    padding: 22px;
    border-radius: var(--radius-xl);
    background: var(--card);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-md);
}

.carousel-card .phone {
    margin: 0 auto 22px;
    --pw: min(240px, 58vw);
}

.carousel-card h3 {
    font-size: 22px;
    margin: 8px 0 10px;
}

.carousel-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}

.carousel-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--bg-higher);
    cursor: pointer;
    transition:
        transform 0.25s var(--ease-out),
        background-color 0.25s ease,
        width 0.25s var(--ease-out);
}

.carousel-dots button.active {
    width: 22px;
    border-radius: var(--radius-pill);
    background: var(--primary);
}

.carousel-dots button:active {
    transform: scale(0.9);
}

@media (min-width: 1025px) {
    .how-carousel {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .how-desktop {
        display: none !important;
    }

    .how-carousel[hidden] {
        display: block !important;
    }
}

/* ---------------------------------------------------------------- plans */

.plans-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 56px;
    align-items: center;
}

.plans-copy .section-head {
    margin-bottom: 32px;
}

.chart-card {
    padding: 22px 22px 16px;
}

.verdict {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #de5a57;
    color: #fff;
    opacity: 0;
    transform: translateY(-10px) scale(0.97);
    transition:
        opacity 0.5s ease,
        transform 0.6s var(--ease-out);
}

.verdict.show {
    opacity: 1;
    transform: none;
}

.verdict b,
.verdict strong {
    color: #fff;
}

.verdict b {
    display: block;
    font-size: 17px;
}

.verdict span {
    font-size: 14px;
    line-height: 1.4;
}

.verdict-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
}

.verdict-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart {
    position: relative;
    margin-top: 14px;
    aspect-ratio: 640 / 300;
}

.chart svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.chart .grid-line {
    stroke: var(--bg-high);
    stroke-width: 1;
}

.chart .zero-line {
    stroke: var(--error);
    stroke-width: 1.5;
    stroke-dasharray: 5 6;
    opacity: 0.7;
}

.chart .axis-label {
    fill: var(--txt-light);
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
}

.chart .balance {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.chart .area {
    fill: url(#areaGrad);
    opacity: 0;
    transition: opacity 1s ease;
}

.chart.drawn .area {
    opacity: 1;
}

.chart .marker {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(0);
    transition:
        opacity 0.3s ease,
        transform 0.5s var(--ease-out);
}

.chart .marker.show {
    opacity: 1;
    transform: scale(1);
}

.chart .m-income {
    fill: var(--green);
}
.chart .m-need {
    fill: var(--primary);
}
.chart .m-fail {
    fill: var(--error);
}

.chart .m-ring {
    fill: none;
    stroke: var(--error);
    stroke-width: 2;
    opacity: 0;
}

.chart.drawn .m-ring {
    animation: ring 1.6s ease-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

@keyframes ring {
    0% {
        opacity: 0.9;
        transform: scale(0.6);
    }
    100% {
        opacity: 0;
        transform: scale(2.4);
    }
}

.chart .m-stroke {
    stroke: var(--card);
    stroke-width: 3;
}

.chart-callout {
    position: absolute;
    transform: translate(-100%, -50%) translateX(-22px) scale(0.9);
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: var(--error);
    white-space: nowrap;
    opacity: 0;
    transition:
        opacity 0.4s ease,
        transform 0.5s var(--ease-out);
    pointer-events: none;
}

.chart-callout::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    background: inherit;
    transform: rotate(45deg);
    border-radius: 2px;
}

.chart-callout.show {
    opacity: 1;
    transform: translate(-100%, -50%) translateX(-22px);
}

.chart-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--txt-light);
}

.replay {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--card-border);
    background: var(--bg-mid);
    color: var(--txt-secondary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition:
        color 0.2s ease,
        transform 100ms ease-out;
}

.replay:hover {
    color: var(--primary);
}

.replay:active {
    transform: scale(0.96);
}

.replay svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.plans-visual {
    display: flex;
    justify-content: center;
    perspective: 1200px;
}

.tilt {
    transform: rotateY(-12deg) rotateX(4deg);
    transition: transform 0.8s var(--ease-out);
}

.tilt:hover {
    transform: none;
}

/* ---------------------------------------------------------------- currency marquee */

.currency .section-head {
    margin-bottom: 48px;
}

.marquee {
    overflow: hidden;
    padding: 8px 0;
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: marquee 40s linear infinite;
}

.marquee.reverse .marquee-track {
    animation-direction: reverse;
    animation-duration: 48s;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

@keyframes marquee {
    to {
        transform: translateX(-50%);
    }
}

.cur {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px 12px 12px;
    border-radius: var(--radius-pill);
    background: var(--glass);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid var(--glass-border);
    font-weight: 700;
    color: var(--txt-primary);
    white-space: nowrap;
}

.cur i {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 8px;
    border-radius: var(--radius-pill);
    font-style: normal;
    font-weight: 800;
    font-size: 18px;
    color: var(--primary);
    background: var(--orange-soft);
}

.cur small {
    color: var(--txt-light);
    font-weight: 700;
    letter-spacing: 0.06em;
}

/* ---------------------------------------------------------------- philosophy / log demo */

.philo-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
    align-items: center;
}

.ticks {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    display: grid;
    gap: 12px;
}

.ticks li {
    position: relative;
    padding-left: 34px;
    font-weight: 600;
    color: var(--txt-primary);
}

.ticks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233eb265' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4L18 8'/%3E%3C/svg%3E")
            center / 14px no-repeat,
        var(--green-soft);
}

.log-demo {
    position: relative;
    max-width: 400px;
    width: 100%;
    justify-self: center;
    overflow: hidden;
    padding: 0;
}

.log-header {
    padding: 18px 20px 22px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.log-header .shapes svg {
    fill: rgba(0, 0, 0, 0.12);
}

.log-header-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.log-back {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
}

.log-type-pill {
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 700;
    color: #1a0f05;
}

.log-meta {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.log-meta span {
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    font-weight: 700;
    color: rgba(18, 18, 18, 0.75);
}

.log-amount {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    color: #ffb4a8;
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.caret {
    width: 3px;
    height: 36px;
    margin-left: 4px;
    border-radius: 2px;
    background: currentColor;
    animation: blink 1s steps(1) infinite;
}

.log-demo:not(.typing-amount) .caret {
    display: none;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.log-body {
    padding: 18px 20px 22px;
    background: var(--card);
}

.log-field {
    padding: 12px 16px;
    border-radius: 16px;
    background: var(--bg-mid);
    margin-bottom: 12px;
    min-height: 68px;
}

.log-field small {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--txt-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.log-field > span {
    display: block;
    min-height: 26px;
    font-weight: 700;
    color: var(--txt-bright);
}

.log-demo.typing-desc #demoDesc::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 18px;
    margin-left: 2px;
    vertical-align: -3px;
    background: var(--primary);
    animation: blink 1s steps(1) infinite;
}

.need-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.need-options span {
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 700;
    color: var(--txt-secondary);
    background: var(--card);
    border: 1.5px solid transparent;
    transition:
        border-color 0.3s ease,
        color 0.3s ease,
        transform 0.3s var(--ease-out);
}

.need-options span.picked {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.06);
}

.log-btn {
    width: 100%;
    height: 52px;
    margin-top: 4px;
    border: 0;
    border-radius: var(--radius-pill);
    font: inherit;
    font-weight: 800;
    color: #1a0f05;
    background: var(--primary);
    cursor: default;
    transition: transform 100ms ease-out;
}

.log-btn.press {
    transform: scale(0.96);
}

.log-toast {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-md);
    transform: translateY(140%);
    transition: transform 0.6s var(--ease-out);
}

.log-toast.show {
    transform: none;
}

.log-toast b {
    display: block;
    color: var(--txt-bright);
}

.log-toast small {
    color: var(--txt-light);
    font-weight: 600;
}

.toast-tick {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    background: var(--green);
}

.toast-tick svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
}

.log-toast.show .toast-tick svg {
    transition: stroke-dashoffset 0.5s 0.3s ease;
    stroke-dashoffset: 0;
}

/* ---------------------------------------------------------------- CTA */

.cta {
    padding-bottom: 100px;
}

.cta-card {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 80px 32px;
    border-radius: 44px;
    color: #1a0f05;
}

.cta-card .shapes svg {
    fill: rgba(0, 0, 0, 0.1);
}

.cta-card h2 {
    position: relative;
    z-index: 1;
    font-size: clamp(32px, 4.4vw, 56px);
    max-width: 760px;
    margin: 0 auto 14px;
    color: #121212;
}

.cta-card p {
    position: relative;
    z-index: 1;
    margin: 0 0 34px;
    font-size: 18px;
    color: rgba(18, 18, 18, 0.72);
}

.cta-logo {
    position: relative;
    z-index: 1;
    width: 112px;
    height: 112px;
    margin: 0 auto 30px;
    display: grid;
    place-items: center;
    border-radius: 26px;
    background: var(--card);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-md);
    animation: float 6s ease-in-out infinite;
}

.cta-logo::before {
    content: "";
    position: absolute;
    inset: -28px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.55), transparent 65%);
    filter: blur(14px);
    animation: glow 4s ease-in-out infinite;
    z-index: -1;
}

.cta-logo img {
    position: relative;
    width: 64px;
    height: auto;
}

.cta-card .store-buttons {
    position: relative;
    z-index: 1;
}

@keyframes glow {
    50% {
        opacity: 0.5;
        transform: scale(0.85);
    }
}

@keyframes float {
    50% {
        transform: translateY(-10px);
    }
}

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1024px) {
    .hero {
        padding-top: 110px;
        padding-bottom: 60px;
    }

    .hero-grid,
    .plans-grid,
    .philo-grid,
    .needs-story,
    .unexpected-grid {
        grid-template-columns: 1fr;
    }

    .unexpected-grid {
        gap: 40px;
    }

    .unexpected-copy {
        order: -1;
    }

    .hero-copy {
        text-align: center;
    }

    .hero-copy .lead {
        margin-inline: auto;
    }

    .currency-line,
    .hero-copy .store-buttons {
        justify-content: center;
    }

    .hero-visual {
        margin-top: 10px;
    }

    .hero-spendable {
        display: none;
    }

    .scroll-cue {
        display: none;
    }

    .section-head.left {
        margin-inline: auto;
        text-align: center;
    }

    .ticks {
        max-width: 460px;
        margin-inline: auto;
        text-align: left;
    }

    .plans-visual {
        order: -1;
    }

    .tilt,
    .tilt.tilt-mirror {
        transform: none;
    }
}

@media (max-width: 640px) {
    .chip-1,
    .chip-3 {
        left: 0;
    }
    .chip-2,
    .chip-4 {
        right: 0;
    }

    .chip {
        padding: 7px 10px 7px 7px;
        gap: 8px;
        border-radius: 14px;
    }

    .chip-emoji {
        width: 30px;
        height: 30px;
        font-size: 16px;
        border-radius: 9px;
    }

    .chip-body {
        font-size: 12px;
    }

    .chip-body small {
        display: none;
    }

    .status {
        font-size: 11px;
        padding: 3px 8px;
    }

    .calendar-card {
        --label-w: 104px;
        padding: 22px 16px 18px;
    }

    .cal-label b {
        font-size: 13px;
    }

    .cal-label small {
        display: block;
        font-size: 11px;
        line-height: 1.25;
    }

    .cal-months .track span {
        padding-left: 4px;
        font-size: 11px;
    }

    .due-dot {
        width: 12px;
        height: 12px;
        margin: -6px 0 0 -6px;
    }

    .story-card {
        padding: 22px 16px 18px;
    }


    .chart-card {
        padding: 16px 14px 12px;
        border-radius: var(--radius-lg);
    }

    .chart-callout {
        font-size: 11px;
        padding: 5px 9px;
    }

    .verdict span {
        font-size: 13px;
    }

    .phone-md {
        --pw: min(270px, 70vw);
    }

    .cta-card {
        padding: 60px 22px;
        border-radius: 32px;
    }

    .chart .axis-label {
        font-size: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cta-logo,
    .cta-logo::before,
    .hero-phone-wrap .phone,
    .chip.materialized,
    .marquee-track,
    .scroll-cue span {
        animation: none !important;
    }

    .chip {
        opacity: 1;
        filter: none;
        transform: none;
        transition: none;
        translate: none;
    }

    .hero .accent::after {
        transform: none;
    }

    .marquee-track {
        flex-wrap: wrap;
        justify-content: center;
        width: auto;
    }

    .calendar-card .playhead {
        display: none;
    }

    .builder-form .builder-title > *,
    .builder-form .builder-value,
    .builder-form .refill-explain {
        filter: none !important;
        transition: opacity 0.22s ease !important;
    }
}

@media (prefers-reduced-transparency: reduce) {
    .cur,
    .pill-on-tint,
    .currency-rotator,
    .hero-spendable {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: var(--card);
    }
}
