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

:root {
  --fff-teal: #0b5259;
  --fff-teal-light: #1a7a85;
  --fff-teal-dark: #073840;
  --fff-bg: #ffefda;
  --fff-accent: #ffca9c;
  --fff-accent-warm: #ffa952;
  --fff-text: #2e2e2e;
  --fff-muted: #5a6e70;
  --fff-em: #86462b;
  --hw-color: #d4622b;
  --moa-color: #0b5259;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  /* single source of truth for the colour of the MOA explainer
           landmark illustrations (Berlin/London/SF/Paris/Rome) — change
           this one value to recolour all of them at once */
  --landmark-fill: var(--fff-teal);
  font-size: 16px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Outfit", sans-serif;
  background-color: var(--fff-bg);
  color: var(--fff-text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── HEADER ───────────────────────────────── */
.site-header {
  background: var(--fff-teal);
  padding: 0px 14px;
  display: flex;
  align-items: center;
  height: 50px;
}

.site-header .logo {
  font-family: "Dosis", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: white;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-header nav a {
  font-family: "Dosis", sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  margin-left: 16px;
  font-weight: 600;
  transition: color 0.2s;
}
.site-header nav a:hover {
  color: var(--fff-accent);
}

/* ── HERO ─────────────────────────────────── */
.hero {
  min-height: 100vh;
  background: var(--fff-bg);
  padding: 12px 16px 32px;
  text-align: center;
  position: relative;
  overflow: visible;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(
      circle at 18% 82%,
      rgba(255, 202, 156, 0.13) 0%,
      transparent 52%
    ),
    radial-gradient(
      circle at 82% 18%,
      rgba(255, 169, 82, 0.07) 0%,
      transparent 48%
    );
  pointer-events: none;
}

/* ── HERO THEMES ──────────────────────────── */
.hero {
  transition: background 0.35s ease;
}

/* HW: pink/coral palette, Bebas Neue brand font */
.hero.theme-hw {
  background: #fad2db;
}
.hero.theme-hw::before {
  background-image:
    radial-gradient(
      circle at 18% 82%,
      rgba(228, 117, 77, 0.18) 0%,
      transparent 52%
    ),
    radial-gradient(
      circle at 82% 18%,
      rgba(250, 210, 219, 0.3) 0%,
      transparent 48%
    );
}
.hero.theme-hw .hero-eyebrow {
  color: #b23a48;
}
.hero.theme-hw #hero-h1 {
  color: #b23a48;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2rem, 7vw, 3.4rem);
  letter-spacing: 0.04em;
}
.hero.theme-hw #hero-h1 em {
  color: #e4754d;
}
.hero.theme-hw #hero-sub {
  color: rgba(178, 58, 72, 0.75);
}
.hero.theme-hw .search-hint {
  color: rgba(178, 58, 72, 0.45);
}
.hero.theme-hw .mode-tagline {
  color: #7a2530;
}
.hero.theme-hw .mode-tagline strong {
  color: #b23a48;
}

/* MOA: warm amber background, Abhaya Libre serif font, teal text */
.hero.theme-moa {
  background: var(--fff-bg);
}
.hero.theme-moa::before {
  background-image:
    radial-gradient(
      circle at 18% 82%,
      rgba(11, 82, 89, 0.08) 0%,
      transparent 52%
    ),
    radial-gradient(
      circle at 82% 18%,
      rgba(255, 202, 156, 0.4) 0%,
      transparent 48%
    );
}
.hero.theme-moa .hero-eyebrow {
  color: #c45e33;
}
.hero.theme-moa #hero-h1 {
  color: var(--fff-teal);
  font-family: "Abhaya Libre", serif;
  font-size: clamp(1.7rem, 5.8vw, 2.8rem);
  font-weight: 800;
}
.hero.theme-moa #hero-h1 em {
  color: #c45e33;
}
.hero.theme-moa #hero-sub {
  color: rgba(11, 82, 89, 0.72);
}
.hero.theme-moa .search-hint {
  color: rgba(11, 82, 89, 0.45);
}
.hero.theme-moa .mode-tagline {
  color: #4a6264;
}
.hero.theme-moa .mode-tagline strong {
  color: var(--fff-teal);
}

.hero-brand-img {
  display: block;
  margin: 0 auto 0px;
  height: 80px;
  width: auto;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.05s forwards;
  transition: opacity 0.25s ease;
}
@media (min-width: 768px) {
  .hero-brand-img {
    height: 90px;
    margin-bottom: 14px;
  }
}

.site-header {
  display: none;
  transition: background 0.35s ease;
}
.site-header.theme-hw {
  background: #e4754d;
}
.site-header.theme-moa {
  background: var(--fff-teal);
}

.search-btn.theme-hw {
  box-shadow: 3px 3px #fad2db;
  font-family: "Dosis", sans-serif;
}
.search-btn.theme-moa {
  box-shadow: 3px 3px #ffca9c;
}

.hero-eyebrow {
  display: none;
  font-family: "Dosis", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--hw-color);
  margin-bottom: 10px;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.1s forwards;
}
.hero h1 {
  font-family: "Dosis", sans-serif;
  font-size: clamp(1.45rem, 5vw, 2.6rem);
  font-weight: 500;
  color: var(--fff-teal);
  line-height: 1.15;
  margin-bottom: 6px;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.18s forwards;
  max-width: 800px;
  margin: 0 auto;
}
.hero h1 em {
  font-style: normal;
  color: var(--hw-color);
}
.hero-sub {
  font-size: 0.88rem;
  color: var(--fff-teal);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.5;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.26s forwards;
  margin-top: 10px;
}

.hero.theme-moa #hero-sub {
  margin-top: 0px;
}
.hero.theme-hw #hero-sub {
  margin-top: 0px;
}

/* ── EXPLAINER DIAGRAM ────────────────────── */
.explainer {
  max-width: 460px;
  margin: 14px auto 0;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.3s forwards;
}
.explainer-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 6px;
}
.explainer-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  width: 76px;
}
.explainer-node-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 2px solid var(--diagram-accent, #d4622b);
  flex-shrink: 0;
  color: var(--diagram-accent, #d4622b);
  overflow: hidden;
}
.explainer-node-circle.is-result {
  background: var(--diagram-result-bg, #e7f2f1);
  border-color: var(--diagram-result-border, #0b5259);
  color: var(--diagram-result-border, #0b5259);
}
.explainer-node-circle svg {
  width: 24px;
  height: 24px;
}
.explainer-sprite-icon {
  fill: currentColor;
  transform-origin: center;
}
.explainer-node-circle img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.explainer-node-circle.is-result img {
  width: 34px;
  height: 34px;
}
.explainer-node-circle svg.explainer-landmark-icon {
  width: 30px;
  height: 30px;
}
.explainer-node-circle.is-result svg.explainer-landmark-icon {
  width: 34px;
  height: 34px;
}

.explainer-node-circle svg.explainer-moa-logo-icon {
  width: 49px;
  height: 50px;
  fill: var(--moa-color);
}

/* every landmark symbol's own paths/shapes leave "fill" unspecified
         (or, for line-style icons like Seoul, use stroke="currentColor"),
         so setting fill + color here lets the single --landmark-fill
         variable above recolour all of them via normal inheritance through
         the <use> reference — no need to reach into each symbol's shapes */
.explainer-landmark-icon {
  fill: var(--landmark-fill);
  color: var(--landmark-fill);
}
.explainer-node-img-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
}
.explainer-node-label {
  font-family: "Dosis", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--fff-teal);
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.explainer-node-label-inner {
  display: block;
  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
}
.scroll-up-out {
  transform: translateY(-100%);
  opacity: 0;
}
.scroll-up-in-start {
  transform: translateY(100%);
  opacity: 0;
}
.scroll-up-in-end {
  transform: translateY(0);
  opacity: 1;
}
.explainer-connector {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  max-width: 72px;
  padding: 0 2px;
  position: relative;
  top: -18px;
  height: 20px;
}
.connector-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-top-style: dotted;
  border-radius: 151%;
  top: 26px;
  color: var(--moa-color);
  border-width: 3px;
}

.explainer-plane {
  position: absolute;
  top: -123%;
  width: 1.4rem;
  height: 1.4rem;
  color: var(--diagram-accent, #c45e33);
  fill: currentColor;
  transform-origin: center;
}
.explainer-connector.result-accent .explainer-plane {
  color: var(--diagram-result-border, #0b5259);
}
.explainer-annotation {
  max-width: 460px;
  margin: 2px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.explainer-annotation svg {
  width: 22px;
  height: 18px;
  color: var(--diagram-result-border, #0b5259);
  opacity: 0.8;
}
.explainer-annotation-text {
  font-family: "Caveat", "Comic Sans MS", cursive;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--diagram-result-border, #0b5259);
  text-align: center;
  line-height: 1.25;
  transform: rotate(-1.5deg);
}

/* ── MODE TABS ────────────────────────────── */
.search-widget {
  max-width: 520px;
  margin: 14px auto 0;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.34s forwards;
  position: relative;
  z-index: 10;
}

.mode-tabs {
  display: flex;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.mode-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 11px 4px 10px;
  background: rgba(0, 0, 0, 0.25);
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
  font-family: "Dosis", sans-serif;
  transition:
    background 0.2s,
    color 0.2s;
  border-bottom: 3px solid transparent;
  position: relative;
}
.mode-tab:hover {
  background: rgba(0, 0, 0, 0.15);
  color: rgba(255, 255, 255, 0.85);
}
.mode-tab.active {
  background: white;
  color: var(--tab-active-color);
  border-bottom-color: var(--tab-active-color);
}
.mode-tab-fff {
  --tab-active-color: #0b5259;
}
.mode-tab-hw {
  font-family: "Bebas Neue", sans-serif;
  --tab-active-color: #c45e33;
}
.mode-tab-moa {
  font-family: "Abhaya Libre", serif;
  --tab-active-color: #0b5259;
}

.tab-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
}
.tab-tagline {
  font-size: 0.59rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  opacity: 0.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding: 0 4px;
  display: none;
}
.mode-tab.active .tab-tagline {
  opacity: 0.7;
}

/* ── SEARCH PANEL ─────────────────────────── */
.search-panel {
  background: white;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 16px 16px 16px;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.22);
  position: relative;
}

.mode-tagline {
  font-size: 0.78rem;
  color: #5a7a7d;
  margin-bottom: 13px;
  line-height: 1.45;
  text-align: left;
  min-height: 2.4em;
  display: none;
}
.mode-tagline strong {
  color: var(--fff-text);
  font-weight: 600;
}

.search-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.search-field {
  display: flex;
  align-items: center;
  background: #f3f7f8;
  border-radius: var(--radius-sm);
  border: 1.5px solid #d8e6e8;
  position: relative;
  transition: border-color 0.2s;
}
.search-field:focus-within {
  border-color: var(--field-accent, #0b5259);
}

.field-icon {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #8aa5a8;
  flex-shrink: 0;
  font-size: 0.85rem;
}
.field-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid currentColor;
  flex-shrink: 0;
}

.search-field input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: "Outfit", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--fff-text);
  padding: 12px 0;
  min-width: 0;
}
.search-field input::placeholder {
  color: #aabcbe;
  font-weight: 400;
}

.field-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #9ab0b2;
  flex-shrink: 0;
  font-size: 0.8rem;
  border-radius: 50%;
  margin-right: 4px;
  transition: background 0.15s;
}
.field-clear:hover {
  background: rgba(0, 0, 0, 0.06);
}
.field-clear.vis {
  display: flex;
}

.field-pill {
  display: none;
  align-items: center;
  gap: 4px;
  background: var(--field-accent, #0b5259);
  color: white;
  font-family: "Dosis", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px 4px 7px;
  border-radius: 20px;
  margin-right: 8px;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
}
.field-pill.vis {
  display: flex;
}
.fp-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.7rem;
  padding: 0;
  margin-left: 1px;
  line-height: 1;
  flex-shrink: 0;
}

/* autocomplete */
.suggestions-drop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(11, 82, 89, 0.1);
  overflow: hidden;
  display: none;
  z-index: 300;
}
.suggestions-drop.open {
  display: block;
}
.suggestion-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  transition: background 0.12s;
  font-size: 0.88rem;
  color: var(--fff-text);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.suggestion-item:last-child {
  border-bottom: none;
}
.suggestion-item:hover,
.suggestion-item.active {
  background: #f0f8f9;
}
.suggestion-city {
  font-weight: 600;
}
.suggestion-country {
  color: var(--fff-muted);
  font-size: 0.78rem;
  margin-left: auto;
}
.suggestion-flag {
  width: 1.1em;
  height: 0.8em;
  flex-shrink: 0;
}

/* MOA second city */
.moa-row {
  display: none;
  flex-direction: column;
  gap: 8px;
}
.moa-row.vis {
  display: flex;
}
.moa-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9ab8ba;
  font-size: 0.66rem;
  font-family: "Dosis", sans-serif;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.moa-divider::before,
.moa-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #dde8ea;
}

/* search button */
.search-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--btn-color, #0b5259);
  color: white;
  font-family: "Dosis", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    filter 0.15s,
    transform 0.1s,
    background 0.3s;
  text-decoration: none;
}
.search-btn:hover {
  filter: brightness(1.1);
}
.search-btn:active {
  transform: scale(0.99);
}
.search-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
  pointer-events: none;
}

.search-hint {
  margin-top: 11px;
  font-size: 0.7rem;
  color: var(--fff-teal);
  text-align: center;
  opacity: 0;
  animation: fadeUp 0.5s ease 0.45s forwards;
  display: none;
}

/* theme adjustments for explainer */
.theme-hw .explainer-node-circle {
  --diagram-accent: #b23a48;
}
.theme-hw .explainer-node-circle.is-result {
  --diagram-result-bg: white;
  --diagram-result-border: var(--hw-color);
}
.theme-hw .explainer-node-label {
  color: #b23a48;
}

.theme-hw .connector-inner {
  color: var(--hw-color);
}
.theme-hw .explainer-connector.result-accent .explainer-plane {
  color: var(--hw-color);
}

/* HW: rain effect on the origin node — short streaks fall through
         the circle and fade out, rather than a static pattern sliding
         sideways. The markup for the drops lives inside the circle (see
         renderExplainer in the script below) and is hidden by default;
         only shown for the first node when the HW theme is active. */
.explainer-node-circle .rain-effect {
  display: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  transform: rotate(8deg);
}
.theme-hw .explainer-node:first-of-type .explainer-node-circle {
  position: relative;
}
.theme-hw .explainer-node:first-of-type .rain-effect {
  display: block;
}
.rain-drop {
  position: absolute;
  top: -30%;
  width: 2px;
  height: 30%;
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(130, 175, 210, 0.85)
  );
  animation: rain-drop-fall 0.9s linear infinite;
}
@keyframes rain-drop-fall {
  0% {
    transform: translateY(0%);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translateY(420%);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rain-drop {
    animation: none;
    opacity: 0;
  }
}

.theme-moa .explainer-node-circle {
  --diagram-accent: #0b5259;
}
.theme-moa .explainer-node-circle.is-result {
  --diagram-result-bg: #ffe9d6;
  --diagram-result-border: #c45e33;
}
/* the MOA middle/destination node's label is intentionally hidden —
         the text is still generated and kept in sync by JS as normal, it's
         just not displayed. Scoped via the adjacent is-result circle so it
         only affects the MOA destination node, not FFF/HW's result label */
.theme-moa
  .explainer-node-circle.is-result
  + .explainer-node-label
  .explainer-node-label-inner {
  display: none;
}

/* ── WAVE DIVIDER ─────────────────────────── */
.wave-divider {
  display: block;
  width: 100%;
  height: 36px;
  background: var(--fff-teal);
  position: relative;
  margin-bottom: -1px;
}
.wave-divider svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ── FOOTER ───────────────────────────────── */
/* footer.css */

#footer-privacy {
  background: #0b5259;
  padding: 26px 20px;
  text-align: center;
}

#footer-privacy p {
  font-family: "Dosis", sans-serif;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  margin: 0;
}

#footer-privacy p a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  padding: 0 2px;
}

#footer-privacy p a:hover {
  color: #ffca9c;
}

/* ── ANIMATIONS ───────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Heat wave effect */
.hero.theme-hw #hero-h1 em {
  filter: url(#heat-haze);
}

@media (prefers-reduced-motion: reduce) {
  .hero.theme-hw #hero-h1 {
    filter: none;
  }
}

/* ── TABLET / DESKTOP ─────────────────────── */
@media (min-width: 768px) {
  .hero-eyebrow {
    display: block;
  }
  .hero-sub {
    display: block;
  }
  .hero {
    padding: 48px 32px 56px;
  }
  .hero h1 {
    font-size: 3rem;
  }
  .tab-tagline {
    font-size: 0.62rem;
  }
  .site-header {
    display: flex;
  }
  .explainer {
    max-width: 540px;
  }
  .explainer-node {
    width: 100px;
  }
  .explainer-node-circle {
    width: 64px;
    height: 64px;
  }
  .explainer-node-circle svg {
    width: 30px;
    height: 30px;
  }
  .explainer-node-circle img {
    width: 40px;
    height: 40px;
  }
  .explainer-node-circle.is-result img {
    width: 46px;
    height: 46px;
  }
  .explainer-node-circle svg.explainer-landmark-icon {
    width: 40px;
    height: 40px;
  }
  .explainer-node-circle.is-result svg.explainer-landmark-icon {
    width: 46px;
    height: 46px;
  }
  .explainer-node-circle svg.explainer-moa-logo-icon {
    width: 59px;
    height: 60px;
  }

  .explainer-node-label {
    font-size: 0.8rem;
  }
  .search-hint {
    display: block;
  }
}

/*custom css*/
.search-hint.hint-hidden {
  visibility: hidden;
}
