/* =====================================================
   COMMON — layout & behaviour shared by every page. Colors & fonts live in
   static/css/style.css.

   Breakpoints used everywhere:
     ≤ 1024px  iPad landscape / small laptops
     ≤ 860px   iPad portrait  (menu becomes a ☰ button)
     ≤ 600px   phones
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0 0 .5em; line-height: 1.1; text-wrap: balance; }
p { margin: 0 0 1em; }
.wrap { width: min(1140px, 100% - 64px); margin-inline: auto; }
.muted { color: var(--muted); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.sec { padding: 112px 0; }
.sec-head { max-width: 660px; margin: 0 0 56px; }
.sec-head.center { margin-inline: auto; text-align: center; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .9em 1.6em;
  font-weight: 600; font-size: 1rem; line-height: 1.2; border: 0; cursor: pointer; white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s; }
.btn-sm { padding: .6em 1.1em; font-size: .92rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; }
.nav > .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; flex-shrink: 0; }
.links { display: flex; align-items: center; gap: 32px; }
.links .only-menu { display: none; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.burger { display: none; background: none; border: 0; padding: 8px; margin-right: -8px; cursor: pointer; }
.burger .x { display: none; }
.burger.open .x { display: block; }
.burger.open .b { display: none; }

/* ---------- chat (shared mechanics) ---------- */
.chat { display: flex; flex-direction: column; height: 480px; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.chat-head strong { display: block; line-height: 1.2; }
.chat-head small { display: flex; align-items: center; gap: 6px; font-size: .8rem; opacity: .7; }
.online { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; }
.chat-body, .hero-chat { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.hero-chat { overflow: hidden; justify-content: flex-end; }
.chat-form { display: flex; gap: 8px; padding: 12px; }
.chat-form input { flex: 1; min-width: 0; font: inherit; font-size: 16px; outline: none; }
.chat-form button { flex-shrink: 0; display: grid; place-items: center; cursor: pointer; border: 0; }
.msg { max-width: 84%; padding: 10px 14px; font-size: .95rem; line-height: 1.45; word-wrap: break-word; animation: msgIn .3s ease both; }
.msg.user { align-self: flex-end; }
.msg.bot { align-self: flex-start; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .3; animation: dot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes dot { 40% { opacity: 1; transform: translateY(-3px); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { cursor: pointer; padding: 9px 15px; font-size: .9rem; font-weight: 500; }

/* ---------- pricing toggle ---------- */
.billing { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; font-size: .95rem; }
.billing span { opacity: .55; transition: opacity .2s; }
.billing span.active { opacity: 1; }
.billing em { font-style: normal; font-size: .82em; }
.switch { position: relative; width: 50px; height: 28px; border-radius: 99px; border: 0; cursor: pointer; padding: 0; }
.switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; opacity: 1 !important; transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.switch.on span { transform: translateX(22px); }
[data-monthly] { display: inline-block; transition: opacity .2s, transform .2s; }
[data-monthly].flip { opacity: 0; transform: translateY(-8px); }

/* ---------- FAQ ---------- */
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq-icon { position: relative; width: 14px; height: 14px; flex-shrink: 0; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; top: 6px; left: 0; width: 14px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s; }
.faq-icon::after { transform: rotate(90deg); }
.faq[open] .faq-icon::after { transform: rotate(0); }

/* ---------- contact ---------- */
.emails { display: grid; gap: 10px; }
.email { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.email small { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; opacity: .6; }
.email a { font-weight: 600; word-break: break-all; }
.copy { cursor: pointer; padding: 6px 14px; font-size: .82rem; font-weight: 600; flex-shrink: 0; }
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.form input, .form textarea { width: 100%; font: inherit; font-size: 16px; padding: 13px 16px; outline: none; resize: vertical; }

/* ---------- footer ---------- */
.footer { padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 32px; }
.footer h4 { font-size: .9rem; margin-bottom: 14px; }
.footer-grid > div > a:not(.brand) { display: block; padding: 4px 0; font-size: .93rem; opacity: .7; word-break: break-all; }
.footer-grid > div > a:not(.brand):hover { opacity: 1; }
.footer-brand p { margin-top: 12px; opacity: .7; font-size: .93rem; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 48px; padding-top: 24px; font-size: .85rem; opacity: .7; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100; transform: translate(-50%, 150%);
  padding: 14px 22px; font-weight: 600; font-size: .95rem; max-width: calc(100vw - 32px); width: max-content; text-align: center;
  transition: transform .4s cubic-bezier(.2, .9, .3, 1.2), visibility .4s; visibility: hidden; }
.toast.show { transform: translate(-50%, 0); visibility: visible; }

/* ---------- reveal on scroll: turned off (content is always visible, no pop-in) ---------- */

/* ---------- carousel dots (phones only) ---------- */
.dots { display: none; }

/* =====================================================
   iPAD LANDSCAPE / SMALL LAPTOP  (≤ 1024px)
   ===================================================== */
@media (max-width: 1024px) {
  .wrap { width: calc(100% - 56px); }
  .sec { padding: 96px 0; }
  .links { gap: 24px; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1.4fr; gap: 24px; }
}

/* =====================================================
   iPAD PORTRAIT  (≤ 860px)
   ===================================================== */
@media (max-width: 860px) {
  .sec { padding: 80px 0; }
  .sec-head { margin-bottom: 40px; }
  .burger { display: grid; }
  .nav-cta { display: none; }
  .links { position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 28px 28px; background: var(--menu-bg, var(--bg)); border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .25s, transform .25s;
    max-height: calc(100vh - 72px); overflow-y: auto; }
  .links.open { opacity: 1; transform: none; pointer-events: auto; }
  .links a { padding: 16px 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .links .only-menu { display: flex; margin-top: 20px; border-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  @media (max-width: 600px) { .footer-contact { grid-column: 1 / -1; } }
}

/* =====================================================
   PHONES  (≤ 600px)
   ===================================================== */
@media (max-width: 600px) {
  body { font-size: 15px; }
  .wrap { width: calc(100% - 40px); }
  .sec { padding: 56px 0; }
  .sec-head { margin-bottom: 28px; }
  .nav > .wrap { height: 62px; }
  .links { top: 62px; padding: 4px 20px 24px; max-height: calc(100vh - 62px); }
  .brand { font-size: 1.05rem; }
  .brand img { width: 26px; height: 26px; }
  .chat { height: 440px; }
  .msg { font-size: .92rem; max-width: 88%; }
  .chips { justify-content: center; }
  .chip { padding: 8px 12px; font-size: .84rem; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hide-phone { display: none !important; }
  .footer { padding: 44px 0 28px; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; margin-top: 32px; }

  /* swipeable cards */
  [data-carousel] { display: flex !important; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -20px; padding: 6px 20px 8px; scrollbar-width: none; position: relative; }
  [data-carousel]::-webkit-scrollbar { display: none; }
  [data-carousel] > * { flex: 0 0 86%; scroll-snap-align: center; }
  .dots { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
  .dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 99px; cursor: pointer;
    background: var(--dot, currentColor); opacity: .25; transition: width .3s, opacity .3s; }
  .dots button.active { width: 22px; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
