/* ==========================================================================
   Architive – base styles
   Tokens, typography, buttons, header, menus, footer, chat, motion primitives.
   Colour scheme taken from the client's approved dummy: warm off-white,
   near-black, signal yellow. Bootstrap 5.3 supplies the grid + utilities.
   ========================================================================== */

/* ---- Fonts (self-hosted, variable) ------------------------------------- */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 400 900; font-display: swap; src: url('../fonts/playfair-display-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 400 900; font-display: swap; src: url('../fonts/playfair-display-latin-wght-italic.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap; src: url('../fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2'); }

/* ---- Tokens -------------------------------------------------------------- */
:root {
  --bg: #FBFBF9;
  --bg-alt: #F4F4F0;
  --surface: #FFFFFF;
  --surface-2: #F6F6F2;
  --ink: #141414;
  --ink-2: #55554F;
  --ink-3: #8A8A83;
  --line: #E6E6E0;
  --line-2: #D5D5CD;
  --accent: #FFD60A;
  --accent-2: #F2C800;
  --accent-ink: #141414;
  --dark: #141414;
  --dark-2: #1D1D1B;
  --on-dark: #F5F5F0;
  --on-dark-2: #A8A8A0;
  --on-dark-line: rgba(255, 255, 255, .14);
  --shadow-sm: 0 1px 2px rgba(20, 20, 20, .04), 0 6px 18px rgba(20, 20, 20, .05);
  --shadow-md: 0 18px 50px -18px rgba(20, 20, 20, .22);
  --shadow-lg: 0 40px 90px -30px rgba(20, 20, 20, .35);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --f-display: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --f-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --header-h: 76px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0E0E0E;
  --bg-alt: #141413;
  --surface: #1A1A19;
  --surface-2: #222220;
  --ink: #F5F5F0;
  --ink-2: #B5B5AD;
  --ink-3: #80807A;
  --line: #2B2B29;
  --line-2: #3B3B38;
  --dark: #060606;
  --dark-2: #111110;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .35);
  --shadow-md: 0 18px 50px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

/* ---- Reset on top of Bootstrap ------------------------------------------ */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--f-body); font-size: 1rem; line-height: 1.7; font-weight: 300;   /* client dummy body text is Plus Jakarta Sans Light */
  color: var(--ink); background: var(--bg); overflow-x: clip;   /* clip (not hidden) so the sticky header keeps working */
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
img, svg, video { max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 500; line-height: 1.15; color: inherit; }
b, strong { font-weight: 600; }   /* 'bolder' of a light body would only reach 400 */
input, textarea, select, button { font-weight: 400; }
p { margin: 0 0 1rem; }
ul, ol { padding: 0; margin: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #141414; }
main:focus { outline: none; }
.ic { width: 1em; height: 1em; flex: none; }

.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 3000; background: var(--accent); color: #141414; padding: .7rem 1.1rem; border-radius: 999px; font-weight: 700; transition: top .25s var(--ease); }
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--wide { max-width: 1380px; }
.wrap--narrow { max-width: 880px; }

/* ---- Type system --------------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .8rem; margin: 0 0 1.4rem;
  font: 600 .72rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); border-radius: 2px; flex: none; }
.eyebrow--center { justify-content: center; }
.eyebrow--center::after { content: ""; width: 26px; height: 2px; background: var(--accent); border-radius: 2px; }
.eyebrow--light { color: rgba(255, 255, 255, .78); }

.display-h {
  font-family: var(--f-display); font-weight: 400; letter-spacing: -.012em; line-height: 1.08;
  font-size: clamp(2.05rem, 4.3vw, 3.55rem); margin: 0 0 1.4rem; text-wrap: balance;
}
.display-h em, .page-hero__title em { font-style: italic; font-weight: 400; }
.display-h--light { color: var(--on-dark); }
.section--dark .display-h em, .display-h--light em { color: var(--accent); }
.display-h--sm { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.lead-p { font-size: clamp(1.02rem, 1.4vw, 1.14rem); color: var(--ink-2); line-height: 1.75; max-width: 62ch; }
.section--dark .lead-p { color: var(--on-dark-2); }
.mono-note { font: 400 .74rem/1.6 var(--f-mono); color: var(--ink-3); letter-spacing: .02em; margin-top: 1rem; }
.mono-note--light { color: rgba(255, 255, 255, .62); }
.text-balance { text-wrap: balance; }

/* ---- Buttons ------------------------------------------------------------- */
.btn-ay {
  --b: var(--accent);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .65rem; overflow: hidden;
  padding: .95rem 1.55rem; border: 0; border-radius: 999px; cursor: pointer; isolation: isolate;
  background: var(--b); color: var(--accent-ink) !important;
  font: 700 .76rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 8px 22px -10px rgba(255, 214, 10, .8);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.btn-ay::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%);
  transform: translateX(-120%); transition: transform .8s var(--ease);
}
.btn-ay:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(255, 214, 10, .95); }
.btn-ay:hover::before { transform: translateX(120%); }
.btn-ay:active { transform: translateY(0) scale(.98); }
.btn-ay .ic { transition: transform .45s var(--ease); font-size: 1.15em; }
.btn-ay:hover .ic { transform: translateX(4px); }
.btn-ay--sm { padding: .7rem 1.1rem; font-size: .7rem; }
.btn-ay--lg { padding: 1.15rem 2rem; font-size: .82rem; }
.btn-ay--block { display: flex; width: 100%; }
.btn-ay--dark { --b: var(--dark); color: var(--on-dark) !important; box-shadow: var(--shadow-sm); }
.btn-ay--dark:hover { box-shadow: var(--shadow-md); }
.btn-ay--dark::before { background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .18) 50%, transparent 80%); }
.btn-ay--ghost { --b: transparent; border: 1px solid var(--line-2); color: var(--ink) !important; box-shadow: none; }
.btn-ay--ghost:hover { border-color: var(--ink); box-shadow: none; }
.btn-ay__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .55rem; font: 700 .74rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; padding-bottom: .35rem; transition: background-size .5s var(--ease);
}
.link-arrow:hover { background-size: 100% 1px; }
.link-arrow .ic { transition: transform .4s var(--ease); }
.link-arrow:hover .ic { transform: translateX(4px); }
.link-arrow--light { color: #fff; }

/* ---- Scroll progress / to-top / curtain --------------------------------- */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 1200; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.to-top {
  position: fixed; right: 1.1rem; bottom: 5.4rem; z-index: 900; width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(14px); transition: .4s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); border-color: var(--accent); color: #141414; transform: translateY(-3px); }

.curtain { position: fixed; inset: 0; z-index: 2500; pointer-events: none; background: var(--dark); transform: translateY(-101%); }
.curtain::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 6px; background: var(--accent); }
html.is-leaving .curtain { transform: translateY(0); transition: transform .5s var(--ease-io); pointer-events: all; }
html.is-entering .curtain { transform: translateY(0); animation: curtain-out .8s var(--ease-io) .08s forwards; }
@keyframes curtain-out { to { transform: translateY(101%); } }

/* ---- Header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 1000; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent; transition: height .35s var(--ease), border-color .3s, box-shadow .3s, background-color .4s;
}
.site-header.is-scrolled { height: calc(var(--header-h) - 10px); border-bottom-color: var(--line); box-shadow: 0 8px 30px -20px rgba(0, 0, 0, .25); }   /* always visible; slightly compact once scrolled */
.site-header.is-scrolled .brand__img { height: 40px; }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

/* Logo (client file). Dark-lettered version on light theme, light-lettered version on dark theme / footer. */
.brand { display: inline-flex; align-items: center; line-height: 0; }
.brand__img { display: block; height: 46px; width: auto; flex: none; object-fit: contain; transform: translateY(9%); transition: height .35s var(--ease), transform .5s var(--ease); }   /* 9% drop lines the wordmark up with the nav text */
.brand__img--light { display: none; }
[data-theme="dark"] .brand__img--dark { display: none; }
[data-theme="dark"] .brand__img--light { display: block; }
.brand--light .brand__img--dark { display: none !important; }
.brand--light .brand__img--light { display: block !important; }
.brand--light .brand__img { height: 50px; transform: none; }
.header-logo { display: flex; align-items: center; flex: none; }
.header-logo:hover .brand__img { transform: translateY(9%) scale(1.03); }

.main-nav__list { display: flex; align-items: center; gap: .4rem; }
.main-nav__item { position: relative; display: flex; align-items: center; }
.main-nav__link {
  position: relative; display: block; padding: .6rem .9rem; font: 500 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2);
  transition: color .3s;
}
.main-nav__link::after { content: ""; position: absolute; left: .9rem; right: .9rem; bottom: .2rem; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s var(--ease); border-radius: 2px; }
.main-nav__link:hover, .main-nav__item.is-active > .main-nav__link { color: var(--ink); }
.main-nav__link:hover::after, .main-nav__item.is-active > .main-nav__link::after { transform: scaleX(1); }
.mega-toggle { margin-left: -.55rem; width: 26px; height: 26px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; border-radius: 50%; }
.mega-toggle .ic { font-size: .95rem; transition: transform .4s var(--ease); }
.has-mega.open .mega-toggle .ic, .has-mega:hover .mega-toggle .ic { transform: rotate(180deg); }

.mega {
  position: absolute; top: 100%; left: 50%; width: 620px; padding-top: 1rem; transform: translate(-50%, 12px); opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), transform .45s var(--ease), visibility .35s;
}
.mega > * { position: relative; }
.mega::before { content: ""; position: absolute; top: 1rem; left: 0; right: 0; bottom: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); }
.has-mega:hover .mega, .has-mega:focus-within .mega, .has-mega.open .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.mega__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; padding: .8rem .8rem 0; }
.mega__link { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem; border-radius: var(--r-sm); transition: background .3s; }
.mega__link:hover { background: var(--bg-alt); }
.mega__link strong { display: block; font-size: .92rem; font-weight: 600; line-height: 1.3; }
.mega__link small { display: block; margin-top: .2rem; font-size: .78rem; color: var(--ink-3); line-height: 1.45; }
.mega__icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--bg-alt); color: var(--ink); font-size: 1.15rem; transition: background .3s, transform .5s var(--ease); }
.mega__link:hover .mega__icon { background: var(--accent); color: #141414; transform: rotate(-6deg) scale(1.06); }
.mega__all { display: flex; align-items: center; justify-content: space-between; margin: .5rem .8rem .8rem; padding: .85rem .9rem; border-top: 1px solid var(--line); font: 700 .7rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.mega__all .ic { transition: transform .4s var(--ease); }
.mega__all:hover .ic { transform: translateX(5px); }

.header-actions { display: flex; align-items: center; gap: .8rem; }
.theme-toggle { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid transparent; background: transparent; cursor: pointer; display: grid; place-items: center; transition: background .3s, transform .5s var(--ease); }
.theme-toggle:hover { background: var(--bg-alt); transform: rotate(18deg); }
.theme-toggle .ic { position: absolute; font-size: 1.15rem; transition: transform .6s var(--ease), opacity .4s; }
.theme-toggle__sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
[data-theme="dark"] .theme-toggle__moon { opacity: 0; transform: rotate(90deg) scale(.4); }
[data-theme="dark"] .theme-toggle__sun { opacity: 1; transform: none; }

.menu-toggle { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; transition: background .3s; }
.menu-toggle span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .4s var(--ease), width .4s var(--ease); }
.menu-toggle span:nth-child(2) { width: 12px; align-self: flex-end; margin-right: 13px; }
.menu-toggle:hover span:nth-child(2) { width: 18px; margin-right: 0; }

/* ---- Mobile menu (Bootstrap offcanvas, restyled) ------------------------- */
.mobile-menu.offcanvas { --bs-offcanvas-width: min(100%, 440px); background: var(--dark); color: var(--on-dark); border-left: 0; padding: 1.2rem 1.5rem 1.6rem; z-index: 2100; }
.offcanvas-backdrop { z-index: 2050; }
.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
.mobile-menu .eyebrow { color: var(--on-dark-2); margin: 0; }
.menu-close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--on-dark-line); background: transparent; color: var(--on-dark); display: grid; place-items: center; font-size: 1.2rem; cursor: pointer; transition: transform .5s var(--ease), background .3s; }
.menu-close:hover { background: var(--accent); color: #141414; transform: rotate(90deg); }
.mobile-menu__nav { flex: 1; overflow-y: auto; padding: 1.2rem 0; }
.mobile-menu__nav > ul > li { border-bottom: 1px solid var(--on-dark-line); opacity: 0; transform: translateX(26px); }
.mobile-menu.show .mobile-menu__nav > ul > li { opacity: 1; transform: none; transition: opacity .6s var(--ease) calc(.12s + var(--i) * .06s), transform .7s var(--ease) calc(.12s + var(--i) * .06s); }
.mobile-menu__nav > ul > li > a { display: block; padding: .85rem 0; font: 400 clamp(1.7rem, 7vw, 2.2rem)/1.1 var(--f-display); }
.mobile-menu__nav a:hover { color: var(--accent); }
.mobile-menu__sub { padding: 0 0 1rem; display: grid; gap: .1rem; }
.mobile-menu__sub a { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; font-size: .95rem; color: var(--on-dark-2); }
.mobile-menu__sub .ic { color: var(--accent); }
.mobile-menu__foot { display: grid; gap: 1rem; }
.mobile-menu__mail { font: 400 .85rem var(--f-mono); color: var(--on-dark); text-align: center; }
.mobile-menu .mono-note { color: var(--on-dark-2); text-align: center; margin: 0; }

/* ---- Breadcrumbs ---------------------------------------------------------- */
.crumbs { margin-bottom: 2rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; font: 500 .7rem/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; opacity: .5; }
.crumbs a { opacity: .75; transition: opacity .3s; } .crumbs a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { opacity: 1; }

/* ---- Footer --------------------------------------------------------------- */
.site-footer { position: relative; border-top: 1px solid var(--on-dark-line); background: var(--dark); color: var(--on-dark); padding: clamp(3.5rem, 7vw, 5.5rem) 0 2rem; overflow: hidden; }
.site-footer::before { content: "ARCHITIVE"; position: absolute; left: 50%; bottom: -.18em; transform: translateX(-50%); font: 800 clamp(5rem, 22vw, 20rem)/1 var(--f-body); letter-spacing: .06em; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .05); white-space: nowrap; pointer-events: none; user-select: none; }
.site-footer .wrap { position: relative; }
.footer-about { margin: 1.4rem 0 1.1rem; max-width: 40ch; font-size: .92rem; color: var(--on-dark-2); line-height: 1.75; }
.footer-mail { font: 500 .85rem var(--f-mono); color: var(--on-dark); background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat; transition: background-size .4s var(--ease), color .3s; padding-bottom: 2px; }
.footer-mail:hover { color: var(--accent); background-size: 100% 1px; }
.footer-h { font: 700 .74rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark); margin: 0 0 1.3rem; }
.footer-h--spaced { margin-top: 2rem; }
.footer-list { display: grid; gap: .65rem; }
.footer-list a, .footer-list li { font: 400 .84rem/1.4 var(--f-mono); color: var(--on-dark-2); }
.footer-list a { position: relative; display: inline-block; transition: color .3s, transform .4s var(--ease); }
.footer-list a:hover { color: var(--accent); transform: translateX(5px); }
.footer-addr p { margin: 0 0 1rem; font: 400 .82rem/1.55 var(--f-mono); color: var(--on-dark-2); }
.footer-addr strong { color: var(--on-dark); font-weight: 700; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.6rem; border-top: 1px solid var(--on-dark-line); font: 400 .74rem/1.6 var(--f-mono); color: var(--on-dark-2); }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }
.footer-legal a { transition: color .3s; } .footer-legal a:hover { color: var(--accent); }
.footer-top-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--on-dark); }

/* ---- Chat widget ---------------------------------------------------------- */
.chat { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 950; }
.chat-fab { display: inline-flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem .7rem .7rem; border: 0; border-radius: 999px; cursor: pointer; background: #111; color: #fff; font: 600 .86rem/1 var(--f-body); box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .55); transition: transform .45s var(--ease), box-shadow .45s; }
[data-theme="dark"] .chat-fab { background: #fff; color: #111; }
.chat-fab:hover { transform: translateY(-3px); }
.chat-fab__icon { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #141414; display: grid; place-items: center; font-size: .95rem; animation: pulse-ring 2.8s infinite; }
.chat-fab__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(255, 214, 10, .6); } 70% { box-shadow: 0 0 0 12px rgba(255, 214, 10, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 214, 10, 0); } }
.chat-panel { position: absolute; right: 0; bottom: calc(100% + .8rem); width: min(380px, calc(100vw - 2.2rem)); max-height: min(560px, calc(100vh - 8rem)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-lg); overflow: hidden; transform-origin: 100% 100%; animation: chat-in .5s var(--ease); }
.chat-panel[hidden] { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateY(16px) scale(.94); } }
.chat-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.1rem; background: var(--dark); color: var(--on-dark); }
.chat-panel__head strong { display: block; font-size: .95rem; }
.chat-panel__head small { color: var(--on-dark-2); font: 400 .7rem var(--f-mono); }
.chat-panel__close { border: 0; background: transparent; color: var(--on-dark); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; font-size: 1.1rem; }
.chat-panel__close:hover { background: rgba(255, 255, 255, .12); }
.chat-panel__log { flex: 1; overflow-y: auto; padding: 1rem; display: grid; gap: .6rem; align-content: start; background: var(--bg); min-height: 120px; }
.bubble { max-width: 88%; padding: .7rem .95rem; border-radius: 16px; font-size: .86rem; line-height: 1.55; animation: bubble-in .45s var(--ease); }
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px); } }
.bubble--bot { background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 4px; }
.bubble--me { justify-self: end; background: var(--accent); color: #141414; border-top-right-radius: 4px; font-weight: 500; }
.chat-panel__chips { display: flex; flex-wrap: wrap; gap: .45rem; padding: .8rem 1rem; border-top: 1px solid var(--line); max-height: 150px; overflow-y: auto; }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: .42rem .8rem; font: 500 .72rem/1.2 var(--f-body); cursor: pointer; transition: .3s; color: var(--ink); text-align: left; }
.chip:hover { background: var(--accent); border-color: var(--accent); color: #141414; }
.chat-panel__foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .8rem 1rem; border-top: 1px solid var(--line); }
.chat-panel__link { font: 700 .7rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; }

/* ---- Reveal / split-text motion primitives ------------------------------- */
.js [data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease) var(--d, 0s), transform 1s var(--ease) var(--d, 0s); will-change: opacity, transform; }
.js [data-reveal="left"] { transform: translateX(-44px); }
.js [data-reveal="right"] { transform: translateX(44px); }
.js [data-reveal="zoom"] { transform: scale(.92); }
.js [data-reveal="mask"] { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); transition: clip-path 1.2s var(--ease-io) var(--d, 0s); }
.js [data-reveal="mask"].is-in { clip-path: inset(0 0 0 0); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-split] { opacity: 1; }
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .08em .14em 0; margin: 0 -.08em -.14em 0; }
.js [data-split] .w > span { display: inline-block; transform: translateY(108%) rotate(3deg); transform-origin: 0 100%; transition: transform 1.1s var(--ease) calc(var(--d, 0s) + var(--wi) * 55ms); }
.js [data-split].is-in .w > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js [data-split] .w > span { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .curtain { display: none; }
}

@media (max-width: 575.98px) {
  :root { --header-h: 66px; }
  .brand__img { height: 34px; }
  .site-header.is-scrolled { height: calc(var(--header-h) - 8px); }
  .site-header.is-scrolled .brand__img { height: 30px; }
  .brand--light .brand__img { height: 42px; }
  .header-actions { gap: .5rem; }
  .chat-fab__label, .chat-fab__dot { display: none; }
  .chat-fab { padding: .6rem; }
  .to-top { bottom: 4.6rem; right: 1rem; }
}

/* Keep Bootstrap's large row gutters inside the page gutter on small screens (prevents horizontal scroll). */
@media (max-width: 767.98px) { .row.g-5 { --bs-gutter-x: 2rem; --bs-gutter-y: 2.2rem; } }
html { overflow-x: clip; }

/* very small phones: keep logo + toggles on one line */
@media (max-width: 380px) {
  .brand__img { height: 29px; }
  .site-header.is-scrolled .brand__img { height: 27px; }
  .header-inner { gap: .75rem; }
  .header-actions { gap: .35rem; }
  .theme-toggle, .menu-toggle { width: 38px; height: 38px; }
}

/* laptop/tablet landscape: smaller logo + tighter nav so nothing is squeezed or wraps */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .brand__img { height: 36px; }
  .site-header.is-scrolled .brand__img { height: 33px; }
  .header-inner { gap: 1rem; }
  .main-nav__link { padding: .6rem .55rem; letter-spacing: .1em; }
  .main-nav__list { gap: .1rem; }
  .header-actions { gap: .5rem; }
  .header-actions .btn-ay--sm { padding: .65rem .85rem; }
}
