/* ===================================================
   iLogs Group — Portal Landing Page
   Design System & Styles
   =================================================== */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  --ilogs-blue: #0d4f78;
  --ilogs-blue-light: #1a6fa0;
  --ilogs-blue-dark: #072e47;
  --ilogs-blue-glow: rgba(13, 79, 120, 0.45);

  --accent-systems: #0d4f78;
  --accent-digital: #0057e7;
  --accent-care: #2a9d8f;

  --surface: #f4f6f9;
  --surface-card: #ffffff;
  --text-primary: #0f1c2e;
  --text-secondary: #5a6a7e;
  --text-on-dark: #ffffff;

  --radius-lg: 10px;
  --radius-md: 12px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 12px 40px rgba(13, 79, 120, 0.22);
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);

  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* ---------- Animated Background ---------- */
html::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ---------- Utility ---------- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3rem);
}

/* ===================================================
   HEADER / HERO
   =================================================== */
.hero {
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
}

/* --- Logo row --- */
.logo-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.9s ease forwards;
}

.logo-row img {
  height: clamp(40px, 6vw, 72px);
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-row img:hover {
  transform: scale(1.06);
}

/* --- Headline --- */
.hero h1 {
  font-size: 48px;
  font-weight: 400;
  color: rgb(34, 37, 41);
  /* var(--ilogs-blue-dark); */
  margin-bottom: 0.1rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.25s ease forwards;
}

.hero p {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.6;
  max-width: 1200px;
  margin: 0 auto;
  opacity: 0;
  animation: fadeUp 0.9s 0.4s ease forwards;
}

/* --- Centered logo above cards --- */
.gateway-logo {
  text-align: center;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.3s ease forwards;
}

.gateway-logo img {
  height: clamp(100px, 15vw, 180px);
  width: auto;
}

/* ===================================================
   GATEWAY CARDS
   =================================================== */
.gateways {
  padding: clamp(1rem, 4vw, 1rem) 0 clamp(3rem, 6vw, 5rem);
}

.gateway-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}

/* --- Card --- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--text-on-dark);
  box-shadow: var(--shadow-card);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    opacity var(--transition),
    filter var(--transition);

  /* entrance animation */
  opacity: 0;
  transform: translateY(30px);
}

.card.revealed {
  animation: cardReveal 0.7s ease forwards;
}

.card:nth-child(1).revealed {
  animation-delay: 0s;
}

.card:nth-child(2).revealed {
  animation-delay: 0.15s;
}

.card:nth-child(3).revealed {
  animation-delay: 0.3s;
}

/* --- CSS-only abstract backgrounds --- */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: transform 0.6s ease;
}

/* iLogs Systems — data grid / security vibe */
.card--systems::before {
  background:
    radial-gradient(circle at 25% 35%, rgba(13, 79, 120, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(13, 79, 120, 0.10) 0%, transparent 50%),
    linear-gradient(160deg, #072e47 0%, #0d4f78 40%, #1a6fa0 100%);
}

/* Digital Solutions — dynamic connected lines */
.card--digital::before {
  background:
    radial-gradient(circle at 70% 20%, rgba(0, 87, 231, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(0, 120, 255, 0.15) 0%, transparent 50%),
    linear-gradient(145deg, #001d3a 0%, #003d7a 35%, #0057e7 100%);
}

/* iLogs Care — warm teal organic */
.card--care::before {
  background:
    radial-gradient(circle at 30% 60%, rgba(42, 157, 143, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 75% 30%, rgba(100, 200, 190, 0.15) 0%, transparent 50%),
    linear-gradient(155deg, #0a3d3a 0%, #1a7a70 40%, #2a9d8f 100%);
}

/* dark overlay for text legibility */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.65) 0%,
      rgba(0, 0, 0, 0.15) 50%,
      rgba(0, 0, 0, 0.05) 100%);
  transition: opacity var(--transition);
}

/* --- Decorative geometric patterns --- */
.card__pattern {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  opacity: 0.12;
  transition: opacity var(--transition);
}

.card--systems .card__pattern {
  background:
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255, 255, 255, 0.08) 40px, rgba(255, 255, 255, 0.08) 41px),
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255, 255, 255, 0.08) 40px, rgba(255, 255, 255, 0.08) 41px);
}

.card--digital .card__pattern {
  background:
    repeating-linear-gradient(45deg, transparent, transparent 30px, rgba(255, 255, 255, 0.06) 30px, rgba(255, 255, 255, 0.06) 31px),
    repeating-linear-gradient(-45deg, transparent, transparent 30px, rgba(255, 255, 255, 0.06) 30px, rgba(255, 255, 255, 0.06) 31px);
}

.card--care .card__pattern {
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* --- Card content --- */
.card__content {
  position: relative;
  z-index: 2;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.card__icon {
  font-size: 2rem;
  margin-bottom: 0.2rem;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.card__title {
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.card__desc {
  font-size: clamp(0.85rem, 1.1vw, 0.95rem);
  font-weight: 400;
  opacity: 0.85;
  line-height: 1.5;
}

/* --- CTA button --- */
.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.15);
  //backdrop-filter: blur(8px);
  //-webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease, background 0.3s ease;
}

.card__cta .arrow {
  transition: transform 0.3s ease;
}

/* --- Card hover states --- */
.card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.card:hover::before {
  transform: scale(1.05);
}

.card:hover .card__pattern {
  opacity: 0.2;
}

.card:hover .card__cta {
  opacity: 1;
  transform: translateY(0);
}

.card:hover .card__cta:hover {
  background: rgba(255, 255, 255, 0.28);
}

.card:hover .card__cta .arrow {
  transform: translateX(4px);
}

/* Custom glow per card */
.card--systems:hover {
  box-shadow: 0 12px 44px rgba(13, 79, 120, 0.35);
}

.card--digital:hover {
  box-shadow: 0 12px 44px rgba(0, 87, 231, 0.3);
}

.card--care:hover {
  box-shadow: 0 12px 44px rgba(42, 157, 143, 0.3);
}

/* --- Sibling dim on hover --- */
.gateway-grid:hover .card:not(:hover) {
  opacity: 0.55;
  //filter: blur(1.5px) saturate(0.7);
}

/* ===================================================
   FOOTER
   =================================================== */
.footer {
  background: linear-gradient(135deg, var(--ilogs-blue-dark), var(--ilogs-blue));
  color: rgba(255, 255, 255, 0.8);
  padding: 1.8rem 0;
  text-align: center;
  font-size: 0.82rem;
  margin-top: auto;
}

.footer__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #fff;
}

.footer__sep {
  opacity: 0.4;
}

/* ===================================================
   KEYFRAME ANIMATIONS
   =================================================== */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================================
   RESPONSIVE
   =================================================== */

/* Tablet */
@media (max-width: 1024px) {
  .gateway-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .card {
    min-height: 360px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .logo-row {
    gap: 1.2rem;
  }

  .logo-row img {
    height: 38px;
  }

  .gateway-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    max-width: 500px;
    margin: 0 auto;
  }

  .card {
    min-height: 280px;
  }

  /* On mobile, CTA always visible */
  .card .card__cta {
    opacity: 1;
    transform: translateY(0);
  }

  /* Disable sibling dim on touch */
  .gateway-grid:hover .card:not(:hover) {
    opacity: 1;
    filter: none;
  }

  .footer__inner {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer__sep {
    display: none;
  }
}

/* Small mobile */
@media (max-width: 400px) {
  .logo-row {
    flex-direction: column;
    gap: 1rem;
  }

  .logo-row img {
    height: 34px;
  }
}

/* ===================================================
   ACCESSIBILITY
   =================================================== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.card:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}