/* ==========================================================================
   YLD Technology - styles
   Dark first, light theme available. Navy + gold from the brand board.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --gold-100: #f4e3b4;
  --gold-300: #e8c87a;
  --gold-500: #c9a24a;
  --gold-700: #a07c2c;
  --gold-line: rgba(201, 162, 74, .34);

  --navy-900: #060a14;
  --navy-800: #0a0f1c;
  --navy-700: #0f172a;
  --navy-600: #16203a;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --maxw: 1180px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* dark (default) */
[data-theme="dark"] {
  --bg: var(--navy-800);
  --bg-alt: var(--navy-900);
  --surface: rgba(255, 255, 255, .038);
  --surface-hi: rgba(255, 255, 255, .072);
  --border: rgba(255, 255, 255, .10);
  --border-hi: rgba(201, 162, 74, .38);
  --text: #f2f5fb;
  --text-mid: #b9c2d6;
  --text-dim: #808da6;
  --accent: var(--gold-500);
  --header-bg: rgba(10, 15, 28, .74);
  --glow-a: rgba(201, 162, 74, .20);
  --glow-b: rgba(35, 78, 160, .26);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .72);
  --shadow-gold: 0 12px 34px -12px rgba(201, 162, 74, .50);
  --grid-line: rgba(255, 255, 255, .045);
  color-scheme: dark;
}

/* light */
[data-theme="light"] {
  --bg: #fdfcf9;
  --bg-alt: #f5f2ea;
  --surface: rgba(10, 15, 28, .026);
  --surface-hi: rgba(10, 15, 28, .05);
  --border: rgba(10, 15, 28, .11);
  --border-hi: rgba(160, 124, 44, .44);
  --text: #0d1526;
  --text-mid: #47516b;
  --text-dim: #576077;
  /* Gold is too faint on a near-white page, so accents darken in light mode.
     This keeps the eyebrow, links and icons legible (>= 4.5:1). */
  --accent: #8a6a1f;
  --header-bg: rgba(253, 252, 249, .82);
  --glow-a: rgba(201, 162, 74, .22);
  --glow-b: rgba(35, 78, 160, .13);
  --shadow: 0 22px 50px -22px rgba(13, 21, 38, .26);
  --shadow-gold: 0 12px 30px -12px rgba(160, 124, 44, .40);
  --grid-line: rgba(10, 15, 28, .045);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .45s var(--ease), color .45s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--gold-500); color: #0a0f1c; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.grad-text {
  background: linear-gradient(100deg, var(--gold-300) 0%, var(--gold-500) 42%, var(--gold-700) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--border); }

.header-inner {
  display: flex; align-items: center; gap: 28px;
  min-height: 76px;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark { width: 38px; height: 38px; }
.mark-body { fill: var(--text); transition: fill .45s var(--ease); }
[data-theme="light"] .mark-body { fill: var(--navy-700); }

.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name {
  font-size: 1.19rem; font-weight: 700; letter-spacing: -.03em;
}
.brand-dot { color: var(--gold-500); }
.brand-tag {
  font-size: .565rem; letter-spacing: .19em; text-transform: uppercase;
  color: var(--text-dim); font-weight: 500; margin-top: 2px;
}

.nav { display: flex; gap: 30px; margin-left: auto; }
.nav a {
  font-size: .925rem; font-weight: 500; color: var(--text-mid);
  position: relative; padding: 4px 0; transition: color .25s var(--ease);
}
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1.5px; background: var(--gold-500);
  transition: width .3s var(--ease);
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-mid);
  transition: background-color .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease);
}
.theme-toggle:hover { background: var(--surface-hi); color: var(--gold-500); border-color: var(--border-hi); transform: translateY(-1px); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[data-theme="dark"] .ico-sun { display: none; }
[data-theme="light"] .ico-moon { display: none; }
[data-theme="light"] .ico-sun { fill: none; }
[data-theme="light"] .ico-moon { stroke: none; fill: currentColor; }

.menu-btn {
  display: none; width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  flex-direction: column; justify-content: center; align-items: center; gap: 4px;
}
.menu-btn span { width: 17px; height: 1.7px; background: var(--text); border-radius: 2px; transition: .3s var(--ease); }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.7px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 600; letter-spacing: -.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-300) 0%, var(--gold-500) 55%, var(--gold-700) 100%);
  color: #0a0f1c;
  box-shadow: var(--shadow-gold);
  position: relative; overflow: hidden;
}
.btn-gold::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--gold-100) 0%, var(--gold-300) 60%, var(--gold-500) 100%);
  opacity: 0; transition: opacity .3s var(--ease);
}
.btn-gold:hover::before { opacity: 1; }
.btn-gold > * { position: relative; z-index: 1; }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(201, 162, 74, .68); }

.btn-ghost {
  background: var(--surface); border-color: var(--border); color: var(--text);
}
.btn-ghost:hover { background: var(--surface-hi); border-color: var(--border-hi); transform: translateY(-2px); }

.btn-sm { padding: 10px 18px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn-arrow { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: clamp(80px, 12vw, 132px) 0 clamp(60px, 8vw, 96px);
  overflow: hidden;
  isolation: isolate;
}

.hero-glow {
  position: absolute; z-index: -2;
  width: 1100px; height: 1100px; left: 50%; top: -560px;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 50%, var(--glow-a) 0%, transparent 58%),
    radial-gradient(circle at 32% 62%, var(--glow-b) 0%, transparent 56%);
  filter: blur(28px);
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translateX(-50%) scale(1); }
  to   { transform: translateX(-46%) scale(1.09); }
}

.hero-grid-lines {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 78% 62% at 50% 32%, #000 12%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 78% 62% at 50% 32%, #000 12%, transparent 76%);
  pointer-events: none;
}

.hero-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: .72rem; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--accent);
  margin: 0 0 26px;
}
.eyebrow-rule { width: 34px; height: 1px; background: currentColor; opacity: .6; }

.hero-title {
  font-size: clamp(2.6rem, 7.4vw, 5.1rem);
  font-weight: 700; letter-spacing: -.042em; line-height: 1.03;
  margin: 0 0 26px; max-width: 15ch;
}

.hero-sub {
  font-size: clamp(1.02rem, 1.65vw, 1.19rem);
  color: var(--text-mid);
  max-width: 62ch; margin: 0 0 38px; line-height: 1.68;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: clamp(56px, 8vw, 84px); }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; width: 100%;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat {
  background: var(--bg);
  padding: 28px 20px; text-align: center;
  transition: background-color .3s var(--ease);
}
.stat:hover { background: var(--surface); }
.stat-num {
  display: block;
  font-size: clamp(1.6rem, 3.1vw, 2.3rem);
  font-weight: 700; letter-spacing: -.035em; line-height: 1.1;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 6px;
}
.stat-label { font-size: .74rem; color: var(--text-dim); letter-spacing: .07em; text-transform: uppercase; font-weight: 500; }

/* ---------- pillars ---------- */
.pillars { padding: clamp(48px, 7vw, 76px) 0; border-block: 1px solid var(--border); background: var(--bg-alt); }
.pillars-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; }
.pillar { text-align: left; }
.pillar-ico {
  width: 30px; height: 30px; margin-bottom: 18px;
  fill: none; stroke: var(--gold-500); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.pillar h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 8px; }
.pillar p { font-size: .89rem; color: var(--text-mid); margin: 0; line-height: 1.62; }

/* ---------- sections ---------- */
.section { padding: clamp(72px, 10vw, 122px) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-head { max-width: 720px; margin-bottom: clamp(44px, 6vw, 68px); }
.section-title {
  font-size: clamp(1.95rem, 4.1vw, 2.95rem);
  letter-spacing: -.035em; line-height: 1.12; margin-bottom: 18px;
}
.section-lead { font-size: 1.045rem; color: var(--text-mid); line-height: 1.7; margin: 0; max-width: 66ch; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  overflow: hidden;
  transition: transform .38s var(--ease), border-color .38s var(--ease),
              background-color .38s var(--ease), box-shadow .38s var(--ease);
}
.card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 82% 0%, var(--glow-a) 0%, transparent 62%);
  opacity: 0; transition: opacity .38s var(--ease); pointer-events: none;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-hi); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }

.card-wide { grid-column: 1 / -1; }
.card > * { position: relative; z-index: 1; }

.card-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(201, 162, 74, .17), rgba(201, 162, 74, .05));
  border: 1px solid var(--gold-line);
}
.card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--gold-500); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.card h3 { font-size: 1.22rem; margin-bottom: 10px; }
.card p { color: var(--text-mid); font-size: .955rem; margin: 0; line-height: 1.68; }

.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li {
  position: relative; padding-left: 28px;
  font-size: .925rem; color: var(--text-mid);
}
.ticks li::before {
  content: ''; position: absolute; left: 0; top: .42em;
  width: 15px; height: 8px;
  border-left: 2px solid var(--gold-500); border-bottom: 2px solid var(--gold-500);
  transform: rotate(-45deg); border-radius: 1px;
}

/* ---------- why ---------- */
.why-inner { display: grid; grid-template-columns: 1.45fr .85fr; gap: clamp(36px, 5vw, 72px); align-items: start; }
.why-copy .section-lead { margin-bottom: 40px; }

.why-list { display: grid; gap: 28px; }
.why-item { display: flex; gap: 20px; align-items: flex-start; }
.why-num {
  flex-shrink: 0;
  font-size: .82rem; font-weight: 700; letter-spacing: .05em;
  color: var(--accent);
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--gold-line);
  min-width: 30px;
}
.why-item h4 { font-size: 1.05rem; margin-bottom: 6px; }
.why-item p { font-size: .925rem; color: var(--text-mid); margin: 0; line-height: 1.64; }

.why-panel { position: sticky; top: 100px; }
.panel-card {
  background: linear-gradient(160deg, var(--surface-hi), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow);
}
.panel-title {
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 20px;
}
.panel-dl { margin: 0 0 26px; display: grid; gap: 0; }
.panel-dl > div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--border);
}
.panel-dl > div:last-child { border-bottom: 0; }
.panel-dl dt { font-size: .855rem; color: var(--text-dim); }
.panel-dl dd { font-size: .875rem; font-weight: 500; margin: 0; text-align: right; }

/* ---------- quote ---------- */
.quote-band {
  padding: clamp(64px, 9vw, 104px) 0;
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.quote-band::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 100% at 50% 50%, var(--glow-a) 0%, transparent 68%);
  pointer-events: none;
}
.quote { margin: 0; text-align: center; position: relative; }
.quote p {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4.4vw, 3.1rem);
  font-style: italic; letter-spacing: -.02em; line-height: 1.24;
  margin: 0; color: var(--text);
}

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 76px); align-items: start; }
.contact-copy .section-lead { margin-bottom: 34px; }
.contact-cards { display: grid; gap: 12px; }

.contact-card {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 22px; border-radius: var(--radius-md);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .3s var(--ease), background-color .3s var(--ease), transform .3s var(--ease);
}
a.contact-card:hover { border-color: var(--border-hi); background: var(--surface-hi); transform: translateX(3px); }
.contact-card svg {
  width: 21px; height: 21px; flex-shrink: 0; margin-top: 2px;
  fill: none; stroke: var(--gold-500); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.cc-label { display: block; font-size: .68rem; letter-spacing: .17em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; margin-bottom: 3px; }
.cc-value { display: block; font-size: .945rem; font-weight: 500; line-height: 1.5; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 3.4vw, 38px);
  display: grid; gap: 18px;
  box-shadow: var(--shadow);
}
.field { display: grid; gap: 7px; }
.field label { font-size: .775rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--text-dim); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .93rem; resize: vertical;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); opacity: .72; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(201, 162, 74, .17);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #e0605f; }
.field select { 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='%23c9a24a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
  padding-right: 40px;
}
.form-note { margin: 0; font-size: .875rem; min-height: 1.2em; }
.form-note.ok { color: var(--gold-500); }
.form-note.err { color: #e0605f; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: clamp(48px, 6vw, 68px) 0 34px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 34px; border-bottom: 1px solid var(--border); }
.footer-brand .brand-name { font-size: 1.24rem; font-weight: 700; letter-spacing: -.03em; }
.footer-brand p { font-size: .885rem; color: var(--text-dim); margin: 9px 0 0; max-width: 34ch; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.footer-nav a { font-size: .885rem; color: var(--text-mid); transition: color .25s var(--ease); }
.footer-nav a:hover { color: var(--accent); }
.footer-legal { padding-top: 24px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-legal p { font-size: .795rem; color: var(--text-dim); margin: 0; }
.disclaimer { max-width: 62ch; }

/* ---------- chatbot ---------- */
.chat-root { position: fixed; right: 22px; bottom: 22px; z-index: 150; }

.chat-launch {
  position: relative;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-700));
  border: none; color: #0a0f1c;
  box-shadow: 0 12px 30px -8px rgba(201, 162, 74, .66);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.chat-launch:hover { transform: scale(1.07); box-shadow: 0 16px 38px -8px rgba(201, 162, 74, .82); }
.chat-ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; position: absolute; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.chat-launch .chat-ico-close { opacity: 0; transform: rotate(-70deg) scale(.7); }
.chat-launch[aria-expanded="true"] .chat-ico-open { opacity: 0; transform: rotate(70deg) scale(.7); }
.chat-launch[aria-expanded="true"] .chat-ico-close { opacity: 1; transform: none; }
.chat-launch .chat-ico-open { fill: #0a0f1c; stroke: none; }

.chat-badge {
  position: absolute; top: -2px; right: -2px;
  width: 13px; height: 13px; border-radius: 50%;
  background: #e0605f; border: 2px solid var(--bg);
}

.chat-panel {
  position: absolute; right: 0; bottom: 70px;
  width: min(378px, calc(100vw - 44px));
  height: min(548px, calc(100vh - 130px));
  display: flex; flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 32px 70px -20px rgba(0, 0, 0, .62);
  overflow: hidden;
  animation: chatIn .32s var(--ease);
}
@keyframes chatIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

.chat-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--surface-hi), var(--surface));
  border-bottom: 1px solid var(--border);
}
.chat-head-text { display: grid; gap: 2px; }
.chat-head-text strong { font-size: .965rem; }
.chat-head-text span { font-size: .775rem; color: var(--text-dim); }
.chat-close { background: none; border: none; color: var(--text-dim); padding: 2px; transition: color .25s var(--ease); }
.chat-close:hover { color: var(--text); }
.chat-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }

.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.chat-log::-webkit-scrollbar { width: 6px; }
.chat-log::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.msg { max-width: 84%; padding: 11px 14px; border-radius: 14px; font-size: .895rem; line-height: 1.55; animation: msgIn .3s var(--ease); }
@keyframes msgIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.msg-bot { align-self: flex-start; background: var(--surface-hi); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg-user { align-self: flex-end; background: linear-gradient(135deg, var(--gold-300), var(--gold-700)); color: #0a0f1c; border-bottom-right-radius: 5px; font-weight: 500; }
.msg-bot p { margin: 0 0 .55em; }
.msg-bot p:last-child { margin: 0; }
.msg-bot ul { margin: 0 0 .55em; padding-left: 18px; }
.msg-bot li { margin-bottom: 4px; }
.msg-bot strong { color: var(--gold-500); }

.typing { display: flex; gap: 4px; align-items: center; padding: 13px 15px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); animation: blink 1.3s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .28; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.chat-suggest { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 18px 12px; }
.chat-suggest button {
  font-size: .775rem; padding: 7px 12px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-mid);
  transition: border-color .25s var(--ease), color .25s var(--ease), background-color .25s var(--ease);
}
.chat-suggest button:hover { border-color: var(--border-hi); color: var(--gold-500); background: var(--surface-hi); }

.chat-form { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--border); background: var(--bg-alt); }
.chat-form input {
  flex: 1; padding: 11px 14px; font-size: .895rem; font-family: inherit;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 99px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.chat-form input::placeholder { color: var(--text-dim); opacity: .78; }
.chat-form input:focus { outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(201, 162, 74, .15); }
.chat-form button {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center; border: none;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-700)); color: #0a0f1c;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.chat-form button:hover { transform: scale(1.07); }
.chat-form button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.chat-form button svg { width: 18px; height: 18px; fill: currentColor; }

.chat-foot { margin: 0; padding: 0 14px 12px; font-size: .68rem; color: var(--text-dim); text-align: center; background: var(--bg-alt); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .why-inner { grid-template-columns: 1fr; }
  .why-panel { position: static; }
  .pillars-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}

@media (max-width: 860px) {
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height .34s var(--ease), opacity .28s var(--ease), padding .34s var(--ease);
  }
  .nav.open { max-height: 300px; opacity: 1; padding: 14px 24px 20px; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav a:last-child { border-bottom: 0; }
  .menu-btn { display: flex; }
  .header-actions .btn-sm { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 26px; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 18px; }
  .header-inner { gap: 14px; min-height: 68px; }
  .brand-tag { display: none; }
  .hero-title { font-size: 2.28rem; }
  .hero-cta { flex-direction: column; width: 100%; }
  .hero-cta .btn { width: 100%; }
  .stat { padding: 22px 12px; }
  .card { padding: 24px; }
  .chat-root { right: 14px; bottom: 14px; }
  .chat-panel { width: calc(100vw - 28px); }
  .footer-legal { flex-direction: column; gap: 12px; }
}

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

@media print {
  .site-header, .chat-root, .hero-glow, .hero-grid-lines { display: none; }
  body { background: #fff; color: #000; }
}
