/* Get Started wizard — premium multi-step lead funnel.
 *
 * Loaded only by templates/home/get_started.html. All hiding/animation is
 * class-driven (no inline styles) so it works under the strict PUBLIC_CSP.
 * Progressive enhancement: without JS every step is visible and the form
 * submits as one page; get_started.js adds `.is-enhanced` to switch on the
 * step-by-step wizard. Honors prefers-reduced-motion.
 */

.gs {
    /* Force a dark presentation regardless of the visitor's theme — matches
       the dark marketing sections (pricing/journey, which hardcode dark).
       We override only the theme tokens this page actually uses that flip
       between light/dark (--inv-bg-color text, --red, --green) with their
       dark values and paint a dark backdrop, so the color-mix() card tints
       and light text always resolve against dark. --purple/--blurple are
       already theme-independent. */
    --inv-bg-color: #f1f5f9;
    --red: #ff4141;
    --green: #22c55e;
    background: #000000;
    color: var(--inv-bg-color);
    /* Fill the viewport so the footer sits below the fold (you scroll to it),
       matching .pricing-v2 / .login-v2 / .journey-v2 which all use 100vh. The
       old `calc(100vh - 220px)` left the section short, so the footer peeked
       above the fold. */
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    /* Top padding must clear the fixed 60px .site-header (tidyTemplate.css)
       on every width. The old `clamp(2rem, …)` bottomed out at 32px on narrow
       screens, so the content slid under the nav. Min 6rem (96px) clears it. */
    padding: clamp(6rem, 8vw, 7rem) 1.25rem 4rem;
}

.gs-inner {
    width: 100%;
    max-width: 720px;
}

/* ── Header + progress ──────────────────────────────────────────────── */

.gs-head {
    margin-bottom: 1.75rem;
}

.gs-kicker {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--purple);
    margin: 0 0 0.85rem;
}

.gs-progress-track {
    height: 5px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--inv-bg-color) 9%, transparent);
    overflow: hidden;
}

.gs-progress-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--blurple), var(--purple));
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.gs-progress-label {
    display: inline-block;
    margin-top: 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--inv-bg-color);
    opacity: 0.45;
}

/* ── Banners (resume / completed) ───────────────────────────────────── */

.gs-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--inv-bg-color);
    border: 1px solid color-mix(in srgb, var(--inv-bg-color) 9%, transparent);
    background: color-mix(in srgb, var(--inv-bg-color) 3%, transparent);
}

/* `display: flex` above would otherwise override the UA `[hidden]` rule
   (author origin beats UA), making BOTH banners show before/while JS
   toggles `hidden`. Restore hidden — `.gs-banner[hidden]` (0,2,0) outranks
   `.gs-banner` (0,1,0), so the JS-controlled `hidden` attribute wins. */
.gs-banner[hidden] { display: none; }

.gs-banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--purple);
    flex-shrink: 0;
}

.gs-banner-link {
    margin-left: auto;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--purple);
    cursor: pointer;
    text-decoration: underline;
    white-space: nowrap;
}

/* Dismiss "×" — sits after "Start over" at the far right of the banner. */
.gs-banner-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 0.15rem;
    padding: 0.2rem;
    background: none;
    border: none;
    border-radius: 6px;
    color: var(--inv-bg-color);
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.gs-banner-close:hover { opacity: 0.85; background: color-mix(in srgb, var(--inv-bg-color) 7%, transparent); }
.gs-banner-close:focus-visible { outline: 2px solid var(--purple); outline-offset: 1px; opacity: 0.85; }

/* ── Error ──────────────────────────────────────────────────────────── */

.gs-error {
    padding: 0.8rem 1.1rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--red) 9%, transparent);
    border: 1px solid color-mix(in srgb, var(--red) 28%, transparent);
    color: var(--red);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ── Steps ──────────────────────────────────────────────────────────── */

/* No-JS: all steps stacked + visible, nav buttons hidden, one submit. */
.gs-wizard:not(.is-enhanced) [data-gs-next],
.gs-wizard:not(.is-enhanced) [data-gs-back] { display: none; }

.gs-step { margin-bottom: 2.5rem; }

.gs-wizard.is-enhanced .gs-step { display: none; }
.gs-wizard.is-enhanced .gs-step.is-current {
    display: block;
    margin-bottom: 0;
    animation: gsStepIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes gsStepIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gs-step-title {
    font-size: clamp(1.5rem, 3.4vw, 2.05rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--inv-bg-color);
    margin: 0 0 0.5rem;
}

.gs-step-sub {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--inv-bg-color);
    opacity: 0.55;
    margin: 0 0 1.6rem;
}

/* ── Choice cards ───────────────────────────────────────────────────── */

.gs-cards { display: grid; gap: 0.85rem; margin-bottom: 1.75rem; }
.gs-cards--2 { grid-template-columns: repeat(2, 1fr); }
.gs-cards--3 { grid-template-columns: repeat(3, 1fr); }

.gs-card {
    position: relative;
    display: block;
    padding: 1.3rem 1.2rem;
    border-radius: 16px;
    border: 1.5px solid color-mix(in srgb, var(--inv-bg-color) 10%, transparent);
    background: color-mix(in srgb, var(--inv-bg-color) 2%, transparent);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
}

.gs-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--purple) 40%, transparent);
    box-shadow: 0 12px 30px color-mix(in srgb, var(--purple) 12%, transparent);
}

/* Visually-hidden native control (kept focusable + in the form). */
.gs-card input,
.gs-pill input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.gs-card:has(input:checked) {
    border-color: var(--purple);
    background: color-mix(in srgb, var(--purple) 8%, transparent);
    box-shadow: 0 10px 34px color-mix(in srgb, var(--purple) 18%, transparent);
}

.gs-card:has(input:focus-visible) {
    outline: 2px solid var(--purple);
    outline-offset: 3px;
}

.gs-card-body { display: flex; flex-direction: column; gap: 0.4rem; }

.gs-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 0.4rem;
    border-radius: 12px;
    color: var(--purple);
    background: color-mix(in srgb, var(--purple) 12%, transparent);
    transition: background 0.2s ease, color 0.2s ease;
}

.gs-card:has(input:checked) .gs-card-icon {
    background: linear-gradient(135deg, var(--blurple), var(--purple));
    color: #fff;
}

.gs-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--inv-bg-color);
    letter-spacing: -0.01em;
}

.gs-card-desc {
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--inv-bg-color);
    opacity: 0.55;
}

.gs-card-check {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--blurple), var(--purple));
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gs-card:has(input:checked) .gs-card-check { opacity: 1; transform: scale(1); }

/* ── Pills (team size) ──────────────────────────────────────────────── */

.gs-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.75rem; }

.gs-pill {
    position: relative;
    cursor: pointer;
}

.gs-pill span {
    display: inline-block;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--inv-bg-color);
    border: 1.5px solid color-mix(in srgb, var(--inv-bg-color) 12%, transparent);
    background: color-mix(in srgb, var(--inv-bg-color) 2%, transparent);
    transition: all 0.18s ease;
}

.gs-pill:hover span { border-color: color-mix(in srgb, var(--purple) 45%, transparent); }

.gs-pill:has(input:checked) span {
    border-color: var(--purple);
    background: linear-gradient(135deg, var(--blurple), var(--purple));
    color: #fff;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--purple) 22%, transparent);
}

.gs-pill:has(input:focus-visible) span { outline: 2px solid var(--purple); outline-offset: 2px; }

/* ── Text fields ────────────────────────────────────────────────────── */

.gs-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; margin-bottom: 0.9rem; }

.gs-field { display: block; margin-bottom: 0.9rem; }

.gs-field-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--inv-bg-color);
    opacity: 0.7;
    margin-bottom: 0.4rem;
}

.gs-field-label--block { margin-top: 0.3rem; }
.gs-optional { font-weight: 400; opacity: 0.6; }

.gs-field input,
.gs-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1.5px solid color-mix(in srgb, var(--inv-bg-color) 12%, transparent);
    background: color-mix(in srgb, var(--inv-bg-color) 2%, transparent);
    color: var(--inv-bg-color);
    font: inherit;
    font-size: 0.92rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    resize: vertical;
}

.gs-field input::placeholder,
.gs-field textarea::placeholder { color: var(--inv-bg-color); opacity: 0.32; }

.gs-field input:focus,
.gs-field textarea:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--purple) 12%, transparent);
}

/* ── Nav + buttons ──────────────────────────────────────────────────── */

.gs-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.9rem;
}

.gs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    border: none;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    /* `gs-success-cta` is an <a>; kill the global landing anchor underline. */
    text-decoration: none !important;
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.gs-btn svg { transition: transform 0.25s ease; }

.gs-btn-primary {
    /* !important beats the global `a:link` color on the <a> success CTA
       (same workaround login.css uses for .login-v2-submit). */
    color: #fff !important;
    background: linear-gradient(135deg, var(--blurple), var(--purple));
    box-shadow: 0 8px 26px color-mix(in srgb, var(--purple) 32%, transparent);
}

.gs-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 34px color-mix(in srgb, var(--purple) 40%, transparent);
}

.gs-btn-primary:hover svg { transform: translateX(4px); }

.gs-btn-ghost {
    color: var(--inv-bg-color);
    background: transparent;
    opacity: 0.6;
}

.gs-btn-ghost:hover { opacity: 1; }

/* ── Success state ──────────────────────────────────────────────────── */

.gs-success {
    text-align: center;
    padding: clamp(1rem, 5vw, 3rem) 0;
    animation: gsStepIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gs-success-check { width: 96px; height: 96px; margin: 0 auto 1.75rem; }
.gs-success-check svg { width: 100%; height: 100%; }

.gs-success-circle {
    stroke: var(--green);
    stroke-width: 2.5;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: gsDraw 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.gs-success-path {
    stroke: var(--green);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: gsDraw 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}

@keyframes gsDraw { to { stroke-dashoffset: 0; } }

.gs-success-title {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--inv-bg-color);
    margin: 0 0 0.75rem;
    animation: gsStepIn 0.5s ease 0.7s both;
}

.gs-success-sub {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--inv-bg-color);
    opacity: 0.6;
    max-width: 460px;
    margin: 0 auto 2rem;
    animation: gsStepIn 0.5s ease 0.85s both;
}

.gs-success-sub a { color: var(--purple); font-weight: 600; }

.gs-success-cta { animation: gsStepIn 0.5s ease 1s both; }

/* Small secondary "submit another request" link under the primary CTA.
   !important on color/decoration beats the global landing anchor styles. */
.gs-success-again {
    display: block;
    width: fit-content;
    margin: 1.1rem auto 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--inv-bg-color) !important;
    opacity: 0.5;
    text-decoration: none !important;
    cursor: pointer;
    transition: opacity 0.15s ease;
    animation: gsStepIn 0.5s ease 1.1s both;
}

.gs-success-again:hover { opacity: 0.9; }

/* ── Validation feedback ────────────────────────────────────────────── */

.gs-invalid {
    border-color: var(--red) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 12%, transparent) !important;
}

.gs-shake { animation: gsShake 0.4s ease; }

@keyframes gsShake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-5px); }
    40%, 60% { transform: translateX(5px); }
}

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .gs-cards--2, .gs-cards--3 { grid-template-columns: 1fr; }
    .gs-field-row { grid-template-columns: 1fr; }
    .gs-card-check { top: 0.85rem; right: 0.85rem; }
}

/* ── Reduced motion ─────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .gs *,
    .gs *::before,
    .gs *::after {
        animation-duration: 0.001ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.001ms !important;
    }
    .gs-success-circle, .gs-success-path { stroke-dashoffset: 0; }
}
