/* ----------------------------------------------------------------------------------------
* Site          : Ki Fitness Lab
* File          : Consultation Modal (Typeform-style booking flow)
* ---------------------------------------------------------------------------------------- */

.kfl-consult {
    --kfl-black: #080517;
    --kfl-black-2: #0e0a24;
    --kfl-gold: #CAA967;
    --kfl-gold-grad: linear-gradient(135deg, #B29357 0%, #E2BF76 100%);
    --kfl-white: #ffffff;
    --kfl-muted: rgba(255, 255, 255, 0.55);
    --kfl-line: rgba(202, 169, 103, 0.22);
    --kfl-head-font: 'ClashGrotesk-Variable', 'DM Sans', sans-serif;
    --kfl-body-font: 'DM Sans', sans-serif;

    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: var(--kfl-body-font);
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s ease, visibility .4s ease;
}
.kfl-consult.is-open {
    opacity: 1;
    visibility: visible;
}

.kfl-consult__overlay {
    position: absolute;
    inset: 0;
    background: rgba(4, 3, 12, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.kfl-consult__dialog {
    position: relative;
    width: 100%;
    max-width: 760px;
    height: min(720px, 92vh);
    background: var(--kfl-black);
    background-image:
        radial-gradient(120% 80% at 100% 0%, rgba(226, 191, 118, 0.16) 0%, rgba(226, 191, 118, 0) 55%),
        radial-gradient(120% 90% at 0% 100%, rgba(178, 147, 87, 0.14) 0%, rgba(178, 147, 87, 0) 55%);
    border: 1px solid var(--kfl-line);
    border-radius: 24px;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(24px) scale(.98);
    opacity: 0;
    transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .5s ease;
}
.kfl-consult.is-open .kfl-consult__dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Progress */
.kfl-consult__progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    z-index: 6;
}
.kfl-consult__progress-bar {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--kfl-gold-grad);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 14px rgba(226, 191, 118, 0.5);
    transition: width .5s cubic-bezier(.16, 1, .3, 1);
}

/* Close */
.kfl-consult__close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 7;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--kfl-line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--kfl-white);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .25s ease;
}
.kfl-consult__close:hover {
    border-color: var(--kfl-gold);
    color: #08040f;
    background: var(--kfl-gold-grad);
    transform: rotate(90deg);
}

/* Viewport / steps */
.kfl-consult__viewport {
    position: relative;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 64px 56px 24px;
    -webkit-overflow-scrolling: touch;
}
.kfl-consult__viewport::-webkit-scrollbar { width: 8px; }
.kfl-consult__viewport::-webkit-scrollbar-thumb { background: rgba(202, 169, 103, 0.3); border-radius: 8px; }

.kfl-step { display: none; }
.kfl-step.is-active {
    display: block;
    animation: kflStepIn .55s cubic-bezier(.16, 1, .3, 1) both;
}
.kfl-consult.is-back .kfl-step.is-active {
    animation: kflStepInBack .55s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes kflStepIn {
    from { opacity: 0; transform: translateY(34px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes kflStepInBack {
    from { opacity: 0; transform: translateY(-34px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Question head */
.kfl-q__num {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .04em;
    margin-bottom: 16px;
    background: var(--kfl-gold-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.kfl-q__num i { font-size: 12px; }
.kfl-q__title {
    font-family: var(--kfl-head-font);
    color: var(--kfl-white);
    font-size: clamp(24px, 3.4vw, 34px);
    line-height: 1.18;
    font-weight: 600;
    margin: 0 0 8px;
}
.kfl-q__req { color: var(--kfl-gold); font-weight: 600; }
.kfl-q__desc {
    color: var(--kfl-muted);
    font-size: 16px;
    margin: 0 0 30px;
}

/* Text inputs */
.kfl-field {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.18);
    color: var(--kfl-white);
    font-family: var(--kfl-body-font);
    font-size: clamp(20px, 2.6vw, 26px);
    padding: 8px 2px 12px;
    outline: none;
    transition: border-color .3s ease;
}
.kfl-field::placeholder { color: rgba(255, 255, 255, 0.28); }
.kfl-field:focus { border-bottom-color: var(--kfl-gold); }
textarea.kfl-field {
    resize: none;
    min-height: 96px;
    font-size: clamp(18px, 2vw, 21px);
    line-height: 1.5;
}

/* Choice options */
.kfl-options {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}
.kfl-options.kfl-options--2 { grid-template-columns: repeat(2, 1fr); }
.kfl-opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: left;
    padding: 15px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: var(--kfl-white);
    font-family: var(--kfl-body-font);
    font-size: 17px;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.kfl-opt:hover {
    border-color: rgba(202, 169, 103, 0.6);
    background: rgba(202, 169, 103, 0.08);
    transform: translateY(-1px);
}
.kfl-opt__key {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--kfl-muted);
    transition: all .2s ease;
}
.kfl-opt__label { flex: 1; }
.kfl-opt__check {
    flex: none;
    opacity: 0;
    color: var(--kfl-gold);
    font-size: 16px;
    transform: scale(.5);
    transition: all .2s ease;
}
.kfl-opt.is-selected {
    border-color: var(--kfl-gold);
    background: rgba(202, 169, 103, 0.12);
}
.kfl-opt.is-selected .kfl-opt__key {
    background: var(--kfl-gold-grad);
    border-color: transparent;
    color: #08040f;
}
.kfl-opt.is-selected .kfl-opt__check { opacity: 1; transform: scale(1); }

/* "Other" inline input */
.kfl-other {
    margin-top: 12px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
}
.kfl-other.is-open { max-height: 80px; }

/* Calendar (Calendly-style) */
.kfl-cal {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--kfl-line);
    border-radius: 18px;
    padding: 20px 22px 24px;
    max-width: 420px;
}
.kfl-cal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.kfl-cal__month {
    font-family: var(--kfl-head-font);
    color: var(--kfl-white);
    font-size: 19px;
    font-weight: 600;
}
.kfl-cal__nav {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--kfl-line);
    background: transparent;
    color: var(--kfl-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}
.kfl-cal__nav:hover:not(:disabled) { background: var(--kfl-gold-grad); color: #08040f; border-color: transparent; }
.kfl-cal__nav:disabled { opacity: .25; cursor: not-allowed; }
.kfl-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.kfl-cal__dow {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    color: var(--kfl-muted);
    padding: 6px 0;
    text-transform: uppercase;
}
.kfl-cal__day {
    aspect-ratio: 1 / 1;
    border: none;
    background: transparent;
    color: var(--kfl-white);
    border-radius: 50%;
    font-family: var(--kfl-body-font);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .18s ease;
}
.kfl-cal__day:hover:not(:disabled):not(.is-empty) {
    background: rgba(202, 169, 103, 0.18);
    box-shadow: inset 0 0 0 1.5px var(--kfl-gold);
}
.kfl-cal__day.is-today:not(.is-selected) { box-shadow: inset 0 0 0 1.5px rgba(202, 169, 103, 0.5); }
.kfl-cal__day.is-selected {
    background: var(--kfl-gold-grad);
    color: #08040f;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(226, 191, 118, 0.35);
}
.kfl-cal__day:disabled { opacity: .22; cursor: not-allowed; }
.kfl-cal__day.is-empty { cursor: default; }
.kfl-cal__selected {
    margin-top: 18px;
    color: var(--kfl-muted);
    font-size: 15px;
}
.kfl-cal__selected strong { color: var(--kfl-gold); font-weight: 600; }

/* Error */
.kfl-err {
    color: #ff8f8f;
    font-size: 14px;
    margin-top: 12px;
    min-height: 18px;
    opacity: 0;
    transform: translateY(-4px);
    transition: all .2s ease;
}
.kfl-err.is-show { opacity: 1; transform: translateY(0); }

/* Footer / nav */
.kfl-consult__footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 56px 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.kfl-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    font-family: var(--kfl-body-font);
    font-weight: 600;
    border-radius: 12px;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.kfl-btn--next {
    background: var(--kfl-gold-grad);
    color: #08040f;
    font-size: 16px;
    padding: 13px 26px;
    box-shadow: 0 10px 26px rgba(178, 147, 87, 0.3);
}
.kfl-btn--next:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(226, 191, 118, 0.42); }
.kfl-btn--next i { font-size: 13px; }
.kfl-btn--back {
    background: transparent;
    color: var(--kfl-muted);
    font-size: 15px;
    padding: 10px 8px;
}
.kfl-btn--back:hover { color: var(--kfl-white); }
.kfl-btn--back[hidden] { display: none; }
.kfl-consult__hint {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.32);
    font-size: 13px;
}
.kfl-consult__hint strong { color: var(--kfl-muted); font-weight: 600; }

/* Welcome + success */
.kfl-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 100%;
    text-align: left;
}
.kfl-hero__eyebrow {
    display: inline-block;
    background: var(--kfl-gold-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-size: 13px;
    margin-bottom: 18px;
}
.kfl-hero__title {
    font-family: var(--kfl-head-font);
    color: var(--kfl-white);
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.08;
    font-weight: 600;
    margin: 0 0 16px;
}
.kfl-hero__title .kfl-gold {
    background: var(--kfl-gold-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.kfl-hero__text { color: var(--kfl-muted); font-size: 17px; line-height: 1.6; max-width: 480px; margin: 0 0 32px; }
.kfl-hero__meta { color: rgba(255,255,255,.4); font-size: 14px; margin-top: 22px; display:flex; align-items:center; gap:8px; }
.kfl-hero__meta i { color: var(--kfl-gold); }

/* Intro screen with inline name + email */
.kfl-intro .kfl-hero__text { margin-bottom: 26px; }
.kfl-intro .kfl-body { width: 100%; }
.kfl-introfields { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 480px; }
.kfl-fieldgroup { display: flex; flex-direction: column; gap: 9px; }
.kfl-flabel { color: var(--kfl-white); font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.kfl-intro .kfl-field { font-size: clamp(17px, 2vw, 21px); }

.kfl-success { text-align: center; align-items: center; }
.kfl-success__icon {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--kfl-gold-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #08040f;
    font-size: 40px;
    margin: 0 auto 26px;
    box-shadow: 0 14px 40px rgba(226, 191, 118, 0.4);
    animation: kflPop .6s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes kflPop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.kfl-success .kfl-hero__title, .kfl-success .kfl-hero__text { text-align: center; }
.kfl-success .kfl-hero__text { margin-left: auto; margin-right: auto; }
.kfl-summary {
    margin: 6px auto 30px;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--kfl-line);
    border-radius: 14px;
    padding: 18px 22px;
    max-width: 420px;
    width: 100%;
}
.kfl-summary__row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.05); }
.kfl-summary__row:last-child { border-bottom: none; }
.kfl-summary__k { color: var(--kfl-muted); }
.kfl-summary__v { color: var(--kfl-white); font-weight: 600; text-align: right; }

.kfl-btn--hero {
    background: var(--kfl-gold-grad);
    color: #08040f;
    font-size: 17px;
    padding: 16px 34px;
    box-shadow: 0 12px 30px rgba(178, 147, 87, 0.32);
}
.kfl-btn--hero:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(226, 191, 118, 0.45); }

/* Lock body scroll */
body.kfl-lock { overflow: hidden; }

/* Mobile */
@media (max-width: 600px) {
    .kfl-consult { padding: 0; }
    .kfl-consult__dialog { max-width: 100%; height: 100%; border-radius: 0; border: none; }
    .kfl-consult__viewport { padding: 60px 24px 20px; }
    .kfl-consult__footer { padding: 16px 24px 22px; }
    .kfl-consult__hint { display: none; }
    .kfl-options.kfl-options--2 { grid-template-columns: 1fr; }
    .kfl-btn--next { padding: 12px 22px; }
}
