/* Additive styles for generated locale routes. The original page stylesheet is
   intentionally unchanged. */

.locale-picker {
  position: relative;
  display: flex;
  align-items: center;
}

.locale-picker::after {
  content: '';
  position: absolute;
  right: 16px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  pointer-events: none;
}

.locale-picker__select {
  min-width: 108px;
  max-width: 170px;
  appearance: none;
  border: 0;
  border-radius: var(--radius-full);
  padding: 6px 40px 6px 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.locale-picker__select:focus-visible,
.faq__item:focus-within {
  outline: 3px solid rgba(43, 138, 122, 0.28);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: var(--space-8);
  left: var(--space-8);
  z-index: 200;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-full);
  background: var(--text);
  color: var(--text-inverse);
  font-size: 14px;
  transform: translateY(-160%);
  transition: transform var(--duration-fast) var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.faq {
  display: grid;
  max-width: 760px;
  margin: var(--space-48) auto 0;
  gap: var(--space-12);
}

.faq__item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-20);
  padding: var(--space-20) var(--space-24);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: '+';
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  transition: transform var(--duration-fast) var(--ease);
}

.faq__item[open] .faq__question::after {
  transform: rotate(45deg);
}

.faq__answer {
  max-width: 66ch;
  padding: 0 var(--space-24) var(--space-24);
  color: var(--text-secondary);
}

.section__label,
.demo__fact-number {
  color: var(--accent-hover);
}

.demo__topic-label,
.demo__tone-label {
  color: var(--text-secondary);
}

.footer__lang-links {
  max-width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

html[lang="ja"] {
  --font-display: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --font-body: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
}

html[lang="ko"] {
  --font-display: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
  --font-body: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
}

html[lang="ja"] .hero__title,
html[lang="ja"] .section__title,
html[lang="ja"] .cta-section__title,
html[lang="ko"] .hero__title,
html[lang="ko"] .section__title,
html[lang="ko"] .cta-section__title {
  letter-spacing: -0.035em;
  line-break: strict;
  overflow-wrap: anywhere;
}

@media (max-width: 639px) {
  .nav__actions {
    gap: var(--space-8);
  }

  .nav:not(.scrolled) .locale-picker__select {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
  }

  .nav.scrolled .locale-picker__select {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    text-overflow: ellipsis;
  }

  .nav.scrolled .locale-picker {
    margin-right: 6px;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .footer__bottom {
    flex-direction: column;
    justify-content: flex-start;
  }

  html:not([lang="en"]):not([lang="es"]) .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  html:not([lang="en"]):not([lang="es"]) .hero__copy {
    align-items: center;
  }

  html:not([lang="en"]):not([lang="es"]) .hero__buttons {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq__question::after {
    transition: none;
  }

  .skip-link {
    transition: none;
  }
}
