/* ==========================================================================
   Tokyo LLC — Design system
   ========================================================================== */

:root {
  /* Brand */
  --blue: #2A7FC9;
  --blue-600: #1F6FB5;
  --blue-700: #145A99;
  --blue-300: #7CB6E8;
  --blue-soft: #EAF3FC;

  /* Ink / neutrals */
  --ink: #0A1628;
  --ink-800: #14243B;
  --ink-700: #1D3556;
  --slate: #475569;
  --muted: #64748B;
  --line: #E4EAF2;
  --line-soft: #EEF2F8;
  --bg: #F6F8FC;
  --white: #FFFFFF;
  --cream: #FBF6E4;

  /* Effects */
  --shadow-sm: 0 2px 8px rgba(10, 22, 40, .05);
  --shadow-md: 0 12px 30px rgba(10, 22, 40, .08);
  --shadow-lg: 0 28px 64px rgba(10, 22, 40, .12);
  --shadow-blue: 0 18px 38px rgba(42, 127, 201, .28);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --font-body: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-head: "Plus Jakarta Sans", Inter, system-ui, sans-serif;

  --header-h: 78px;
  --container: 1200px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--slate);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  margin: 0 0 .6em;
  font-family: var(--font-head);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.035em;
}

h1 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); letter-spacing: -.045em; }
h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); }
h3 { font-size: 1.2rem; letter-spacing: -.02em; }
h4 { font-size: .95rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--blue); color: #fff; }

:focus-visible {
  outline: 3px solid var(--blue-300);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 0 0 12px 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 0; }

/* --------------------------------------------------------------------------
   Scroll progress
   -------------------------------------------------------------------------- */

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 120;
  pointer-events: none;
  background: transparent;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue-300), var(--blue), var(--blue-700));
  box-shadow: 0 0 14px rgba(42, 127, 201, .6);
  transition: width .08s linear;
}

/* --------------------------------------------------------------------------
   Topbar
   -------------------------------------------------------------------------- */

.topbar {
  position: relative;
  z-index: 60;
  background: var(--ink);
  color: rgba(255, 255, 255, .72);
  font-size: .82rem;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 42px;
  padding-block: 6px;
}
.topbar p { margin: 0; }
.topbar-note,
.topbar-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.topbar svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--blue-300);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topbar-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 600;
}
.topbar-links a { transition: color .2s var(--ease); }
.topbar-links a:hover { color: #fff; }
.topbar-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, .18);
}

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .92);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(10, 22, 40, .06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.brand img {
  width: 138px;
  height: auto;
  transition: transform .35s var(--ease-out);
}
.brand:hover img { transform: scale(1.04) rotate(-1deg); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  position: relative;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--ink-800);
  font-weight: 600;
  font-size: .95rem;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.nav-link:hover { color: var(--blue-700); background: var(--blue-soft); }
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--blue-700); }

.nav-cta { margin-left: 10px; }
.wa-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav-actions { display: none; align-items: center; gap: 8px; }
.nav-chat {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-700) 100%);
  box-shadow: 0 8px 20px rgba(42, 127, 201, .28);
  cursor: pointer;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease), filter .2s var(--ease);
}
.nav-chat:hover { transform: translateY(-2px); filter: brightness(1.06); }
.nav-chat .wa-icon { width: 22px; height: 22px; }
.nav-chat[aria-expanded="true"],
.nav-cta[aria-expanded="true"] { box-shadow: 0 0 0 4px rgba(42, 127, 201, .2); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.01em;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .88rem; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .3s var(--ease-out);
}
.btn:hover .btn-arrow { transform: translateX(4px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-700) 100%);
  box-shadow: var(--shadow-blue);
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blue-600), #0F4C85);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary > * { position: relative; z-index: 1; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 24px 48px rgba(42, 127, 201, .36); }

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, .7);
  border-color: var(--line);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  transform: translateY(-3px);
  border-color: var(--blue-300);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.btn-light {
  color: var(--blue-700);
  background: var(--white);
  box-shadow: 0 18px 38px rgba(4, 22, 44, .3);
}
.btn-light:hover { transform: translateY(-3px); background: var(--cream); }

.btn-outline-light {
  color: #fff;
  border-color: rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .06);
}
.btn-outline-light:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .6);
}

/* --------------------------------------------------------------------------
   Reveal animations
   -------------------------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].in {
  opacity: 1;
  transform: none;
}

.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(.6em) rotate(2deg);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--word-delay, 0ms);
}
.word.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(64px, 9vw, 116px) 0 clamp(72px, 8vw, 104px);
  background: linear-gradient(170deg, #071324 0%, #0A1628 42%, #10243D 100%);
  color: rgba(255, 255, 255, .78);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hero-grid-lines {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(124, 182, 232, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 182, 232, .09) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 80% 65% at 50% 35%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 35%, #000 20%, transparent 78%);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  will-change: transform;
}
.orb-1 {
  top: -14%;
  right: -6%;
  width: 46vw;
  height: 46vw;
  max-width: 620px;
  max-height: 620px;
  background: radial-gradient(circle at 35% 35%, rgba(42, 127, 201, .85), transparent 68%);
  animation: float-a 16s ease-in-out infinite;
}
.orb-2 {
  bottom: -22%;
  left: -10%;
  width: 40vw;
  height: 40vw;
  max-width: 540px;
  max-height: 540px;
  background: radial-gradient(circle at 60% 40%, rgba(20, 90, 153, .8), transparent 66%);
  animation: float-b 20s ease-in-out infinite;
}
.orb-3 {
  top: 34%;
  left: 42%;
  width: 26vw;
  height: 26vw;
  max-width: 360px;
  max-height: 360px;
  background: radial-gradient(circle, rgba(251, 246, 228, .16), transparent 70%);
  animation: float-a 24s ease-in-out infinite reverse;
}

@keyframes float-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-24px, 30px, 0) scale(1.07); }
}
@keyframes float-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(34px, -26px, 0) scale(1.05); }
}

.hero-inner { position: relative; }
.hero-copy { max-width: 940px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  padding: 8px 18px 8px 14px;
  border: 1px solid rgba(124, 182, 232, .32);
  border-radius: 999px;
  background: rgba(124, 182, 232, .1);
  color: #CFE4F7;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
  backdrop-filter: blur(8px);
}
.pill-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #56D18B;
}
.pill-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #56D18B;
  animation: ping 2.2s var(--ease-out) infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: .7; }
  80%, 100% { transform: scale(2.8); opacity: 0; }
}

.hero-title {
  max-width: 17ch;
  margin-bottom: 26px;
  color: #fff;
  text-wrap: balance;
}
.hero-title .word-accent { color: #8FC3EC; }

.hero-text {
  max-width: 62ch;
  margin-bottom: 34px;
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  color: rgba(255, 255, 255, .72);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}
.hero-actions .btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .22);
}
.hero-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .5);
  box-shadow: none;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .62);
}
.hero-trust li { display: inline-flex; align-items: center; gap: 9px; }
.hero-trust svg {
  width: 17px;
  height: 17px;
  padding: 2px;
  border-radius: 50%;
  background: rgba(86, 209, 139, .16);
  fill: none;
  stroke: #56D18B;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(48px, 6vw, 72px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}
.stat {
  padding: 28px 26px;
  background: rgba(10, 22, 40, .55);
  backdrop-filter: blur(10px);
  transition: background .3s var(--ease);
}
.stat:hover { background: rgba(42, 127, 201, .16); }
.stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: #fff;
}
.stat-text { background: linear-gradient(120deg, #7CB6E8, #FBF6E4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label {
  display: block;
  margin-top: 10px;
  font-size: .84rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .6);
}

/* --------------------------------------------------------------------------
   Marquee band
   -------------------------------------------------------------------------- */

.marquee-band {
  padding: 22px 0;
  background: var(--ink-800);
  overflow: hidden;
}
.marquee {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 26px;
  flex: 0 0 auto;
  padding-right: 26px;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-100%, 0, 0); }
}
.marquee-item {
  font-family: var(--font-head);
  font-size: clamp(.95rem, 1.5vw, 1.15rem);
  font-weight: 700;
  letter-spacing: -.01em;
  color: rgba(255, 255, 255, .55);
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.marquee-item:hover { color: #fff; }
.marquee-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: clamp(68px, 8vw, 116px) 0; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue-600);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.section-heading {
  max-width: 680px;
  margin: 0 auto clamp(40px, 5vw, 62px);
  text-align: center;
}
.section-lead {
  color: var(--muted);
  font-size: 1.05rem;
  text-wrap: pretty;
}

/* Services ---------------------------------------------------------------- */

.services { background: var(--white); }

.service-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}
.service-card {
  position: relative;
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  padding: 32px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease), border-color .45s var(--ease);
}
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(42, 127, 201, .1), transparent 62%);
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.service-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-300), var(--blue), var(--blue-700));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease-out);
}
.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(42, 127, 201, .3);
  box-shadow: var(--shadow-lg);
}
.service-card:hover::before { opacity: 1; }
.service-card:hover::after { transform: scaleX(1); }

.service-card:nth-child(4) { grid-column: span 5; }

.service-card-feature {
  grid-column: span 7;
  background:
    linear-gradient(135deg, rgba(42, 127, 201, .06), transparent 48%),
    var(--white);
}
.service-card-feature h3 { font-size: 1.32rem; }
.service-card-feature .service-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: auto;
}

.service-index {
  position: absolute;
  top: 24px;
  right: 28px;
  font-family: var(--font-head);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.05em;
  color: var(--line-soft);
  transition: color .4s var(--ease), transform .5s var(--ease-out);
}
.service-card:hover .service-index { color: rgba(42, 127, 201, .16); transform: translateY(-4px); }

.service-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), var(--blue-700));
  box-shadow: 0 10px 22px rgba(42, 127, 201, .28);
  transition: transform .5s var(--ease-out), box-shadow .4s var(--ease);
}
.service-card:hover .service-icon {
  transform: translateY(-3px) rotate(-6deg) scale(1.06);
  box-shadow: 0 16px 30px rgba(42, 127, 201, .4);
}
.service-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card h3 { position: relative; }
.service-card > p { position: relative; color: var(--muted); font-size: .96rem; }

.service-list {
  position: relative;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 8px;
  font-size: .88rem;
  color: var(--slate);
}
.service-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.service-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
}
.service-link {
  position: relative;
  flex-basis: 100%;
  margin-top: 22px;
  color: var(--blue-700);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
}
.service-link span {
  display: inline-block;
  transition: transform .3s var(--ease-out);
}
.service-link:hover span { transform: translateX(5px); }

/* Approach ---------------------------------------------------------------- */

.approach {
  position: relative;
  background:
    radial-gradient(900px circle at 85% 8%, rgba(42, 127, 201, .07), transparent 60%),
    var(--bg);
}
.approach-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(36px, 5vw, 76px);
  align-items: start;
}
.approach-copy .section-lead { margin-bottom: 40px; }

.steps { display: grid; gap: 14px; }
.step {
  display: flex;
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .6);
  transition: background .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease-out), box-shadow .35s var(--ease);
}
.step:hover {
  transform: translateX(6px);
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.step-num {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue-700);
  font-family: var(--font-head);
  font-weight: 800;
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease-out);
}
.step:hover .step-num {
  background: linear-gradient(135deg, var(--blue), var(--blue-700));
  color: #fff;
  transform: scale(1.08);
}
.step h3 { margin-bottom: 4px; font-size: 1.05rem; }
.step p { font-size: .93rem; color: var(--muted); }

.approach-panel { position: sticky; top: calc(var(--header-h) + 24px); }
.panel-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.panel-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-800);
}
.panel-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 22, 40, .45));
}
.panel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
.panel-card:hover .panel-media img { transform: scale(1.06); }
.panel-body { padding: 30px; }
.panel-body h3 { margin-bottom: 18px; font-size: 1.18rem; }

.check-list { display: grid; gap: 12px; margin-bottom: 28px; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: .94rem;
  color: var(--slate);
}
.check-list svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  padding: 3px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--blue-soft);
  fill: none;
  stroke: var(--blue-600);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Work gallery ------------------------------------------------------------ */

.work-gallery {
  position: relative;
  background: linear-gradient(170deg, #0A1628, #102943);
  color: rgba(255, 255, 255, .72);
  overflow: hidden;
}
.work-gallery::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  max-width: 640px;
  max-height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42, 127, 201, .3), transparent 68%);
  filter: blur(80px);
  pointer-events: none;
}
.work-gallery h2 { color: #fff; }
.work-gallery .eyebrow { color: var(--blue-300); }

.gallery-heading {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 42px;
}
.gallery-heading h2 { margin-bottom: 0; }
.gallery-heading > p {
  max-width: 420px;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, .6);
}

.carousel { position: relative; }
.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
  outline: none;
  cursor: grab;
}
.carousel-viewport:active { cursor: grabbing; }
.carousel-viewport:focus-visible { box-shadow: 0 0 0 4px rgba(124, 182, 232, .6); }

.carousel-track {
  display: flex;
  gap: 22px;
  transform: translate3d(0, 0, 0);
  transition: transform .62s var(--ease-out);
  will-change: transform;
}
.carousel-track.no-transition { transition: none; }

.carousel-slide {
  position: relative;
  flex: 0 0 calc((100% - 44px) / 3);
  aspect-ratio: 4 / 3;
  margin: 0;
  border-radius: var(--radius-lg);
  background: #102D4D;
  overflow: hidden;
  cursor: zoom-in;
}
.carousel-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(7, 19, 36, .82));
  opacity: 0;
  transition: opacity .4s var(--ease);
}
.carousel-slide:hover::after { opacity: 1; }
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease-out);
}
.carousel-slide:hover img { transform: scale(1.06); }
.carousel-slide figcaption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  z-index: 1;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .4s var(--ease), transform .45s var(--ease-out);
}
.carousel-slide:hover figcaption { opacity: 1; transform: none; }

.carousel-controls {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 28px;
}
.carousel-progress {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .14);
  overflow: hidden;
}
.carousel-progress span {
  display: block;
  height: 100%;
  width: 20%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue-300), var(--blue));
  transition: transform .5s var(--ease-out);
  transform-origin: left;
}
.carousel-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}
.carousel-status {
  min-width: 56px;
  color: rgba(255, 255, 255, .6);
  font-size: .85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.carousel-arrow {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), transform .3s var(--ease-out), border-color .25s var(--ease);
}
.carousel-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .25s var(--ease);
}
.carousel-arrow:hover {
  transform: translateY(-2px);
  background: #fff;
  border-color: #fff;
}
.carousel-arrow:hover svg { stroke: var(--blue-700); }

/* Clients ----------------------------------------------------------------- */

.clients { background: var(--white); }
.logo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.client-logo {
  display: grid;
  place-items: center;
  min-height: 138px;
  padding: 26px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
}
.client-logo:hover {
  transform: translateY(-6px);
  border-color: rgba(42, 127, 201, .3);
  background: linear-gradient(180deg, #fff, var(--blue-soft));
  box-shadow: var(--shadow-md);
}
.client-logo img {
  max-width: 100%;
  max-height: 58px;
  object-fit: contain;
  filter: grayscale(1) contrast(1.05);
  opacity: .72;
  transition: filter .4s var(--ease), opacity .4s var(--ease), transform .4s var(--ease-out);
}
.client-logo-square img { max-height: 86px; }
.client-logo:hover img {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.05);
}

/* CTA band ---------------------------------------------------------------- */

.cta-band {
  position: relative;
  padding: clamp(56px, 6vw, 84px) 0;
  background: linear-gradient(120deg, var(--blue-700) 0%, var(--blue) 55%, #1B5D9E 100%);
  color: rgba(255, 255, 255, .84);
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 20% 50%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 20% 50%, #000, transparent 72%);
}
.cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px 48px;
  flex-wrap: wrap;
}
.cta-copy { flex: 1 1 420px; max-width: 760px; }
.cta-actions { flex: 0 0 auto; }
.cta-copy h2 {
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(1.7rem, 2.7vw, 2.4rem);
}
.cta-copy p { margin: 0; color: rgba(255, 255, 255, .8); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Contact ----------------------------------------------------------------- */

.contact {
  background:
    radial-gradient(700px circle at 8% 10%, rgba(42, 127, 201, .07), transparent 58%),
    var(--bg);
}
.contact-grid {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: clamp(36px, 5vw, 68px);
  align-items: start;
}
.contact-copy { position: sticky; top: calc(var(--header-h) + 28px); }
.contact-copy .section-lead { margin-bottom: 34px; }

.contact-info { display: grid; gap: 12px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.contact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(42, 127, 201, .3);
  box-shadow: var(--shadow-md);
}
.contact-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--blue-soft);
  transition: background .35s var(--ease);
}
.contact-card:hover .contact-icon { background: linear-gradient(135deg, var(--blue), var(--blue-700)); }
.contact-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--blue-600);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .35s var(--ease);
}
.contact-card:hover .contact-icon svg { stroke: #fff; }
.contact-text { display: grid; gap: 1px; }
.contact-text strong {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.contact-text small { font-size: .84rem; color: var(--muted); }
.contact-arrow {
  margin-left: auto;
  color: var(--blue);
  font-size: 1.1rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .3s var(--ease), transform .3s var(--ease-out);
}
.contact-card:hover .contact-arrow { opacity: 1; transform: none; }

.contact-form {
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}
.form-head { margin-bottom: 26px; }
.form-head h3 { margin-bottom: 4px; font-size: 1.35rem; }
.form-head p { margin: 0; font-size: .92rem; color: var(--muted); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field > span {
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink-800);
}
.field em { font-style: normal; font-weight: 500; color: var(--muted); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #FBFCFE;
  color: var(--ink);
  outline: none;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 42px;
}
.field input::placeholder,
.field textarea::placeholder { color: #9AA7B8; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(42, 127, 201, .13);
}
.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: #E0645C;
  box-shadow: 0 0 0 4px rgba(224, 100, 92, .12);
}
.contact-form .btn { margin-top: 10px; }
.form-note {
  margin: 14px 0 0;
  min-height: 1.3em;
  font-size: .9rem;
  font-weight: 600;
  color: var(--blue-700);
  text-align: center;
}
.form-note.error { color: #C4463D; }

/* Footer ------------------------------------------------------------------ */

.footer {
  padding: clamp(52px, 6vw, 76px) 0 0;
  background: var(--ink);
  color: rgba(255, 255, 255, .62);
  font-size: .93rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.1fr;
  gap: 44px;
  padding-bottom: 46px;
}
.footer-wordmark {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: #fff;
}
.footer-wordmark span {
  position: relative;
  padding-left: 14px;
  font-size: .5em;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--blue-300);
}
.footer-wordmark span::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: .22em;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue);
}
.footer-brand p { max-width: 36ch; color: rgba(255, 255, 255, .55); }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col h4 {
  margin: 0 0 6px;
  color: #fff;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.footer-col a {
  position: relative;
  width: fit-content;
  color: rgba(255, 255, 255, .6);
  transition: color .25s var(--ease), transform .25s var(--ease-out);
}
.footer-col a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--blue-300);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.footer-col a:hover { color: #fff; transform: translateX(3px); }
.footer-col a:hover::after { transform: scaleX(1); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 22px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .86rem;
  color: rgba(255, 255, 255, .45);
}
.footer-bottom p { margin: 0; }

/* Developed-by credit */

.footer-credit {
  border-top: 1px solid rgba(255, 255, 255, .07);
  background: #06101F;
}
.credit-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 0 34px;
}
.credit-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
}
.credit-label {
  font-family: var(--font-head);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .38);
}
.credit-logo {
  width: 142px;
  height: auto;
  opacity: .88;
  transition: opacity .4s var(--ease), transform .45s var(--ease-out), filter .4s var(--ease);
}
.credit-block:hover .credit-logo {
  opacity: 1;
  transform: translateY(-2px);
  filter: drop-shadow(0 10px 22px rgba(201, 161, 74, .3));
}

/* --------------------------------------------------------------------------
   Floating UI
   -------------------------------------------------------------------------- */

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-700));
  box-shadow: var(--shadow-blue);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(.9);
  transition: opacity .35s var(--ease), transform .35s var(--ease-out), visibility .35s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-4px); }
.to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Lightbox ---------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px;
  background: rgba(5, 13, 25, .92);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.lightbox[hidden] { display: none; }
.lightbox.show { opacity: 1; }
.lightbox-figure {
  margin: 0;
  max-width: min(1080px, 88vw);
  max-height: 84vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55);
  transform: scale(.96);
  transition: transform .4s var(--ease-out);
}
.lightbox.show .lightbox-figure { transform: none; }
.lightbox-figure img {
  max-width: min(1080px, 88vw);
  max-height: 84vh;
  object-fit: contain;
}
.lightbox-nav,
.lightbox-close {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  transition: background .25s var(--ease), transform .25s var(--ease-out);
}
.lightbox-nav { width: 52px; height: 52px; flex: 0 0 auto; }
.lightbox-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lightbox-close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 46px;
  height: 46px;
  font-size: 1.6rem;
  line-height: 1;
}
.lightbox-nav:hover,
.lightbox-close:hover { background: rgba(255, 255, 255, .2); transform: scale(1.06); }

body.no-scroll { overflow: hidden; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .service-card,
  .service-card:nth-child(4) { grid-column: span 6; }
  .service-card-feature { grid-column: span 12; }
  .service-card-feature .service-list { margin-top: 20px; }
  .approach-grid { grid-template-columns: 1fr; }
  .approach-panel { position: static; max-width: 560px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-copy { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .topbar-note { display: none; }
  .topbar-inner { justify-content: center; }

  .nav-actions { display: flex; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 24px;
    right: 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .3s var(--ease), transform .35s var(--ease-out), visibility .3s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-link { padding: 13px 14px; font-size: 1rem; }
  .nav-link::after { display: none; }
  .nav-links .nav-cta { display: none; }

  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-card,
  .service-card:nth-child(4),
  .service-card-feature { grid-column: span 12; }

  .gallery-heading { flex-direction: column; align-items: flex-start; gap: 16px; }
  .carousel-slide { flex-basis: calc((100% - 22px) / 2); }
  .logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .container { width: min(var(--container), calc(100% - 32px)); }
  .brand img { width: 118px; }
  .topbar { font-size: .78rem; }
  .nav-links { left: 16px; right: 16px; }

  .hero { padding: 52px 0 64px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-trust { gap: 8px 18px; font-size: .84rem; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 20px 18px; }

  .service-card { padding: 26px 22px; }
  .service-card-feature .service-list { grid-template-columns: 1fr; }
  .service-index { font-size: 2.1rem; top: 20px; right: 22px; }

  .step { padding: 18px; gap: 14px; }
  .panel-body { padding: 24px; }

  .carousel-slide { flex-basis: 100%; }
  .carousel-controls { flex-direction: column-reverse; gap: 18px; align-items: stretch; }
  .carousel-buttons { justify-content: center; }
  .carousel-progress { width: 100%; }

  .logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .client-logo { min-height: 104px; padding: 18px; }

  .field-row { grid-template-columns: 1fr; gap: 0; }
  .cta-actions .btn { flex: 1 1 100%; }

  .footer-top { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .credit-inner { padding: 26px 0 30px; }
  .credit-logo { width: 126px; }

  .to-top { right: 16px; bottom: 16px; width: 46px; height: 46px; }
  .lightbox { padding: 16px; gap: 8px; }
  .lightbox-nav { width: 42px; height: 42px; }
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal],
  .word { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none; }
}

/* --------------------------------------------------------------------------
   AI Chat Assistant (drops down from the Live Chat button in the header)
   -------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.chatbot-panel {
  --chat-max-h: 560px;
  position: absolute;
  top: calc(100% + 12px);
  right: calc((100% - min(var(--container), 100% - 48px)) / 2);
  display: flex;
  flex-direction: column;
  width: min(396px, calc(100vw - 32px));
  height: min(620px, var(--chat-max-h));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(10, 22, 40, .02);

  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(.97);
  transform-origin: top right;
  transition: opacity .25s var(--ease), transform .35s var(--ease-out), visibility .25s;
}
.chatbot.open .chatbot-panel { opacity: 1; visibility: visible; transform: none; }

.chatbot-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 18px 18px 17px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-700) 100%);
  overflow: hidden;
}
.chatbot-header::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .18), transparent 70%);
  pointer-events: none;
}
.chatbot-header-info { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }

.chatbot-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 14px;
  background: rgba(255, 255, 255, .16);
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.chatbot-header h2 {
  margin: 0;
  color: #fff;
  background: none;
  font-family: var(--font-head);
  font-size: .98rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.01em;
}
.chatbot-header p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  color: rgba(255, 255, 255, .8);
  font-size: .74rem;
  line-height: 1;
}
.chatbot-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5EE0A0;
  box-shadow: 0 0 0 3px rgba(94, 224, 160, .22);
}

.chatbot-header-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; }
.chatbot-new,
.chatbot-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(255, 255, 255, .85);
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.chatbot-new:hover,
.chatbot-close:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.chatbot-new svg,
.chatbot-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chatbot-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 16px 8px;
  background: var(--bg);
  scroll-behavior: smooth;
}
.chatbot-message { display: flex; width: 100%; margin-bottom: 12px; }
.chatbot-message-assistant { justify-content: flex-start; }
.chatbot-message-user { justify-content: flex-end; }

.chatbot-message-bubble {
  max-width: 86%;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 6px;
  background: var(--white);
  color: var(--ink-800);
  box-shadow: var(--shadow-sm);
  font-size: .9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* Rendered (formatted) assistant replies */
.chatbot-message-bubble.is-rich { white-space: normal; }
.chatbot-message-bubble.is-rich > :first-child { margin-top: 0; }
.chatbot-message-bubble.is-rich > :last-child { margin-bottom: 0; }
.chatbot-message-bubble p { margin: 0 0 .7em; }
.chatbot-message-bubble strong { color: var(--ink); font-weight: 700; }
.chatbot-message-bubble .chatbot-heading {
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
}
.chatbot-message-bubble ul,
.chatbot-message-bubble ol { margin: 0 0 .7em; padding: 0; list-style: none; }
.chatbot-message-bubble li { position: relative; padding-left: 20px; margin: 0 0 .5em; }
.chatbot-message-bubble li:last-child { margin-bottom: 0; }
.chatbot-message-bubble ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-700));
}
.chatbot-message-bubble ol { counter-reset: chatli; }
.chatbot-message-bubble ol li { counter-increment: chatli; }
.chatbot-message-bubble ol li::before {
  content: counter(chatli);
  position: absolute;
  left: 0;
  top: .2em;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-700);
  font-size: .68rem;
  font-weight: 700;
  line-height: 1;
}
.chatbot-message-bubble a {
  color: var(--blue-700);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(42, 127, 201, .4);
  text-underline-offset: 2px;
  word-break: break-word;
}
.chatbot-message-bubble a:hover { text-decoration-color: currentColor; }
.chatbot-message-bubble code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue-700);
  font-size: .85em;
}
.chatbot-message-user .chatbot-message-bubble {
  border-color: transparent;
  border-radius: 18px 18px 6px 18px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-700) 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(42, 127, 201, .22);
}

.chatbot-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 18px 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: .72rem;
}
.chatbot-typing[hidden] { display: none; }
.chatbot-typing span:not(:last-child) {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  animation: chatbotTyping 1.2s infinite ease-in-out;
}
.chatbot-typing span:nth-child(2) { animation-delay: .15s; }
.chatbot-typing span:nth-child(3) { animation-delay: .3s; }
.chatbot-typing span:last-child { margin-left: 6px; }

@keyframes chatbotTyping {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chatbot-form {
  flex-shrink: 0;
  padding: 12px 14px 13px;
  border-top: 1px solid var(--line);
  background: var(--white);
}
.chatbot-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 7px 7px 7px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.chatbot-input-wrapper:focus-within {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(42, 127, 201, .14);
}
.chatbot-input-wrapper textarea {
  flex: 1;
  min-width: 0;
  max-height: 100px;
  min-height: 24px;
  padding: 4px 0;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .9rem;
  line-height: 1.45;
}
.chatbot-input-wrapper textarea::placeholder { color: var(--muted); }

.chatbot-send {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-700) 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(42, 127, 201, .3);
  cursor: pointer;
  transition: transform .2s var(--ease-out), opacity .2s var(--ease), filter .2s var(--ease);
}
.chatbot-send:hover { transform: translateY(-1px); filter: brightness(1.07); }
.chatbot-send:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.chatbot-send svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chatbot-disclaimer {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.35;
  text-align: center;
}

@media (max-width: 640px) {
  .chatbot-panel {
    top: calc(100% + 10px);
    left: 12px;
    right: 12px;
    width: auto;
    border-radius: var(--radius);
  }
  .chatbot-message-bubble { font-size: .92rem; }
  .chatbot-input-wrapper textarea { font-size: 16px; } /* prevents iOS zoom on focus */
}

@media (prefers-reduced-motion: reduce) {
  .chatbot-panel, .nav-chat { transition: none; }
  .chatbot-typing span:not(:last-child) { animation: none; }
}
