/* ====================================================
   Teil1 Funnel — Frontend Form Styles
   Swiss Typography / Editorial Light
   ==================================================== */

/* ── Design Tokens ── */
.t1-form-container {
    --t1f-accent: #5eb94c;
    --t1f-accent-hover: #4da83e;
    --t1f-btn-bg: #E2E1DD;
    --t1f-btn-color: #121212;
    --t1f-btn-hover: #5eb94c;
    --t1f-text: #121212;
    --t1f-muted: #73726E;
    --t1f-light: #BDBDBA;
    --t1f-border: rgba(18, 18, 18, 0.08);
    --t1f-input-bg: rgba(255, 255, 255, 0.5);
    --t1f-input-border: rgba(18, 18, 18, 0.08);
    --t1f-radius-btn: 40px;
    --t1f-radius-card: 12px;
    --t1f-radius-input: 6px;
    --t1f-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --t1f-font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --t1f-font-heading: "Space Grotesk", "Inter", sans-serif;

    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    font-family: var(--t1f-font);
    position: relative;
}


/* ── Card ── */
.t1-form-card {
    background: rgba(255, 255, 255, 0.25);
    border-radius: var(--t1f-radius-card);
    border: 1px solid rgba(18, 18, 18, 0.06);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.02),
        0 6px 24px rgba(0, 0, 0, 0.04);
    padding: 32px;
    overflow: visible;
}

.t1-form--minimal .t1-form-card {
    border: 1px solid rgba(18, 18, 18, 0.04);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

/* ── Header ── */
.t1-form-header {
    padding: 0;
    margin: 0 0 20px;
    text-align: left;
    border-bottom: none;
}

.t1-form-title {
    margin: 0;
    color: var(--t1f-text);
    font-size: clamp(22px, 2.5vw, 28px);
    font-weight: 400;
    font-family: var(--t1f-font-heading);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.t1-form-subtitle {
    margin: 6px 0 0;
    color: var(--t1f-muted);
    font-size: 12px;
    line-height: 1.5;
}

/* ── Form Body ── */
.t1-form {
    padding: 0;
}

/* ── Steps ── */
.t1-form-step {
    display: none;
}

.t1-form-step.active {
    display: block;
    animation: t1f-fadeIn 0.35s var(--t1f-spring);
}

@keyframes t1f-fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Field Groups ── */
.t1-form-group {
    margin-bottom: 20px;
}

.t1-form-row {
    display: flex;
    gap: 16px;
}

.t1-form-row .t1-form-group {
    margin-bottom: 20px;
}

.t1-field-half {
    flex: 1;
    min-width: 0;
}

/* ── Labels ── */
.t1-form-group label {
    display: block;
    font-family: var(--t1f-font);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--t1f-muted);
    margin-bottom: 6px;
}

/* ── Inputs & Textarea ── */
.t1-form input[type="text"],
.t1-form input[type="email"],
.t1-form input[type="tel"],
.t1-form input[type="url"],
.t1-form input[type="number"],
.t1-form textarea,
.t1-form select {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    font-family: var(--t1f-font);
    color: var(--t1f-text);
    background: var(--t1f-input-bg);
    border: 1px solid var(--t1f-input-border);
    border-radius: var(--t1f-radius-input);
    box-sizing: border-box;
    transition:
        border-color 0.25s var(--t1f-spring),
        background 0.25s var(--t1f-spring),
        box-shadow 0.25s var(--t1f-spring);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.t1-form input::placeholder,
.t1-form textarea::placeholder {
    color: var(--t1f-light);
    font-size: 12px;
}

.t1-form input:focus,
.t1-form textarea:focus,
.t1-form select:focus {
    border-color: rgba(94, 185, 76, 0.5);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 0 0 3px rgba(94, 185, 76, 0.08);
}

.t1-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Validation error */
.t1-field-error {
    border-color: #d93025 !important;
    box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.08) !important;
}

/* ── Icon Input ── */
.t1-input-icon-wrap {
    position: relative;
}

.t1-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    opacity: 0.35;
    pointer-events: none;
}

.t1-input-icon-wrap input {
    padding-left: 32px;
}

/* ── Radio Cards ── */
.t1-radio-group {
    display: flex;
    gap: 8px;
}

.t1-radio-card {
    flex: 1;
    cursor: pointer;
    position: relative;
    display: flex;
}

.t1-radio-card input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.t1-radio-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 9px 8px;
    border: 1px solid var(--t1f-input-border);
    border-radius: var(--t1f-radius-input);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--t1f-muted);
    transition: all 0.25s var(--t1f-spring);
    background: var(--t1f-input-bg);
}

.t1-radio-card:hover .t1-radio-content {
    border-color: rgba(18, 18, 18, 0.2);
    color: var(--t1f-text);
}

.t1-radio-card input:checked + .t1-radio-content {
    background: var(--t1f-text);
    color: #fff;
    border-color: var(--t1f-text);
}

/* ── Checkbox ── */
.t1-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.4;
}

.t1-checkbox-label input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--t1f-accent);
    cursor: pointer;
}

.t1-checkbox-text {
    font-size: 11px;
    color: var(--t1f-muted);
    line-height: 1.5;
}

.t1-checkbox-text a {
    color: var(--t1f-text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Select ── */
.t1-select-wrap {
    position: relative;
}

.t1-select-wrap select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 28px;
}

.t1-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
    color: var(--t1f-light);
    pointer-events: none;
}

/* ── Submit Button — centered for balance ── */
.t1-form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 32px;
    background: var(--t1f-btn-bg);
    color: var(--t1f-btn-color);
    border: none;
    border-radius: var(--t1f-radius-btn);
    font-family: var(--t1f-font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        background 0.4s var(--t1f-spring),
        color 0.4s var(--t1f-spring),
        transform 0.4s var(--t1f-spring),
        box-shadow 0.4s var(--t1f-spring);
    margin-top: 28px;
    position: relative;
    overflow: hidden;
}

.t1-form-submit:hover {
    background: var(--t1f-btn-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(94, 185, 76, 0.25);
}

.t1-form-submit:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Arrow animation */
.t1-btn-arrow {
    display: inline-block;
    transition: transform 0.3s var(--t1f-spring);
}

.t1-form-submit:hover .t1-btn-arrow {
    transform: translateX(3px);
}

/* Shimmer — subtle */
.t1-shimmer-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.12),
        transparent
    );
    transform: skewX(-20deg);
    animation: t1f-shimmer 5s infinite 3s;
}

@keyframes t1f-shimmer {
    0% { left: -100%; }
    12% { left: 200%; }
    100% { left: 200%; }
}

/* ── Navigation (Multi-Step) ── */
.t1-form-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.t1-form-btn-prev,
.t1-form-btn-next {
    padding: 10px 24px;
    font-family: var(--t1f-font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid var(--t1f-border);
    border-radius: var(--t1f-radius-btn);
    background: transparent;
    color: var(--t1f-text);
    cursor: pointer;
    transition: all 0.25s var(--t1f-spring);
}

.t1-form-btn-next {
    background: var(--t1f-text);
    color: #fff;
    border-color: var(--t1f-text);
    margin-left: auto;
}

.t1-form-btn-prev:hover {
    background: rgba(18, 18, 18, 0.03);
}

.t1-form-btn-next:hover {
    background: #333;
}

/* ── Security Note ── */
.t1-form-security {
    margin: 12px 0 0;
    font-size: 10px;
    color: var(--t1f-light);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.t1-form-security svg {
    flex-shrink: 0;
    opacity: 0.5;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .t1-form-container {
        max-width: 100%;
    }

    .t1-form-card {
        padding: 0;
        border-radius: 0;
        border: none;
        background: none;
        box-shadow: none;
    }

    .t1-form-row {
        flex-direction: column;
        gap: 0;
    }

    .t1-field-half {
        width: 100%;
    }

    .t1-form-title {
        font-size: 22px;
    }
}
