/* رویش پنل — درگاه ورود (Soft UI Evolution / Enterprise Gateway) */
:root {
  --color-primary: #0f766e;
  --color-primary-deep: #115e59;
  --color-on-primary: #ffffff;
  --color-secondary: #1e3a5f;
  --color-accent: #15803d;
  --color-background: #ecfdf8;
  --color-foreground: #0f2f2c;
  --color-muted: #d1fae5;
  --color-muted-fg: #4b6b66;
  --color-border: #99f6e4;
  --color-surface: #ffffff;
  --color-ring: #0f766e;
  --color-admin: #1e3a5f;
  --color-admin-soft: #e8eef5;
  --shadow-soft: 0 10px 30px rgba(15, 47, 44, 0.08), 0 2px 8px rgba(15, 47, 44, 0.04);
  --shadow-lift: 0 18px 40px rgba(15, 47, 44, 0.12);
  --radius: 1.25rem;
  --font-display: "Markazi Text", "Vazirmatn", Tahoma, sans-serif;
  --font-body: "Vazirmatn", Tahoma, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --space: clamp(1rem, 2.5vw, 2rem);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-inline: env(safe-area-inset-left, 0px);
  --safe-inline-end: env(safe-area-inset-right, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.gateway {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--color-foreground);
  background: var(--color-background);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.gateway-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  padding-bottom: var(--safe-bottom);
  padding-inline-start: var(--safe-inline);
  padding-inline-end: var(--safe-inline-end);
}

/* Full-bleed atmospheric plane */
.gateway-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(15, 118, 110, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 10%, rgba(30, 58, 95, 0.22), transparent 50%),
    radial-gradient(ellipse 60% 45% at 70% 85%, rgba(21, 128, 61, 0.16), transparent 55%),
    linear-gradient(165deg, #f0fdfa 0%, #e6f4f8 42%, #eef2f7 100%);
}

.gateway-atmosphere::after {
  content: "";
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(15, 118, 110, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  animation: grid-drift 28s linear infinite;
}

.gateway-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: orb-float 14s var(--ease) infinite alternate;
  will-change: transform;
}

.gateway-orb--a {
  width: min(42vw, 420px);
  height: min(42vw, 420px);
  background: #5eead4;
  top: -8%;
  left: -6%;
}

.gateway-orb--b {
  width: min(36vw, 360px);
  height: min(36vw, 360px);
  background: #93c5fd;
  top: 12%;
  right: -8%;
  animation-delay: -4s;
}

.gateway-orb--c {
  width: min(30vw, 280px);
  height: min(30vw, 280px);
  background: #86efac;
  bottom: 8%;
  left: 35%;
  animation-delay: -7s;
}

.gateway-visual {
  position: absolute;
  inset: auto 0 0 0;
  height: min(55vh, 480px);
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}

.gateway-visual svg {
  width: 100%;
  height: 100%;
  display: block;
}

.gateway-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100% - 2 * var(--space)));
  max-width: 100%;
  margin-inline: auto;
  padding: var(--space) 0 calc(var(--space) * 1.5);
}

.gateway-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: clamp(0.75rem, 2.5vh, 1.75rem);
  animation: rise 0.7s var(--ease) both;
}

.gateway-nav__link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-muted-fg);
  text-decoration: none;
  padding: 0.55rem 0.75rem;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  border-radius: 0.65rem;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.gateway-nav__link:hover,
.gateway-nav__link:focus-visible {
  color: var(--color-primary-deep);
  background: rgba(255, 255, 255, 0.55);
  outline: none;
}

.gateway-nav__link:focus-visible {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.35);
}

.gateway-hero {
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  align-content: start;
  justify-items: stretch;
  flex: 1;
  padding-top: clamp(0.15rem, 2vh, 1rem);
  padding-bottom: clamp(0.75rem, 3vh, 2rem);
}

.gateway-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--color-primary-deep);
  animation: rise 0.75s var(--ease) 0.08s both;
}

.gateway-headline {
  margin: 0.55rem 0 0;
  max-width: 24ch;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.8vw, 1.85rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-foreground);
  animation: rise 0.75s var(--ease) 0.16s both;
}

.gateway-lead {
  margin: 0.55rem 0 0;
  max-width: 40ch;
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
  color: var(--color-muted-fg);
  animation: rise 0.75s var(--ease) 0.24s both;
}

.gateway-paths {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  width: 100%;
  animation: rise 0.8s var(--ease) 0.32s both;
}

@media (min-width: 720px) {
  .gateway-paths {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

.gateway-path {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.2rem 1.25rem 1.25rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  cursor: pointer;
  min-height: 9.5rem;
  -webkit-tap-highlight-color: transparent;
}

.gateway-path:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.gateway-path:active {
  transform: translateY(-1px);
}

.gateway-path:focus-visible {
  outline: none;
  box-shadow: var(--shadow-lift), 0 0 0 3px rgba(15, 118, 110, 0.4);
}

.gateway-path--customer {
  border-color: rgba(15, 118, 110, 0.28);
}

.gateway-path--customer:hover {
  border-color: rgba(15, 118, 110, 0.5);
}

.gateway-path--admin {
  border-color: rgba(30, 58, 95, 0.22);
}

.gateway-path--admin:hover {
  border-color: rgba(30, 58, 95, 0.45);
}

.gateway-path__icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.gateway-path--customer .gateway-path__icon {
  background: var(--color-muted);
  color: var(--color-primary-deep);
}

.gateway-path--admin .gateway-path__icon {
  background: var(--color-admin-soft);
  color: var(--color-admin);
}

.gateway-path__icon svg {
  width: 1.3rem;
  height: 1.3rem;
}

.gateway-path__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.gateway-path__desc {
  margin: 0;
  flex: 1;
  font-size: 0.92rem;
  color: var(--color-muted-fg);
  line-height: 1.55;
}

.gateway-path__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  font-weight: 650;
  margin-top: 0.15rem;
  min-height: 1.5rem;
}

.gateway-path--customer .gateway-path__cta {
  color: var(--color-primary);
}

.gateway-path--admin .gateway-path__cta {
  color: var(--color-admin);
}

.gateway-path__cta svg {
  width: 1rem;
  height: 1rem;
  transition: transform 0.2s var(--ease);
  flex-shrink: 0;
}

.gateway-path:hover .gateway-path__cta svg {
  transform: translateX(-3px);
}

.gateway-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.75rem 1.25rem;
  margin-top: 0.15rem;
  width: 100%;
  animation: rise 0.8s var(--ease) 0.42s both;
}

.gateway-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 3rem;
  padding: 0.75rem 1.35rem;
  border-radius: 0.9rem;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 650;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.gateway-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.4);
}

.gateway-btn--accent {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(21, 128, 61, 0.25);
}

.gateway-btn--accent:hover {
  background: #166534;
  transform: translateY(-2px);
}

.gateway-btn--accent:active {
  transform: translateY(0);
}

.gateway-btn--ghost {
  background: transparent;
  color: var(--color-muted-fg);
  padding-inline: 0.5rem;
}

.gateway-btn--ghost:hover {
  color: var(--color-primary-deep);
}

.gateway-footer {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2 * var(--space)));
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem 0 1.35rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--color-muted-fg);
  border-top: 1px solid rgba(15, 118, 110, 0.12);
}

.gateway-footer a {
  color: var(--color-muted-fg);
  text-decoration: none;
  cursor: pointer;
  padding: 0.35rem 0;
  display: inline-block;
}

.gateway-footer a:hover,
.gateway-footer a:focus-visible {
  color: var(--color-primary-deep);
  outline: none;
}

@keyframes rise {
  from {
    opacity: 0.01;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes orb-float {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(18px, 24px) scale(1.06);
  }
}

@keyframes grid-drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(48px, 48px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .gateway-path:hover,
  .gateway-btn--accent:hover {
    transform: none;
  }
}

/* —— Mobile & compact viewports —— */
@media (max-width: 719.98px) {
  :root {
    --space: 1rem;
    --radius: 1.1rem;
  }

  .gateway-orb {
    opacity: 0.4;
    filter: blur(36px);
  }

  .gateway-orb--a {
    width: min(70vw, 280px);
    height: min(70vw, 280px);
  }

  .gateway-orb--b {
    width: min(55vw, 220px);
    height: min(55vw, 220px);
  }

  .gateway-orb--c {
    width: min(48vw, 180px);
    height: min(48vw, 180px);
    bottom: 18%;
  }

  .gateway-visual {
    height: min(38vh, 280px);
    opacity: 0.4;
  }

  .gateway-content {
    width: min(1120px, calc(100% - 1.5rem));
    padding-top: 0.85rem;
    padding-bottom: 1rem;
  }

  .gateway-nav {
    margin-bottom: 0.85rem;
  }

  .gateway-nav__link {
    font-size: 0.88rem;
    padding: 0.45rem 0.55rem;
    min-height: 2.5rem;
  }

  .gateway-hero {
    gap: 0.95rem;
    padding-top: 0;
    padding-bottom: 0.5rem;
  }

  .gateway-brand {
    font-size: clamp(2.15rem, 11vw, 2.85rem);
  }

  .gateway-headline {
    margin-top: 0.4rem;
    font-size: clamp(1.15rem, 4.5vw, 1.4rem);
    max-width: none;
  }

  .gateway-lead {
    margin-top: 0.4rem;
    font-size: 0.94rem;
    max-width: none;
    line-height: 1.6;
  }

  .gateway-path {
    min-height: 0;
    padding: 1.05rem 1.1rem 1.1rem;
    gap: 0.55rem;
  }

  .gateway-path__icon {
    width: 2.35rem;
    height: 2.35rem;
  }

  .gateway-path__title {
    font-size: 1.08rem;
  }

  .gateway-path__desc {
    font-size: 0.88rem;
  }

  .gateway-secondary {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .gateway-btn--accent {
    width: 100%;
  }

  .gateway-btn--ghost {
    width: 100%;
    min-height: 2.75rem;
    justify-content: center;
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(15, 118, 110, 0.12);
  }

  .gateway-footer {
    width: min(1120px, calc(100% - 1.5rem));
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding-top: 0.85rem;
    padding-bottom: calc(0.85rem + var(--safe-bottom));
  }
}

/* Short phones: keep primary actions closer to fold */
@media (max-width: 480px) and (max-height: 760px) {
  .gateway-brand {
    font-size: 2.1rem;
  }

  .gateway-headline {
    font-size: 1.12rem;
  }

  .gateway-lead {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .gateway-path__desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .gateway-hero {
    gap: 0.8rem;
  }
}

@media (max-width: 360px) {
  .gateway-nav {
    gap: 0.35rem;
  }

  .gateway-nav__link {
    font-size: 0.82rem;
    padding-inline: 0.4rem;
  }
}
