/* V2 subscription plans — toggle, plan cards, "how connects work" panel.
   Neutral selection language (ink / #EBECEE / #F8F9FB); brand pink only on the
   featured plan's CTA. No box-shadows anywhere — borders and fills only. */

.v2-plans {
    --pl-ink: #1E242E;
    --pl-muted: #6B7280;
    --pl-border: #EBECEE;
    --pl-border-strong: #D7DAE0;
    --pl-soft: #F8F9FB;
    --pl-brand: #e20246;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

/* ── Billing period toggle ─────────────────────────────── */
.v2-plans__toggle {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--pl-border);
    border-radius: 999px;
    background: var(--pl-soft);
}

.v2-plans__toggle-btn {
    height: 40px;
    padding: 0 1.5rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--pl-muted);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.v2-plans__toggle-btn:hover {
    color: var(--pl-ink);
}

.v2-plans__toggle-btn.is-active {
    background: var(--pl-ink);
    color: #fff;
}

.v2-plans__toggle-btn:focus-visible {
    outline: 2px solid var(--pl-ink);
    outline-offset: 2px;
}

/* ── Panels / grid ─────────────────────────────────────── */
.v2-plans__panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    width: 100%;
    align-items: stretch;
}

.v2-plans__panel.hidden {
    display: none;
}

.v2-plans__empty {
    grid-column: 1 / -1;
}

/* ── Plan card ─────────────────────────────────────────── */
.v2-plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.75rem 1.75rem;
    border: 1px solid var(--pl-border);
    border-radius: 20px;
    background: linear-gradient(180deg, var(--pl-soft) 0%, #fff 38%);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.v2-plan:hover {
    transform: translateY(-3px);
    border-color: var(--pl-border-strong);
}

.v2-plan--featured {
    border: 1.5px solid var(--pl-ink);
}

.v2-plan--featured:hover {
    border-color: var(--pl-ink);
}

.v2-plan__badge {
    position: absolute;
    top: 0;
    left: 1.75rem;
    transform: translateY(-50%);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: var(--pl-ink);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.v2-plan__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--pl-ink);
}

.v2-plan__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0.75rem 0 1.5rem;
}

.v2-plan__amount {
    font-size: clamp(1.875rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--pl-ink);
}

.v2-plan__period {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--pl-muted);
}

.v2-plan__save {
    margin: -0.75rem 0 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pl-ink);
}

/* ── CTA ───────────────────────────────────────────────── */
.v2-plan__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    width: 100%;
    border: 1px solid var(--pl-ink);
    border-radius: 12px;
    background: #fff;
    color: var(--pl-ink);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.v2-plan__cta:hover {
    background: var(--pl-ink);
    color: #fff;
}

.v2-plan__cta:active {
    transform: translateY(1px);
}

.v2-plan__cta:focus-visible {
    outline: 2px solid var(--pl-ink);
    outline-offset: 2px;
}

.v2-plan--featured .v2-plan__cta {
    border-color: var(--pl-brand);
    background: var(--pl-brand);
    color: #fff;
}

.v2-plan--featured .v2-plan__cta:hover {
    background: #c80140;
    border-color: #c80140;
}

/* ── What's included ───────────────────────────────────── */
.v2-plan__included-title {
    margin: 1.75rem 0 0.875rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--pl-border);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pl-muted);
}

.v2-plan__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.v2-plan__list li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--pl-ink);
}

.v2-plan__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border: 1px solid var(--pl-border);
    border-radius: 999px;
    background: #fff;
    color: var(--pl-ink);
}

/* ── Shared premium surface: "Start free" + "How connects work" ─
   Soft fill, dot grid and hairline border — depth without shadows. */
.v2-rules,
.v2-start-free {
    position: relative;
    width: 100%;
    border: 1px solid var(--pl-border);
    border-radius: 24px;
    background-color: var(--pl-soft);
    background-image: radial-gradient(circle at center, var(--pl-border) 1px, transparent 1px);
    background-size: 24px 24px;
    overflow: hidden;
}

/* ── How connects work — pipeline (plan → proposals → new brands → expiry) ─ */
.v2-rules {
    --rules-gap: 1.5rem;
    padding: 2rem 1.5rem;
}

@media (min-width: 1024px) {
    .v2-rules {
        padding: 3rem;
    }
}

.v2-rules__head {
    max-width: 640px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.v2-rules__title {
    margin: 0;
    font-size: clamp(1.5rem, 2.6vw, 2.125rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--pl-ink);
}

.v2-rules__intro {
    margin: 0.75rem 0 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--pl-muted);
}

.v2-flow {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--rules-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 1024px) {
    .v2-flow {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: stretch;
    }
}

/* One step = node on the rail + card. Mobile: node left, card right. */
.v2-step {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 1rem;
    align-items: start;
}

/* Desktop: each node sits in the centre of its column, above the card. */
@media (min-width: 1024px) {
    .v2-step {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.75rem;
    }
}

.v2-step__node {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border: 1px solid var(--pl-border);
    border-radius: 999px;
    background: #fff;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--pl-muted);
}

.v2-step__node::after {
    content: "";
    position: absolute;
    inset: -6px;
    border: 1px solid var(--pl-border-strong);
    border-radius: inherit;
    opacity: 0;
    animation: v2-node-ring 3.2s ease-out infinite;
    animation-delay: calc(var(--i) * 0.8s);
}

.v2-step:first-child .v2-step__node {
    border-color: transparent;
    background: #e20246;
    color: #fff;
}

.v2-step:first-child .v2-step__node::after {
    border-color: rgba(226, 2, 70, 0.35);
}

/* Connector to the next step: a hairline track with a brand-gradient fill
   that draws in, plus a token travelling along it. */
.v2-step__link {
    position: absolute;
    z-index: 0;
    left: 31px;
    top: 32px;
    width: 2px;
    height: calc(100% + var(--rules-gap));
    background: var(--pl-border-strong);
    border-radius: 2px;
}

/* Desktop: the rail runs from this node's centre to the next node's centre. */
@media (min-width: 1024px) {
    .v2-step__link {
        left: 50%;
        top: 31px;
        width: calc(100% + var(--rules-gap));
        height: 2px;
    }
}

.v2-step__link i {
    position: absolute;
    inset: 0;
    background: #e20246;
    transform-origin: left center;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--i) * 0.45s + 0.25s);
}

.v2-step__link i::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 999px;
    background: #fff;
    border: 2px solid #e20246;
    opacity: 0;
    animation: v2-token-y 4.5s ease-in-out infinite;
    animation-delay: calc(var(--i) * 1.5s + 1.6s);
}

@media (min-width: 1024px) {
    .v2-step__link i::after {
        animation-name: v2-token-x;
    }
}

.v2-step__card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.5rem;
    border: 1px solid var(--pl-border);
    border-radius: 18px;
    background: #fff;
    transition: border-color 0.25s ease, transform 0.25s ease, opacity 0.6s ease;
}

@media (min-width: 1024px) {
    .v2-step__card {
        flex: 1;
        width: 100%;
    }
}

.v2-step:hover .v2-step__card {
    border-color: var(--pl-border-strong);
    transform: translateY(-3px);
}

.v2-step__figure {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-height: 3.5rem;
    margin-bottom: 1.125rem;
    padding-bottom: 1.125rem;
    border-bottom: 1px solid var(--pl-border);
}

.v2-step__num {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
    color: #e20246;
}

.v2-step__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--pl-border);
    border-radius: 12px;
    background: var(--pl-soft);
    color: var(--pl-ink);
}

.v2-step__unit {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pl-muted);
}

.v2-step__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--pl-ink);
}

.v2-step__text {
    margin: 0.5rem 0 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--pl-muted);
}

/* Scroll reveal — only armed when JS is present; otherwise final state. */
.v2-flow.is-armed .v2-step__node,
.v2-flow.is-armed .v2-step__card {
    opacity: 0;
    transform: translateY(18px);
}

.v2-flow.is-armed .v2-step__link i {
    transform: scaleX(0);
}

.v2-flow.is-in .v2-step__node,
.v2-flow.is-in .v2-step__card {
    opacity: 1;
    transform: none;
}

.v2-flow.is-armed .v2-step__node {
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: calc(var(--i) * 0.45s);
}

.v2-flow.is-armed .v2-step__card {
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease;
    transition-delay: calc(var(--i) * 0.45s + 0.12s);
}

.v2-flow.is-in .v2-step:hover .v2-step__card {
    transform: translateY(-3px);
    transition-delay: 0s;
}

/* Mobile: the fill grows downward instead of sideways. */
@media (max-width: 1023px) {
    .v2-step__link i {
        transform-origin: center top;
    }

    .v2-flow.is-armed .v2-step__link i {
        transform: scaleY(0);
    }

    .v2-flow.is-in .v2-step__link i {
        transform: none;
    }
}

@media (min-width: 1024px) {
    .v2-flow.is-in .v2-step__link i {
        transform: none;
    }
}

.v2-flow.is-armed:not(.is-in) .v2-step__node::after,
.v2-flow.is-armed:not(.is-in) .v2-step__link i::after {
    animation-play-state: paused;
}

@keyframes v2-node-ring {
    0% { transform: scale(0.85); opacity: 0.7; }
    70%, 100% { transform: scale(1.25); opacity: 0; }
}

@keyframes v2-token-x {
    0% { left: 0; opacity: 0; }
    6% { opacity: 1; }
    30% { left: 100%; opacity: 1; }
    34%, 100% { left: 100%; opacity: 0; }
}

@keyframes v2-token-y {
    0% { top: 0; left: 50%; opacity: 0; }
    6% { opacity: 1; }
    30% { top: 100%; left: 50%; opacity: 1; }
    34%, 100% { top: 100%; left: 50%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .v2-plan,
    .v2-plan__cta,
    .v2-plans__toggle-btn,
    .v2-step__card,
    .v2-step__link i {
        transition: none;
    }

    .v2-plan:hover,
    .v2-step:hover .v2-step__card {
        transform: none;
    }

    .v2-step__node::after,
    .v2-step__link i::after {
        animation: none;
        opacity: 0;
    }
}

html[data-theme="dark"] .v2-plans {
    --pl-ink: #F3F4F6;
    --pl-muted: #A1A1AA;
    --pl-border: #2A2C34;
    --pl-border-strong: #3A3D47;
    --pl-soft: #17181C;
}

html[data-theme="dark"] .v2-plan {
    background: linear-gradient(180deg, #17181C 0%, #111111 38%);
}

html[data-theme="dark"] .v2-plan__cta,
html[data-theme="dark"] .v2-plan__check,
html[data-theme="dark"] .v2-step__card,
html[data-theme="dark"] .v2-step__icon,
html[data-theme="dark"] .v2-step:not(:first-child) .v2-step__node {
    background: #111111;
}

html[data-theme="dark"] .v2-step__link i::after {
    background: #111111;
}

html[data-theme="dark"] .v2-plan--featured .v2-plan__cta,
html[data-theme="dark"] .v2-plan--featured .v2-plan__cta:hover {
    background: var(--pl-brand);
    color: #fff;
}

html[data-theme="dark"] .v2-plan--featured .v2-plan__cta:hover {
    background: #c80140;
}

html[data-theme="dark"] .v2-plans__toggle-btn.is-active,
html[data-theme="dark"] .v2-plan__badge,
html[data-theme="dark"] .v2-plan__cta:hover {
    color: #111111;
}

/* ── Start free CTA (under the plan cards, guests only) ─ */
.v2-start-free {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    width: 100%;
    padding: 2rem;
}

@media (min-width: 900px) {
    .v2-start-free {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 2.25rem 2.5rem;
    }
}

.v2-start-free__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--pl-muted);
}

.v2-start-free__title {
    margin: 0;
    font-size: clamp(1.375rem, 2.2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--pl-ink);
}

/* Brand accent on the number + connects in the title (main color #e20246). */
.v2-start-free__accent {
    color: #e20246;
}

.v2-start-free__text {
    margin: 0.625rem 0 0;
    max-width: 40rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--pl-muted);
}

.v2-start-free__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    height: 48px;
    padding: 0 1.5rem;
    border-radius: 12px;
    background: var(--pl-brand);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.v2-start-free__cta:hover {
    background: #c80140;
}

.v2-start-free__cta:active {
    transform: translateY(1px);
}

.v2-start-free__cta:focus-visible {
    outline: 2px solid var(--pl-ink);
    outline-offset: 2px;
}



.v2-plan__note {
    margin: 0.85rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--pl-muted);
}
