/* ============================================
   Blobtown Game Landing Page
   ============================================ */

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

:root {
  --blue: #2D7FF9;
  --blue-hover: #1a6de0;
  --bg: #f9f9f7;
  --text: #2a2a2a;
  --text-muted: #888;
  --font: 'Nunito', sans-serif;

  /* Fluid layout tokens — scale with viewport, capped by min/max */
  --hero-padding-bottom: clamp(14px, 3vh, 48px);
  --hero-gap: clamp(12px, 2.5vh, 40px);

  --cta-gap: clamp(4px, 0.7vw, 14px);
  --cta-padding-y: clamp(7px, 1.75vh, 25px);
  --cta-padding-x: clamp(14px, 3.5vw, 63px);
  --cta-font-size: clamp(0.63rem, min(1.75vw, 2.45vh), 1.68rem);
  --cta-radius: clamp(17px, 4.2vw, 56px);
  --cta-icon-size: clamp(0.45rem, min(1.26vw, 1.82vh), 1.26rem);

  --social-gap: clamp(6px, 1.4vw, 28px);
  --social-size: clamp(25px, min(3.85vw, 5.6vh), 63px);

  --footer-padding-y: clamp(6px, 1.4vh, 20px);
  --footer-padding-x: clamp(7px, 2.1vw, 28px);
  --footer-gap: clamp(2px, 0.7vh, 8px);
  --footer-links-gap: clamp(4px, 1.05vw, 15px);
  --footer-links-size: clamp(0.5rem, 1vw, 1rem);
  --footer-copy-size: clamp(0.45rem, 0.84vw, 0.84rem);
}

html, body {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ---- Parallax Scene ---- */

.parallax-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.parallax-layer {
  position: absolute;
  /* Oversize slightly so movement doesn't reveal edges */
  top: -8%;
  left: -8%;
  width: 116%;
  height: 116%;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: cover;
  will-change: transform;
  transition: transform 0.15s ease-out;
}

.layer-sky {
  background-image: url('../images/Paralax/Sky_BG.webp');
  background-position: center center;
  z-index: 1;
}

.layer-back {
  background-image: url('../images/Paralax/Back.webp');
  z-index: 2;
}

.layer-mid {
  background-image: url('../images/Paralax/Mid.webp');
  z-index: 3;
}

.layer-front {
  background-image: url('../images/Paralax/Front.webp');
  z-index: 4;
}

/* ---- Page Layout ---- */

.page {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: var(--hero-padding-bottom);
  gap: var(--hero-gap);
}

/* ---- CTA Button ---- */

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: var(--cta-gap);
  padding: var(--cta-padding-y) var(--cta-padding-x);
  background: var(--blue);
  color: #fff;
  font-family: var(--font);
  font-size: var(--cta-font-size);
  font-weight: 800;
  text-decoration: none;
  border-radius: var(--cta-radius);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.01em;
}

.cta-button:hover {
  background: var(--blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.35);
}

.cta-button:active {
  transform: translateY(0);
}

.cta-icon {
  font-size: var(--cta-icon-size);
}

/* ---- Social Links ---- */

.social-links {
  display: flex;
  gap: var(--social-gap);
  justify-content: center;
  align-items: center;
}

.social-link {
  display: block;
  transition: transform 0.2s, opacity 0.2s;
  border-radius: 50%;
}

.social-link:hover {
  transform: scale(1.12);
  opacity: 0.85;
}

.social-link img {
  display: block;
  width: var(--social-size);
  height: var(--social-size);
  border-radius: 50%;
}

/* ---- Footer ---- */

.footer {
  padding: var(--footer-padding-y) var(--footer-padding-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--footer-gap);
  background: rgba(249, 249, 247, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.footer-links {
  display: flex;
  gap: var(--footer-links-gap);
  align-items: center;
  font-size: var(--footer-links-size);
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-sep {
  color: #ccc;
}

.footer-copy {
  font-size: var(--footer-copy-size);
  color: var(--text-muted);
}

/* ---- Edge Covers (hidden on desktop) ---- */

.edge-cover {
  display: none;
}

/* ---- Responsive (orientation-first) ---- */

/* Portrait layouts: tighter vertical rhythm and smaller controls.
   max-width guard prevents this from firing on desktop/laptop windows
   that happen to be taller than wide. */
@media (orientation: portrait) and (max-width: 1024px) {
  :root {
    --hero-padding-bottom: clamp(22px, 4vh, 44px);
    --hero-gap: clamp(20px, 3vh, 36px);

    --cta-gap: clamp(8px, 2vw, 14px);
    --cta-padding-y: clamp(12px, 1.8vh, 20px);
    --cta-padding-x: clamp(22px, 7vw, 42px);
    --cta-font-size: clamp(0.9rem, 3.8vw, 1.45rem);
    --cta-radius: clamp(28px, 8vw, 50px);
    --cta-icon-size: clamp(0.8rem, 2.8vw, 1.15rem);

    --social-gap: clamp(10px, 3.5vw, 22px);
    --social-size: clamp(70px, 18.9vw, 135px);

    --footer-padding-y: clamp(10px, 1.54vh, 17px);
    --footer-padding-x: clamp(8px, 2.8vw, 17px);
    --footer-gap: clamp(4px, 0.84vh, 7px);
    --footer-links-gap: clamp(7px, 1.82vw, 13px);
    --footer-links-size: clamp(0.56rem, 2.17vw, 0.84rem);
    --footer-copy-size: clamp(0.5rem, 1.82vw, 0.7rem);
  }
}

/* Very small portrait devices */
@media (orientation: portrait) and (max-width: 480px) {
  :root {
    --hero-padding-bottom: clamp(16px, 3vh, 28px);
    --hero-gap: clamp(14px, 2.4vh, 24px);
    --social-size: clamp(65px, 17.6vw, 114px);
    --footer-links-size: clamp(0.5rem, 2.1vw, 0.67rem);
    --footer-copy-size: clamp(0.45rem, 1.68vw, 0.6rem);
  }
}


/* Mobile portrait-specific parallax framing */
@media (max-width: 768px) and (orientation: portrait) {
  .edge-cover {
    display: block;
    position: fixed;
    left: 0;
    width: 100%;
    background: var(--bg);
    z-index: 4;
  }

  .edge-top {
    top: 0;
    height: 0;
  }

  .edge-bottom {
    bottom: 0;
    height: 12vh;
  }

  .layer-sky {
    background-image: url('../images/Paralax/Sky_BG_Mobile.webp');
  }

  .layer-back {
    background-image: url('../images/Paralax/Back_Mobile.webp');
  }

  .layer-mid {
    background-image: url('../images/Paralax/Mid_Mobile.webp');
  }

  .layer-front {
    background-image: url('../images/Paralax/Front_Mobile.webp');
  }

  .parallax-container {
    top: -62vh;
    height: 182vh;
  }

  .parallax-layer {
    top: -48%;
    left: -48%;
    width: 197%;
    height: 197%;
    background-size: contain;
    background-position: center center;
  }

  .layer-sky {
    background-size: cover;
  }
}
