/* ============================================================
   Memoli – Coming Soon Page
   Standalone CSS (no framework dependencies)
   ============================================================ */

/* ----- Reset & Base ----- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #0052CC;
  --color-primary-dark: #003D99;
  --color-primary-light: #EBF0FF;
  --color-secondary: #5B9FD4;
  --color-accent: #2684FF;
  --color-text: #1A1A1A;
  --color-text-light: #6B7280;
  --color-text-muted: #9CA3AF;
  --color-bg: #FFFFFF;
  --color-bg-light: #F9FAFB;
  --color-border: #E5E7EB;
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --card-size: 200px;
  --card-gap: 20px;
  --transition-speed: 0.6s;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: #F0F6FF;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* ----- Ambient Background ----- */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  will-change: transform;
}

.bg-orb--1 {
  width: 400px;
  height: 400px;
  background: var(--color-primary-light);
  top: -100px;
  left: -80px;
}

.bg-orb--2 {
  width: 350px;
  height: 350px;
  background: var(--color-accent);
  opacity: 0.12;
  bottom: -60px;
  right: -60px;
}

.bg-orb--3 {
  width: 280px;
  height: 280px;
  background: var(--color-secondary);
  opacity: 0.1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ----- Page Layout ----- */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px;
  gap: 0;
}

/* ----- Hero / Banner ----- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
  padding: 56px 0;
}

.hero__banner {
  width: 100%;
  max-width: 860px;
  height: auto;
  opacity: 0;
  filter: drop-shadow(0 2px 8px rgba(0, 82, 204, 0.08));
  min-width: 220px;
}

.hero__banner img {
  width: 100%;
  height: auto;
  max-width: 100%;
  min-width: 180px;
  object-fit: contain;
  display: block;
}

/* ----- Cards Section ----- */
.cards {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: center;
}

.cards__wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

.cards__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--card-gap);
}

.cards__grid--top {
  /* 4 cards row */
  max-width: calc(var(--card-size) * 4 + var(--card-gap) * 3);
}

.cards__grid--bottom {
  /* 3 cards row - centered */
  max-width: calc(var(--card-size) * 3 + var(--card-gap) * 2);
}

/* ----- Individual Card ----- */
.card {
  width: var(--card-size);
  height: var(--card-size);
  perspective: 800px;
  cursor: pointer;
  opacity: 0;
}

.card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  will-change: transform;
}

.card:hover .card__inner,
.card.is-flipped .card__inner {
  transform: rotateY(180deg);
}

.card__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06),
              0 1px 4px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s ease;
}

.card:hover .card__face {
  box-shadow: 0 12px 40px rgba(0, 82, 204, 0.12),
              0 4px 12px rgba(0, 0, 0, 0.06);
}

.card__face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__face--front {
  z-index: 2;
}

.card__face--back {
  transform: rotateY(180deg);
}

/* ----- Footer ----- */
.footer {
  display: none;
}

/* ============================================================
   Responsive
   ============================================================ */

/* Large desktops (≥ 1400px) */
@media (min-width: 1400px) {
  :root {
    --card-size: 210px;
    --card-gap: 24px;
  }

  .hero__banner {
    max-width: 420px;
    min-width: 180px;
  }

  .page {
    gap: 56px;
    padding: 48px 40px;
  }
}

/* Desktop (≥ 1024px) */
@media (min-width: 1024px) and (max-width: 1399px) {
  :root {
    --card-size: 180px;
    --card-gap: 18px;
  }

  .hero__banner {
    max-width: 310px;
    min-width: 90px;
  }
}

/* Tablet (≥ 768px, < 1024px) */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --card-size: 155px;
    --card-gap: 14px;
  }

  .hero__banner {
    max-width: 310px;
    min-width: 90px;
  }

  .page {
    gap: 40px;
    padding: 32px 24px;
  }
}

/* Mobile landscape / small tablet (≥ 576px, < 768px) */
@media (min-width: 576px) and (max-width: 767px) {
  :root {
    --card-size: 130px;
    --card-gap: 12px;
  }

  .hero__banner {
    max-width: 310px;
    min-width: 90px;
  }

  .page {
    gap: 36px;
    padding: 24px 16px;
  }

  .hero__tagline {
    font-size: 12px;
  }

  /* Hide cards on small tablets */
  .cards__grid--top,
  .cards__grid--bottom {
    display: none;
  }

  /* Center banner on small viewports */
  .hero {
    padding: 48px 0;
  }
}

/* Mobile (< 576px) */
@media (max-width: 575px) {
  :root {
    --card-size: 100px;
    --card-gap: 10px;
  }

  .hero__banner {
    max-width: 90vw;
    min-width: 180px;
  }

  .page {
    gap: 32px;
    padding: 24px 16px;
    min-height: 100dvh;
  }

  .hero__tagline {
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .footer__text {
    font-size: 14px;
  }

  .footer__cta {
    flex-direction: column;
  }

  .footer__btn {
    width: 100%;
    text-align: center;
  }

  .card__face {
    border-radius: 10px;
  }

  .cards__grid {
    max-width: calc(var(--card-size) * 3 + var(--card-gap) * 2);
  }

  /* Hide cards on mobile */
  .cards__grid--top,
  .cards__grid--bottom {
    display: none;
  }

  /* Ensure banner is centered and visible */
  .hero {
    padding: 40px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Very small mobile (< 380px) */
@media (max-width: 379px) {
  :root {
    --card-size: 85px;
    --card-gap: 8px;
  }

  .hero__banner {
    max-width: 90vw;
    min-width: 140px;
  }

  .cards__grid {
    max-width: calc(var(--card-size) * 3 + var(--card-gap) * 2);
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .card__inner {
    transition: none;
  }

  .bg-orb {
    animation: none !important;
  }
}
