/* ===== HIBBA LIMITED — FRONTIER GATE SYSTEM v2 ===== */
/* 3-step wizard modal · frosted glass · Frontier dark-space branding */

/* ---------- KEYFRAME ANIMATIONS ---------- */

@keyframes gateScaleIn {
  from { opacity: 0; transform: translateY(24px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gateScaleOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(16px) scale(0.96); }
}

@keyframes gateFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-60px); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(60px); }
}

@keyframes blurReveal {
  from { filter: blur(8px); opacity: 0; }
  to   { filter: blur(0); opacity: 1; }
}

@keyframes drawCheck {
  from { stroke-dashoffset: 48; }
  to   { stroke-dashoffset: 0; }
}

@keyframes drawCircle {
  from { stroke-dashoffset: 160; }
  to   { stroke-dashoffset: 0; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

@keyframes ribbonSlideIn {
  from { transform: translateX(120px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes spinnerRotate {
  to { transform: rotate(360deg); }
}

/* ---------- BODY SCROLL LOCK ---------- */

body.gate-no-scroll {
  overflow: hidden;
}

/* ---------- GATED CONTENT (blurred until unlocked) ---------- */

.gated-content {
  position: relative;
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  transition: filter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.gated-content.unlocked {
  filter: none;
  pointer-events: auto;
  user-select: auto;
  -webkit-user-select: auto;
}

.gated-content.unlocked > * {
  animation: blurReveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.gated-content.unlocked > *:nth-child(1) { animation-delay: 0s; }
.gated-content.unlocked > *:nth-child(2) { animation-delay: 0.08s; }
.gated-content.unlocked > *:nth-child(3) { animation-delay: 0.16s; }
.gated-content.unlocked > *:nth-child(4) { animation-delay: 0.24s; }
.gated-content.unlocked > *:nth-child(5) { animation-delay: 0.32s; }
.gated-content.unlocked > *:nth-child(6) { animation-delay: 0.40s; }

/* ---------- SOFT GATE ---------- */

.gated-content.soft-gated {
  filter: blur(4px);
}

.gated-content.soft-unlocked {
  position: relative;
}

.gated-content.soft-unlocked::after {
  content: "Preview — Register for full access";
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #94a3b8;
  font-size: 0.82rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  text-align: center;
  z-index: 8500;
  border-top: 1px solid rgba(129, 140, 248, 0.2);
  letter-spacing: 0.5px;
}

.gate-skip-link {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 0.78rem;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
  width: 100%;
}

.gate-skip-link:hover {
  color: #94a3b8;
  text-decoration: underline;
}

/* ---------- GATE OVERLAY (z-index: 9000) ---------- */

.gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.35s;
}

/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(1px)) {
  .gate-overlay {
    background: rgba(10, 14, 26, 0.92);
  }
}

.gate-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ---------- GATE MODAL (frosted glass) ---------- */

.gate-modal {
  position: relative;
  width: 90%;
  max-width: 520px;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(129, 140, 248, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: gateScaleIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(1px)) {
  .gate-modal {
    background: rgba(10, 14, 26, 0.97);
  }
}

.gate-overlay:not(.active) .gate-modal {
  animation: gateScaleOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Gradient top accent line */
.gate-modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #22d3ee, #818cf8, #a78bfa);
  z-index: 1;
}

/* ---------- MODAL HEADER ---------- */

.gate-header {
  padding: 36px 36px 0;
  text-align: center;
}

.gate-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(129, 140, 248, 0.15));
  border: 1px solid rgba(129, 140, 248, 0.2);
  margin-bottom: 16px;
}

.gate-header-icon svg {
  width: 24px;
  height: 24px;
  stroke: #818cf8;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gate-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 6px;
  line-height: 1.3;
}

.gate-header h2 .gradient-text {
  background: linear-gradient(135deg, #22d3ee, #818cf8, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gate-header p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ---------- PROGRESS BAR (3-step) ---------- */

.gate-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 24px 36px 8px;
}

/* Step container: dot + label stacked vertically */
.gate-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.gate-progress-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #64748b;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  flex-shrink: 0;
}

.gate-progress-dot.active {
  border-color: #818cf8;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.2), rgba(129, 140, 248, 0.2));
  color: #f1f5f9;
  box-shadow: 0 0 16px rgba(129, 140, 248, 0.25);
}

.gate-progress-dot.completed {
  border-color: #22d3ee;
  background: linear-gradient(135deg, #22d3ee, #818cf8);
  color: #ffffff;
}

.gate-progress-dot.completed::after {
  content: "\2713";
  font-size: 0.85rem;
}

.gate-progress-dot.completed span {
  display: none;
}

.gate-progress-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: #64748b;
  margin-top: 4px;
  white-space: nowrap;
  text-align: center;
  transition: color 0.3s;
}

.gate-progress-step.active .gate-progress-label {
  color: #cbd5e1;
}

.gate-progress-step.completed .gate-progress-label {
  color: #22d3ee;
}

/* Line connecting dots — positioned at dot center height */
.gate-progress-line {
  width: 48px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 8px;
  margin-top: -18px;
  margin-bottom: 18px;
  border-radius: 1px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  align-self: center;
}

.gate-progress-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #22d3ee, #818cf8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gate-progress-line.filled::after {
  transform: scaleX(1);
}

/* ---------- FORM BODY ---------- */

.gate-body {
  padding: 16px 36px 0;
  position: relative;
  overflow: hidden;
  min-height: 240px;
}

/* Individual step container */
.gate-step {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.gate-step.active {
  display: flex;
  animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.gate-step.slide-out-left {
  display: flex;
  animation: slideOutLeft 0.25s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.gate-step.slide-out-right {
  display: flex;
  animation: slideOutRight 0.25s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.gate-step.slide-in-left {
  display: flex;
  animation: slideInLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Step title */
.gate-step-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #22d3ee;
  margin-bottom: 2px;
}

/* ---------- FORM FIELDS ---------- */

.gate-field {
  position: relative;
}

.gate-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 5px;
  transition: color 0.2s;
}

.gate-field.focused label {
  color: #818cf8;
}

.gate-field input,
.gate-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: rgba(255, 255, 255, 0.04);
  color: #f1f5f9;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  outline: none;
}

.gate-field input::placeholder {
  color: #475569;
}

.gate-field input:focus,
.gate-field select:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.12);
  background: rgba(129, 140, 248, 0.04);
}

/* Select custom arrow */
.gate-field select {
  color: #94a3b8;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%2394a3b8' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.gate-field select option {
  background: #101828;
  color: #f1f5f9;
}

.gate-field select:valid:not([data-empty="true"]) {
  color: #f1f5f9;
}

/* Validation states */
.gate-field.error input,
.gate-field.error select {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
  animation: shake 0.4s ease;
}

.gate-field.success input,
.gate-field.success select {
  border-color: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.08);
}

.gate-field-error {
  font-size: 0.72rem;
  color: #f87171;
  margin-top: 3px;
  display: none;
  line-height: 1.4;
}

.gate-field.error .gate-field-error {
  display: block;
  animation: gateFadeIn 0.2s ease both;
}

/* Validation icon inside field */
.gate-field-icon {
  position: absolute;
  right: 12px;
  top: 34px;
  width: 18px;
  height: 18px;
  opacity: 0;
  transition: opacity 0.2s;
}

.gate-field.success .gate-field-icon--success {
  opacity: 1;
}

.gate-field.error .gate-field-icon--error {
  opacity: 1;
}

/* ---------- CHECKBOX GROUP (interests) ---------- */

.gate-checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.gate-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.gate-checkbox-item:hover {
  border-color: rgba(129, 140, 248, 0.3);
  background: rgba(129, 140, 248, 0.04);
}

.gate-checkbox-item:focus-within {
  border-color: rgba(129, 140, 248, 0.4);
  box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.15);
}

.gate-checkbox-item.checked {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.06);
  color: #f1f5f9;
}

.gate-checkbox-item input[type="checkbox"] {
  display: none;
}

.gate-checkbox-item .gate-check-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.gate-checkbox-item.checked .gate-check-box {
  border-color: #22d3ee;
  background: linear-gradient(135deg, #22d3ee, #818cf8);
}

.gate-checkbox-item.checked .gate-check-box::after {
  content: "\2713";
  font-size: 0.65rem;
  color: #fff;
  font-weight: 700;
}

/* ---------- FOOTER / BUTTONS ---------- */

.gate-footer {
  padding: 20px 36px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gate-btn {
  padding: 12px 28px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, opacity 0.25s;
  letter-spacing: 0.3px;
}

.gate-btn:active {
  transform: scale(0.97);
}

.gate-btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #22d3ee, #818cf8, #a78bfa);
  color: #ffffff;
}

.gate-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(129, 140, 248, 0.35);
}

.gate-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.gate-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gate-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

/* Loading spinner in button */
.gate-btn-primary .gate-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinnerRotate 0.6s linear infinite;
  margin: 0 auto;
}

.gate-btn-primary.loading .gate-spinner {
  display: inline-block;
}

.gate-btn-primary.loading .gate-btn-label {
  display: none;
}

/* Privacy note */
.gate-privacy {
  font-size: 0.68rem;
  color: #64748b;
  text-align: center;
  padding: 0 36px 24px;
  line-height: 1.5;
}

.gate-privacy a {
  color: #818cf8;
  text-decoration: none;
}

.gate-privacy a:hover {
  text-decoration: underline;
}

/* ---------- SUCCESS SCREEN ---------- */

.gate-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 36px 56px;
  text-align: center;
}

.gate-success.active {
  display: flex;
  animation: gateFadeIn 0.4s ease both;
}

.gate-success-check {
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
}

.gate-success-check .circle {
  fill: none;
  stroke: #22d3ee;
  stroke-width: 2.5;
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: drawCircle 0.6s 0.1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.gate-success-check .check {
  fill: none;
  stroke: #22d3ee;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: drawCheck 0.4s 0.55s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.gate-success h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 6px;
}

.gate-success h3 .gradient-text {
  background: linear-gradient(135deg, #22d3ee, #818cf8, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gate-success p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- RETURNING USER RIBBON (z-index: 8000) ---------- */

.gate-ribbon {
  position: fixed;
  top: 80px;
  right: -4px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(129, 140, 248, 0.12));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-right: none;
  border-radius: 10px 0 0 10px;
  padding: 10px 20px 10px 16px;
  z-index: 8000;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: ribbonSlideIn 0.5s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  cursor: default;
  max-width: 260px;
}

@supports not (backdrop-filter: blur(1px)) {
  .gate-ribbon {
    background: rgba(16, 24, 40, 0.95);
  }
}

.gate-ribbon-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #818cf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.gate-ribbon-text {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gate-ribbon-text strong {
  color: #f1f5f9;
  font-weight: 600;
}

.gate-ribbon-close {
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  color: #64748b;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}

.gate-ribbon-close:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.08);
}

.gate-ribbon.hiding {
  animation: ribbonSlideIn 0.3s ease reverse both;
}

/* ---------- GATE TOAST (z-index: 10000) ---------- */

.gate-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #22d3ee, #818cf8, #a78bfa);
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s;
  z-index: 10000;
}

.gate-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ---------- GATE BANNER (inline CTA) ---------- */

.gate-banner {
  background: rgba(16, 24, 40, 0.95);
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin: 32px 0;
  position: relative;
  overflow: hidden;
}

.gate-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(135deg, #22d3ee, #818cf8, #a78bfa);
}

.gate-banner h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 8px;
}

.gate-banner p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.btn-unlock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #22d3ee, #818cf8);
  color: #ffffff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-unlock:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(129, 140, 248, 0.35);
}

/* ---------- CLOSE / MINIMIZE BUTTON ---------- */

.gate-minimize {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #64748b;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
  line-height: 1;
}

.gate-minimize:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

/* ---------- ROW LAYOUT FOR 2-COL FIELDS ---------- */

.gate-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---------- RESPONSIVE: TABLET (768px) ---------- */

@media (max-width: 768px) {
  .gate-modal {
    max-width: 440px;
  }

  .gate-field-row {
    grid-template-columns: 1fr;
  }

  .gate-checkbox-group {
    grid-template-columns: 1fr;
  }

  .gate-progress-line {
    width: 32px;
  }

  .gate-progress-label {
    font-size: 0.62rem;
  }

  .gate-header {
    padding: 28px 24px 0;
  }

  .gate-body {
    padding: 16px 24px 0;
  }

  .gate-footer {
    padding: 16px 24px 24px;
  }

  .gate-privacy {
    padding: 0 24px 20px;
  }

  .gate-success {
    padding: 36px 24px 44px;
  }

  .gate-banner {
    padding: 24px 20px;
  }

  .gate-toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    text-align: center;
  }
}

/* ---------- RESPONSIVE: MOBILE (480px) ---------- */

@media (max-width: 480px) {
  .gate-modal {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .gate-modal::before {
    border-radius: 0;
  }

  .gate-header {
    padding: 24px 20px 0;
  }

  .gate-header h2 {
    font-size: 1.3rem;
  }

  .gate-progress {
    padding: 20px 20px 8px;
  }

  .gate-progress-label {
    display: none;
  }

  .gate-progress-line {
    width: 40px;
  }

  .gate-body {
    padding: 12px 20px 0;
    flex: 1;
    overflow-y: auto;
  }

  .gate-footer {
    padding: 16px 20px 20px;
    flex-shrink: 0;
  }

  .gate-privacy {
    padding: 0 20px 16px;
  }

  .gate-field-row {
    grid-template-columns: 1fr;
  }

  .gate-checkbox-group {
    grid-template-columns: 1fr;
  }

  .gate-success {
    padding: 32px 20px 40px;
    flex: 1;
    justify-content: center;
  }

  .gate-minimize {
    top: 10px;
    right: 10px;
  }

  .gate-ribbon {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    max-width: 100%;
    border-radius: 12px 12px 0 0;
    border-right: 1px solid rgba(129, 140, 248, 0.2);
    border-bottom: none;
    justify-content: center;
    animation-name: gateFadeIn;
  }

  .gate-banner {
    padding: 20px 16px;
    margin: 20px 0;
    border-radius: 12px;
  }
}

/* ---------- DARK SCROLLBAR FOR MODAL ---------- */

.gate-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.gate-body::-webkit-scrollbar {
  width: 4px;
}

.gate-body::-webkit-scrollbar-track {
  background: transparent;
}

.gate-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* ---------- FOCUS VISIBLE (keyboard nav) ---------- */

.gate-modal *:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

.gate-field input:focus-visible,
.gate-field select:focus-visible {
  outline: none;
}

/* ---------- PRINT ---------- */

@media print {
  .gate-overlay,
  .gate-ribbon,
  .gate-toast,
  .gate-banner {
    display: none !important;
  }

  .gated-content {
    filter: none !important;
    pointer-events: auto !important;
    user-select: auto !important;
  }
}

/* ---------- REDUCED MOTION ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
