/* ================================================================
   PLANS PAGE — page-specific styles
   Relies on main.css for header, footer, CTA, etc.
================================================================ */

/* ── Hero section ── */
.plans-hero-section {
    padding: 7rem 2rem 5rem;
    text-align: center;
}

:root {
    --plans-gold: #fece49;
}

.plans-hero-intro {
    margin-bottom: 3.5rem;
}

.plans-title {
    font-family: 'Relative-Book', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #1a1a1a;
    line-height: 1.1;
    margin: 0 0 1.25rem 0;
}

.plans-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    color: #6b7280;
    max-width: 44ch;
    margin: 1.75rem auto 0;
    line-height: 1.6;
}

/* ── Single-card layout ── */
.new-pricing-layout {
    max-width: 420px;
    margin: 0 auto 1.75rem;
    text-align: left;
}

/* ── Controls row: project selector (left) + billing toggle (right) ── */
.plans-controls-row {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    gap: 0.75rem;
    max-width: 620px;
    margin: 0 auto 1.5rem;
}

.plans-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 0 1 395px;
    max-width: 395px;
    min-width: 0;
}

.plans-selector-slider {
    position: relative;
    width: 100%;
    height: 1.72rem;
    margin-bottom: 0;
}

.plans-selector-card {
    position: absolute;
    top: 0.12rem;
    left: 0;
    transform: translateX(-50%);
    display: inline-block;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: left 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    text-align: center;
}

.plans-selector-card::after {
    content: '';
    display: block;
    width: 0.32rem;
    height: 0.32rem;
    border-radius: 999px;
    background: #6b7280;
    margin: 0.14rem auto 0;
}

.plan-tabs {
    display: flex;
    background: #f3f2f0;
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
    width: 100%;
}

.plan-tab {
    padding: 0.34rem 0.55rem;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
    line-height: 1.4;
    white-space: nowrap;
    flex: 1 1 0;
    text-align: center;
}

.plan-tab:hover:not(.is-active) {
    color: #1a1a1a;
}

.plan-tab.is-active {
    background: #fff;
    color: #1a1a1a;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.plan-tab-label {
    display: inline-block;
    transform: scale(1);
    transition: transform 0.2s ease;
}

.plan-tab.is-active .plan-tab-label {
    transform: scale(1.12);
}

/* Billing toggle */
.billing-toggle-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    padding-top: 48px;
}

/* Handwriting annotation — text + arrow in row, arrow curves from right of text down to Yearly */
.billing-annotation {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(calc(-50% - 0.75rem));
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    pointer-events: none;
    user-select: none;
    color: var(--plans-gold);
}

.billing-annotation-text {
    font-family: 'Caveat', cursive;
    font-size: 1.18rem;
    font-weight: 700;
    color: inherit;
    white-space: nowrap;
    line-height: 1.2;
}

.billing-annotation-arrow {
    flex-shrink: 0;
    transform: scaleX(-1) translateY(0.95rem);
}

.billing-toggle {
    display: inline-flex;
    background: #f3f2f0;
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.billing-btn {
    padding: 0.38rem 1rem;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
    line-height: 1.4;
    white-space: nowrap;
}

.billing-btn.is-active {
    background: #fff;
    color: #1a1a1a;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* ── Plans card ── */
.plans-card {
    background: #f3f2f0;
    border-radius: 16px;
    padding: 2.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

/* Price number transition */
@keyframes price-swap {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    45% {
        transform: translateY(-14%);
        opacity: 0;
    }
    55% {
        transform: translateY(14%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Price display */
.plans-price-area {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.plans-price-main {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    line-height: 1;
}

.plans-price-clip {
    line-height: 1;
}

.plans-price-symbol {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.plans-price-dollars {
    font-size: clamp(2.75rem, 4.5vw, 3.75rem);
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.05em;
    line-height: 1;
    font-family: 'Relative-Book', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: inline-block;
    will-change: transform, opacity;
}

.plans-price-dollars.is-rolling {
    animation: price-swap 0.34s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.plans-price-mo {
    font-size: 1rem;
    color: #9ca3af;
    font-weight: 400;
    letter-spacing: 0;
    margin-left: 0.08rem;
}

.plans-price-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-height: 1.4em;
    margin-bottom: 0.2rem;
}

.plans-plan-name {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ca3af;
    margin: 0 0 0.85rem 0;
}

.plans-billed-yearly {
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 400;
}

/* Save row — shown only in annual mode (2 months free) */
.plans-save-row {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 1.35rem;
    font-size: 1rem;
    font-weight: 800;
    color: #1f2937;
    opacity: 0;
    visibility: hidden;
    transform: translateY(3px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.plans-save-row.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.plans-save-slot {
    min-height: 1.35rem;
}

.plans-save-slot::before {
    content: none !important;
}

.plans-save-check {
    flex-shrink: 0;
}

.plans-save-row strong {
    font-weight: 700;
}

/* Features */
.plans-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.52rem;
}

.plans-features-list li {
    font-size: 0.98rem;
    color: #444;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    line-height: 1.4;
}

.plans-check-icon {
    flex-shrink: 0;
    color: #1a1a1a;
}

.plans-feature-primary {
    font-weight: 700;
    color: #1f2937;
    position: relative;
}

.projects-highlight {
    display: inline;
    background: rgba(253, 224, 105, 0.6);
    color: #1f2937;
    font-weight: 800;
    border-radius: 4px;
    padding: 0.05em 0.35em;
    margin: -0.05em -0.1em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.projects-info-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 0.25rem;
}

.projects-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.92rem;
    height: 0.92rem;
    border: 1px solid #b8b8b5;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    color: #8a8a87;
    cursor: pointer;
    overflow: hidden;
    transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, color 0.2s ease, border-radius 0.2s ease, transform 0.2s ease;
}

.projects-info-i,
.projects-info-arrow {
    display: inline-block;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.projects-info-i {
    opacity: 1;
    transform: translateX(0);
}

.projects-info-arrow {
    position: absolute;
    opacity: 0;
    transform: translateX(-3px);
    font-size: 1.3rem;
    font-weight: 700;
}

.projects-info-wrap:hover .projects-info-i,
.projects-info-wrap:focus-within .projects-info-i {
    opacity: 0;
    transform: translateX(3px);
}

.projects-info-wrap:hover .projects-info-arrow,
.projects-info-wrap:focus-within .projects-info-arrow {
    opacity: 1;
    transform: translateX(0);
}

.projects-info-wrap:hover .projects-info-icon,
.projects-info-wrap:focus-within .projects-info-icon {
    width: 1.08rem;
    height: 0.92rem;
    border-radius: 4px;
    border-color: transparent;
    color: #6b7280;
    transform: translateX(1px);
}

.projects-info-card {
    position: absolute;
    left: calc(100% + 1.5rem);
    top: 50%;
    transform: translateY(-50%);
    width: 250px;
    padding: 0.85rem 0.95rem;
    border-radius: 10px;
    background: #ffffff;
    border: none;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    color: #555;
    font-size: 0.98rem;
    font-weight: 500;
    line-height: 1.38;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 6;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.projects-info-wrap:hover .projects-info-card,
.projects-info-wrap:focus-within .projects-info-card {
    opacity: 1;
    visibility: visible;
}

.term-tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.term-tooltip-trigger {
    border-bottom: 1px dotted #9ca3af;
    cursor: help;
    line-height: 1.15;
}

.term-tooltip-trigger-strong {
    font-weight: 700;
    color: #374151;
}

.term-tooltip-bubble {
    position: absolute;
    left: calc(100% + 0.6rem);
    top: 50%;
    transform: translateY(-50%);
    min-width: 220px;
    max-width: 260px;
    padding: 0.58rem 0.68rem;
    border-radius: 8px;
    border: 1px solid #dddcd9;
    background: #ffffff;
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1.35;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 3;
    transition: opacity 0.16s ease, visibility 0.16s ease;
}

.term-tooltip-wrap:hover .term-tooltip-bubble,
.term-tooltip-wrap:focus-within .term-tooltip-bubble {
    opacity: 1;
    visibility: visible;
}

/* CTA */
.plans-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-align: center;
    padding: 0.875rem 2rem;
    border-radius: 10px;
    background: linear-gradient(to right, #ffeb7f, #fbc02d);
    border: 1px solid #2c2c2c;
    color: #374151;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.plans-cta-text {
    font-weight: 800;
}

.plans-cta-arrow {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.plans-cta-btn:hover .plans-cta-arrow {
    transform: translateX(4px);
}

.plans-cta-btn:hover {
    background: linear-gradient(to right, #ffe773, #efb92a);
    box-shadow: 0 8px 18px rgba(44, 44, 44, 0.15);
    transform: translateY(-1px) scale(1.02);
    text-decoration: none;
    color: #374151;
}

/* Guarantee line */
.plans-guarantee {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    color: #9ca3af;
    letter-spacing: 0.01em;
    text-align: center;
    margin-bottom: 0;
}

.plans-guarantee-bullet {
    display: inline-block;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 999px;
    background: #c6c4bf;
    margin: 0 0.48rem 0.08rem;
    vertical-align: middle;
}

/* ── Responsive ── */
@media (max-width: 620px) {
    .plans-controls-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        max-width: 420px;
    }

    .plans-selector {
        align-items: center;
        max-width: 420px;
    }

    .plans-selector-slider {
        display: flex;
        justify-content: center;
    }

    .plans-selector-card {
        left: 50% !important;
        transform: translateX(-50%);
    }

    .plan-tabs {
        justify-content: center;
    }

    .billing-toggle-wrap {
        align-items: center;
        padding-top: 48px;
    }

    .billing-annotation {
        left: 50%;
        right: auto;
        transform: translateX(calc(-50% - 0.75rem));
        align-items: center;
    }

    .term-tooltip-bubble {
        left: 0;
        top: calc(100% + 0.45rem);
        transform: none;
        min-width: 200px;
        max-width: 250px;
    }

    .projects-info-card {
        left: 0;
        right: auto;
        top: calc(100% + 0.45rem);
        transform: none;
        width: min(260px, 82vw);
    }

}

@media (max-width: 600px) {
    .plans-card {
        padding: 1.75rem;
    }

    .plans-price-dollars {
        font-size: 2.75rem;
    }
}

@media (max-width: 480px) {
    .plans-card {
        padding: 1.5rem;
    }

    .billing-btn {
        padding: 0.38rem 0.75rem;
    }
}
