/* ============================================================
   TOMOTOMO FRIENDS — STYLE.CSS
   Layout & section styles.
   Tokens: tokens.css | Animations: animations.css
   Components: components.css | A11y: accessibility.css
   ============================================================ */

/* ── FONT ── */
@font-face {
  font-family: 'Horizon';
  src: url('fonts/horizon.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; width: 100%; }
body { font-family: var(--font-body); background: var(--clr-body-bg); color: #fff; overflow-x: hidden; min-height: var(--app-vh-stable); width: 100%; }
main { overflow-x: clip; width: 100%; }
img  { max-width: 100%; display: block; }

:root {
  --app-vh: 100vh;
  --app-vh-stable: 100vh;
  --safe-top: 0px;
  --safe-top: env(safe-area-inset-top);
  --safe-right: 0px;
  --safe-right: env(safe-area-inset-right);
  --safe-bottom: 0px;
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: 0px;
  --safe-left: env(safe-area-inset-left);
  --mobile-fixed-reserve: 0px;
}

@supports (height: 100svh) {
  :root {
    --app-vh: 100svh;
    --app-vh-stable: 100svh;
  }
}

@supports (height: 100dvh) {
  :root {
    --app-vh: 100dvh;
  }
}

@media (max-width: 1100px) {
  html.ios-webkit #intro,
  html.ios-webkit .char-sec {
    min-height: calc(var(--app-vh-stable) - var(--nav-h-mobile));
  }

  html.ios-webkit #intro .sec-inner,
  html.ios-webkit .char-layout {
    min-height: calc(var(--app-vh-stable) - var(--nav-h-mobile));
  }

  html.ios-webkit .loc-sec,
  html.ios-webkit .loc-sec .sec-inner {
    min-height: 60vh;
  }

  html.ios-webkit .loc-sec .sec-inner {
    justify-content: center;
    padding-top: clamp(42px, 9vh, 76px);
    padding-bottom: clamp(42px, 9vh, 76px);
  }
}

/* ── UTILITY COLORS ── */
.c-green  { color: var(--clr-green);  } .c-yellow { color: var(--clr-yellow); }
.c-pink   { color: var(--clr-pink);   } .c-blue   { color: var(--clr-cyan);   }
.c-orange { color: var(--clr-orange); } .c-purple { color: var(--clr-purple); }
.c-lime   { color: var(--clr-lime);   } .c-teal   { color: var(--clr-teal);   }

/* ============================================================
   NAVBAR
   ============================================================ */
header > nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  isolation: isolate;
  display: flex; align-items: center;
  height: var(--nav-h-desktop);
  padding: 0 clamp(16px, 4vw, 44px);
  gap: clamp(10px, 2vw, 24px);
  background:
    radial-gradient(circle at 10% 22%, rgba(255,255,255,.26) 0 5px, transparent 6px),
    radial-gradient(circle at 26% 70%, rgba(255,255,255,.17) 0 3px, transparent 4px),
    radial-gradient(circle at 86% 20%, rgba(255,255,255,.24) 0 6px, transparent 7px),
    linear-gradient(120deg, #1e46c3 0%, #2b69dc 54%, #2f84e7 100%);
  border-bottom: 4px solid rgba(255,255,255,.45);
  box-shadow: 0 12px 30px rgba(7,24,84,.42);
  overflow: visible;
}
header > nav::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  background:
    radial-gradient(42px 22px at 10% 0, rgba(255,255,255,.22) 98%, transparent 100%),
    radial-gradient(42px 22px at 35% 0, rgba(255,255,255,.18) 98%, transparent 100%),
    radial-gradient(42px 22px at 60% 0, rgba(255,255,255,.22) 98%, transparent 100%),
    radial-gradient(42px 22px at 85% 0, rgba(255,255,255,.16) 98%, transparent 100%);
  background-size: 136px 30px;
  opacity: .72;
  pointer-events: none;
  z-index: 1;
}
header > nav > * {
  position: relative;
  z-index: 2;
}
.nav-logo {
  height: 82px; width: 82px; object-fit: contain;
  margin-right: auto; border-radius: 16px;
  flex-shrink: 0;
  padding: 5px;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #ebf5ff 70%);
  border: 3px solid rgba(255,255,255,.95);
  box-shadow: 0 5px 0 rgba(16,44,132,.48), 0 14px 18px rgba(0,0,0,.25);
  animation: navLogoFloat 3.8s ease-in-out infinite;
}
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 12px);
  order: 2;
  flex-shrink: 1;
  min-width: 0;
}
.nav-links li { flex-shrink: 1; min-width: 0; }
.nav-links li:nth-child(odd) a { --nav-tilt: -1.3deg; }
.nav-links li:nth-child(even) a { --nav-tilt: 1.2deg; }
.nav-links a {
  --nav-tilt: 0deg;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 10px clamp(10px, 1.4vw, 20px);
  min-height: 46px;
  font-family: var(--font-display); font-size: clamp(11px, 1.15vw, 16px); font-weight: 700;
  text-transform: uppercase; letter-spacing: clamp(0px, .06vw, 1px);
  border-radius: var(--r-pill);
  border: 3px solid rgba(255,255,255,.92);
  text-decoration: none;
  color: #fff;
  line-height: 1.2;
  text-align: center;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-shadow: 0 1px 0 rgba(0,0,0,.22);
  box-shadow: 0 6px 0 rgba(17,39,120,.40), 0 12px 18px rgba(0,0,0,.24);
  transform: rotate(var(--nav-tilt));
  transition:
    transform var(--dur-fast) var(--ease-bounce),
    box-shadow var(--dur-fast) ease,
    filter var(--dur-fast) ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  pointer-events: none;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  transform: translateY(-6px) scale(1.05) rotate(0deg);
  filter: brightness(1.05) saturate(1.08);
  box-shadow: 0 8px 0 rgba(17,39,120,.45), 0 16px 22px rgba(0,0,0,.28);
}
.nav-links a:active {
  transform: translateY(-1px) scale(.98) rotate(0deg);
  box-shadow: 0 3px 0 rgba(17,39,120,.45), 0 8px 14px rgba(0,0,0,.22);
}
.nav-links a[aria-current="page"] {
  transform: translateY(-3px) rotate(0deg);
  box-shadow: 0 0 0 3px #fff, 0 8px 0 rgba(17,39,120,.45), 0 16px 22px rgba(0,0,0,.28);
  filter: saturate(1.15) brightness(1.05);
}
.n-about   { background: linear-gradient(160deg, #4adfff 0%, #1aa7ec 100%); }
.n-story   { background: linear-gradient(160deg, #d580ff 0%, #a855f7 100%); }
.n-content { background: linear-gradient(160deg, #ffbf58 0%, #ff9f34 100%); }
.n-music   { background: linear-gradient(160deg, #8fe94b 0%, #62c92a 100%); }
.n-contact { background: linear-gradient(160deg, #ff66b8 0%, #ff3e96 100%); }

.nav-links a:focus-visible,
.hamburger:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.hamburger {
  display: none;
  order: 4;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 48px;
  height: 48px;
  cursor: pointer;
  border: 3px solid rgba(255,255,255,.92);
  border-radius: 50%;
  background: linear-gradient(160deg, #ffd95a 0%, #ff9b4b 100%);
  box-shadow: 0 4px 0 rgba(182,91,0,.58), 0 10px 16px rgba(0,0,0,.26);
  transition: transform var(--dur-fast) var(--ease-bounce), box-shadow var(--dur-fast) ease;
}
.hamburger:hover {
  transform: translateY(-2px);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 3px;
  background: #1c2f72;
  border-radius: 999px;
  transition: transform var(--dur-fast) var(--ease-smooth), opacity var(--dur-fast) ease;
}
.hamburger[aria-expanded="true"] {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(182,91,0,.58), 0 7px 14px rgba(0,0,0,.22);
}
.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@keyframes navLogoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .nav-logo {
    animation: none;
  }
  .nav-links a,
  .hamburger,
  .hamburger span {
    transition: none;
  }
}

@media (max-width: 1100px) {
  header > nav {
    height: var(--nav-h-mobile);
    gap: 10px;
    padding: 0 max(12px, var(--safe-left, 0px)) 0 max(12px, var(--safe-right, 0px));
  }
  .nav-logo {
    height: 54px;
    width: 54px;
    padding: 3px;
    border-radius: 13px;
    border-width: 2px;
    animation: none;
  }
  .hamburger {
    display: flex;
    width: 44px;
    height: 44px;
    border-width: 2px;
    flex-shrink: 0;
  }
  .hamburger span {
    width: 20px;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: calc(var(--nav-h-mobile) + var(--safe-top, 0px) + 8px);
    left: max(8px, var(--safe-left, 0px));
    right: max(8px, var(--safe-right, 0px));
    max-height: calc(var(--app-vh-stable) - var(--nav-h-mobile) - var(--safe-top, 0px) - var(--safe-bottom, 0px) - 16px);
    overflow-y: auto;
    padding: 14px 12px 18px;
    gap: 10px;
    z-index: calc(var(--z-nav) + 1);
    background:
      radial-gradient(circle at 84% 12%, rgba(255,255,255,.25) 0 9px, transparent 10px),
      linear-gradient(165deg, #2456cd 0%, #2f7be3 100%);
    border: 3px solid rgba(255,255,255,.72);
    border-radius: 24px;
    box-shadow: 0 14px 28px rgba(6,19,70,.45);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links li:nth-child(odd) a,
  .nav-links li:nth-child(even) a {
    --nav-tilt: 0deg;
  }
  .nav-links a {
    width: 100%;
    min-height: var(--touch-min);
    font-size: 15px;
    padding: 12px 16px;
    border-width: 2px;
    border-radius: 15px;
    justify-content: flex-start;
    box-sizing: border-box;
    transform: none;
    box-shadow: 0 5px 0 rgba(17,39,120,.38), 0 10px 14px rgba(0,0,0,.20);
  }
  .nav-links a:hover,
  .nav-links a:focus-visible,
  .nav-links a:active,
  .nav-links a[aria-current="page"] {
    transform: none;
  }
  .nav-links a br { display: none; }
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang-switch {
  position: relative;
  order: 3;
  margin-left: 8px;
  flex-shrink: 0;
  min-width: 0;
}
.lang-trigger {
  all: unset;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 32px 7px 12px;
  min-height: 38px;
  max-width: min(220px, calc(100vw - 168px));
  border-radius: var(--r-pill);
  border: 2px solid rgba(255,255,255,.58);
  background: linear-gradient(160deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.28) 100%);
  box-shadow: 0 3px 0 rgba(17,39,120,.32), 0 8px 14px rgba(0,0,0,.20);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(0,0,0,.24);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-bounce), filter var(--dur-fast) ease;
}
.lang-trigger::after {
  content: '▼';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8px;
  color: rgba(255,255,255,.9);
  pointer-events: none;
}
.lang-prefix {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
  text-shadow: 0 1px 0 rgba(0,0,0,.24);
  white-space: nowrap;
}
.lang-current {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 132px;
  display: block;
  white-space: normal;
  overflow: hidden;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.lang-trigger:hover,
.lang-trigger:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.lang-trigger:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.lang-popup {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(320px, 92vw);
  padding: 10px;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,.72);
  background:
    radial-gradient(circle at 90% 8%, rgba(255,255,255,.2) 0 10px, transparent 11px),
    linear-gradient(168deg, #2354cd 0%, #2e77de 100%);
  box-shadow: 0 14px 28px rgba(6,19,70,.42);
  z-index: calc(var(--z-nav) + 5);
  opacity: 0;
  transform: translateY(-8px) scale(.98);
  pointer-events: none;
  transition: opacity var(--dur-fast) ease, transform var(--dur-fast) var(--ease-bounce);
}
.lang-switch.open .lang-popup {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.lang-popup-title {
  margin: 2px 4px 8px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: rgba(255,255,255,.95);
  text-shadow: 0 1px 0 rgba(0,0,0,.24);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.lang-option {
  all: unset;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  padding: 10px 12px;
  min-height: 40px;
  border-radius: 14px;
  border: 2px solid transparent;
  background: rgba(255,255,255,.1);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.lang-option:hover,
.lang-option:focus-visible {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.58);
}
.lang-option:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
}
.lang-option.active {
  background: rgba(255,255,255,.24);
  border-color: rgba(255,255,255,.9);
}
.lang-option-label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.lang-option-tag {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,.5);
  background: rgba(10,26,92,.35);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .8px;
}
.lang-option-tag.soon {
  border-color: rgba(255,255,255,.34);
  background: rgba(0,0,0,.24);
}
.lang-option.is-soon,
.lang-option:disabled,
.lang-option[aria-disabled="true"] {
  opacity: .72;
  cursor: not-allowed;
}
.lang-option.is-soon:hover,
.lang-option:disabled:hover,
.lang-option[aria-disabled="true"]:hover,
.lang-option.is-soon:focus-visible,
.lang-option:disabled:focus-visible,
.lang-option[aria-disabled="true"]:focus-visible {
  background: rgba(255,255,255,.1);
  border-color: transparent;
  outline: none;
}
@media (max-width: 1400px) {
  .lang-prefix { display: none; }
  .lang-current {
    max-width: 124px;
  }
}
@media (max-width: 1100px) {
  .lang-switch {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
  }
  .lang-trigger {
    min-height: 32px;
    padding: 6px 26px 6px 10px;
    max-width: min(180px, calc(100vw - 132px));
    font-size: 12px;
  }
  .lang-trigger::after {
    right: 10px;
  }
  .lang-current {
    max-width: 100px;
  }
  .lang-popup {
    right: -4px;
    top: calc(100% + 8px);
    width: min(260px, 92vw);
    padding: 8px;
    border-radius: 16px;
  }
  .lang-popup-title {
    margin-bottom: 6px;
    font-size: 11px;
  }
  .lang-option {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 12px;
  }
  .lang-option-tag {
    font-size: 10px;
    padding: 3px 6px;
  }
}

/* ============================================================
   SECTION BASE
   ============================================================ */
.sec { position: relative; overflow: hidden; width: 100%; }
.sec-inner { position: relative; z-index: var(--z-content); }
.dark-overlay { position: absolute; inset: 0; z-index: var(--z-overlay); pointer-events: none; background: rgba(0,0,0,.30); }
.sec::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 82%, rgba(0,0,0,.35) 100%);
  opacity: .6;
}

/* ============================================================
   CLOUD LAYER
   ============================================================ */
.cloud-layer { position: absolute; inset: 0; z-index: var(--z-cloud); pointer-events: none; overflow: hidden; }
.cloud { position: absolute; will-change: transform; opacity: 0; height: auto; --cloud-o: 1; }

/* 6 clouds at different speeds, sizes, depths — negative delay = already mid-drift on load */
.cl-1 { top: 3%;  width: clamp(220px,28vw,380px); animation: cloudDrift 65s linear infinite;               --cloud-o: .85; }
.cl-2 { top: 14%; width: clamp(150px,20vw,260px); animation: cloudDrift 48s linear infinite; animation-delay: -14s; --cloud-o: .6;  filter: blur(.5px); }
.cl-3 { top: 1%;  width: clamp(300px,38vw,520px); animation: cloudDrift 85s linear infinite; animation-delay: -40s; --cloud-o: .4;  filter: blur(1.5px); }
.cl-4 { top: 24%; width: clamp(120px,16vw,220px); animation: cloudDrift 38s linear infinite; animation-delay: -8s;  --cloud-o: .75; }
.cl-5 { top: 32%; width: clamp(100px,14vw,190px); animation: cloudDrift 30s linear infinite; animation-delay: -22s; --cloud-o: .5;  filter: blur(.5px); }
.cl-6 { top: 8%;  width: clamp(260px,32vw,460px); animation: cloudDrift 75s linear infinite; animation-delay: -55s; --cloud-o: .3;  filter: blur(2px); }
@media (max-width: 768px) { .cl-1{width:55vw} .cl-2{width:40vw} .cl-3{width:70vw} .cl-4{width:35vw} .cl-5{width:28vw} .cl-6{width:62vw} }

/* ============================================================
   HERO — unified SVG
   ============================================================ */
#welcome { height: var(--app-vh-stable); min-height: 500px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#welcome .parallax-bg {
  position: absolute; inset: 0; z-index: var(--z-bg);
  background: #111827; /* fallback color while img loads */
  will-change: transform;
}
/* Hero background <img> — replaces CSS background-image for faster LCP */
.parallax-bg-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
}
#welcome .parallax-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.2) 0%, rgba(0,0,0,.3) 55%, rgba(0,0,0,.5) 100%);
}
.hero-stage {
  position: relative; z-index: var(--z-content);
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: var(--app-vh-stable); min-height: 500px;
  padding: clamp(16px, 4vw, 60px); box-sizing: border-box;
}
.hero-svg {
  display: block;
  width: min(580px, 88vw);
  height: auto;
  animation: heroEnter 1.0s var(--ease-bounce) both;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.4));
}
/* legacy hidden */
#welcome .sec-inner { display: none; }
.welcome-svg-wrap { display: none; }
.welcome-mobile-wrap { display: none; }
.hero-logo { display: none; }
@media (max-width: 680px) {
  :root {
    --mobile-fixed-reserve: 0px;
  }

  body, main {
    overflow-x: clip;
  }

  main {
    padding-bottom: var(--mobile-fixed-reserve);
  }

  /* clouds visible on mobile — lightweight CSS-only */

  #welcome {
    height: auto;
    min-height: calc(var(--app-vh-stable) - var(--nav-h-mobile));
    justify-content: center;
    overflow: clip;
    overflow: clip visible; /* keep arc text visible above viewBox; clip only horizontally */
  }

  #welcome .parallax-bg {
    background-position: center 14%;
  }

  .hero-stage {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: calc(var(--app-vh-stable) - var(--nav-h-mobile));
    align-items: center;
    /* Balanced padding — no CTA to reserve for; just visual breathing room */
    padding: clamp(72px, 18vw, 100px) 12px clamp(28px, 6vw, 44px);
  }

  .hero-svg {
    width: min(520px, 95vw);
    max-width: 95vw;
  }

  .sec-inner {
    width: 100%;
    max-width: 100%;
  }

  .loc-sec .sec-inner {
    padding: clamp(42px, 10vw, 72px) 20px clamp(42px, 10vw, 72px);
  }

  .sec-title {
    margin-bottom: clamp(12px, 4vw, 18px);
    letter-spacing: 1px;
    -webkit-text-stroke: 2.5px rgba(0,0,0,.62);
    text-shadow: 2px 2px 0 rgba(0,0,0,.5);
  }

  #banana-land .sec-title,
  #magical-village .sec-title,
  #grand-town .sec-title {
    font-size: clamp(34px, 10.2vw, 54px);
    letter-spacing: 2px;
  }

  #tomotomo-land .sec-title {
    font-size: clamp(36px, 10.8vw, 56px);
    letter-spacing: 2px;
  }

  .land-sub {
    font-size: clamp(15px, 4.8vw, 21px);
    margin-bottom: 8px;
  }

  .ph-txt {
    max-width: 34ch;
    font-size: clamp(14px, 3.9vw, 16px);
    line-height: 1.52;
  }

  /* ── Character sections ── */
  .char-info-card {
    background: rgba(0, 0, 0, .48); /* stronger on mobile since backdrop-filter is off */
    padding: 14px 16px;
    border-color: rgba(255,255,255,.12);
  }

  .char-info-card p {
    font-size: clamp(13px, 3.6vw, 15px);
    line-height: 1.5;
    margin-bottom: 8px;
  }

  .char-txt .sec-title {
    margin-bottom: clamp(10px, 3vw, 16px);
  }
}

@media (max-width: 430px) {
  .hero-stage {
    padding: clamp(64px, 18vw, 90px) 10px clamp(22px, 5vw, 36px);
  }

  .hero-svg {
    width: min(500px, 96vw);
    max-width: 96vw;
  }

  .loc-sec .sec-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav-links a {
    font-size: 14px;
    letter-spacing: .7px;
  }

  .ph-txt {
    max-width: 31ch;
  }
}

@media (max-width: 390px) {
  .hero-stage {
    padding: 56px 8px 20px;
  }

  .hero-svg {
    width: min(480px, 97vw);
  }

  .loc-sec .sec-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .sec-title {
    letter-spacing: .6px;
  }
}

/* ============================================================
   PARALLAX BG
   ============================================================ */
#our-story .parallax-bg, #intro .parallax-bg {
  position: absolute; inset: 0; z-index: var(--z-bg);
  background-image: url('images/Background.webp');
  background-size: cover; background-position: center top; background-repeat: no-repeat; will-change: transform;
}
#our-story .parallax-bg::after, #intro .parallax-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.28) 0%, rgba(0,0,0,.38) 55%, rgba(0,0,0,.55) 100%);
}
/* ============================================================
   INTRO SECTIONS
   ============================================================ */
#intro { min-height: var(--app-vh-stable); }
#intro .parallax-bg { inset: -30% 0; background-position: center 40%; }
#intro .sec-inner { display: flex; flex-direction: column; align-items: center; min-height: var(--app-vh-stable); padding: var(--sp-2xl) var(--sp-lg) 100px; text-align: center; }
.intro-block { max-width: 720px; width: 100%; }
.intro-block + .intro-block { margin-top: clamp(60px, 10vh, 110px); }
.intro-ph { font-style: italic; color: rgba(255,255,255,.80); font-size: clamp(15px,2.5vw,19px); text-shadow: 1px 1px 6px rgba(0,0,0,.9); }
.land-sub { font-style: italic; font-weight: 800; font-size: clamp(17px,3vw,27px); color: #fff; text-shadow: 1px 1px 8px rgba(0,0,0,.9); display: block; margin-bottom: var(--sp-sm); }

/* ============================================================
   LOCATION SECTIONS
   ============================================================ */
.loc-sec { min-height: var(--app-vh-stable); }
.loc-sec .sec-bg { position: absolute; inset: -30% 0; z-index: var(--z-bg); background-size: cover; background-position: center; background-attachment: fixed; will-change: transform; }
.loc-sec .sec-inner { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: var(--app-vh-stable); padding: clamp(48px, 8vh, 80px) var(--sp-xl); text-align: center; }
@media (max-width: 680px) {
  .loc-sec,
  .loc-sec .sec-inner { min-height: 60vh; }
  .loc-sec .sec-inner { justify-content: center; }
}
#tomotomo-land  .sec-bg { background-image: url('images/Background.webp'); background-position: center 70%; }
#banana-land    .sec-bg { background-image: url('images/Banana_Land.webp'); }
#magical-village .sec-bg { background-image: url('images/Magical_Village.webp'); }
#grand-town     .sec-bg { background-image: url('images/grandtown.webp'); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.sec-title { font-family: var(--font-display); font-size: clamp(38px,8vw,74px); line-height: 1.05; letter-spacing: 2px; -webkit-text-stroke: 4px rgba(0,0,0,.65); paint-order: stroke fill; text-shadow: 3px 3px 0 rgba(0,0,0,.55); margin-bottom: var(--sp-xl); }
.ph-txt { font-style: italic; color: rgba(255,255,255,.72); font-size: clamp(13px,2.2vw,17px); text-shadow: 1px 1px 5px rgba(0,0,0,.85); max-width: 560px; margin: 0 auto; }

/* ── Our Story — narrative section, different layout from location cards ── */
#our-story { min-height: auto; }
#our-story .story-inner {
  justify-content: center; align-items: center; text-align: center;
  min-height: auto; padding: clamp(60px, 10vh, 100px) var(--sp-xl);
}
.story-content {
  max-width: 640px; width: 100%;
  background: rgba(0, 0, 0, .45);
  border-radius: var(--r-xl);
  padding: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 48px);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 40px rgba(0,0,0,.35);
}
@supports (backdrop-filter: blur(1px)) {
  .story-content { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); background: rgba(0, 0, 0, .35); }
}
#our-story .story-title {
  font-size: clamp(32px, 5.5vw, 56px); letter-spacing: 2px; color: var(--clr-yellow);
  line-height: 1.1; margin-bottom: var(--sp-lg);
  -webkit-text-stroke: 2.5px rgba(0,0,0,.5);
  text-shadow: 3px 3px 0 rgba(0,0,0,.5);
  text-wrap: balance;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.story-body {
  max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column; gap: var(--sp-md);
}
.story-body p {
  font-size: clamp(14px, 1.6vw, 17px); color: rgba(255,255,255,.88);
  line-height: 1.75; text-shadow: 1px 1px 3px rgba(0,0,0,.6); margin: 0;
}
.story-closing {
  font-style: italic; font-weight: 700;
  color: #fff !important;
  padding-top: var(--sp-xs);
  border-top: 1px solid rgba(255,255,255,.12);
}
@media (max-width: 680px) {
  .story-content { max-width: 100%; border-radius: var(--r-lg); }
  #our-story .story-inner { padding: clamp(36px, 7vw, 56px) 16px; }
  #our-story .story-title {
    font-size: clamp(26px, 8vw, 40px); letter-spacing: 1px;
    -webkit-text-stroke: 2px rgba(0,0,0,.45);
    margin-bottom: var(--sp-md);
    line-height: 1.08;
  }
  .story-body { gap: var(--sp-sm); }
  .story-body p { font-size: clamp(14px, 3.9vw, 16px); line-height: 1.65; }
}
/* ============================================================
   LOCATION CARD — unified storybook-style text panel
   Used by: tomotomo-land, banana-land, magical-village, grand-town
   ============================================================ */
.loc-card {
  max-width: 620px; width: 100%;
  background: rgba(0, 0, 0, .42);
  border-radius: var(--r-xl);
  padding: clamp(28px, 4.5vw, 48px) clamp(24px, 4vw, 44px);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 40px rgba(0,0,0,.3);
  text-align: center;
}
@supports (backdrop-filter: blur(1px)) {
  .loc-card { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(0, 0, 0, .32); }
}
.loc-card .sec-title {
  margin-bottom: var(--sp-sm);
}
.loc-tagline {
  display: block;
  font-family: var(--font-title); font-size: clamp(15px, 2.4vw, 20px);
  font-weight: 400; letter-spacing: .5px;
  margin-bottom: var(--sp-lg);
  text-shadow: 1px 1px 4px rgba(0,0,0,.6);
}
.loc-body {
  max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column; gap: var(--sp-md);
}
.loc-body p {
  font-size: clamp(14px, 1.6vw, 16.5px); color: rgba(255,255,255,.88);
  line-height: 1.75; margin: 0;
  text-shadow: 1px 1px 3px rgba(0,0,0,.5);
}
.loc-closing {
  font-style: italic; font-weight: 700;
  color: #fff !important;
  padding-top: var(--sp-xs);
  border-top: 1px solid rgba(255,255,255,.10);
}

/* ── Per-section title sizing ── */
#tomotomo-land   .sec-title { font-family: var(--font-title); font-size: clamp(36px, 7vw, 72px); letter-spacing: 4px; color: var(--clr-green); }
#banana-land     .sec-title { font-size: clamp(34px, 7vw, 68px); letter-spacing: 3px; color: var(--clr-orange); }
#magical-village .sec-title { font-size: clamp(32px, 6.5vw, 64px); letter-spacing: 2px; color: var(--clr-purple); }
#grand-town      .sec-title { font-size: clamp(30px, 6vw, 60px);  letter-spacing: 2px; color: var(--clr-cyan); }

/* ── Location card mobile adjustments ── */
@media (max-width: 680px) {
  .loc-card { max-width: 100%; border-radius: var(--r-lg); }
  .loc-card .sec-title {
    font-size: clamp(28px, 9vw, 44px) !important;
    letter-spacing: 1.5px !important;
    -webkit-text-stroke: 2.5px rgba(0,0,0,.55);
  }
  .loc-tagline { font-size: clamp(14px, 4vw, 17px); margin-bottom: var(--sp-md); }
  .loc-body { gap: var(--sp-sm); }
  .loc-body p { font-size: clamp(13.5px, 3.8vw, 15.5px); line-height: 1.65; }
}

/* ============================================================
   MEET THE CREW — improved text layout
   ============================================================ */
.crew-body {
  display: flex; flex-direction: column; gap: var(--sp-sm);
  margin-top: var(--sp-md);
  width: min(100%, 640px);
  margin-inline: auto;
  padding: clamp(14px, 2.2vw, 24px);
  border-radius: 18px;
  background: rgba(255, 248, 215, .94);
  border: 2px solid rgba(107,0,48,.20);
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
}
.crew-body p {
  font-size: clamp(14px, 1.9vw, 17px); color: #2f1c00;
  line-height: 1.75; margin: 0; text-align: left;
  font-weight: 700;
  text-shadow: none;
}
#meet-crew .crew-body .loc-closing {
  color: #2f1c00 !important;
  border-top: 1px solid rgba(47,28,0,.22);
  padding-top: var(--sp-sm);
}

/* ============================================================
   CHARACTER CARD — role badge + readable bio
   ============================================================ */
.char-role {
  font-family: var(--font-title); font-size: clamp(16px, 2.5vw, 22px);
  color: var(--clr-yellow); margin-bottom: var(--sp-sm) !important;
  letter-spacing: .5px;
}

/* ============================================================
   MEET THE CREW
   ============================================================ */
#meet-crew { min-height: 70vh; }
#meet-crew .sec-bg { position: absolute; inset: 0; z-index: var(--z-bg); background-color: #f5d830; background-image: radial-gradient(circle, #c9a500 2.5px, transparent 2.5px); background-size: 24px 24px; }
#meet-crew .sec-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70vh; padding: 40px 16px; gap: var(--sp-xs); }
.crew-chars { display: flex; flex-direction: column; align-items: center; gap: var(--sp-xs); flex: 0 0 auto; width: clamp(90px,18vw,170px); }
.crew-char-img { width: 100%; height: clamp(70px,14vw,140px); object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); transition: transform var(--dur-mid) var(--ease-bounce); }
.crew-char-img:hover { transform: scale(1.10) translateY(-6px); }
.crew-char-ph { font-size: clamp(42px,9vw,80px); line-height: 1; filter: drop-shadow(0 3px 6px rgba(0,0,0,.3)); transition: transform var(--dur-mid) var(--ease-bounce); cursor: default; user-select: none; }
.crew-char-ph:hover { transform: scale(1.12) translateY(-5px); }
.crew-center { flex: 1; text-align: center; padding: 0 10px; display: flex; flex-direction: column; align-items: center; }
.crew-ttl { font-family: var(--font-title); font-size: clamp(28px,6.5vw,62px); color: var(--clr-pink); -webkit-text-stroke: 4px #6b0030; paint-order: stroke fill; text-shadow: 4px 4px 0 #6b0030; line-height: 1.1; }
@media (max-width: 640px) { #meet-crew .sec-inner { flex-direction: column; padding: 40px 20px; gap: var(--sp-md); } .crew-chars { flex-direction: row; width: 100%; justify-content: center; flex-wrap: wrap; } }

/* ============================================================
   CHARACTER SECTIONS
   ============================================================ */
.char-sec { min-height: var(--app-vh-stable); }
.char-sec .sec-bg { position: absolute; inset: -30% 0; z-index: var(--z-bg); background-size: cover; background-position: center; background-attachment: fixed; will-change: transform; }
.char-layout { position: relative; z-index: var(--z-content); display: flex; flex-direction: row-reverse; align-items: stretch; min-height: var(--app-vh-stable); }
.char-layout.flip { flex-direction: row; }
.char-img-wrap { flex-shrink: 0; width: clamp(280px,46vw,660px); display: flex; align-items: flex-end; }
.char-img-wrap img { width: 100%; height: var(--app-vh-stable); object-fit: contain; object-position: bottom center; filter: drop-shadow(0 6px 32px rgba(0,0,0,.55)); transition: transform var(--dur-mid) var(--ease-bounce); display: block; transform-origin: center bottom; animation: floatYSlow 4.4s ease-in-out infinite; }
.char-img-wrap img:hover { animation: none; transform: scale(1.04) translateY(-10px); }
.char-ph-big { font-size: clamp(120px,26vw,240px); line-height: 1; filter: drop-shadow(0 4px 12px rgba(0,0,0,.4)); align-self: flex-end; }
.char-txt { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; padding: clamp(48px,7vh,90px) clamp(32px,5vw,80px); text-align: left; }
.char-txt.right { align-items: flex-end; text-align: right; }
.char-txt .sec-title { font-size: clamp(60px,11vw,120px); line-height: .92; margin-bottom: 18px; }
.char-txt .ph-txt { font-size: clamp(15px,2vw,19px); max-width: 420px; text-align: inherit; margin: 0; }
.char-txt.right .ph-txt { margin-left: auto; }
.char-info-card { max-width: 470px; padding: 16px 18px; border-radius: 14px; background: rgba(0,0,0,.40); border: 1px solid rgba(255,255,255,.16); }
.char-txt.right .char-info-card { margin-left: auto; }
.char-info-card p { font-size: clamp(14px,1.8vw,17px); color: rgba(255,255,255,.9); line-height: 1.55; margin: 0 0 10px; }
.char-info-card p:last-child { margin-bottom: 0; }
.char-info-card strong { color: var(--clr-yellow); font-weight: 800; }
@media (max-width: 680px) {
  .char-layout, .char-layout.flip { flex-direction: column; align-items: center; min-height: calc(var(--app-vh-stable) - var(--nav-h-mobile)); }
  .char-txt, .char-txt.right { order: 1; align-items: center; text-align: center; padding: clamp(36px, 8vw, 52px) 20px 16px; width: 100%; }
  .char-txt.right .ph-txt { margin: 0 auto; }
  .char-txt.right .char-info-card { margin: 0 auto; }
  .char-img-wrap { order: 2; width: min(75vw, 320px); padding-bottom: clamp(16px, 4vw, 32px); }
  .char-img-wrap img { height: 60vw; max-height: 380px; }
  .char-txt .sec-title { font-size: clamp(52px,14vw,80px); }
}

#nara .char-img-wrap img { animation: naraLift 4.2s ease-in-out infinite; }
#yomin-koko .char-img-wrap img { animation: yominKokoSwing 3.9s ease-in-out infinite; }
#rere .char-img-wrap img { animation: rereFloat 4.8s ease-in-out infinite; }
#sisi .char-img-wrap img { animation: sisiCalm 4.6s ease-in-out infinite; }
#bobo .char-img-wrap img { animation: boboBounce 3.6s ease-in-out infinite; }
#kiki .char-img-wrap img { animation: kikiWiggle 4s ease-in-out infinite; }

/* Keep mobile Safari from rendering fixed full-bleed backgrounds as a zoom-like effect */
@media (max-width: 768px) {
  #welcome .parallax-bg,
  #intro .parallax-bg,
  .loc-sec .sec-bg,
  .char-sec .sec-bg {
    inset: 0;
    background-attachment: scroll;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
:root {
  /* Footer color controls: edit these to tune footer text and accents */
  --ft-bg-top: #3f88ff;
  --ft-bg-mid: #2f6fe3;
  --ft-bg-bottom: #2857b9;
  --ft-glass-1: rgba(255, 255, 255, 0.24);
  --ft-glass-2: rgba(255, 255, 255, 0.12);
  --ft-text-main: #ffffff;
  --ft-text-soft: rgba(243, 251, 255, 0.92);
  --ft-text-muted: rgba(229, 242, 255, 0.86);
  --ft-title-soft: #fff6ca;
  --ft-brand-name-color: #ffe98a;
  --ft-brand-name-shadow: rgba(22, 66, 152, 0.42);
  --ft-link-dot: #ffe67a;
  --ft-mail-bg-a: #fff18f;
  --ft-mail-bg-b: #ffd25f;
  --ft-mail-text: #6a4900;
}

.ft-wave {
  display: block;
  line-height: 0;
  margin-bottom: -2px;
}

.ft-wave svg {
  width: 100%;
  height: 110px;
  display: block;
}

/* Normalize inline wave fill from HTML so no dark navy strip appears */
.ft-wave svg path:first-child {
  fill: rgba(255, 255, 255, 0.16);
}

.ft-wave svg path:last-child {
  fill: #3577e4;
}

footer#contact {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: var(--sp-2xl) var(--sp-xl) 44px;
  background:
    radial-gradient(circle at 8% 10%, rgba(255, 241, 153, 0.42) 0%, transparent 38%),
    radial-gradient(circle at 92% 10%, rgba(140, 233, 255, 0.34) 0%, transparent 34%),
    linear-gradient(180deg, var(--ft-bg-top) 0%, var(--ft-bg-mid) 44%, var(--ft-bg-bottom) 100%);
  border-top: 4px solid rgba(255, 255, 255, 0.48);
}

footer#contact::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 22%, rgba(255, 255, 255, 0.26) 0 5px, transparent 6px),
    radial-gradient(circle at 28% 68%, rgba(255, 255, 255, 0.18) 0 3px, transparent 4px),
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.3) 0 6px, transparent 7px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 30%);
}

footer#contact::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
}

.ft-orb {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(58px);
  opacity: 0.22;
  animation: orbFloat 8s ease-in-out infinite;
}

.ft-orb1 {
  width: 250px;
  height: 250px;
  background: #70d8ff;
  top: -60px;
  left: -46px;
}

.ft-orb2 {
  width: 200px;
  height: 200px;
  background: #ff93ca;
  bottom: 32px;
  right: -24px;
  animation-delay: -3s;
}

.ft-orb3 {
  width: 170px;
  height: 170px;
  background: #ffe27c;
  top: 54%;
  left: 52%;
  transform: translate(-50%, -50%);
  animation-delay: -5s;
  opacity: 0.12;
}

.ft-spark {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  color: rgba(255, 248, 194, 0.88);
  animation: sparkle 3.5s ease-in-out infinite;
}

.s1 { top: 8%; left: 6%; font-size: 16px; }
.s2 { top: 18%; right: 8%; font-size: 20px; animation-delay: 1.1s; color: rgba(230, 186, 255, 0.88); }
.s3 { top: 65%; left: 4%; font-size: 11px; animation-delay: 2.2s; }
.s4 { top: 72%; right: 12%; font-size: 13px; animation-delay: .6s; color: rgba(165, 255, 236, 0.84); }

.ft-inner {
  position: relative;
  z-index: 2;
  max-width: 1140px;
  margin: 0 auto;
}

.ft-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: var(--sp-xl);
  flex-wrap: wrap;
}

.ft-logo-wrap {
  position: relative;
  width: 94px;
  height: 94px;
  flex-shrink: 0;
}

.ft-logo-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--clr-yellow), #fb923c, #f472b6, #67e8f9, var(--clr-yellow));
  animation: logoSpin 7s linear infinite;
  opacity: .86;
}

.ft-logo-wrap::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #1c4caf;
}

.ft-logo {
  position: relative;
  z-index: 2;
  width: 94px;
  height: 94px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .34));
}

.ft-brand {
  flex: 1;
  min-width: 180px;
  max-width: 700px;
}

.ft-brand-name {
  display: block;
  margin-bottom: var(--sp-xs);
  font-family: var(--font-display);
  font-size: clamp(20px, 3.5vw, 38px);
  letter-spacing: clamp(1px, .7vw, 3px);
  line-height: 1;
  color: var(--ft-brand-name-color);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.32), 0 7px 16px var(--ft-brand-name-shadow);
  animation: none;
}

.ft-tagline {
  margin: 0;
  font-weight: 800;
  font-size: clamp(12px, 1.5vw, 15px);
  color: var(--ft-text-main);
  letter-spacing: .4px;
  overflow-wrap: anywhere;
}

.ft-socials {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.ft-soc {
  width: 44px;
  height: 44px;
  border-radius: 14px 18px 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--ft-text-main);
  background: rgba(255, 255, 255, .18);
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: 0 5px 0 rgba(24, 56, 127, .45), 0 10px 16px rgba(0, 0, 0, .2);
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast) ease, background var(--dur-fast) ease, color var(--dur-fast) ease;
}

.ft-soc svg {
  width: 18px;
  height: 18px;
}

.ft-soc:hover {
  transform: translateY(-4px);
  color: #fff;
  box-shadow: 0 8px 0 rgba(24, 56, 127, .45), 0 14px 20px rgba(0, 0, 0, .25);
}

.ft-yt:hover { background: #ff3d2e; border-color: #fff; }
.ft-sp:hover { background: #1ecf61; border-color: #fff; color: #03351a; }
.ft-ig:hover { background: linear-gradient(135deg, #f09433, #dc2743, #bc1888); border-color: #fff; }
.ft-tt:hover { background: #2a2a2a; border-color: #7be6ee; }

.ft-rule {
  height: 2px;
  margin: 0 0 var(--sp-xl);
  background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, .24) 20%, rgba(255, 224, 100, .96) 50%, rgba(255, 255, 255, .24) 80%, transparent 100%);
}

.ft-rule--slim {
  margin: 0 0 24px;
}

.ft-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  gap: 24px;
  margin-bottom: 44px;
}

.ft-card {
  padding: 28px 26px 30px;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, .34);
  background: linear-gradient(170deg, var(--ft-glass-1), var(--ft-glass-2));
  box-shadow: 0 12px 24px rgba(15, 39, 99, .24);
  min-width: 0;
  transition: border-color var(--dur-mid) ease, transform var(--dur-mid) var(--ease-bounce), background var(--dur-mid) ease;
}

.ft-card:hover {
  background: linear-gradient(170deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .16));
  border-color: rgba(255, 241, 165, .8);
  transform: translateY(-5px);
}

.ft-card:nth-child(1) {
  background:
    radial-gradient(circle at 88% 14%, rgba(255, 203, 140, .44) 0%, transparent 36%),
    linear-gradient(170deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .12));
}

.ft-card:nth-child(2) {
  background:
    radial-gradient(circle at 86% 12%, rgba(164, 255, 220, .42) 0%, transparent 36%),
    linear-gradient(170deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .11));
}

.ft-card:nth-child(3) {
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 175, 226, .42) 0%, transparent 36%),
    linear-gradient(170deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .11));
}

.ft-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ft-title-soft);
}

.ft-card-pip {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--ft-link-dot), transparent);
  flex-shrink: 0;
}

.ft-nav {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.ft-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 14px;
  color: var(--ft-text-soft);
  text-decoration: none;
  letter-spacing: .3px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transition: color var(--dur-fast) ease, gap var(--dur-fast) ease;
}

.ft-nav a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ft-link-dot);
  flex-shrink: 0;
  transition: transform var(--dur-fast) ease;
}

.ft-nav a:hover {
  color: var(--ft-text-main);
  gap: 14px;
}

.ft-nav a:hover::before {
  transform: scale(1.35);
}

.ft-platform-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.ft-platform {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 14px;
  color: var(--ft-text-soft);
  text-decoration: none;
  letter-spacing: .3px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transition: color var(--dur-fast) ease, gap var(--dur-fast) ease;
}

.ft-platform span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.ft-p-yt span { background: #ff5757; }
.ft-p-sp span { background: #4be48a; }
.ft-p-ig span { background: #ff5e9f; }
.ft-p-tt span { background: #7be6ee; }

.ft-platform:hover {
  color: var(--ft-text-main);
  gap: 16px;
}

.ft-platform:hover span {
  transform: scale(1.5);
}

.ft-contact-body {
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--ft-text-muted);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.ft-mailto {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  border: 2px solid rgba(255, 255, 255, .92);
  background: linear-gradient(145deg, var(--ft-mail-bg-a), var(--ft-mail-bg-b));
  color: var(--ft-mail-text);
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .3px;
  box-shadow: 0 5px 0 rgba(174, 120, 0, .32), 0 10px 14px rgba(0, 0, 0, .16);
  transition: transform var(--dur-fast) var(--ease-bounce), box-shadow var(--dur-fast) ease, filter var(--dur-fast) ease;
  overflow-wrap: anywhere;
  word-break: normal;
}

.ft-mailto:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 8px 0 rgba(174, 120, 0, .34), 0 14px 18px rgba(0, 0, 0, .18);
}

.ft-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-xs);
}

.ft-copy,
.ft-made {
  margin: 0;
  font-size: clamp(12px, 1.4vw, 14px);
  color: var(--ft-text-muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ft-heart {
  color: #ff8eb8;
  display: inline-block;
  animation: heartbeat 1.8s ease-in-out infinite;
}

.footer-emojis,
.footer-wave,
.footer-inner,
.footer-top,
.footer-logo-wrap,
.footer-brand-block,
.footer-divider,
.footer-mid,
.footer-socials,
.footer-email-txt,
.footer-email-btn,
.footer-bottom,
.footer-copy-sub,
.fsoc-btn {
  display: none !important;
}

@media (max-width: 860px) {
  .ft-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .ft-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  footer#contact {
    padding: 56px 20px calc(40px + var(--safe-bottom, 0px));
  }

  .ft-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .ft-socials {
    flex-wrap: wrap;
  }

  .ft-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ft-card:last-child {
    grid-column: auto;
  }

  .ft-bottom {
    justify-content: center;
    text-align: center;
  }
}

/* ============================================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   Remove GPU-expensive properties on mobile devices.
   ============================================================ */
@media (max-width: 768px) {
  /* Pause character animations that run off-screen (saves CPU) */
  .char-sec .char-img-wrap img {
    animation: none;
  }

  /* Prevent heavy infinite footer animations from compositing layers */
  .ft-logo-glow {
    animation: none;
  }
  .ft-brand-name {
    animation: none;
    color: var(--ft-brand-name-color);
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}

/* ── CONTENT-VISIBILITY: skip rendering off-screen sections ── */
/* Saves significant main-thread time on index.html's long page */
.loc-sec,
.char-sec {
  content-visibility: auto;
  contain-intrinsic-size: 0 100vh;
}
