/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.75rem 1.75rem; border: 2px solid transparent;
  border-radius: var(--radius-pill); font-weight: 600; text-decoration: none; cursor: pointer;
  position: relative; z-index: 0; overflow: hidden;
  transition: transform 0.25s ease;
}
/* Hover color swap uses an opacity-only overlay (never transitions background-color),
   so only transform/opacity are ever animated on .btn. */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--c-accent); opacity: 0; transition: opacity 0.25s ease; pointer-events: none;
}
.btn:hover { transform: translate3d(0, -2px, 0); }
.btn--primary { background: var(--c-primary); color: var(--c-dark); }
.btn--primary:hover::before { opacity: 1; }
.btn--ghost { border-color: var(--c-line-dark); color: var(--c-on-dark); background: transparent; }
.btn--ghost:hover { border-color: var(--c-accent); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

/* Navigation: solid dark pill so it reads over every section tone */
.site-nav {
  position: fixed; z-index: 50; top: 1rem; left: 50%;
  width: min(calc(100% - 2rem), 60rem);
  transform: translate3d(-50%, 0, 0);
  background: var(--c-dark); color: var(--c-on-dark);
  border: 1px solid var(--c-line-dark); border-radius: 1.75rem;
  padding: 0.4rem 0.5rem 0.4rem 1.25rem;
}
.site-nav__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3rem; }
.logo {
  display: inline-flex; align-items: center; height: 2.5rem; min-width: 7rem;
  text-decoration: none;
}
.logo img { height: 100%; width: auto; max-width: 12rem; }
.logo__text { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; letter-spacing: -0.03em; line-height: 1; }
.site-nav__menu { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.site-nav__menu a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.9rem;
  border-radius: var(--radius-pill); text-decoration: none; font-size: 0.95rem; color: var(--c-on-dark);
}
.site-nav__menu a:not(.btn):hover, .site-nav__menu a[aria-current="true"] { background: rgba(240,249,255,0.12); }
.site-nav__menu .btn { min-height: 2.75rem; padding: 0.5rem 1.25rem; margin-left: 0.25rem; }
.site-nav__toggle {
  display: none; min-width: 2.75rem; min-height: 2.75rem; padding: 0 1rem;
  border: 1px solid var(--c-line-dark); border-radius: var(--radius-pill);
  background: transparent; cursor: pointer; font-weight: 600;
}

@media (max-width: 52rem) {
  .js .site-nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav__menu { flex-direction: column; align-items: stretch; width: 100%; padding: 0.5rem 0 0.75rem; }
  .site-nav__menu a:not(.btn) { min-height: 3rem; }
  .site-nav__menu .btn { margin: 0.25rem 0 0; }
  .site-nav__bar { flex-wrap: wrap; }
  .js .site-nav__menu { display: none; }
  .js .site-nav.is-open .site-nav__menu { display: flex; }
  .site-nav { border-radius: 1.5rem; }
}
/* No-JS on small screens: menu stays visible below the logo */
@media (max-width: 52rem) { html:not(.js) .site-nav__menu { flex-direction: row; } }

/* Cards */
.card {
  position: relative; border-radius: var(--radius-card); padding: 2rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.tone-light .card { background: var(--c-surface-light); border: 1px solid var(--c-line-light); }
.tone-dark .card { background: var(--c-surface-dark); border: 1px solid var(--c-line-dark); }
.card p { color: var(--c-on-light-muted); }
.tone-dark .card p { color: var(--c-on-dark-muted); }
.card__visual {
  aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden;
  background: var(--c-dark); display: block; width: 100%;
}
.card__visual svg { width: 100%; height: 100%; }

/* Carousel */
.carousel { position: relative; }
.carousel__viewport { overflow-x: auto; touch-action: pan-y; }
.js .carousel__viewport { overflow: hidden; }
.carousel__track { display: flex; gap: 1.25rem; transition: transform 0.6s cubic-bezier(0.22, 0.8, 0.3, 1); }
.js .carousel__track { will-change: transform; }
.slide { flex: 0 0 min(88%, 30rem); }
.slide, .slide__group { display: flex; }
.slide__group { flex: 1; min-width: 0; }
.slide .card { height: 100%; flex: 1; }
.slide__tag { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-accent); }
.carousel__controls { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.carousel__btn {
  width: 3.25rem; height: 3.25rem; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--c-line-dark); background: transparent; color: var(--c-on-dark);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.carousel__btn:hover { border-color: var(--c-accent); }
.carousel__btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.carousel__btn[aria-disabled="true"]:hover { border-color: var(--c-line-dark); }
html:not(.js) .carousel__controls { display: none; }

/* Why points */
.why-point { border-top: 2px solid var(--c-on-primary); padding-top: 1.25rem; }
.why-point h3 { margin-bottom: 0.75rem; }
.why-point p { max-width: 28rem; }

/* Steps */
.step {
  border-radius: var(--radius-card); padding: 2rem;
  background: var(--c-surface-dark); border: 1px solid var(--c-line-dark);
}
.step__num { display: block; font-family: var(--font-display); font-style: italic; font-size: 3.5rem; line-height: 1; color: var(--c-accent); margin-bottom: 1.5rem; }
.step p { margin-top: 0.75rem; color: var(--c-on-dark-muted); }

/* Stats and testimonials */
.stat { border-top: 2px solid var(--c-dark); padding-top: 1rem; }
.stat__num { font-family: var(--font-display); font-size: clamp(3rem, 6vw, 4.75rem); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.counter { display: inline-block; min-width: 4ch; }
.stat__label { margin-top: 0.5rem; color: var(--c-on-light-muted); }
.placeholder-note { margin-bottom: 1.5rem; font-size: 0.875rem; font-weight: 600; color: var(--c-link-on-light); }
.quote { border-radius: var(--radius-card); padding: 2rem; background: var(--c-surface-light); border: 1px solid var(--c-line-light); }
.quote blockquote { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.3; }
.quote figcaption { margin-top: 1.25rem; font-size: 0.9rem; color: var(--c-on-light-muted); }
.quote__flag { display: block; margin-top: 0.25rem; font-weight: 600; color: var(--c-link-on-light); }

/* Newsletter form */
.newsletter { max-width: 34rem; }
.newsletter label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.newsletter__row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.newsletter input[type="email"] {
  flex: 1 1 14rem; min-width: 0; width: 100%; min-height: 3.25rem; padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill); border: 2px solid var(--c-line-dark);
  background: rgba(240,249,255,0.08); color: var(--c-on-dark); overflow-wrap: anywhere;
}
.newsletter input[aria-invalid="true"] { border-color: #FCA5A5; }
.newsletter .btn { flex: 0 0 auto; }
.newsletter__msg { min-height: 1.5rem; margin-top: 0.75rem; }
.newsletter__msg--error { color: #FCA5A5; }
.newsletter__msg--ok { color: var(--c-accent); }
.bot-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.footer__links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer__links a { color: var(--c-on-dark-muted); }

/* Chat widget: fixed launcher + panel, solid dark background regardless of
   the section tone scrolling beneath it (same precedent as .site-nav).
   Open/close only ever animates opacity/transform, per project convention;
   the global prefers-reduced-motion rule in motion.css zeroes the
   transition duration automatically. */
.chat-widget { position: fixed; z-index: 60; right: 1rem; bottom: 1rem; }
/* Deliberately NOT gated behind `html.js`/`:not(.js)` (unlike
   .carousel__controls below): the brief requires the chat widget to
   initialize and work independently of whether GSAP/ScrollTrigger/Lenis
   succeed, fail, or the failsafe strips the `js` class — see main.js,
   where P.chat.init() runs in all four start()/onChange() branches. With
   genuine no-JS the launcher is an inert no-op button, which is an
   acceptable, harmless degraded state. */
.chat-widget__launcher {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0.75rem 1.5rem;
  border: 1px solid var(--c-line-dark); border-radius: var(--radius-pill);
  background: var(--c-dark); color: var(--c-on-dark); font-weight: 600; cursor: pointer;
  transition: transform 0.25s ease;
}
.chat-widget__launcher:hover { transform: translate3d(0, -2px, 0); }

.chat-widget__panel {
  position: fixed; z-index: 60; right: 1rem; bottom: 5rem;
  width: min(92vw, 24rem);
  /* Capped well short of the viewport top so the panel can never overlap
     the skip-link (top-left) or .site-nav (top-center), even at 320px. */
  max-height: min(30rem, calc(100vh - 11rem));
  overflow-y: auto;
  background: var(--c-dark); color: var(--c-on-dark);
  border: 1px solid var(--c-line-dark); border-radius: var(--radius-card);
  padding: 1.25rem;
  opacity: 0; transform: translate3d(0, 12px, 0) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.chat-widget__panel.is-open { opacity: 1; transform: translate3d(0, 0, 0) scale(1); pointer-events: auto; }

.chat-widget__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.chat-widget__header h2 { font-size: 1.15rem; }
.chat-widget__close {
  min-width: 44px; min-height: 44px; padding: 0 1rem;
  border: 1px solid var(--c-line-dark); border-radius: var(--radius-pill);
  background: transparent; color: var(--c-on-dark); font-weight: 600; cursor: pointer;
}
.chat-widget__close:hover { border-color: var(--c-accent); }

.chat-widget__answer { min-height: 1.5rem; margin-bottom: 1rem; color: var(--c-on-dark-muted); }
.chat-widget__answer:empty { display: none; margin-bottom: 0; }
.chat-widget__answer h3 { font-size: 1rem; margin-bottom: 0.4rem; color: var(--c-on-dark); }

.chat-widget__search { margin-bottom: 1rem; }
.chat-widget__search label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.chat-widget__search-row { display: flex; gap: 0.5rem; }
.chat-widget__search-row input[type="text"] {
  flex: 1 1 auto; min-width: 0; min-height: 2.75rem; padding: 0.6rem 1rem;
  border-radius: var(--radius-pill); border: 2px solid var(--c-line-dark);
  background: rgba(240,249,255,0.08); color: var(--c-on-dark);
}
.chat-widget__search-row .btn { flex: 0 0 auto; min-height: 2.75rem; padding: 0.5rem 1.25rem; }

.chat-widget__list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.chat-widget__faq-btn {
  display: block; width: 100%; text-align: left; min-height: 2.75rem; padding: 0.6rem 1rem;
  border-radius: 1rem; border: 1px solid var(--c-line-dark); background: rgba(240,249,255,0.05);
  color: var(--c-on-dark); cursor: pointer; font: inherit;
}
.chat-widget__faq-btn:hover { border-color: var(--c-accent); }

.chat-widget__no-match { margin-bottom: 1rem; }
.chat-widget__no-match p { margin-bottom: 0.75rem; color: var(--c-on-dark-muted); }

.chat-widget__human label { display: block; margin-top: 0.75rem; margin-bottom: 0.5rem; font-weight: 600; }
.chat-widget__human input[type="email"] {
  width: 100%; min-height: 2.75rem; padding: 0.6rem 1rem;
  border-radius: var(--radius-pill); border: 2px solid var(--c-line-dark);
  background: rgba(240,249,255,0.08); color: var(--c-on-dark);
}
.chat-widget__human textarea {
  width: 100%; min-height: 6rem; padding: 0.75rem 1rem;
  border-radius: 1rem; border: 2px solid var(--c-line-dark);
  background: rgba(240,249,255,0.08); color: var(--c-on-dark); resize: vertical; font: inherit;
}
.chat-widget__human [aria-invalid="true"] { border-color: #FCA5A5; }
.chat-widget__counter { margin-top: 0.35rem; font-size: 0.8125rem; color: var(--c-on-dark-muted); }
.chat-widget__human .btn { margin-top: 1rem; }
