/* Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-cream);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-normal) var(--ease-out);
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-normal);
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--color-terracotta), #d4895f);
  color: var(--color-cream);
  font-size: var(--text-sm);
  font-weight: 700;
}

.logo__img {
  display: block;
  height: 2.25rem;
  width: auto;
  object-fit: contain;
}

.site-nav {
  display: none;
  align-items: center;
  gap: var(--space-8);
}

.site-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-muted);
  transition: color var(--duration-fast) var(--ease-out);
}

.site-nav a:hover {
  color: var(--color-foreground);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
  color: var(--color-foreground);
  cursor: pointer;
}

.nav-toggle__icon {
  width: 1.125rem;
  height: 1.125rem;
}

.mobile-nav {
  position: fixed;
  inset: var(--header-height) 0 0 0;
  z-index: 90;
  padding: var(--space-6);
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-border);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition:
    transform var(--duration-normal) var(--ease-out),
    opacity var(--duration-normal) var(--ease-out),
    visibility var(--duration-normal);
}

.mobile-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
}

.mobile-nav__links a {
  display: block;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 500;
  color: var(--color-foreground);
}

.mobile-nav__links a:hover {
  background: var(--color-linen);
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .mobile-nav {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 3rem;
  padding: 0 var(--space-6);
  border: none;
  border-radius: var(--radius-xl);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease-out),
    transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--color-terracotta);
  color: var(--color-cream);
  box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
  background: var(--color-terracotta-hover);
}

.btn--secondary {
  background: var(--color-card);
  color: var(--color-foreground);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-linen);
}

.btn--ghost {
  background: transparent;
  color: var(--color-muted);
  min-height: auto;
  padding: var(--space-2) var(--space-3);
}

.btn--ghost:hover {
  color: var(--color-foreground);
}

.btn--lg {
  min-height: 3.5rem;
  padding-inline: var(--space-8);
  font-size: var(--text-base);
}

.btn--block {
  width: 100%;
}

/* Cards */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-soft);
}

.feature-card {
  padding: var(--space-6);
  height: 100%;
}

.feature-card__icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--color-terracotta-light);
  color: var(--color-terracotta);
}

.feature-card__icon--sage {
  background: var(--color-sage-light);
  color: var(--color-sage);
}

.feature-card__title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: var(--tracking-normal);
}

.feature-card__text {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-muted);
}

/* Testimonial */
.testimonial-card {
  padding: var(--space-8);
  height: 100%;
}

.testimonial-card__quote {
  margin: 0 0 var(--space-6);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-foreground);
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.testimonial-card__avatar {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-full);
  background: var(--color-linen);
  color: var(--color-terracotta);
  font-weight: 600;
  font-size: var(--text-sm);
}

.testimonial-card__name {
  margin: 0;
  font-weight: 600;
  font-size: var(--text-sm);
}

.testimonial-card__role {
  margin: var(--space-1) 0 0;
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-card);
  overflow: hidden;
}

.faq-item__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-5) var(--space-6);
  border: none;
  background: transparent;
  text-align: left;
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-foreground);
  cursor: pointer;
}

.faq-item__icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-muted);
  transition: transform var(--duration-normal) var(--ease-out);
}

.faq-item.is-open .faq-item__icon {
  transform: rotate(180deg);
}

.faq-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-normal) var(--ease-out);
}

.faq-item.is-open .faq-item__panel {
  grid-template-rows: 1fr;
}

.faq-item__content {
  overflow: hidden;
}

.faq-item__answer {
  margin: 0;
  padding: 0 var(--space-6) var(--space-5);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--color-muted);
}

/* Beta form */
.beta-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.beta-form__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.beta-form__input {
  width: 100%;
  min-height: 3.5rem;
  padding: 0 var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-card);
  color: var(--color-foreground);
}

.beta-form__input::placeholder {
  color: var(--color-muted);
}

.beta-form__input:focus {
  outline: none;
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px var(--color-terracotta-light);
}

.beta-form__hint {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.beta-form__success {
  display: none;
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background: var(--color-sage-light);
  color: var(--color-foreground);
  text-align: center;
}

.beta-form.is-success .beta-form__fields {
  display: none;
}

.beta-form.is-success .beta-form__success {
  display: block;
}

.form-error {
  margin: 0;
  font-size: var(--text-xs);
  color: #9e4a3a;
}

@media (min-width: 540px) {
  .beta-form__row {
    flex-direction: row;
  }

  .beta-form__row .beta-form__input {
    flex: 1;
  }

  .beta-form__row .btn {
    flex-shrink: 0;
  }
}

/* Footer */
.site-footer {
  padding-block: var(--space-12) var(--space-8);
  border-top: 1px solid var(--color-border);
  background: var(--color-cream);
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  font-size: var(--text-sm);
  color: var(--color-muted);
  transition: color var(--duration-fast);
}

.site-footer__links a:hover {
  color: var(--color-foreground);
}

.site-footer__copy {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--color-muted);
}

@media (min-width: 768px) {
  .site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Feedback Form */
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: left;
}

.feedback-form__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.feedback-form__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(253, 251, 247, 0.85);
}

.feedback-form__input,
.feedback-form__select,
.feedback-form__textarea {
  width: 100%;
  padding: var(--space-3.5) var(--space-4);
  border: 1px solid rgba(232, 226, 218, 0.25);
  border-radius: var(--radius-xl);
  background: rgba(255, 252, 249, 0.08);
  color: var(--color-cream);
  font-family: inherit;
  font-size: var(--text-sm);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.feedback-form__input::placeholder,
.feedback-form__textarea::placeholder {
  color: rgba(253, 251, 247, 0.45);
}

.feedback-form__select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba%28253, 251, 247, 0.7%29' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.feedback-form__select option {
  background: var(--color-foreground);
  color: var(--color-cream);
}

.feedback-form__input:focus,
.feedback-form__select:focus,
.feedback-form__textarea:focus {
  outline: none;
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px rgba(196, 115, 74, 0.35);
}

.feedback-form__success {
  display: none;
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  background: rgba(156, 175, 136, 0.18);
  color: var(--color-cream);
  text-align: center;
}

.feedback-form.is-success .feedback-form__fields {
  display: none;
}

.feedback-form.is-success .feedback-form__success {
  display: block;
}

/* Custom Language Dropdown Switcher */
.lang-switcher {
  position: relative;
  display: inline-block;
}

.lang-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(45, 42, 38, 0.05);
  border: 1px solid rgba(45, 42, 38, 0.12);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-3.5);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-foreground);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.lang-switcher__trigger:hover {
  background: rgba(45, 42, 38, 0.08);
  border-color: rgba(45, 42, 38, 0.22);
}

.lang-switcher__trigger:focus {
  outline: none;
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px rgba(196, 115, 74, 0.25);
}

.lang-switcher__globe {
  color: var(--color-muted);
  transition: color var(--duration-fast) var(--ease-out);
}

.lang-switcher__trigger:hover .lang-switcher__globe {
  color: var(--color-foreground);
}

.lang-switcher__chevron {
  color: var(--color-muted);
  transition: transform var(--duration-fast) var(--ease-out);
}

.lang-switcher.is-open .lang-switcher__chevron {
  transform: rotate(180deg);
}

.lang-switcher__current {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  min-width: 12rem;
  padding: var(--space-2) 0;
  margin: 0;
  list-style: none;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--duration-fast) var(--ease-out);
  z-index: 100;
}

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

.lang-switcher__item {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-muted);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lang-switcher__item:hover {
  background: rgba(45, 42, 38, 0.04);
  color: var(--color-foreground);
}

.lang-switcher__item.is-active {
  color: var(--color-terracotta);
  font-weight: 600;
  background: var(--color-terracotta-light);
}

.lang-switcher__item.is-active::after {
  content: "✓";
  font-size: var(--text-xs);
  font-weight: 700;
}

.header-actions .lang-switcher {
  margin-right: var(--space-3);
}

/* Lang switcher on mobile navigation drawer */
.mobile-nav .lang-switcher {
  margin-top: var(--space-8);
  display: block;
}

.mobile-nav .lang-switcher__trigger {
  width: 100%;
  justify-content: center;
  background: rgba(255, 252, 249, 0.9);
  border-color: rgba(45, 42, 38, 0.15);
}

.mobile-nav .lang-switcher__menu {
  right: 0;
  left: 0;
  min-width: unset;
  background: var(--color-card);
}

/* Legal content styling */
.legal-content {
  padding-block: var(--space-16) var(--space-24);
}

.legal-content h1 {
  font-size: var(--text-3xl);
  font-weight: 600;
  line-height: var(--leading-tight);
  color: var(--color-foreground);
  margin-bottom: var(--space-4);
}

.legal-content .last-updated {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: var(--space-8);
}

.legal-content h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: var(--leading-snug);
  color: var(--color-foreground);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.legal-content p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-muted);
  margin-bottom: var(--space-6);
}

.legal-content ul {
  margin-bottom: var(--space-6);
  padding-left: var(--space-6);
  color: var(--color-muted);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

.legal-content li {
  margin-bottom: var(--space-2);
}

/* Language switcher visibility for legal sections */
.lang-section {
  display: none;
}

html[lang="uk"] .lang-section[lang="uk"] {
  display: block;
}

html[lang="en"] .lang-section[lang="en"],
html[lang="de"] .lang-section[lang="en"],
html[lang="es"] .lang-section[lang="en"],
html[lang="fr"] .lang-section[lang="en"],
html[lang="it"] .lang-section[lang="en"],
html[lang="pt"] .lang-section[lang="en"] {
  display: block;
}

