.gate-scene {
    position: relative;
    overflow: hidden;
    background: var(--grad-dark);
    min-height: calc(100svh - 72px);
    display: grid;
    place-items: center;
    padding: clamp(40px, 7vw, 90px) 0;
}

.gate-plate {
    position: absolute;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(135deg, rgba(0, 213, 212, 0.10), rgba(98, 84, 222, 0.04));
    border: 1px solid rgba(160, 152, 236, 0.10);
    pointer-events: none;
    z-index: 1;
}
.gate-plate--1 { width: 240px; height: 264px; top: -60px; left: 6%; opacity: 0.5; transform: rotate(8deg); }
.gate-plate--2 { width: 180px; height: 198px; bottom: 4%; right: 8%; opacity: 0.45; transform: rotate(-12deg); }
.gate-plate--3 { width: 120px; height: 132px; top: 22%; right: 18%; opacity: 0.3; }

.gate-scene__inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.gate-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    overflow: hidden;
    transition: max-width 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.gate-card[data-step="register"] { max-width: 780px; }

@media (prefers-reduced-motion: reduce) {
    .gate-card { transition: none; }
}

.gate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px 18px;
}
.gate-grid > .field { margin-bottom: 0; }
.gate-grid > .field--full { grid-column: 1 / -1; }

.gate-grid--corp { grid-template-columns: 2fr 1fr 1fr; }

@media (max-width: 700px) {
    .gate-grid--corp { grid-template-columns: 1fr; }
}

.gate-vein {
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 0;
    width: 1.5px;
    border-radius: var(--r-pill);
    background: var(--grad-text);
    opacity: 0.85;
    transform-origin: top;
    transition: transform var(--t), opacity var(--t);
}

.gate-brand {
    margin-bottom: 22px;
}

.gate-brand__logo {
    display: block;
    width: 212px;
    height: auto;
}

.gate-plan {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 18px;
    padding: 11px 14px;
    border-radius: var(--r-md);
    background: var(--surface-alt);
    border: 1px solid var(--line);
}
.gate-plan__hex {
    flex-shrink: 0;
    width: 18px;
    height: 20px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--grad-cta);
}
.gate-plan__text { margin: 0; font-size: 0.9rem; color: var(--slate); }
.gate-plan__text strong { color: var(--gece-yarisi); }
.gate-plan__demo { color: var(--slate-light); font-size: 0.8rem;
letter-spacing: 0.02em; }

.gate-tabs {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 22px;
    padding: 4px;
    border-radius: var(--r-pill);
    background: var(--surface-alt);
    border: 1px solid var(--line);
}
.gate-tabs__ind {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: var(--r-pill);
    background: var(--grad-violet);
    box-shadow: var(--shadow-sm);
    transform: translateX(100%);
    transition: transform var(--t), background var(--t);
    z-index: 0;
}

.gate-tabs[data-active="register"] .gate-tabs__ind { transform: translateX(0); background: var(--grad-cta); }
.gate-tabs[data-active="login"] .gate-tabs__ind { transform: translateX(100%); background: var(--grad-violet); }

.gate-tabs__btn {
    position: relative;
    z-index: 1;
    min-height: 44px;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--slate);
    cursor: pointer;
    border-radius: var(--r-pill);
    transition: color var(--t);
}
.gate-tabs__btn[aria-selected="true"] { color: #fff; }
.gate-tabs__btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.gate-body { position: relative; }
.gate-panel[hidden] { display: none; }

.gate-note {
    margin: 0 0 18px;
    padding: 11px 14px;
    font-size: 0.86rem;
    color: var(--slate);
    background: var(--surface-alt);
    border-left: 3px solid var(--cyan);
    border-radius: var(--r-sm);
}

.gate-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    color: var(--slate-light);
}.match-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 7px 0 0;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    color: var(--slate-light);
}
.match-badge__hex {
    flex-shrink: 0;
    width: 15px;
    height: 17px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--slate-light);
    transition: background var(--t);
}
.match-badge[data-state="mismatch"] { color: var(--crit); }
.match-badge[data-state="mismatch"] .match-badge__hex { background: var(--crit); }
.match-badge[data-state="match"] { color: var(--ok); }
.match-badge[data-state="match"] .match-badge__hex { background: var(--ok); }

.gate-cross {
    margin: 16px 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--slate);
}
.gate-cross a {
    font-weight: 700;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.gate-cross a:hover { text-decoration: underline; text-decoration-color: var(--cyan); }
.gate-cross a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }

.gate-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 4px 0 18px;
}
.gate-row__remember { margin: 0; }
.gate-forgot {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--marakes);
}
.gate-forgot:hover { text-decoration: underline; }
.gate-forgot:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
.gate-forgot__soon { font-size: 0.72rem;
letter-spacing: 0.02em; font-weight: 400; color: var(--slate-light); }

.gate-otp__title { font-size: 1.32rem; margin: 0 0 6px; }
.gate-otp__title:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.gate-otp__sub { margin: 0 0 20px; font-size: 0.9rem; color: var(--slate); }
.gate-otp__sub span { font-weight: 700; color: var(--gece-yarisi); letter-spacing: 0.02em; }

.otp-cells {
    position: relative;
    display: flex;
    gap: 9px;
    justify-content: space-between;
    margin-bottom: 16px;
}
.otp-cell {
    position: relative;
    flex: 1 1 0;
    aspect-ratio: 1 / 1.1;
    max-width: 52px;
    display: grid;
    place-items: center;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--gece-yarisi);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--surface-alt);
    box-shadow: inset 0 0 0 1.5px var(--line);
    transition: background var(--t), box-shadow var(--t), color var(--t);
}
.otp-cell.is-filled {
    background: rgba(0, 213, 212, 0.12);
    box-shadow: inset 0 0 0 2px var(--cyan), var(--glow-cyan);
}

.otp-cell.is-active {
    background: rgba(98, 84, 222, 0.07);
    box-shadow: inset 0 0 0 2px var(--marakes);
}
.otp-cell.is-active::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    height: 40%;
    transform: translate(-50%, -50%);
    background: var(--marakes);
    border-radius: 2px;
    animation: otpCaret 1.05s steps(1, end) infinite;
}
@keyframes otpCaret { 50% { opacity: 0; } }

.otp-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: transparent;
    caret-color: transparent;
    cursor: text;
    font-size: 1px;
    letter-spacing: 0.02em;
    z-index: 2;
}

.gate-otp__redirect {
    margin: 12px 0 0;
    text-align: center;
    font-size: 0.88rem;
    color: var(--ok);
    font-weight: 700;
}
.gate-otp__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.gate-link {
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--marakes);
    cursor: pointer;
    padding: 6px 2px;
    min-height: 36px;
}
.gate-link:disabled { color: var(--slate-light); cursor: default; }
.gate-link:not(:disabled):hover { text-decoration: underline; }
.gate-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }

.gate-notice {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 0 0 18px;
    padding: 11px 14px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--ink);
    background: rgba(0, 213, 212, 0.08);
    border: 1px solid rgba(0, 213, 212, 0.28);
    border-radius: var(--r-md);
}

.gate-notice__hex {
    flex-shrink: 0;
    width: 15px;
    height: 17px;
    margin-top: 2px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--grad-cta);
}

.gate-corp__switch {
    margin-top: 16px;
}

.gate-corp {
    margin-top: 14px;
    padding: 16px;
    border-radius: var(--r-md);
    background: var(--surface-alt);
    border: 1px solid var(--line);
}

.gate-corp[hidden] {
    display: none;
}

.gate-consents {
    margin: 18px 0 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px 18px;
    align-items: start;
}

.gate-consents > .field__error { grid-column: 1 / -1; }

.gate-consents .field__check {
    margin: 0;
}

.gate-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}
.gate-trust li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    color: var(--slate);
}
.gate-trust__hex {
    flex-shrink: 0;
    width: 11px;
    height: 12px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--cyan);
}

.gate-faq { max-width: 720px; }

.gate-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

.gate-panel:not([hidden]) {
    animation: gate-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes gate-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
    .gate-card { padding: 22px; border-radius: var(--r-lg); }
    .gate-plate--1, .gate-plate--2 { opacity: 0.25; }
    .gate-plate--3 { display: none; }
    .glow.glow--cyan, .glow.glow--violet { opacity: 0.5; }
    .otp-cells { gap: 6px; }
    .gate-row { flex-direction: column; align-items: stretch; gap: 14px; }
    .gate-forgot { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .gate-vein,
    .gate-tabs__ind,
    .gate-tabs__btn,
    .otp-cell,
    .match-badge,
    .match-badge__hex {
        transition: none;
    }
    .gate-panel:not([hidden]) { animation: none; }
    .otp-cell.is-active::after { animation: none; }
    .gate-plate { opacity: 0.2; }
}
