/* =========================================================
   NOWERA — FAQ, nav fit, WhatsApp button
   ========================================================= */

/* ---- FAQ ---- */
.faq { background: var(--ivory); color: var(--ink); }
.faq__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(3rem, 7vw, 8rem);
  align-items: start;
}
.faq__aside { position: sticky; top: clamp(6rem, 12vh, 9rem); }
.faq .h2 { margin-top: 1.25rem; font-size: clamp(2.2rem, 1rem + 3.3vw, 4.25rem); }
.faq__text { margin-top: 1.5rem; max-width: 34ch; font-size: var(--fs-lead); line-height: 1.55; }
.faq__ask { display: inline-block; margin-top: 2rem; font-weight: 500; color: var(--gold-ink); }

.faq__list { border-top: 1px solid var(--line-light-strong); }
.faq__item { border-bottom: 1px solid var(--line-light-strong); }
.faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: clamp(1.35rem, 2.4vw, 2rem) 0;
  list-style: none; cursor: pointer;
  font-size: var(--fs-h4); font-weight: 500; line-height: 1.3; letter-spacing: -0.01em;
  transition: color var(--dur-s, 0.25s) ease;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--gold-ink); }
.faq__q:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 4px; border-radius: var(--radius-s); }
.faq__icon {
  position: relative; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-light-strong); color: var(--ink);
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease, transform 0.45s var(--ease-out, ease);
}
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px;
  background: currentColor; translate: -50% -50%;
  transition: transform 0.45s var(--ease-out, ease);
}
.faq__icon::after { transform: rotate(90deg); }
.faq__q:hover .faq__icon { border-color: var(--gold-ink); }
.faq__item[open] .faq__icon { background: var(--deep-black); border-color: var(--deep-black); color: var(--gold); transform: rotate(180deg); }
.faq__item[open] .faq__icon::after { transform: rotate(0deg); }
.faq__a { max-width: 62ch; padding: 0 3.75rem clamp(1.35rem, 2.4vw, 2rem) 0; font-size: 1.0625rem; line-height: var(--lh-body); color: var(--ink-muted); }

/* smooth open/close where supported (details::details-content) */
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq__item::details-content {
    block-size: 0; overflow: clip;
    transition: block-size 0.5s var(--ease-out, ease), content-visibility 0.5s allow-discrete;
  }
  .faq__item[open]::details-content { block-size: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .faq__item::details-content, .faq__icon, .faq__icon::before, .faq__icon::after { transition: none; }
}
@media (max-width: 960px) {
  .faq__layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .faq__aside { position: static; }
}
@media (max-width: 480px) {
  .faq__a { padding-right: 0; }
  .faq__icon { width: 36px; height: 36px; }
}

/* ---- nav: four languages + CTA fit between 1024 and 1279px ---- */
.nav__cta { flex: none; white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1279px) {
  .nav__bar { gap: 1.1rem; }
  .nav__links { gap: 1rem; }
  .nav__links a { font-size: 0.8125rem; }
  .lang__opt { min-width: 30px; }
}

/* ---- WhatsApp: floating chat button, always in motion ---- */
.wa {
  position: fixed; right: clamp(16px, 2.2vw, 28px); bottom: clamp(16px, 2.6vw, 30px); z-index: 90;
  display: flex; align-items: center; gap: 14px;
  -webkit-tap-highlight-color: transparent;
}
.wa__btn {
  position: relative; display: grid; place-items: center;
  width: 62px; height: 62px; border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #4be27f, #25d366 45%, #12a650 100%);
  box-shadow: 0 14px 30px -10px rgba(18, 166, 80, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.18) inset;
  animation: wa-float 3.2s ease-in-out infinite;
  transition: transform 0.35s var(--ease-out, ease);
}
.wa__btn svg { position: relative; z-index: 1; width: 32px; height: 32px; fill: #fff; animation: wa-wiggle 4s ease-in-out infinite; transform-origin: 50% 60%; }
.wa__ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.7);
  animation: wa-ring 2.4s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}
.wa__ring--2 { animation-delay: 1.2s; }
.wa:hover .wa__btn, .wa:focus-visible .wa__btn { transform: scale(1.08); }
.wa:focus-visible { outline: none; }
.wa:focus-visible .wa__btn { box-shadow: 0 0 0 3px var(--deep-black, #090909), 0 0 0 5px #25d366; }

/* speech bubble: types first, then talks */
.wa__bubble {
  position: relative; display: flex; align-items: center; min-height: 44px;
  padding: 0.7rem 1rem; border-radius: 16px 16px 4px 16px;
  background: var(--warm-white, #fffdf9); color: var(--deep-black, #090909);
  font-size: 0.875rem; font-weight: 500; line-height: 1.35; max-width: 250px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.45);
  opacity: 0; transform: translateX(12px) scale(0.92); transform-origin: 100% 100%; pointer-events: none;
  transition: opacity 0.45s ease, transform 0.55s var(--ease-out, ease);
}
.wa__bubble::after { content: ""; position: absolute; right: -6px; bottom: 10px; width: 12px; height: 12px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.wa.is-typing .wa__bubble, .wa.is-talking .wa__bubble { opacity: 1; transform: none; }
.wa.is-talking .wa__bubble { animation: wa-nudge 6s ease-in-out 1.5s infinite; }
.wa__typing { display: none; gap: 4px; }
.wa.is-typing .wa__typing { display: inline-flex; }
.wa__typing i { width: 7px; height: 7px; border-radius: 50%; background: #25d366; animation: wa-dot 1s ease-in-out infinite; }
.wa__typing i:nth-child(2) { animation-delay: 0.15s; }
.wa__typing i:nth-child(3) { animation-delay: 0.3s; }
.wa__msg { display: none; }
.wa.is-talking .wa__msg { display: inline; }

@keyframes wa-ring { 0% { transform: scale(1); opacity: 0.85; } 100% { transform: scale(1.75); opacity: 0; } }
@keyframes wa-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes wa-wiggle {
  0%, 62%, 100% { transform: rotate(0) scale(1); }
  66% { transform: rotate(-14deg) scale(1.08); }
  72% { transform: rotate(12deg) scale(1.08); }
  78% { transform: rotate(-8deg) scale(1.04); }
  84% { transform: rotate(5deg); }
  90% { transform: rotate(0); }
}
@keyframes wa-dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes wa-nudge { 0%, 80%, 100% { transform: none; } 85% { transform: translateY(-4px) rotate(-1.5deg); } 90% { transform: translateY(0) rotate(1deg); } }

/* phones: above the sticky "start a project" bar, no bubble */
@media (max-width: 767px) {
  .wa { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); right: 14px; }
  .wa__btn { width: 56px; height: 56px; }
  .wa__btn svg { width: 29px; height: 29px; }
  .wa__bubble { display: none; }
}
/* print / visitors who switched motion off in their system settings */
@media print { .wa { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .wa__btn, .wa__btn svg, .wa__typing i, .wa.is-talking .wa__bubble { animation: none; }
  .wa__ring { animation-duration: 4s; }
}
