:root {
  --bg-deep: #030806;
  --bg-mid: #0a1a12;
  --bg-soft: #0f2418;
  --surface: #152a1f;
  --surface-hover: #1c3528;
  --border: rgba(134, 188, 152, 0.12);
  --border-strong: rgba(134, 188, 152, 0.28);
  --text: #f3f7f4;
  --text-muted: #8fa897;
  --label: #7d9b88;
  --accent: #9bcf4a;
  --accent-soft: #6f9f3a;
  --green: #3dba6e;
  --orange: #f0a03a;
  --blue: #4ea0e8;
  --purple: #9b7ae8;
  --gold: #e6c35c;
  --teal: #3db8a8;
  --radius: 12px;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  --font: "Outfit", system-ui, sans-serif;
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(61, 186, 110, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 45% at 80% 100%, rgba(15, 60, 35, 0.45), transparent 50%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 48%, var(--bg-soft) 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.75rem 1.25rem 2rem;
  position: relative;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(155, 207, 74, 0.04) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 60%, rgba(61, 186, 110, 0.035) 0 1px, transparent 1.5px);
  background-size: 48px 48px, 72px 72px;
  opacity: 0.7;
  animation: drift 28s linear infinite;
}

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

.portal {
  width: min(920px, 100%);
  position: relative;
  z-index: 1;
}

.portal-header {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: rise 0.7s ease both;
}

.portal-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  display: block;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}

.portal-title {
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.15;
}

.portal-section {
  margin-bottom: 1.85rem;
  animation: rise 0.65s ease both;
  animation-delay: calc(0.08s + (var(--i, 0) * 0.08s));
}

.section-label {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--label);
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.portal-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.7rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.portal-link:hover,
.portal-link:focus-visible {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
  outline: none;
}

.portal-link:active {
  transform: translateY(0);
}

.link-icon {
  width: 1.65rem;
  height: 1.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.05rem;
}

.link-name {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-leaf { color: var(--green); }
.icon-crm { color: var(--blue); }
.icon-lead { color: var(--orange); }
.icon-erp { color: var(--gold); }
.icon-admin { color: var(--purple); }
.icon-mr { color: #5ecf8a; }
.icon-pc { color: var(--teal); }
.icon-fm { color: var(--blue); }
.icon-pad { color: #7eb8ff; }
.icon-wo { color: var(--orange); }
.icon-mail { color: #e8eef0; }

.portal-footer {
  margin-top: auto;
  padding-top: 2.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  animation: rise 0.7s ease 0.45s both;
}

.credit {
  color: var(--accent);
  font-weight: 600;
}

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

@media (max-width: 560px) {
  body {
    padding: 2rem 1rem 1.5rem;
  }

  .portal-logo {
    width: 60px;
    height: 60px;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }

  .portal-link {
    min-height: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere,
  .portal-header,
  .portal-section,
  .portal-footer {
    animation: none;
  }

  .portal-link {
    transition: none;
  }
}
