/* ==========================================================
   Floating tools: accessibility, dark/light, share, FAQ bot
   + dark theme + accessibility modes
   ========================================================== */

/* ---------- dark theme ---------- */
:root[data-theme="dark"] {
  --cream: #17120E;
  --sand: #1F1914;
  --white: #241D17;
  --stone: #3A3027;
  --taupe: #B8A388;
  --ink: #EFE6D8;
  --ink-2: #CDBFAD;
  --ink-3: #A39582;
  --line: rgba(239, 230, 216, .14);
  --accent: #C4A27C;
  color-scheme: dark;
}
/* containers that are dark in both themes keep the original token meaning */
:root[data-theme="dark"] .footer,
:root[data-theme="dark"] .menu,
:root[data-theme="dark"] .section--dark,
:root[data-theme="dark"] .cta,
:root[data-theme="dark"] .mbar,
:root[data-theme="dark"] .hero,
:root[data-theme="dark"] .phero {
  --cream: #F3ECE0; --ink: #0F0B08; --ink-2: #5E4F42; --stone: #D2C3AE; --white: #FBF8F3;
  --line: rgba(243, 236, 224, .16);
}
:root[data-theme="dark"] .header.is-solid,
:root[data-theme="dark"] .header--solid { background: rgba(23, 18, 14, .92); box-shadow: 0 1px 0 var(--line); }
:root[data-theme="dark"] .header.is-solid .logo__img--light,
:root[data-theme="dark"] .header--solid .logo__img--light { opacity: 1; }
:root[data-theme="dark"] .header.is-solid .logo__img--dark,
:root[data-theme="dark"] .header--solid .logo__img--dark { opacity: 0; }
:root[data-theme="dark"] .preloader__mark .logo__img { filter: invert(1) brightness(1.6); }
:root[data-theme="dark"] .gallery a, :root[data-theme="dark"] .pcard__img { background: #2A221B; }
:root[data-theme="dark"] .pcard__tag, :root[data-theme="dark"] .ba__lbl, :root[data-theme="dark"] .media-tag { background: rgba(23, 18, 14, .88); color: #EFE6D8; }
:root[data-theme="dark"] .field select option { color: #17120E; }
:root[data-theme="dark"] img { filter: brightness(.94); }
:root[data-theme="dark"] .logo__img { filter: none; }
html { transition: background-color .4s ease; }

/* ---------- floating buttons ---------- */
.fabs { position: fixed; left: 27px; bottom: 96px; z-index: 92; display: flex; flex-direction: column; gap: 10px; }
.fab {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: #1A1410; color: #F3ECE0; box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  transition: transform .35s var(--ease-out), background .3s, box-shadow .3s;
}
.fab svg { width: 22px; height: 22px; }
.fab:hover { transform: scale(1.08); }
.fab:focus-visible { outline: 3px solid #2563EB; outline-offset: 3px; }
.fab--share { background: #C2A15A; color: #fff; }
.fab--bot { background: #2E241C; color: #E4C88E; border: 1.5px solid #C2A15A; }
.fab--a11y { background: #1D4ED8; color: #fff; }
.fab .tip {
  position: absolute; left: calc(100% + 12px); white-space: nowrap; pointer-events: none;
  background: #1A1410; color: #F3ECE0; font-size: 13px; padding: 6px 10px; border-radius: 6px;
  opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s;
}
.fab { position: relative; }
.fab:hover .tip, .fab:focus-visible .tip { opacity: 1; transform: none; }
.theme-ico-moon { display: none; }
:root[data-theme="dark"] .theme-ico-sun { display: none; }
:root[data-theme="dark"] .theme-ico-moon { display: block; }
@media (max-width: 860px) {
  .fabs { left: 12px; bottom: 70px; gap: 8px; }
  .fab { width: 44px; height: 44px; }
  .fab svg { width: 20px; height: 20px; }
  .fab .tip { display: none; }
}

/* ---------- share popover ---------- */
.share-pop {
  position: fixed; left: 86px; bottom: 120px; z-index: 300; width: 230px;
  background: #fff; color: #1A1410; border-radius: 14px; padding: 10px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s, transform .3s var(--ease-out), visibility 0s .3s;
}
.share-pop.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .3s var(--ease-out); }
.share-pop h3 { font-size: 14px; font-weight: 500; padding: 6px 10px 10px; margin: 0; color: #5E4F42; }
.share-pop a, .share-pop button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 10px; font-size: 15px; text-align: right; color: inherit; }
.share-pop a:hover, .share-pop button:hover { background: #F4EFE7; }
.share-pop svg { width: 20px; height: 20px; flex: none; }
.share-pop .ok { color: #15803D; }
@media (max-width: 860px) { .share-pop { left: 12px; right: 12px; width: auto; bottom: 130px; } }

/* ---------- accessibility panel ---------- */
.a11y {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 600; width: min(440px, 100%);
  background: #EEF1F6; color: #111827; font-family: 'Heebo', Arial, sans-serif; font-weight: 400;
  display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0, 0, 0, .25);
  transform: translateX(105%); visibility: hidden; transition: transform .45s var(--ease-out), visibility 0s .45s;
  zoom: 1 !important; filter: none !important;
}
.a11y.is-open { transform: none; visibility: visible; transition: transform .45s var(--ease-out); }
.a11y * { letter-spacing: normal !important; word-spacing: normal !important; }
.a11y__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #fff; border-bottom: 1px solid #E5E7EB; }
.a11y__head h2 { font-size: 20px; font-weight: 600; margin: 0; flex: 1; }
.a11y__close { width: 46px; height: 46px; border-radius: 50%; background: #111827; color: #fff; display: grid; place-items: center; }
.a11y__close svg { width: 20px; height: 20px; }
.a11y__stmt { display: inline-flex; align-items: center; gap: 8px; background: #2563EB; color: #fff; border-radius: 999px; padding: 9px 16px; font-size: 15px; font-weight: 600; }
.a11y__stmt svg { width: 18px; height: 18px; }
.a11y__body { flex: 1; overflow-y: auto; padding: 14px; display: grid; gap: 12px; align-content: start; }
.a11y__reset { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 64px; border-radius: 999px; background: #E8175D; color: #fff; font-size: 19px; font-weight: 700; }
.a11y__reset svg { width: 22px; height: 22px; }
.a11y__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.a11y__tile {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 66px; padding: 10px 16px;
  background: #F8FAFC; border: 2px solid transparent; border-radius: 14px; font-size: 16px; font-weight: 500; text-align: right; color: #111827;
  transition: border-color .2s, background .2s;
}
.a11y__tile svg { width: 26px; height: 26px; flex: none; order: 2; }
.a11y__tile:hover { border-color: #CBD5E1; }
.a11y__tile[aria-pressed="true"] { border-color: #2563EB; background: #E8F0FE; color: #1D4ED8; }
.a11y__card { background: #fff; border-radius: 16px; padding: 16px; display: grid; gap: 12px; border: 1px solid #E5E7EB; }
.a11y__card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.a11y__card-head h3 { font-size: 17px; font-weight: 600; margin: 0; }
.a11y__pill { display: inline-flex; align-items: center; gap: 6px; background: #E8175D; color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.a11y__pill svg { width: 14px; height: 14px; }
.a11y__btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.a11y__btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 8px; background: #F3F4F6; border: 2px solid transparent; border-radius: 12px; font-size: 14px; font-weight: 500; color: #111827; text-align: center; }
.a11y__btn svg { width: 18px; height: 18px; flex: none; }
.a11y__btn[aria-pressed="true"] { border-color: #2563EB; background: #E8F0FE; color: #1D4ED8; }
.a11y__acc { display: flex; justify-content: space-between; align-items: center; width: 100%; font-size: 17px; font-weight: 600; color: #111827; }
.a11y__acc svg { width: 20px; height: 20px; transition: transform .3s; }
.a11y__acc[aria-expanded="true"] svg { transform: rotate(180deg); }
.a11y__toc { display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.a11y__toc a { display: block; padding: 8px 10px; border-radius: 8px; background: #F3F4F6; font-size: 15px; color: #111827; }
.a11y__toc a:hover { background: #E8F0FE; }
.a11y__toc a.lvl3 { margin-right: 14px; font-size: 14px; }
.a11y__foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #fff; border-top: 1px solid #E5E7EB; font-size: 15px; }
.a11y__foot a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #111827; }
.a11y__foot svg { width: 18px; height: 18px; }
.a11y__foot small { color: #6B7280; font-size: 13px; }
.a11y-backdrop { position: fixed; inset: 0; z-index: 590; background: rgba(0, 0, 0, .35); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.a11y-backdrop.is-open { opacity: 1; visibility: visible; transition: opacity .3s; }

/* ---------- accessibility modes (classes on <html>) ---------- */
html.a11y-readable body, html.a11y-readable body *:not(svg):not(svg *) { font-family: Arial, 'Heebo', sans-serif !important; }
html.a11y-wordspace main, html.a11y-wordspace footer { word-spacing: .3em !important; }
html.a11y-letterspace main, html.a11y-letterspace footer { letter-spacing: .1em !important; }
html.a11y-lineheight main *, html.a11y-lineheight footer * { line-height: 2 !important; }
html.a11y-highlight-links a:not(.a11y *):not(.fab) { background: #FFF2A8 !important; color: #111 !important; outline: 2px solid #111 !important; }
html.a11y-underline-links a:not(.a11y *) { text-decoration: underline !important; text-underline-offset: 4px !important; }
html.a11y-hide-images img:not(.logo__img):not(.a11y img), html.a11y-hide-images video, html.a11y-hide-images .hero__media, html.a11y-hide-images .cta__bg { visibility: hidden !important; }
html.a11y-img-desc img[alt]:not([alt=""]) { outline: 3px dashed #2563EB; outline-offset: -3px; }
html.a11y-big-cursor, html.a11y-big-cursor * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M8 4l30 18-13 3 8 15-6 3-8-15-11 9z' fill='%23111' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 4, auto !important; }
html.a11y-keyboard *:focus { outline: 4px solid #2563EB !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px rgba(37, 99, 235, .25) !important; }
html.a11y-stop-anim *, html.a11y-stop-anim *::before, html.a11y-stop-anim *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html.a11y-stop-anim [data-reveal], html.a11y-stop-anim .split-words .w > span, html.a11y-stop-anim .wave .ch, html.a11y-stop-anim .wink { opacity: 1 !important; transform: none !important; filter: none !important; }
html.a11y-stop-anim .reveal-img { clip-path: none !important; }
html.a11y-stop-anim .reveal-img img { transform: none !important; }
html.a11y-stop-anim .marquee__inner { transform: none !important; }
html.a11y-align-right main :is(p, h1, h2, h3, li, .lead) { text-align: right !important; }
html.a11y-align-center main :is(p, h1, h2, h3, li, .lead) { text-align: center !important; }
html.a11y-align-left main :is(p, h1, h2, h3, li, .lead) { text-align: left !important; }
html.a11y-invert body > *:not(.a11y):not(.a11y-backdrop) { filter: invert(1) hue-rotate(180deg); }
html.a11y-invert body > *:not(.a11y) img { filter: invert(1) hue-rotate(180deg); }
html.a11y-mono body > *:not(.a11y):not(.a11y-backdrop) { filter: grayscale(1); }
html.a11y-sat-high body > *:not(.a11y):not(.a11y-backdrop) { filter: saturate(1.8); }
html.a11y-sat-low body > *:not(.a11y):not(.a11y-backdrop) { filter: saturate(.4); }
html.a11y-dark-contrast body, html.a11y-dark-contrast main, html.a11y-dark-contrast section, html.a11y-dark-contrast footer, html.a11y-dark-contrast .header { background: #000 !important; color: #fff !important; }
html.a11y-dark-contrast main *:not(img):not(svg *) { color: #fff !important; border-color: #fff !important; }
html.a11y-dark-contrast main a { color: #FFE14D !important; }
html.a11y-light-contrast body, html.a11y-light-contrast main, html.a11y-light-contrast section, html.a11y-light-contrast footer, html.a11y-light-contrast .header { background: #fff !important; color: #000 !important; }
html.a11y-light-contrast main *:not(img):not(svg *) { color: #000 !important; border-color: #000 !important; }
html.a11y-light-contrast main a { color: #0000C8 !important; }
.reading-guide { position: fixed; left: 0; right: 0; height: 44px; z-index: 580; pointer-events: none; display: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45); border-top: 2px solid #FFD43B; border-bottom: 2px solid #FFD43B; }
html.a11y-guide .reading-guide { display: block; }

/* ---------- FAQ bot ---------- */
.bot {
  position: fixed; left: 24px; bottom: 96px; z-index: 400; width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100vh - 140px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; background: #F5F0E8; color: #2E241C;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .3); font-family: 'Heebo', Arial, sans-serif;
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.98); transform-origin: bottom left;
  transition: opacity .3s, transform .4s var(--ease-out), visibility 0s .4s;
}
.bot.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .4s var(--ease-out); }
.bot__head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #2E241C; color: #F3ECE0; }
.bot__avatar { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid #C2A15A; display: grid; place-items: center; color: #E4C88E; flex: none; }
.bot__avatar svg { width: 30px; height: 30px; }
.bot__title { flex: 1; line-height: 1.3; }
.bot__title b { display: block; font-size: 17px; font-weight: 500; }
.bot__title span { font-size: 13px; opacity: .7; }
.bot__close { width: 38px; height: 38px; display: grid; place-items: center; color: #F3ECE0; }
.bot__close svg { width: 22px; height: 22px; }
.bot__msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.bot__msg { max-width: 88%; padding: 11px 14px; border-radius: 16px; font-size: 15px; line-height: 1.6; white-space: pre-line; }
.bot__msg--bot { align-self: flex-start; background: #fff; border: 1px solid #EADFCB; border-top-right-radius: 4px; }
.bot__msg--user { align-self: flex-end; background: #2E241C; color: #F3ECE0; border-top-left-radius: 4px; }
.bot__msg a { color: #9A7B5B; text-decoration: underline; text-underline-offset: 3px; }
.bot__msg .bot__links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bot__msg .bot__links a { text-decoration: none; background: #F5F0E8; border: 1px solid #E2D3B6; border-radius: 999px; padding: 4px 10px; font-size: 13px; color: #2E241C; }
.bot__label { font-size: 13px; color: #8A7A6B; margin: 6px 4px 0; }
.bot__chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
.bot__chip { background: #fff; border: 1px solid #DCC59A; border-radius: 14px; padding: 9px 14px; font-size: 14.5px; color: #2E241C; text-align: right; transition: background .2s, border-color .2s; }
.bot__chip:hover { background: #FBF6EC; border-color: #C2A15A; }
.bot__typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 14px; background: #fff; border-radius: 16px; border: 1px solid #EADFCB; }
.bot__typing i { width: 6px; height: 6px; border-radius: 50%; background: #B8A388; animation: bot-dot 1s infinite; }
.bot__typing i:nth-child(2) { animation-delay: .15s; } .bot__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bot-dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.bot__form { display: flex; gap: 10px; align-items: center; padding: 12px; background: #fff; border-top: 1px solid #EADFCB; }
.bot__form input { flex: 1; height: 52px; border-radius: 999px; border: 1px solid #E2D3B6; padding: 0 18px; font: inherit; font-size: 15px; color: #2E241C; background: #FBF8F3; outline: none; }
.bot__form input:focus { border-color: #C2A15A; }
.bot__send { width: 52px; height: 52px; border-radius: 50%; background: #2E241C; color: #F3ECE0; display: grid; place-items: center; flex: none; }
.bot__send svg { width: 20px; height: 20px; transform: scaleX(-1); }
.bot__wa { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; background: #25D366; color: #fff !important; text-decoration: none !important; border-radius: 999px; padding: 7px 14px; font-size: 14px; }
@media (max-width: 860px) {
  .bot { left: 8px; right: 8px; width: auto; bottom: 64px; height: calc(100vh - 140px); height: calc(100svh - 140px); }
}

/* font size (accessibility) */
html.a11y-zoomed main, html.a11y-zoomed .footer { zoom: var(--a11y-zoom); }

/* ---------- bot launcher: right corner + speech bubble ---------- */
.bot-launch { position: fixed; right: 24px; bottom: 24px; z-index: 93; display: flex; align-items: center; gap: 14px; flex-direction: row-reverse; }
.bot-launch .fab--bot { width: 60px; height: 60px; animation: bot-bob 3.2s ease-in-out infinite; }
.bot-launch .fab--bot svg { width: 34px; height: 34px; }
@keyframes bot-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.bot-launch .fab--bot:hover { animation-play-state: paused; transform: scale(1.06); }
.bot-bubble {
  position: relative; max-width: 230px; padding: 12px 16px 12px 34px; border-radius: 16px; border-bottom-right-radius: 4px;
  background: #fff; color: #2E241C; border: 1px solid #E2D3B6; box-shadow: 0 12px 34px rgba(0, 0, 0, .18);
  font-family: 'Heebo', Arial, sans-serif; font-size: 15px; line-height: 1.45; font-weight: 400;
  transform-origin: right center; opacity: 0; transform: translateX(8px); transition: opacity 3.5s ease, transform 3.5s cubic-bezier(.16, 1, .3, 1);
}
.bot-bubble p { margin: 0; }
/* tail pointing at the bot's mouth */
.bot-bubble::after { content: ''; position: absolute; right: -7px; bottom: 16px; width: 14px; height: 14px; background: #fff; border-top: 1px solid #E2D3B6; border-right: 1px solid #E2D3B6; transform: rotate(45deg); }
.bot-bubble__x { position: absolute; top: 6px; left: 8px; width: 22px; height: 22px; border-radius: 50%; font-size: 17px; line-height: 1; color: #8A7A6B; display: grid; place-items: center; }
.bot-bubble__x:hover { background: #F4EFE7; color: #2E241C; }
@keyframes bubble-in { from { opacity: 0; transform: translateX(10px) scale(.8); } to { opacity: 1; transform: none; } }
.bot { left: auto; right: 24px; transform-origin: bottom right; }
:root[data-theme="dark"] .bot-bubble, :root[data-theme="dark"] .bot-bubble::after { background: #2A221B; color: #EFE6D8; border-color: #4A3D31; }
@media (max-width: 860px) {
  .bot-launch { right: 12px; bottom: 70px; }
  .bot-launch .fab--bot { width: 52px; height: 52px; }
  .bot-bubble { max-width: 190px; font-size: 14px; }
  .bot { left: 8px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .bot-launch .fab--bot, .bot-bubble { animation: none; } }

/* privacy consent: fades in softly over 5s */
.consent { position: fixed; z-index: 120; inset: auto 0 24px 0; margin-inline: auto; width: min(640px, calc(100% - 32px)); background: var(--white, #FBF8F3); color: var(--ink, #2E241C); border: 1px solid rgba(46, 36, 28, .14); box-shadow: 0 24px 60px -20px rgba(46, 36, 28, .45); padding: 34px 30px 26px; font-size: 15px; line-height: 1.75; opacity: 0; transform: translateY(14px); transition: opacity 5s ease, transform 5s cubic-bezier(.16, 1, .3, 1); }
.consent.is-in { opacity: 1; transform: none; }
.consent.is-out { opacity: 0; transform: translateY(14px); transition-duration: .5s; }
.consent p { margin: 0; color: var(--ink-2, #5E4F42); }
.consent__link { display: inline-block; margin-top: 12px; color: var(--ink, #2E241C); text-decoration: underline; text-underline-offset: 4px; font-weight: 500; }
.consent__ok { display: block; width: 100%; margin-top: 22px; height: 56px; border: 0; background: var(--accent, #9A7B5B); color: #fff; font: 500 17px/1 var(--f-he, sans-serif); letter-spacing: .04em; cursor: pointer; transition: background .3s; }
.consent__ok:hover, .consent__ok:focus-visible { background: var(--ink, #2E241C); }
.consent__x { position: absolute; top: 10px; inset-inline-start: 10px; width: 36px; height: 36px; display: grid; place-items: center; background: transparent; border: 1px solid rgba(46, 36, 28, .25); color: var(--ink, #2E241C); cursor: pointer; }
.consent__x:hover { background: rgba(46, 36, 28, .06); }
@media (max-width: 860px) { .consent { bottom: calc(68px + env(safe-area-inset-bottom)); padding: 30px 18px 18px; font-size: 13.5px; line-height: 1.65; } .consent__ok { height: 50px; font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .consent { transition: opacity .3s; transform: none; } }
html.dark .consent, [data-theme="dark"] .consent { background: #2a211a; color: #F3ECE0; border-color: rgba(243, 236, 224, .18); }
html.dark .consent p, [data-theme="dark"] .consent p { color: #d9cdbd; }
html.dark .consent__link, html.dark .consent__x, [data-theme="dark"] .consent__link, [data-theme="dark"] .consent__x { color: #F3ECE0; }
.footer__legal { display: inline-flex; gap: 22px; flex-wrap: wrap; }
.bot-bubble.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .bot-bubble { transition: opacity .3s; transform: none; } }
