:root {
  --bg-deep: #f0f6fc;
  --bg-mid: #e8f1f9;
  --text: #2a3d52;
  --text-muted: #6b8299;
  --accent: #3d8fd4;
  --accent-warm: #c9923a;
  --sky-blue: #9dd2ff;
  --sky-blue-bg: #d4ebf8;
  --sky-hover-text: #6eb8ea;
  --sky-hover-bg: linear-gradient(
    135deg,
    rgba(157, 210, 255, 0.62) 0%,
    rgba(212, 235, 248, 0.78) 100%
  );
  --select-bg: rgba(157, 210, 255, 0.68);
  --select-fg: #2a3d52;
  --nav-h: 5.25rem;
  --title-size: clamp(2.1rem, 4.8vw, 3.1rem);
  --font-secondary: "Imprima", sans-serif;
  --font-display: "Hachi Maru Pop", cursive;
  --bubble-bg: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(240, 248, 255, 0.48) 100%
  );
  --bubble-border: rgba(255, 255, 255, 0.62);
  --bubble-shadow:
    0 4px 22px rgba(61, 143, 212, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.65) inset;
  --bubble-glow:
    0 4px 22px rgba(61, 143, 212, 0.16),
    0 0 26px rgba(61, 143, 212, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.65) inset;
  --bubble-glow-strong:
    0 6px 28px rgba(61, 143, 212, 0.24),
    0 0 36px rgba(61, 143, 212, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

/* Touch tap should not leave a focus ring; keyboard users still get :focus-visible styles */
:focus:not(:focus-visible) {
  outline: none;
}

canvas:focus {
  outline: none;
}

body {
  margin: 0;
  font-family: "Imprima", sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg-deep);
  line-height: 1.6;
}

::selection {
  background: var(--select-bg);
  color: var(--select-fg);
}

::-moz-selection {
  background: var(--select-bg);
  color: var(--select-fg);
}

/* ── Shared bubble pill (nav + buttons) ── */
.bubble-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.58rem 1.15rem;
  font-family: "Imprima", sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--bubble-border);
  border-radius: 999px;
  background: var(--bubble-bg);
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: var(--bubble-glow);
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.bubble-btn:hover,
.bubble-btn:focus-visible {
  color: var(--sky-hover-text);
  border-color: rgba(157, 210, 255, 0.75);
  background: var(--sky-hover-bg);
  box-shadow: var(--bubble-glow-strong);
  transform: translateY(-1px);
}

.bubble-btn--glow {
  animation: bubble-glow 3.2s ease-in-out infinite;
}

@keyframes bubble-glow {
  0%,
  100% {
    box-shadow: var(--bubble-glow);
  }
  50% {
    box-shadow: var(--bubble-glow-strong);
  }
}

/* ── Navbar ── */
.nav {
  position: fixed;
  top: 1rem;
  left: 50%;
  z-index: 100;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(52rem, calc(100% - 2rem));
  min-height: 3.5rem;
  padding: 0.45rem 0.55rem 0.45rem 1.35rem;
  border-radius: 999px;
  background: var(--bubble-bg);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--bubble-border);
  box-shadow: var(--bubble-shadow);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav__icon {
  display: block;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(61, 143, 212, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nav__brand:hover .nav__icon,
.nav__brand:focus-visible .nav__icon {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 4px 14px rgba(61, 143, 212, 0.24);
}

.nav__brand:hover,
.nav__brand:focus-visible {
  color: var(--sky-hover-text);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0.2rem;
  list-style: none;
  border-radius: 999px;
  background: rgba(61, 143, 212, 0.06);
  font-family: "Imprima", sans-serif;
}

.nav__links a {
  display: inline-block;
  padding: 0.48rem 0.9rem;
  font-family: "Imprima", sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.nav__links a:hover,
.nav__links a:focus-visible {
  color: var(--sky-hover-text);
  background: var(--sky-hover-bg);
  border-color: rgba(157, 210, 255, 0.55);
  box-shadow: 0 0 18px rgba(157, 210, 255, 0.28);
  transform: translateY(-1px);
}

/* ── Hero ── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--nav-h) + 2rem) 1.5rem 3rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(157, 210, 255, 0.45) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 75%, rgba(255, 220, 160, 0.2) 0%, transparent 60%),
    linear-gradient(180deg, #e8f4ff 0%, var(--bg-deep) 100%);
}

.hero__glow {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(61, 143, 212, 0.25) 0%, transparent 100%),
    radial-gradient(1px 1px at 32% 68%, rgba(61, 143, 212, 0.18) 0%, transparent 100%),
    radial-gradient(1px 1px at 58% 18%, rgba(61, 143, 212, 0.22) 0%, transparent 100%),
    radial-gradient(1px 1px at 74% 48%, rgba(61, 143, 212, 0.15) 0%, transparent 100%),
    radial-gradient(1px 1px at 86% 80%, rgba(61, 143, 212, 0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 18% 86%, rgba(61, 143, 212, 0.16) 0%, transparent 100%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  text-align: center;
  max-width: 36rem;
}

.hero__eyebrow {
  margin: 0 0 1rem;
  font-family: "Imprima", sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-warm);
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--title-size);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--text);
}

.hero__sub {
  margin: 1.1rem auto 2rem;
  max-width: 22rem;
  font-family: "Imprima", sans-serif;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.hero__scroll {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.hero__scroll svg {
  animation: bob 2s ease-in-out infinite;
}

.hero__scroll:hover,
.hero__scroll:focus-visible {
  transform: translateY(-1px);
}

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

/* ── Map section ── */
.map-section {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 5rem 1.5rem 3rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(157, 210, 255, 0.35) 0%, transparent 65%),
    linear-gradient(180deg, var(--bg-deep) 0%, #dceaf6 50%, #d4e6f4 100%);
}

.map-section__header {
  text-align: center;
  margin-bottom: 1.5rem;
  font-family: "Imprima", sans-serif;
}

.map-section__eyebrow {
  margin: 0 0 0.5rem;
  font-family: "Imprima", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.map-section__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.8vw, 2.15rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text);
}

.map-section__hint {
  margin: 0.75rem 0 0;
  font-family: "Imprima", sans-serif;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.map-section__canvas-wrap {
  position: relative;
  display: block;
  width: min(920px, 100%);
  height: min(68vh, 620px);
  margin: 0 auto;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(61, 143, 212, 0.18);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.8),
    0 16px 48px rgba(61, 143, 212, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  background: radial-gradient(ellipse at center, #d0e9f8 0%, #b8ddf0 100%);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.map-section__canvas-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: rgba(212, 235, 248, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.map-section__canvas-wrap:hover,
.map-section__canvas-wrap:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(61, 143, 212, 0.38);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 22px 56px rgba(61, 143, 212, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.map-section__canvas-wrap:hover::after,
.map-section__canvas-wrap:focus-visible::after {
  opacity: 1;
}

.map-section__canvas-wrap:hover .map-section__enter,
.map-section__canvas-wrap:focus-visible .map-section__enter {
  box-shadow: var(--bubble-glow-strong);
}

.map-section__enter {
  position: absolute;
  bottom: 1.15rem;
  left: 50%;
  top: auto;
  z-index: 2;
  transform: translateX(-50%);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
  opacity: 1;
  pointer-events: none;
}

#mapCanvas {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.28s ease;
}

.map-section__canvas-wrap:hover #mapCanvas,
.map-section__canvas-wrap:focus-visible #mapCanvas {
  opacity: 0.78;
}

/* ── About ── */
.about {
  padding: 5rem 1.5rem 6rem;
  background: var(--bg-mid);
  border-top: 1px solid rgba(61, 143, 212, 0.1);
}

.about__inner {
  max-width: 34rem;
  margin: 0 auto;
  text-align: center;
}

.about__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.about__text {
  margin: 0;
  font-family: "Imprima", sans-serif;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--text-muted);
}

@media (max-width: 520px) {
  .nav {
    top: 0.75rem;
    width: calc(100% - 1.25rem);
    padding: 0.4rem 0.4rem 0.4rem 1rem;
    min-height: 3.1rem;
  }

  .nav__brand {
    font-size: 1rem;
  }

  .nav__links {
    gap: 0.1rem;
    padding: 0.15rem;
  }

  .nav__links a {
    padding: 0.42rem 0.65rem;
    font-size: 0.76rem;
  }

  .map-section__canvas-wrap {
    height: 55vh;
    border-radius: 0.75rem;
  }
}

/* Phone tap: hide browser focus ring and sticky link highlight */
@media (pointer: coarse) {
  .map-section__canvas-wrap:focus,
  .map-section__canvas-wrap:focus-visible {
    transform: none;
    border-color: rgba(61, 143, 212, 0.18);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.8),
      0 16px 48px rgba(61, 143, 212, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }

  .map-section__canvas-wrap:focus::after,
  .map-section__canvas-wrap:focus-visible::after {
    opacity: 0;
  }

  .map-section__canvas-wrap:focus #mapCanvas,
  .map-section__canvas-wrap:focus-visible #mapCanvas {
    opacity: 1;
  }
}

/* Phone: lighter effects + smoother scroll */
@media (pointer: coarse) {
  html {
    -webkit-overflow-scrolling: touch;
  }

  .nav,
  .bubble-btn {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav {
    background: rgba(255, 255, 255, 0.94);
  }

  .bubble-btn--glow,
  .hero__scroll svg {
    animation: none;
  }

  .map-section__canvas-wrap {
    touch-action: pan-y;
  }

  #mapCanvas {
    pointer-events: none;
    touch-action: pan-y;
  }
}
