/* Bamnang sticky footer reveal - same radius tokens as bamnang.com:
   --landing-reveal-radius: 2.5rem / sm+: 4rem (circular bottom corners only). */
:root {
  --nn-footer-h: 34rem; /* overwritten in px by nn-footer.js */
  --footer-radius: 2.5rem; /* Bamnang mobile */
}

@media (min-width: 640px) {
  :root {
    --nn-footer-h: 32rem;
    --footer-radius: 4rem; /* Bamnang sm+ = 64px */
  }
}

/* Content sheet over sticky footer (Bamnang: overflow visible, not clipped). */
.nn-reveal-content,
body:has(.nn-footer-reveal) > main {
  position: relative;
  z-index: 10;
  border-radius: 0 0 var(--footer-radius) var(--footer-radius);
  background: var(--bg, #f7f7f5);
  box-shadow: 0 30px 60px -25px rgba(10, 10, 15, 0.35);
  overflow: visible;
}

/* Round the last section fill so opaque CTAs follow the same arc */
.nn-reveal-content > :last-child,
body:has(.nn-footer-reveal) > main > :last-child {
  border-bottom-left-radius: var(--footer-radius);
  border-bottom-right-radius: var(--footer-radius);
}

body[data-region="kh"] .nn-reveal-content,
body.kh-shell .nn-reveal-content,
body.kh-shell:has(.nn-footer-reveal) > main {
  background: var(--bg, #f5f1e6);
}

html[data-kh-theme="dark"] body[data-region="kh"] .nn-reveal-content,
html[data-kh-theme="dark"] body.kh-shell .nn-reveal-content,
html[data-kh-theme="dark"] body.kh-shell:has(.nn-footer-reveal) > main {
  background: var(--bg, #12100e);
}

/* Reveal window: 2× footer height, overlapped under content by 1× */
.nn-footer-reveal {
  --footer-bg: #c9e4c8;
  --footer-ink: #141414;
  --footer-line: rgba(20, 20, 20, 0.14);
  --footer-line-soft: rgba(20, 20, 20, 0.2);
  --footer-line-hover: rgba(20, 20, 20, 0.4);
  --footer-muted-fill: rgba(20, 20, 20, 0.08);
  --footer-dropdown-bg: #ffffff;
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: calc(var(--nn-footer-h) * 2);
  margin-top: calc(var(--nn-footer-h) * -1);
  background: var(--footer-bg);
  flex-shrink: 0;
  color-scheme: light;
}

html[data-us-theme="light"] .nn-footer-reveal,
body[data-us-theme="light"] .nn-footer-reveal,
body.kr-shell[data-kr-theme="light"] .nn-footer-reveal {
  --footer-bg: #c9e4c8;
  --footer-ink: #141414;
  --footer-dropdown-bg: #ffffff;
  background: var(--footer-bg);
}

/* Cambodia footer: NomNote logo mint (#c9e4c8) in both themes. */
body[data-region="kh"] .nn-footer-reveal,
body.kh-shell .nn-footer-reveal,
html[data-kh-theme="light"] .nn-footer-reveal,
body[data-kh-theme="light"] .nn-footer-reveal,
html[data-kh-theme="dark"] .nn-footer-reveal,
body[data-kh-theme="dark"] .nn-footer-reveal {
  --footer-bg: #c9e4c8;
  --footer-ink: #141414;
  --footer-dropdown-bg: #ffffff;
  --footer-line: rgba(20, 20, 20, 0.14);
  --footer-line-soft: rgba(20, 20, 20, 0.2);
  --footer-line-hover: rgba(20, 20, 20, 0.4);
  --footer-muted-fill: rgba(20, 20, 20, 0.08);
  background: var(--footer-bg);
}

html[data-us-theme="dark"] .nn-footer-reveal,
body[data-us-theme="dark"] .nn-footer-reveal,
body.kr-shell[data-kr-theme="dark"] .nn-footer-reveal {
  --footer-bg: #ffffff;
  --footer-ink: #141414;
  --footer-dropdown-bg: #f4f4f2;
  --footer-line: rgba(20, 20, 20, 0.12);
  --footer-line-soft: rgba(20, 20, 20, 0.18);
  --footer-line-hover: rgba(20, 20, 20, 0.35);
  --footer-muted-fill: rgba(20, 20, 20, 0.06);
  background: var(--footer-bg);
}

.nn-footer {
  position: sticky;
  bottom: 0;
  z-index: 0;
  flex-shrink: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  background: var(--footer-bg);
  color: var(--footer-ink);
  font-family: "Plus Jakarta Sans", "Noto Sans KR", system-ui, sans-serif;
  color-scheme: light;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nn-footer__wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 88px 32px 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.nn-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 48px 64px;
}

.nn-footer__brand {
  flex: 0 1 300px;
  max-width: 300px;
}

/* Desktop: brand (+ CTA) left, Explore / Company / Legal clustered right */
@media (min-width: 721px) {
  .nn-footer__brand {
    margin-right: auto;
  }

  .nn-footer__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 48px 64px;
    margin-left: 0;
  }
}

.nn-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--footer-ink);
  text-decoration: none;
  line-height: 1;
}

.nn-footer__logo:hover {
  color: var(--footer-ink);
}

.nn-footer__logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: block;
  object-fit: cover;
  flex-shrink: 0;
  /* Mint footer matches logo green - outline so the mark reads */
  box-sizing: border-box;
  border: 1.5px solid #141414;
}

/* White footer (US/KR dark theme): logo already contrasts - no border */
html[data-us-theme="dark"] .nn-footer__logo-mark,
body[data-us-theme="dark"] .nn-footer__logo-mark,
body.kr-shell[data-kr-theme="dark"] .nn-footer__logo-mark {
  border-color: transparent;
}

.nn-footer__tagline {
  margin: 14px 0 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--footer-ink);
  opacity: 0.6;
}

.nn-footer__col {
  flex: 0 1 auto;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nn-footer__col h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--footer-ink);
  letter-spacing: 0;
  text-transform: none;
}

.nn-footer__col a {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--footer-ink);
  opacity: 0.68;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}

.nn-footer__col a:hover {
  opacity: 1;
  color: var(--footer-ink);
}

.nn-footer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--footer-line);
  position: relative;
  z-index: 2;
  overflow: visible;
}

.nn-footer__copy {
  flex: 1 1 0;
  min-width: 220px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--footer-ink);
  opacity: 0.6;
}

.nn-footer__copy > div + div {
  margin-top: 2px;
}

.nn-footer__geo {
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
  overflow: visible;
}

.nn-footer__socials {
  flex: 1 1 0;
  min-width: 220px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.nn-footer__socials a,
.nn-footer__socials .footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  color: var(--footer-ink);
  opacity: 0.68;
  border: none;
  border-radius: 0;
  background: transparent;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.nn-footer__socials a:hover,
.nn-footer__socials .footer-social-link:hover {
  opacity: 1;
  color: var(--footer-ink);
  background: transparent;
}

.nn-footer__socials a svg,
.nn-footer__socials .footer-social-link svg {
  width: 15px;
  height: 15px;
}

/* Geo switcher - restyle only; keep .geo-* classes for JS */
.nn-footer .geo-switcher {
  position: relative;
  overflow: visible;
}

.nn-footer .geo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--footer-line-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--footer-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.75;
  cursor: pointer;
}

.nn-footer .geo-btn:hover {
  opacity: 1;
  border-color: var(--footer-line-hover);
  color: var(--footer-ink);
  background: transparent;
}

.nn-footer .geo-current-flag {
  display: none !important;
}

.nn-footer .nn-footer__globe {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  color: currentColor;
}

.nn-footer .geo-current-label {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
}

.nn-footer .geo-chevron {
  opacity: 0.7;
  transition: transform 0.15s ease;
}

.nn-footer .geo-switcher.open .geo-chevron {
  transform: rotate(180deg);
}

.nn-footer .geo-dropdown {
  display: none;
  position: absolute;
  bottom: 100%;
  top: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  margin-bottom: 8px;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--footer-line-soft);
  border-radius: 12px;
  background: var(--footer-dropdown-bg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  list-style: none;
  z-index: 20;
}

.nn-footer .geo-switcher.open .geo-dropdown {
  display: block;
}

.nn-footer .geo-dropdown button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--footer-ink);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.nn-footer .geo-dropdown button:hover,
.nn-footer .geo-dropdown button.is-active {
  background: var(--footer-muted-fill);
  color: var(--footer-ink);
}

/* Half-wordmark - viewBox clips at letter mid-line; full "NomNote" always fits width */
.nn-footer__wordmark {
  display: block;
  box-sizing: border-box;
  width: 100vw;
  max-width: none;
  height: auto;
  margin-top: 56px;
  margin-bottom: 0;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  color: var(--footer-ink);
  aspect-ratio: 1000 / 107;
  flex-shrink: 0;
}

.nn-footer__wordmark text {
  fill: currentColor;
}

@media (max-width: 720px) {
  .nn-footer__wrap {
    padding: 56px 24px 0;
  }

  /* Mobile stack: links → copyright/geo/socials → half-height NomNote at page bottom */
  .nn-footer__top {
    order: 1;
    gap: 32px 40px;
  }

  .nn-footer__bar {
    order: 2;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 28px;
    margin-bottom: 0;
    padding-top: 20px;
    gap: 16px;
  }

  .nn-footer__wordmark {
    order: 3;
    margin-top: 24px;
    margin-bottom: 0;
    /* Full word visible at every width - same half-letter crop, no side clip */
    width: 100vw;
    max-width: none;
    max-height: none;
    margin-left: calc(50% - 50vw);
    aspect-ratio: 1000 / 107;
    position: static;
    left: auto;
    transform: none;
  }

  .nn-footer__copy,
  .nn-footer__socials {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .nn-footer__geo {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .nn-footer .geo-btn {
    min-height: 44px;
    padding: 0 16px;
    opacity: 1;
  }
}
