/* ============================================================
   PUGS.ORG — RESPONSIVE STYLESHEET
   Mobile-first breakpoints.
   Base (mobile) styles live in main.css.
   This file contains overrides at each breakpoint.

   Breakpoints:
   xs:  < 480px   (small phones)
   sm:  640px+    (large phones / portrait tablet)
   md:  1024px+   (landscape tablet / small desktop)
   lg:  1280px+   (desktop)
   xl:  1600px+   (wide desktop)
   ============================================================ */


/* ================================================================
   XS — Small phones (< 480px)
   ================================================================ */
@media (max-width: 479px) {

  /* Tighten horizontal padding on small screens */
  :root { --px: 1rem; }

  /* Nav: only wordmark + burger */
  .header-nav .nav-link  { display: none; }
  .nav-menu-btn { display: flex; }

  /* Hero headline — size down slightly */
  .hero-headline {
    font-size: clamp(5rem, 22vw, 8rem);
  }

  /* Hero words — prevent overflow on narrow screens */
  .hero-word-inner {
    font-size: clamp(5rem, 23vw, 10rem) !important;
    white-space: normal;
    text-align: center;
    line-height: 0.88;
  }

  [data-word="stubborn"] .hero-word-inner {
    font-size: clamp(4rem, 19vw, 8rem) !important;
  }

  [data-word="stubborn"] {
    justify-content: center;
    padding-right: 0;
  }

  [data-word="iconic"] .hero-word-inner {
    font-size: clamp(6rem, 25vw, 12rem) !important;
  }

  .hero-final-text {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  /* Anatomy: hide the horizontal lines on small screens,
     stack callouts vertically below the image */
  .anatomy-stage {
    flex-direction: column;
    height: auto;
    padding-bottom: 2rem;
    min-height: 50vh;
  }

  .anatomy-pug-anchor {
    height: 45vw;
    max-height: 260px;
    min-height: 180px;
  }

  .anatomy-pug-img {
    max-width: 90vw;
  }

  .anatomy-callouts {
    position: relative;
    width: 100%;
    top: auto; left: auto; right: auto; bottom: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem var(--px);
  }

  .anat-callout {
    position: relative !important;
    top: auto !important;
    flex: 1 1 48%;
  }

  .anat-callout--left,
  .anat-callout--right {
    right: auto !important;
    left: auto !important;
    flex-direction: row;
  }

  .anat-callout-text {
    text-align: left;
    padding-left: 0.5rem;
    padding-right: 0;
  }

  .anat-line-h { width: 20px; }

  /* Walk: scale down text */
  .walk-beat-text {
    font-size: clamp(2.2rem, 11vw, 5rem);
    max-width: 90%;
  }

  [data-beat="2"] {
    justify-content: flex-start;
  }

  [data-beat="2"] .walk-beat-text {
    text-align: left;
  }

  .walk-pug-wrap {
    width: clamp(130px, 52vw, 260px);
  }

  /* Personality: smaller headline */
  .personality-hed p {
    font-size: clamp(2.5rem, 12vw, 6rem);
  }

  .trait {
    font-size: calc(clamp(0.75rem, 4.5vw, 2rem) * var(--tscale, 1));
  }

  .personality-outro-hed {
    font-size: clamp(1.6rem, 7vw, 3.5rem);
  }

  .anatomy-outro-hed {
    font-size: clamp(3rem, 11vw, 6rem);
  }
}


/* ================================================================
   SM — Large phones / portrait tablet (640px – 1023px)
   ================================================================ */
@media (min-width: 640px) and (max-width: 1023px) {

  /* Show some nav links, keep burger for full menu */
  .header-nav .nav-link:nth-child(n+3) { display: none; }
  .nav-menu-btn { display: flex; }

  /* Anatomy: adapt stage for tablet portrait */
  .anatomy-pug-anchor {
    height: 60vw;
    max-height: 500px;
  }

  .anatomy-pug-img {
    max-width: 60vw;
  }

  .anatomy-callouts {
    width: 30%;
  }

  .anat-line-h {
    width: clamp(25px, 3.5vw, 50px);
  }

  /* Walk pug size */
  .walk-pug-wrap {
    width: clamp(160px, 28vw, 380px);
  }
}


/* ================================================================
   MD — Landscape tablet / small desktop (1024px+)
   ================================================================ */
@media (min-width: 1024px) {

  /* Full desktop nav — hide burger */
  .nav-menu-btn { display: none; }
  .header-nav .nav-link { display: inline; }

  /* Enable custom cursor on hover-capable devices */
  .cursor { display: block; }
  body { cursor: none; }

  /* Allow full word sizes intended for desktop */
  /* (clamp already scales — no extra overrides needed here) */

  /* Anatomy: side callouts take full form */
  .anatomy-callouts { width: 36%; }

  .anat-line-h {
    width: clamp(40px, 5vw, 80px);
  }

}


/* ================================================================
   LG — Desktop (1280px+)
   ================================================================ */
@media (min-width: 1280px) {

  :root {
    --px: clamp(3rem, 6vw, 6rem);
  }

  .anatomy-callouts { width: 34%; }

  .walk-pug-wrap {
    width: clamp(280px, 32vw, 480px);
  }
}


/* ================================================================
   XL — Wide desktop (1600px+)
   ================================================================ */
@media (min-width: 1600px) {

  :root {
    --px: clamp(4rem, 7vw, 8rem);
  }

}


/* ================================================================
   TOUCH DEVICES
   Disable cursor; ensure tap targets are accessible.
   ================================================================ */
@media (hover: none) {
  .cursor { display: none !important; }
  body { cursor: auto !important; }

  /* Ensure tap targets are large enough (WCAG 2.5.5) */
  .nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .cta-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}


/* ================================================================
   TALL VIEWPORTS (portrait phones with safe-area insets)
   ================================================================ */
@media (min-height: 800px) {

  .anatomy-stage {
    height: 100vh;
  }

}

/* Support viewport units with safe-area on notched phones */
@supports (height: 100svh) {
  .chapter--hero       { height: 100svh; }
  .walk-pin-target     { height: 100svh; }
  .personality-pin-target { height: 100svh; }
  .anatomy-stage       { height: 100svh; }
}


/* ================================================================
   HIGH-CONTRAST MODE (Windows)
   ================================================================ */
@media (forced-colors: active) {
  .hero-vignette,
  .personality-vignette,
  .hero-tint,
  .walk-heat,
  .anatomy-spotlight {
    display: none;
  }

  .hero-word-inner,
  .walk-beat-text,
  .personality-hed p {
    color: ButtonText;
    -webkit-text-stroke: 0;
  }
}
