/* lg breakpoint utilities (1024px) — needed for fr/es/de header */
@media (min-width: 1024px) {
  .lg\:flex { display: flex !important; }
  .lg\:hidden { display: none !important; }
}

/* intlTelInput dial code + selected flag text — force black so it's readable */
.iti__selected-dial-code,
.iti__selected-country-primary,
.iti__country-name,
.iti__dial-code {
  color: #000 !important;
}

/* Checkbox: always render stroke in foreground color, show checkmark on checked */
[role="checkbox"] {
  color: var(--foreground);
}
[role="checkbox"] .check-icon {
  opacity: 0;
  pointer-events: none;
}
[role="checkbox"][data-state="checked"] .check-icon {
  opacity: 1;
}

/* Mobile nav — overlay, doesn't push content */
[data-mobile-nav] {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 49;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Mobile nav backdrop blur */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 48;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.15);
}
.nav-backdrop.is-active {
  display: block;
}

/* Ticker — scroll animation */
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-track {
  font-size: 0.9rem !important;
  gap: 5rem !important;
  animation: ticker-scroll 36s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track {
  animation-play-state: paused;
}

/* Hero video — seamless cinematic loop (replaces alternate) */
@keyframes cinematic-drift {
  0%, 100% { transform: scale(1.06) translate(0%,    0%);    }
  33%       { transform: scale(1.1)  translate(-1.2%, 0.6%);  }
  66%       { transform: scale(1.05) translate(0.8%,  -0.8%); }
}
.video-hero .hero-background-video {
  animation: cinematic-drift 22s ease-in-out infinite !important;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.65);
  overflow-y: auto;
  padding: 2rem 1rem;
}
.modal.is-open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.modal-box {
  background: var(--background);
  color: var(--foreground);
  width: 100%;
  max-width: 740px;
  padding: 2.5rem 2.5rem 2rem;
  position: relative;
  margin: auto;
}
.modal-box h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-right: 2rem;
}
.modal-box h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}
.modal-box p {
  font-size: 0.875rem;
  line-height: 1.75;
  color: oklch(17% .008 110 / 70%);
  margin-bottom: 0.5rem;
}
.modal-box ul {
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}
.modal-box ul li {
  font-size: 0.875rem;
  line-height: 1.75;
  color: oklch(17% .008 110 / 70%);
}
.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: 1px solid oklch(17% .008 110 / 20%);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--foreground);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}
.modal-accept-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  padding: 0.75rem 2rem;
  border: none;
  cursor: pointer;
}
.modal-accept-btn:hover {
  opacity: 0.9;
}
@media (max-width: 600px) {
  .modal-box {
    padding: 1.5rem 1.25rem 1.25rem;
  }
  .modal-box h2 {
    font-size: 1.375rem;
  }
}
@media (max-width: 360px) {
  .modal-box {
    padding: 1.25rem 1rem 1rem;
  }
  .modal-box h2 {
    font-size: 1rem;
    padding-right: 2.25rem;
  }
}

/* Force dark text on all text inputs — prevents white-on-white when inside dark sections */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"] {
  color: var(--foreground) !important;
}

/* Autofill — force dark text regardless of browser/filter overrides */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: #000 !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  caret-color: #000;
}

/* Form submit button — loader dot color */
.signup_form [type="submit"] span.loader {
  color: var(--primary-foreground);
}

/* FAQ accordion — rotate + icon when open */
[data-accordion-item][data-state="open"] [data-accordion-trigger] span:last-child {
  transform: rotate(45deg);
}

/* ── Language switcher ─────────────────────────────────────── */
.language-dropdown {
  position: relative;
  display: inline-block;
}

.lang-pill {
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.2s;
}

.lang-pill:hover {
  background: rgba(255, 255, 255, 0.12);
}

.flag-current-wrapper {
  display: flex;
  align-items: center;
}

.flag {
  width: 24px;
  height: 16px;
  border-radius: 2px;
  display: block;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--background, #fff);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: fit-content;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 200;
}

.lang-menu--open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-menu a {
  display: flex;
  align-items: center;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.lang-menu a:hover,
.lang-menu a[aria-current] {
  background: rgba(0,0,0,0.07);
}

/* ── Form submit button — responsive fix for narrow screens (≤320px) ── */
@media (max-width: 380px) {
  .signup_form [type="submit"],
  .signup_form button[type="submit"] {
    white-space: normal;
    word-break: break-word;
    padding-left: 1rem;
    padding-right: 1rem;
    height: auto;
    min-height: 3rem;
    font-size: 0.75rem;
  }
  .signup_form button[type="submit"] svg {
    display: none;
  }
}

/* ── Name fields grid — stack on mobile ── */
@media (max-width: 480px) {
  .signup_form .grid {
    grid-template-columns: 1fr;
  }
}

/* ── Hero h1 — intermediate size between lg (1024px) and large desktop (1400px+).
      Without this: 3rem at 640-1023px → jumps straight to 4.5rem at 1024px+.
      Now: 3.5rem at 1024-1399px, 4.5rem at 1400px+. Applies to all languages. ── */
@media (min-width: 1024px) and (max-width: 1399px) {
  .hero-home h1 {
    font-size: 3.5rem;
  }
}

/* ── Hero home grid: fix form column shrinking due to long DE/FR words at 72px.
      Plain `fr` = minmax(auto, fr) — the left column's min-content (e.g.
      "Investmentchancen" at 4.5rem) overrides fr and steals space from the form.
      minmax(0, fr) sets minimum to 0 so fr fractions distribute correctly. ── */
@media (min-width: 1024px) {
  .hero-home-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.65fr);
  }
}

/* ── Section h2 (text-4xl) — responsive down to 320px ── */
@media (max-width: 480px) {
  h2.text-4xl {
    font-size: 1.75rem;
    line-height: 1.2;
  }
}
@media (max-width: 360px) {
  h2.text-4xl {
    font-size: 1.5rem;
  }
}

/* ── Footer nav links — smaller text on mobile ── */
@media (max-width: 480px) {
  footer .grid.text-sm {
    font-size: 0.7rem;
    column-gap: 1.5rem;
  }
}

/* ── Page hero h1 — responsive down to 320px ── */
@media (max-width: 480px) {
  .page-hero-copy h1 {
    font-size: 1.75rem;
  }
}
@media (max-width: 360px) {
  .page-hero-copy h1 {
    font-size: 1.5rem;
  }
}
