/* Home mobile: composición basada en 01_home-mobile-nueva.jpg.
   El breakpoint existente de 780px mantiene intacta la composición desktop. */
.doodles--bottom { display: none; }

@media (max-width: 780px) {
  .hero {
    min-height: 100svh;
    padding: clamp(90px, 24vw, 150px) 20px clamp(118px, 30vw, 190px);
    overflow: hidden;
  }
  .intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 540px;
  }
  .visual {
    order: 0;
    width: clamp(125px, 33vw, 195px);
    height: auto;
    margin: 0;
    transform: none;
  }
  .logo {
    position: static;
    display: block;
    width: 100%;
    height: auto;
  }
  .polaroid, .calendar-widget, .note { display: none; }
  .copy { order: 1; width: min(100%, 420px); text-align: left; }
  .copy h1 {
    font-size: clamp(30px, 7.5vw, 44px);
    line-height: 1.15;
    letter-spacing: 0;
    margin: 0 0 22px;
  }
  .copy p {
    font-size: clamp(16px, 3.9vw, 20px);
    line-height: 1.3;
    letter-spacing: 0;
    margin: 0 0 22px;
    text-wrap: pretty;
  }
  .copy .welcome { margin: 0 0 28px; }
  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    width: min(100%, 300px);
    margin: 0;
  }
  .nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 8px;
    border-radius: 5px;
    font-size: clamp(15px, 4vw, 19px);
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    box-shadow: 0 2px 4px #0002;
    -webkit-tap-highlight-color: transparent;
    --item-color: var(--cyan);
    transition: box-shadow .18s ease;
  }
  .nav-btn.green { --item-color: var(--green); }
  .nav-btn.purple { --item-color: var(--purple); }
  .nav-btn.orange { --item-color: var(--orange); }
  /* Touch has no persistent hover: color follows press and keyboard focus. */
  .nav .nav-btn:hover { color: #fff; transform: none; }
  .nav .nav-btn:active, .nav .nav-btn.is-touched, .nav .nav-btn:focus-visible { color: var(--item-color); transform: none; }
  .nav-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }
  .bottom-row {
    position: relative;
    right: auto;
    bottom: auto;
    display: block;
    width: 100%;
    margin: 34px auto 0;
  }
  .social-note { width: 100%; height: auto; max-width: none; margin: 0; transform: none; }
  .socials {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 6vw, 40px);
  }
  .socials a { width: 64px; height: 64px; }
  .socials a:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; border-radius: 50%; }
  .doodles--top, .doodles--bottom {
    position: absolute;
    width: 260px;
    height: 150px;
    z-index: 0;
    pointer-events: none;
    transform: none;
  }
  .doodles--top { top: -10px; right: -7px; }
  .doodles--bottom { display: block; left: -7px; bottom: -10px; transform: scaleX(-1); }
  .doodles .s1 { width: 38px; left: 8px; top: 14px; }
  .doodles .a1 { width: 58px; left: 54px; top: -10px; }
  .doodles .s2 { width: 40px; left: 118px; top: 34px; }
  .doodles .h1 { width: 32px; left: 169px; top: 17px; }
  .doodles .h2 { width: 32px; left: 146px; top: 82px; }
  .doodles .a2 { width: 104px; right: -41px; top: 48px; }
  body:has(.hero) .language-switcher {
    position: absolute;
    top: max(14px, env(safe-area-inset-top));
    left: max(14px, env(safe-area-inset-left));
    right: auto;
    bottom: auto;
    transform: none;
    z-index: 4;
    background: #fffffff0;
  }
  body:has(.hero) .language-switcher button { min-width: 44px; height: 44px; padding: 0 8px; color: #515656; }
  body:has(.hero) .language-switcher button.is-active { color: #fff; }
  body:has(.hero) .language-switcher button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
}
@media (max-width: 360px) {
  .doodles--top { transform: scale(.8); transform-origin: top right; }
}
/* Mobile home: centered logo, introduction and social links. */
.home-story-mobile { display: none; }
@media (max-width: 780px) {
  .hero { min-height: 100svh; padding: 60px 22px; display: flex; flex-direction: column; align-items: center; justify-content: safe center; }
  .intro { width: 100%; max-width: 420px; gap: 18px; margin: 0; }
  .visual { position: relative; flex: none; width: 145px; height: 160px; margin: 0; transform: none; }
  .logo { position: static; display: block; width: 100%; height: 100%; object-fit: contain; }
  .polaroid, .calendar-widget { display: none; }
  .copy { width: 100%; max-width: none; padding: 0; text-align: center; }
  .copy h1 { font-size: clamp(28px, 7.4vw, 34px); line-height: 1.1; margin: 0 0 14px; text-align: center; }
  .copy p { font-size: clamp(12px, 3.47vw, 15px); line-height: 1.4; letter-spacing: 0; margin: 0 0 18px; }
  .home-story-desktop { display: none; }
  .home-story-mobile { display: inline; }
  .home-story-mobile > span { white-space: nowrap; }
  .copy .welcome { margin: 0 0 18px; }
  .nav { width: min(100%, 340px); margin: 0 auto; gap: 10px 12px; }
  .nav-btn { min-height: 44px; font-size: 15px; padding: 10px 8px; }
  .bottom-row { position: static; display: flex; flex-direction: column; align-items: center; flex: none; width: 100%; margin: 18px 0 0; }
  .social-note { position: static; flex: none; width: auto; max-width: none; height: auto; margin: 0; transform: none; }
  .socials { position: static; justify-content: center; gap: 10px; }
  .socials a { width: 61.5px; height: 61.5px; }
  .doodles--top { transform: scale(.65); transform-origin: top right; }
  .doodles--bottom { display: block; left: -7px; bottom: -10px; transform: translate(-17.5%, 17.5%) scale(-.65, -.65); transform-origin: center; }
  .doodles--bottom .heart { transform: scaleY(-1); }
}
@media (max-width: 780px) and (max-height: 740px) {
  .intro { gap: 12px; }
  .visual { height: 130px; width: 118px; }
  .copy p { margin-bottom: 12px; }
  .copy .welcome { margin-bottom: 12px; }
  .bottom-row { margin-top: 12px; }
}
