/* =====================================================
   RESET & BASE
===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Ubuntu,
    Cantarell,
    "Helvetica Neue",
    Arial,
    sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-main);
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* =====================================================
   DESIGN SYSTEM — ALIGNED WITH PLATFORM
===================================================== */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #e0e7ff;
  --primary-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);

  --secondary: #06b6d4;
  --secondary-dark: #0891b2;

  --bg-main: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  --bg-panel: rgba(255, 255, 255, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.6);
  --bg-overlay: rgba(0, 0, 0, 0.05);

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border-soft: #e2e8f0;
  --border-focus: #6366f1;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --radius-xl: 24px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-main: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =====================================================
   ANIMATIONS
===================================================== */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* =====================================================
    LAYOUT
 ===================================================== */
.gateway-wrapper {
  width: 100%;
  max-width: 1200px;
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.gateway {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =====================================================
    HEADER
 ===================================================== */
.gateway-header {
  padding: 28px 40px;
  animation: slideDown 0.8s ease-out;
  position: relative;
}

.gateway-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.gateway-logo {
  height: 34px;
}

.gateway-brand-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

/* =====================================================
   SEARCH BAR (Invisible Admin Access)
===================================================== */
.gateway-search {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.gateway-search-input {
  flex: 1;
  padding: 12px 18px 12px 44px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-main);
  background: var(--bg-panel);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  outline: none;
}

.gateway-search-input::placeholder {
  color: var(--text-light);
}

.gateway-search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.gateway-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}


.gateway-search-input--hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition: all var(--transition-main);
}

.gateway-search-input--visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.gateway-logo-right {
  position: absolute;
  top: 28px;
  right: 40px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: opacity var(--transition-fast);
  opacity: 0.8;
}

.gateway-logo-right:hover {
  opacity: 1;
}

.gateway-logo-right img {
  height: 32px;
}

/* =====================================================
   CONTENT
===================================================== */
.gateway-content {
  flex: 1;
  padding: 40px 32px 60px;
  text-align: center;
}

.gateway-intro {
  max-width: 760px;
  margin: 0 auto 40px;
}

.gateway-title {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  animation: fadeIn 1s ease-out 0.2s both;
}

.gateway-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  animation: fadeIn 1s ease-out 0.4s both;
}

/* =====================================================
   CARDS
===================================================== */
.gateway-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.gateway-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 44px;
  text-align: left;
  background: var(--bg-panel);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-soft);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-lg);
  transition:
    transform var(--transition-main),
    box-shadow var(--transition-main),
    border var(--transition-fast);
  animation: fadeInUp 0.8s ease-out both;
}

.gateway-card:nth-child(1) {
  animation-delay: 0.6s;
}

.gateway-card:nth-child(2) {
  animation-delay: 0.8s;
}

.gateway-card:hover,
.gateway-card:focus-visible {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-focus);
}

/* =====================================================
   CARD HEADER
===================================================== */
.gateway-card-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.gateway-card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.gateway-card-icon svg {
  animation: pulse 2s ease-in-out infinite;
}

.gateway-card-title {
  font-size: 1.4rem;
  font-weight: 600;
}

/* =====================================================
   CARD BODY
===================================================== */
.gateway-card-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 26px;
}

.gateway-card-features {
  list-style: none;
  margin-bottom: 32px;
}

.gateway-card-features li {
  position: relative;
  padding-left: 22px;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.gateway-card-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

/* =====================================================
   CTA
===================================================== */
.gateway-card-cta {
  margin-top: auto;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  transition:
    transform var(--transition-fast),
    color var(--transition-fast);
}

.gateway-card:hover .gateway-card-cta {
  transform: translateX(6px);
  color: var(--primary-dark);
}

/* =====================================================
   TRUST
===================================================== */
.gateway-trust {
  font-size: 0.85rem;
  color: var(--text-light);
  animation: fadeIn 1s ease-out 1s both;
}

/* =====================================================
   FOOTER
===================================================== */
.gateway-footer {
  padding: 28px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
  animation: fadeIn 1s ease-out 1.2s both;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 900px) {
  .gateway-cards {
    grid-template-columns: 1fr;
  }

  .gateway-content {
    padding: 32px 24px 48px;
  }

  .gateway-wrapper {
    padding: 10px;
  }

  .gateway-logo-right {
    top: 20px;
    right: 24px;
  }

  .gateway-logo-right img {
    height: 32px;
  }

  .gateway-search {
    position: static;
    transform: none;
    max-width: 100%;
    margin-top: 20px;
  }

  .gateway-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
