/* =====================
   MOBILE POLISH
   Loaded last on every page so it overrides page styles.
   Desktop is untouched: everything sits inside media queries.
   ===================== */

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

@media (max-width: 768px) {

  /* Real viewport height on phones (address bar aware) */
  body, .overlay { min-height: 100vh; min-height: 100svh; }

  /* ---------- Buttons: bigger tap targets, centered ---------- */
  .btn {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 12px auto;
    padding: 15px 24px;
    text-align: center;
    font-size: 1rem;
  }

  /* ---------- Home ---------- */
  /* Hero fills the first screen and is centered, so the page opens with a clean focal point */
  #hero {
    min-height: calc(100vh - 80px);
    min-height: calc(100svh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 22px 56px;
  }
  #hero h1 {
    text-wrap: balance;
    line-height: 1.15;
  }
  #hero h1:nth-of-type(1) {
    font-size: clamp(2.1rem, 10.5vw, 2.8rem);
    margin-bottom: 10px;
  }
  /* second line acts as the subtitle */
  #hero h1:nth-of-type(2) {
    font-size: clamp(1.05rem, 4.8vw, 1.3rem);
    font-weight: 500;
    letter-spacing: 0.4px;
    margin-bottom: 22px;
  }
  #hero p {
    font-size: 1.02rem;
    line-height: 1.6;
    max-width: 32ch;
    margin: 0 auto 26px;
  }

  /* About sections become tidy readable panels */
  .about-section { padding: 8px 16px 16px; gap: 0; }
  .about-part {
    width: 100%;
    max-width: 560px;
    align-items: flex-start;
    text-align: left;
    padding: 26px 22px 14px;
    margin: 0 0 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  .about-part h2 {
    font-size: clamp(1.35rem, 6vw, 1.7rem);
    line-height: 1.25;
    margin-bottom: 14px;
  }
  .about-part p {
    font-size: 0.98rem;
    line-height: 1.7;
    max-width: 100%;
    margin-bottom: 14px;
  }
  .cta-center { margin: 12px 0 40px; width: 100%; }

  /* Boxes stay perfectly still on mobile: no slide-up reveal, no hover/tap lift */
  .about-part,
  .about-part.visible,
  .about-part:hover {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* ---------- Contact ---------- */
  /* Hero + card sit together, centered in the space above the footer */
  .contact-overlay {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 0 24px;
  }
  .contact-hero { padding: 32px 22px 4px; }
  .contact-hero h1 {
    font-size: clamp(2rem, 10vw, 2.7rem);
    line-height: 1.15;
    margin-bottom: 14px;
  }
  .contact-hero p {
    font-size: 1.02rem;
    line-height: 1.6;
    max-width: 32ch;
    margin: 0 auto 4px;
  }
  .contact-card {
    display: block;
    width: calc(100% - 40px);
    max-width: 440px;
    margin: 24px auto 8px;
    padding: 26px 20px 24px;
    border-radius: 18px;
    box-shadow: 0 0 22px rgba(98,209,243,0.5), 0 0 36px rgba(155,107,255,0.3);
  }
  .contact-card h2 { font-size: 1.45rem; margin-bottom: 10px; }
  .contact-card p  { font-size: 0.98rem; line-height: 1.5; margin-bottom: 0; color: #c9ccd3; }
  /* email becomes a big, tappable button-style row */
  .contact-card a {
    display: block;
    margin-top: 14px;
    padding: 14px 12px;
    font-size: 1.05rem;
    border: 1px solid rgba(98, 209, 243, 0.4);
    border-radius: 12px;
    background: rgba(98, 209, 243, 0.08);
    overflow-wrap: anywhere;
  }

  /* ---------- Games ---------- */
  .slideshow-container {
    width: auto;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 20px 16px 8px;
    border-radius: 14px;
  }
  .center-message { padding: 28px 20px 8px; }
  .center-message h2 {
    font-size: clamp(1.35rem, 6vw, 1.8rem);
    line-height: 1.3;
    margin-bottom: 12px;
  }
  .center-message p { font-size: 1rem; line-height: 1.6; }
  .featured-grid { margin-top: 24px; padding: 0 20px 40px; }
  .featured-card { padding: 28px 20px; }
  .featured-card h3 { font-size: 1.35rem; }

  /* ---------- Statement ---------- */
  .hero h1 { overflow-wrap: anywhere; }
  .statement-box {
    margin: 16px;
    padding: 24px 20px;
    border-radius: 16px;
  }
  .statement-box p {
    font-size: 1rem;
    line-height: 1.75;
    text-align: left;
    margin-bottom: 16px;
  }
  .statement-box .signature { font-size: 1.5rem; margin-top: 20px; }

  /* ---------- Footer ---------- */
  footer {
    padding: 18px 16px;
    font-size: 0.8rem;
    line-height: 1.5;
  }
}

@media (max-width: 380px) {
  .logo { font-size: 1.05rem; letter-spacing: 0.5px; }
  .contact-hero h1 { font-size: 1.8rem; }
  .contact-card { width: calc(100% - 28px); padding: 22px 16px; }
  .about-part { padding: 22px 18px 10px; }
  .statement-box { margin: 12px; padding: 20px 16px; }
}

/* Touch screens have no hover: stop cards/buttons getting "stuck" lifted after a tap */
@media (hover: none) {
  .about-part:hover,
  .featured-card:hover,
  .btn:hover { transform: none; }
}
