/* ==========================================================================
   components.css — buttons, header, nav, footer, cards, forms, mobile bar
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: .95rem 1.6rem;
  min-height: 50px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: .01em;
  white-space: nowrap;
  border: 2px solid transparent;
  transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out),
              background-color .22s ease, color .22s ease, border-color .22s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { background: var(--navy-700); color: #fff; box-shadow: var(--sh-md); }
.btn--primary:hover { background: var(--navy-600); box-shadow: var(--sh-lg); }

.btn--accent { background: var(--orange-500); color: #fff; box-shadow: var(--sh-orange); }
.btn--accent:hover { background: var(--orange-600); }

.btn--ghost { background: transparent; color: var(--navy-700); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--navy-700); background: var(--navy-100); }

.btn--wa { background: #25D366; color: #fff; box-shadow: 0 8px 24px rgba(37, 211, 102, .3); }
.btn--wa:hover { background: #1EBE5A; }

.btn--light { background: #fff; color: var(--navy-800); }
.btn--light:hover { background: var(--surface); }

.btn--on-navy { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.22); }
.btn--on-navy:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); }

.btn--lg { padding: 1.1rem 2rem; min-height: 58px; font-size: 1rem; }
.btn--block { width: 100%; }

/* Arrow that slides on hover */
.btn .arrow { transition: transform .3s var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Header ---------- */
.topbar {
  background: var(--navy-900);
  color: rgba(255, 255, 255, .8);
  font-size: var(--fs-xs);
  letter-spacing: .01em;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: 40px;
  padding-block: .4rem;
}
.topbar__group { display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; }
.topbar a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding-block: .3rem;
  min-height: 28px; /* keeps the tap target above the 24px minimum */
  transition: color .2s;
}
.topbar a:hover { color: var(--orange-400); }
.topbar svg { width: 14px; height: 14px; opacity: .75; flex: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s ease, border-color .3s ease, background-color .3s ease;
}
.site-header.is-stuck {
  box-shadow: 0 4px 24px rgba(7, 31, 77, .08);
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  min-height: var(--header-h);
  transition: min-height .3s var(--ease-out);
}
.site-header.is-stuck .header__inner { min-height: 64px; }

.brand { display: flex; align-items: center; gap: .7rem; flex: none; }
.brand img { height: 44px; width: auto; transition: height .3s var(--ease-out); }
.site-header.is-stuck .brand img { height: 38px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-size: .82rem; font-weight: 800; color: var(--navy-800); letter-spacing: -.01em; }
.brand__tag { font-size: .66rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

/* Scroll progress */
.scroll-progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--orange-500), var(--orange-400));
  z-index: 2;
}

/* Desktop nav */
.nav { display: flex; align-items: center; gap: clamp(.4rem, 1.4vw, 1.4rem); }
.nav__link {
  position: relative;
  padding: .5rem .25rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  transition: color .2s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--orange-500);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform .35s var(--ease-out);
}
.nav__link:hover { color: var(--navy-700); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav__link.is-active { color: var(--navy-700); font-weight: 700; }
.nav__link.is-active::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: var(--sp-3); flex: none; }

/* Language toggle */
.lang {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-2);
  border-radius: var(--r-pill);
}
.lang__btn {
  padding: .45rem .75rem;
  min-height: 34px;
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--muted);
  transition: background-color .25s var(--ease-out), color .25s;
}
.lang__btn.is-active { background: var(--navy-700); color: #fff; box-shadow: var(--sh-sm); }

/* Hamburger */
.burger {
  display: none;
  width: 46px; height: 46px;
  border-radius: var(--r-md);
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
}
.burger span {
  display: block;
  position: relative;
  width: 20px; height: 2px;
  background: var(--navy-800);
  border-radius: 2px;
  transition: background-color .2s;
}
.burger span::before, .burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px; height: 2px;
  background: var(--navy-800);
  border-radius: 2px;
  transition: transform .35s var(--ease-out);
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger.is-open span { background: transparent; }
.burger.is-open span::before { transform: translateY(6px) rotate(45deg); }
.burger.is-open span::after { transform: translateY(-6px) rotate(-45deg); }

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--navy-800);
  padding: calc(var(--header-h) + 32px) 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out), visibility .35s;
  overflow-y: auto;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-nav__links { display: flex; flex-direction: column; }
.mobile-nav__links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.05rem 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  opacity: 0;
  transform: translateY(14px);
}
.mobile-nav.is-open .mobile-nav__links a {
  animation: mnav-in .5s var(--ease-out) forwards;
  animation-delay: calc(var(--i) * 55ms + 100ms);
}
.mobile-nav__links a span { color: var(--orange-400); font-size: 1rem; }
@keyframes mnav-in { to { opacity: 1; transform: none; } }

.mobile-nav__foot { margin-top: auto; display: grid; gap: var(--sp-3); }
.mobile-nav__meta { color: rgba(255,255,255,.6); font-size: var(--fs-sm); }
.mobile-nav__meta a { color: #fff; font-weight: 600; }

@media (max-width: 1024px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
  .lang { order: 1; }
}
@media (max-width: 720px) {
  /* Needs the .topbar prefix to outrank `.topbar a` (0,1,1) */
  .topbar .topbar__group--secondary { display: none; }
  .brand__text { display: none; }
  .topbar__inner { justify-content: center; }
}

/* On a real phone the logo + language toggle + CTA + burger do not fit on one
   row and push the whole page wider than the viewport. The quote CTA is
   dropped here because the sticky bottom action bar already carries it. */
@media (max-width: 600px) {
  .header__actions .btn { display: none; }
  .brand img { height: 36px; }
  .site-header.is-stuck .brand img { height: 32px; }
  .header__actions { gap: var(--sp-2); }
}
@media (max-width: 380px) {
  .brand img { height: 32px; }
  .lang__btn { padding-inline: .55rem; }
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 2.4vw, 2rem);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out),
              border-color .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: transparent; }

.card__icon {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  background: var(--navy-100);
  color: var(--navy-700);
  margin-bottom: var(--sp-5);
  transition: background-color .3s ease, color .3s ease, transform .4s var(--ease-out);
}
.card__icon svg { width: 28px; height: 28px; }
.card:hover .card__icon { background: var(--orange-500); color: #fff; transform: scale(1.06) rotate(-4deg); }

.card h3 { margin-bottom: var(--sp-3); }
.card p { color: var(--muted); font-size: var(--fs-sm); line-height: 1.7; }

/* Numbered corner index */
.card__index {
  position: absolute;
  top: clamp(1.5rem, 2.4vw, 2rem);
  right: clamp(1.5rem, 2.4vw, 2rem);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--navy-800);
  opacity: .07;
  letter-spacing: -.04em;
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: .45rem; }
.field label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: .85rem 1rem;
  min-height: 50px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  font-size: var(--fs-body);
  transition: border-color .2s ease, box-shadow .2s ease;
  appearance: none;
}
.field textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6478' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 18px;
  padding-right: 2.75rem;
  cursor: pointer;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy-500);
  box-shadow: 0 0 0 4px rgba(27, 79, 184, .12);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-light); }

.field-error {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: #D92D20;
  display: none;
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #D92D20; }
.field.has-error .field-error { display: block; }

/* Segmented radio group */
.segmented { display: grid; gap: var(--sp-3); }
.segmented__opt { position: relative; }
.segmented__opt input {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.segmented__opt label {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: .95rem 1.1rem;
  min-height: 56px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.segmented__opt label:hover { border-color: var(--navy-500); }
.segmented__opt input:checked + label {
  border-color: var(--navy-700);
  background: var(--navy-100);
  box-shadow: 0 0 0 3px rgba(11, 43, 107, .1);
}
.segmented__opt input:focus-visible + label { outline: 3px solid var(--orange-500); outline-offset: 2px; }
.segmented__opt .dotmark {
  width: 20px; height: 20px; flex: none;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid; place-items: center;
  transition: border-color .2s;
}
.segmented__opt .dotmark::after {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--navy-700); transform: scale(0);
  transition: transform .25s var(--ease-out);
}
.segmented__opt input:checked + label .dotmark { border-color: var(--navy-700); }
.segmented__opt input:checked + label .dotmark::after { transform: scale(1); }
.segmented__opt small { display: block; font-weight: 500; color: var(--muted); font-size: var(--fs-xs); }

/* ---------- Mobile sticky action bar ---------- */
.action-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: none;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: .55rem .6rem calc(.55rem + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(7, 31, 77, .08);
}
.action-bar__inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.action-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  padding: .4rem;
  border-radius: var(--r-md);
  font-size: .7rem;
  font-weight: 700;
  color: var(--navy-800);
  background: var(--surface);
  transition: background-color .2s, color .2s;
}
.action-bar a svg { width: 19px; height: 19px; }
.action-bar a.is-primary { background: var(--orange-500); color: #fff; }
.action-bar a.is-wa { background: #25D366; color: #fff; }

@media (max-width: 860px) {
  .action-bar { display: block; }
  body { padding-bottom: 74px; }
}

/* ---------- Floating WhatsApp (desktop) ---------- */
.wa-float {
  position: fixed;
  right: clamp(1rem, 2.5vw, 2rem);
  bottom: clamp(1rem, 2.5vw, 2rem);
  z-index: 88;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .85rem 1.2rem;
  border-radius: var(--r-pill);
  background: #25D366;
  color: #fff;
  font-weight: 700;
  font-size: var(--fs-sm);
  box-shadow: 0 10px 30px rgba(37, 211, 102, .38);
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  transition: transform .45s var(--ease-out), opacity .45s var(--ease-out), background-color .2s;
}
.wa-float.is-visible { transform: none; opacity: 1; pointer-events: auto; }
.wa-float:hover { background: #1EBE5A; }
.wa-float svg { width: 22px; height: 22px; }
@media (max-width: 860px) { .wa-float { display: none; } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, .72);
  padding-top: clamp(3.5rem, 6vw, 5.5rem);
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -40%; right: -10%;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(27, 79, 184, .28), transparent 65%);
  pointer-events: none;
}
.footer__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: var(--sp-9);
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

.footer__brand { display: flex; align-items: center; gap: .75rem; margin-bottom: var(--sp-5); }
.footer__brand img { height: 46px; width: auto; background: #fff; padding: 6px 10px; border-radius: var(--r-sm); }
.footer h4 {
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin: 0 0 var(--sp-4);
}
.footer__links { display: grid; gap: .35rem; font-size: var(--fs-sm); }
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  transition: color .2s, transform .2s;
}
.footer__links a:hover { color: var(--orange-400); transform: translateX(3px); }

.footer__contact { display: grid; gap: var(--sp-4); font-size: var(--fs-sm); }
.footer__contact-item { display: flex; gap: .7rem; align-items: flex-start; }
.footer__contact-item svg { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--orange-400); }
.footer__contact-item a:hover { color: #fff; }

.footer__socials { display: flex; gap: .6rem; margin-top: var(--sp-5); }
.footer__socials a {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .08);
  transition: background-color .25s, transform .25s;
}
.footer__socials a:hover { background: var(--orange-500); transform: translateY(-3px); }
.footer__socials svg { width: 18px; height: 18px; }

.footer__bottom {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-block: var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-size: var(--fs-xs);
}
.footer__bottom a:hover { color: var(--orange-400); }

/* ---------- Utility: pill badge ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .8rem;
  border-radius: var(--r-pill);
  background: var(--navy-100);
  color: var(--navy-700);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .02em;
}
.badge--accent { background: var(--orange-100); color: var(--orange-600); }
.badge--ok { background: #E7F7EE; color: var(--ok); }
.badge--glass { background: rgba(255,255,255,.12); color: #fff; }
