:root{
  --bg:#14161C; --bg-raised:#1C1F28; --line:#2C303B;
  --gold:#E8A33D; --teal:#4FA8A0;
  --ink:#F2F0EA; --ink-dim:#9298A6; --ink-faint:#5C6272;
}
*{ margin:0; padding:0; box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{ background:var(--bg); color:var(--ink); font-family:'IBM Plex Sans',sans-serif; line-height:1.6; overflow-x:hidden; }
h1,h2,h3{ font-family:'Space Grotesk',sans-serif; font-weight:600; letter-spacing:-0.01em; }
.mono{ font-family:'IBM Plex Mono',monospace; }
a{ color:inherit; text-decoration:none; }
.wrap{ max-width:1160px; margin:0 auto; padding:0 32px; }
@media (prefers-reduced-motion: reduce){ *{ animation-duration:0.001ms !important; transition-duration:0.001ms !important; } }

nav{ position:fixed; top:0; left:0; right:0; z-index:50; background:rgba(20,22,28,0.85); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
nav .wrap{ display:flex; align-items:center; justify-content:space-between; height:68px; }
.logo{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:19px; display:flex; align-items:center; gap:8px; }
.logo-dot{ width:9px; height:9px; border-radius:50%; background:var(--gold); box-shadow:0 0 12px 2px rgba(232,163,61,0.6); }
.logo-img{ width:36px; height:36px; object-fit:cover; border-radius:50%; background:var(--bg); border:1.5px solid var(--line); padding:2px; }
.back-link{ font-size:14px; color:var(--ink-dim); display:flex; align-items:center; gap:6px; transition:color .15s ease; }
.back-link:hover{ color:var(--ink); }
.nav-cta{ background:var(--gold); color:#14161C; padding:9px 18px; border-radius:6px; font-size:14px; font-weight:600; transition:transform .15s ease, background .15s ease; }
.nav-cta:hover{ background:#F0B155; transform:translateY(-1px); }

/* Detail hero — matches homepage hero typography/spacing rhythm */
.detail-hero{ padding:150px 0 48px; border-bottom:1px solid var(--line); }
.detail-tag{ font-family:'IBM Plex Mono',monospace; font-size:12.5px; color:var(--teal); text-transform:uppercase; letter-spacing:.08em; margin-bottom:16px; }
.detail-hero h1{ font-size:clamp(32px,4.2vw,48px); max-width:760px; line-height:1.1; margin-bottom:18px; }
.detail-hero p{ font-size:17px; color:var(--ink-dim); max-width:640px; margin-bottom:20px; }
/* plain-text tag row, matching the homepage's decluttered style (no pill badges) */
.tag-row{ font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--ink-faint); text-transform:uppercase; letter-spacing:.05em; }

/* Video section — quiet frame, no card shadow, consistent with hairline-divided sections elsewhere */
.video-section{ padding:56px 0; border-bottom:1px solid var(--line); }
.video-frame{
  position:relative; width:100%; aspect-ratio:16/9; border-radius:10px; overflow:hidden;
  border:1px solid var(--line); background:var(--bg-raised);
}
.video-frame video{ width:100%; height:100%; object-fit:contain; display:block; }
.video-placeholder{
  position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:14px; color:var(--ink-faint); text-align:center; padding:24px;
}
.video-placeholder .play{
  width:52px; height:52px; border-radius:50%; border:1.5px solid var(--ink-faint);
  display:flex; align-items:center; justify-content:center; color:var(--ink-faint); font-size:14px;
}
.video-caption{ margin-top:16px; font-size:13px; color:var(--ink-faint); font-family:'IBM Plex Mono',monospace; }

/* Narrative tabs */
.narrative-section{ padding:8px 0 64px; border-bottom:1px solid var(--line); }
.narrative-tabs{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:28px; }
.narrative-tab{ font-family:'IBM Plex Mono',monospace; font-size:13px; padding:9px 18px; border-radius:20px; border:1px solid var(--line); color:var(--ink-dim); background:transparent; cursor:pointer; transition:all .15s ease; }
.narrative-tab:hover{ border-color:var(--ink-faint); color:var(--ink); }
.narrative-tab.active{ background:var(--gold); color:#14161C; border-color:var(--gold); }
.narrative-panel{ display:none; max-width:680px; }
.narrative-panel.active{ display:block; animation:fadeIn .25s ease; }
.narrative-panel p{ font-size:16px; color:var(--ink-dim); line-height:1.65; }
@keyframes fadeIn{ from{ opacity:0; transform:translateY(4px); } to{ opacity:1; transform:translateY(0); } }

.cta-section{ padding:90px 0; text-align:center; }
.cta-section h2{ font-size:clamp(26px,3.4vw,38px); margin-bottom:14px; }
.cta-section p{ color:var(--ink-dim); max-width:460px; margin:0 auto 26px; }
.btn-primary{ background:var(--gold); color:#14161C; padding:14px 26px; border-radius:7px; font-weight:600; font-size:15px; display:inline-block; transition:transform .15s ease, background .15s ease; }
.btn-primary:hover{ background:#F0B155; transform:translateY(-2px); }

/* Office location section */
.office-section{ padding:80px 0; border-bottom:1px solid var(--line); text-align:center; }
.office-section h2{ font-size:clamp(24px,3vw,32px); margin-bottom:28px; }
.office-video-frame{
  max-width:720px; margin:0 auto; border-radius:14px; overflow:hidden;
  border:1px solid var(--line); aspect-ratio:16/9;
}
.office-video-frame video{ width:100%; height:100%; object-fit:cover; display:block; }

footer{ padding:36px 0; }
footer .wrap{ display:flex; justify-content:space-between; align-items:center; font-size:13px; color:var(--ink-faint); flex-wrap:wrap; gap:12px; }

/* ── Homepage-specific styles ── */

.nav-links{ display:flex; gap:32px; font-size:14px; color:var(--ink-dim); }
.nav-links a:hover{ color:var(--ink); }
@media (max-width:820px){ .nav-links{ display:none; } }

.hero{ position:relative; padding:170px 0 100px; overflow:hidden; border-bottom:1px solid var(--line); }
#net{ position:absolute; inset:0; width:100%; height:100%; opacity:0.5; }
.hero-content{ position:relative; z-index:2; max-width:700px; }
.eyebrow{ display:inline-flex; align-items:center; gap:8px; font-family:'IBM Plex Mono',monospace; font-size:12.5px; color:var(--gold); border:1px solid rgba(232,163,61,.35); background:rgba(232,163,61,.08); padding:6px 12px; border-radius:20px; margin-bottom:26px; }
.hero h1{ font-size:clamp(36px,5vw,58px); line-height:1.08; margin-bottom:20px; }
.hero h1 em{ font-style:normal; color:var(--gold); }
.hero p{ font-size:17.5px; color:var(--ink-dim); max-width:560px; margin-bottom:34px; }
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; }
.btn-ghost{ border:1px solid var(--line); padding:14px 26px; border-radius:7px; font-weight:500; font-size:15px; transition:border-color .15s ease, background .15s ease; }
.btn-ghost:hover{ border-color:var(--ink-faint); background:var(--bg-raised); }

.section{ padding:96px 0; border-bottom:1px solid var(--line); }
.section-tag{ font-family:'IBM Plex Mono',monospace; font-size:12.5px; color:var(--teal); text-transform:uppercase; letter-spacing:.08em; margin-bottom:14px; }
.section h2{ font-size:clamp(27px,3.2vw,36px); max-width:600px; margin-bottom:16px; }
.section-sub{ color:var(--ink-dim); max-width:560px; font-size:16px; margin-bottom:44px; }

.chatbox{ max-width:640px; border:1px solid var(--line); border-radius:14px; background:var(--bg-raised); overflow:hidden; }
.chat-log{ max-height:320px; overflow-y:auto; padding:22px; display:flex; flex-direction:column; gap:14px; }
.chat-msg{ font-size:14.5px; line-height:1.55; padding:12px 16px; border-radius:12px; max-width:85%; }
.chat-msg.bot{ background:var(--bg); border:1px solid var(--line); color:var(--ink-dim); align-self:flex-start; border-bottom-left-radius:3px; }
.chat-msg.user{ background:var(--gold); color:#14161C; align-self:flex-end; border-bottom-right-radius:3px; font-weight:500; }
.chat-msg.bot a{ color:var(--gold); text-decoration:underline; }
.chat-input-row{ display:flex; border-top:1px solid var(--line); }
.chat-input-row input{ flex:1; background:transparent; border:none; padding:16px 18px; color:var(--ink); font-family:'IBM Plex Sans',sans-serif; font-size:14.5px; outline:none; }
.chat-input-row input::placeholder{ color:var(--ink-faint); }
.chat-input-row button{ background:var(--gold); color:#14161C; border:none; padding:0 24px; font-weight:600; font-size:14px; cursor:pointer; transition:background .15s ease; }
.chat-input-row button:hover{ background:#F0B155; }

.filters{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:36px; }
.filter-accordion{ display:none; }
.chat-mini{ display:none; }
.filter-btn{ font-family:'IBM Plex Mono',monospace; font-size:13px; padding:8px 16px; border-radius:20px; border:1px solid var(--line); color:var(--ink-dim); background:transparent; cursor:pointer; transition:all .15s ease; }
.filter-btn:hover{ border-color:var(--ink-faint); color:var(--ink); }
.filter-btn.active{ background:var(--gold); color:#14161C; border-color:var(--gold); }

.solutions-grid{ display:grid; grid-template-columns:repeat(3, 1fr); gap:2px 40px; }
@media (max-width:900px){ .solutions-grid{ grid-template-columns:repeat(2, 1fr); } }
@media (max-width:560px){ .solutions-grid{ grid-template-columns:1fr; } }
.solution{ padding:22px 0; border-top:1px solid var(--line); display:flex; flex-direction:column; gap:8px; }
.solution.hidden{ display:none; }
.solution-top{ display:flex; align-items:center; gap:12px; }
.solution-media{ flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.solution-media svg{ width:22px; height:22px; }
.solution-media.accent-gold svg{ color:var(--gold); }
.solution-media.accent-teal svg{ color:var(--teal); }
.solution h3{ font-size:15px; line-height:1.3; }
.solution p{ font-size:13px; color:var(--ink-dim); line-height:1.55; }
.solution-btn{ align-self:flex-start; margin-top:6px; font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--gold); border:1px solid rgba(232,163,61,.4); padding:8px 14px; border-radius:7px; transition:background .15s ease, color .15s ease; display:inline-flex; align-items:center; gap:6px; }
.solution-btn:hover{ background:var(--gold); color:#14161C; }

.case{ background:var(--bg-raised); border:1px solid var(--line); border-radius:14px; padding:40px; display:grid; grid-template-columns:1fr auto; gap:32px; align-items:center; }
@media (max-width:760px){ .case{ grid-template-columns:1fr; } }
.case-tag{ font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--gold); text-transform:uppercase; letter-spacing:.06em; margin-bottom:10px; }
.case h3{ font-size:22px; margin-bottom:10px; }
.case p{ color:var(--ink-dim); font-size:15px; max-width:480px; }
.case-stats{ display:flex; gap:28px; }
.case-stat{ text-align:center; }
.case-stat .num{ font-family:'IBM Plex Mono',monospace; font-size:30px; color:var(--gold); font-weight:500; }
.case-stat .lbl{ font-size:11.5px; color:var(--ink-faint); text-transform:uppercase; letter-spacing:.05em; margin-top:4px; }

/* Contact form */
.contact-form{ max-width:540px; margin:36px auto 0; text-align:left; }
.form-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:560px){ .form-row{ grid-template-columns:1fr; } }
.form-group{ margin-bottom:20px; }
.form-group label{ display:block; font-family:'IBM Plex Mono',monospace; font-size:11.5px; color:var(--ink-faint); text-transform:uppercase; letter-spacing:.06em; margin-bottom:8px; }
.form-group input,
.form-group textarea{ width:100%; background:var(--bg-raised); border:1px solid var(--line); border-radius:10px; padding:14px 16px; color:var(--ink); font-family:'IBM Plex Sans',sans-serif; font-size:15px; outline:none; transition:border-color .15s ease; resize:vertical; }
.form-group input::placeholder,
.form-group textarea::placeholder{ color:var(--ink-faint); }
.form-group input:focus,
.form-group textarea:focus{ border-color:var(--gold); }
.contact-form .btn-primary{ width:100%; text-align:center; border:none; cursor:pointer; font-size:16px; padding:16px; margin-top:4px; }
.form-note{ margin-top:16px; font-size:13px; color:var(--ink-faint); text-align:center; }
.form-note a{ color:var(--gold); text-decoration:underline; }
.form-success{ text-align:center; padding:40px 0; }
.form-success h3{ font-size:24px; color:var(--gold); margin-bottom:8px; }
.form-success p{ color:var(--ink-dim); }

/* Floating chat widget */
.chat-widget{
  position:fixed; bottom:28px; right:28px; z-index:998;
  width:370px; height:580px; border-radius:20px; overflow:hidden;
  background:var(--bg-raised); border:1px solid var(--line);
  box-shadow:0 12px 48px rgba(0,0,0,0.6);
  display:none; flex-direction:column;
}
.chat-widget.open{ display:flex; animation:widgetPop .5s cubic-bezier(0.34,1.56,0.64,1); }
.chat-widget.minimized{ display:none; }
@keyframes widgetPop{
  0%{ opacity:0; transform:scale(0.3) translateY(40px); }
  60%{ opacity:1; transform:scale(1.05) translateY(-4px); }
  80%{ transform:scale(0.97) translateY(2px); }
  100%{ transform:scale(1) translateY(0); }
}

.chat-widget-header{
  padding:18px 20px; background:linear-gradient(135deg, var(--gold), #D4922E);
  display:flex; align-items:center; gap:12px; min-height:70px;
}
.chat-widget-header img{ width:40px; height:40px; object-fit:cover; border-radius:50%; border:2px solid rgba(255,255,255,0.3); padding:2px; background:var(--bg); }
.chat-widget-header .wh-info{ flex:1; }
.chat-widget-header .wh-title{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:16px; color:#14161C; }
.chat-widget-header .wh-status{ font-size:11px; color:rgba(20,22,28,0.7); display:flex; align-items:center; gap:5px; }
.chat-widget-header .wh-status::before{ content:''; width:7px; height:7px; border-radius:50%; background:#1a7a1a; display:inline-block; }
.chat-widget-minimize{
  background:rgba(20,22,28,0.15); border:none; color:#14161C; cursor:pointer;
  font-size:20px; line-height:1; width:32px; height:32px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; transition:background .15s ease;
}
.chat-widget-minimize:hover{ background:rgba(20,22,28,0.25); }

.chat-widget-log{ flex:1; overflow-y:auto; padding:20px 16px; display:flex; flex-direction:column; gap:14px; background:var(--bg); }
.chat-widget-log .w-msg{ font-size:13.5px; line-height:1.55; padding:12px 16px; border-radius:16px; max-width:85%; word-wrap:break-word; }
.chat-widget-log .w-msg.bot{ background:var(--bg-raised); border:1px solid var(--line); color:var(--ink-dim); align-self:flex-start; border-bottom-left-radius:4px; }
.chat-widget-log .w-msg.user{ background:var(--gold); color:#14161C; align-self:flex-end; border-bottom-right-radius:4px; font-weight:500; }
.chat-widget-log .w-msg.bot a{ color:var(--gold); text-decoration:underline; }

.chat-widget-input{ display:flex; border-top:1px solid var(--line); background:var(--bg-raised); padding:6px; gap:6px; }
.chat-widget-input input{ flex:1; background:var(--bg); border:1px solid var(--line); border-radius:12px; padding:12px 16px; color:var(--ink); font-family:'IBM Plex Sans',sans-serif; font-size:14px; outline:none; transition:border-color .15s ease; }
.chat-widget-input input::placeholder{ color:var(--ink-faint); }
.chat-widget-input input:focus{ border-color:var(--gold); }
.chat-widget-input button{ background:var(--gold); color:#14161C; border:none; padding:0 18px; font-weight:600; font-size:13px; cursor:pointer; border-radius:12px; transition:background .15s ease; }
.chat-widget-input button:hover{ background:#F0B155; }

/* Quick reply buttons */
.w-quick-replies{ display:flex; flex-wrap:wrap; gap:8px; padding:4px 0; }
.w-quick-replies button{
  background:transparent; border:1px solid var(--gold); color:var(--gold);
  padding:8px 14px; border-radius:20px; font-size:12.5px; font-family:'IBM Plex Sans',sans-serif;
  cursor:pointer; transition:all .15s ease; white-space:nowrap;
}
.w-quick-replies button:hover{ background:var(--gold); color:#14161C; }

/* Typing dots animation */
.typing-dots{ display:flex; gap:4px; padding:4px 0; }
.typing-dots span{
  width:7px; height:7px; border-radius:50%; background:var(--ink-faint);
  animation:typingBounce 1.4s infinite ease-in-out;
}
.typing-dots span:nth-child(2){ animation-delay:0.2s; }
.typing-dots span:nth-child(3){ animation-delay:0.4s; }
@keyframes typingBounce{
  0%,60%,100%{ transform:translateY(0); opacity:0.4; }
  30%{ transform:translateY(-6px); opacity:1; }
}

/* Minimized bubble */
.chat-widget-bubble{
  position:fixed; bottom:28px; right:28px; z-index:997;
  display:none; cursor:pointer;
  background:var(--gold); color:#14161C; border:none; border-radius:50%;
  width:60px; height:60px; align-items:center; justify-content:center;
  box-shadow:0 4px 24px rgba(232,163,61,0.45);
  transition:transform .2s ease, box-shadow .2s ease;
}
.chat-widget-bubble:hover{ transform:scale(1.1); box-shadow:0 6px 32px rgba(232,163,61,0.55); }
.chat-widget-bubble.show{ display:flex; animation:bubblePop .4s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes bubblePop{ 0%{ transform:scale(0); } 100%{ transform:scale(1); } }
.chat-widget-bubble svg{ width:28px; height:28px; }

/* ── Mobile fixes ── */
@media (max-width:768px){
  /* 1. Navbar — compact, hide back-link */
  nav .wrap{ height:52px; padding:0 14px; }
  .logo{ font-size:15px; gap:6px; }
  .logo-img{ width:28px; height:28px; }
  .back-link{ display:none; }
  .nav-cta{ padding:7px 14px; font-size:12px; }

  /* 2. Solution page — reduce gaps */
  .detail-hero{ padding:90px 0 28px; }
  .detail-hero h1{ font-size:24px; }
  .detail-hero p{ font-size:14px; margin-bottom:12px; }
  .video-section{ padding:24px 0; }
  .narrative-section{ padding:4px 0 32px; }
  .narrative-tabs{ gap:6px; display:flex; flex-wrap:nowrap; }
  .narrative-tab{ font-size:11px; padding:7px 10px; flex:1; text-align:center; white-space:nowrap; }
  .cta-section{ padding:40px 0; }

  /* Filters — accordion on mobile */
  .filter-accordion{
    display:flex; align-items:center; gap:8px;
    padding:10px 14px; background:var(--bg-raised); border:1px solid var(--line);
    border-radius:10px; cursor:pointer; width:100%;
    font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--ink);
    margin-bottom:10px;
  }
  .filter-accordion .fa-label{ flex:1; }
  .filter-accordion .fa-active{ color:var(--gold); font-weight:500; font-size:11px; }
  .filter-accordion .fa-arrow{ font-size:10px; color:var(--ink-faint); transition:transform .2s ease; }
  .filter-accordion.open .fa-arrow{ transform:rotate(180deg); }
  .filters{ display:none !important; margin-top:0 !important; padding:12px; background:var(--bg-raised); border:1px solid var(--line); border-radius:10px; }
  .filters.show{ display:flex !important; }
  .filter-btn{ font-size:10px; padding:5px 10px; }

  /* Solution cards — center button */
  .solution{ align-items:center; text-align:center; }
  .solution-btn{ align-self:center; }

  /* Footer — stack & center */
  footer .wrap{ flex-direction:column; text-align:center; gap:8px; font-size:12px; }

  /* Homepage hero — reduce top/bottom space */
  .hero{ padding:100px 0 48px; }
  .hero p{ margin-bottom:22px; }

  /* 3. Chatbot — full screen on mobile */
  .chat-widget{
    width:100vw; height:100dvh; right:0; bottom:0;
    border-radius:0; border:none;
  }
  .chat-widget-bubble{ width:52px; height:52px; bottom:16px; right:14px; }
  .chat-widget-bubble svg{ width:24px; height:24px; }

  /* Mini chat clickbait — light themed, cute */
  .chat-mini{
    position:fixed; bottom:16px; right:14px; z-index:997;
    width:160px; border-radius:14px; overflow:hidden;
    background:#ffffff; border:1px solid #e8e8e8;
    box-shadow:0 6px 28px rgba(0,0,0,0.18);
    cursor:pointer; display:none; flex-direction:column;
    animation:miniFloat 3s ease-in-out infinite, miniPop .4s cubic-bezier(0.34,1.56,0.64,1);
  }
  .chat-mini.show{ display:flex; }
  .chat-mini-close{
    position:absolute; top:6px; right:6px; background:none; border:none;
    color:#9ca3af; font-size:14px; cursor:pointer; width:18px; height:18px;
    display:flex; align-items:center; justify-content:center; border-radius:50%;
    transition:background .15s ease, color .15s ease; line-height:1; z-index:2;
  }
  .chat-mini-close:hover{ background:#f0f0f0; color:#374151; }
  .chat-mini-header{
    padding:10px 12px; background:#ffffff;
    display:flex; align-items:center; gap:8px; position:relative;
  }
  .chat-mini-avatar{
    width:22px; height:22px; border-radius:50%;
    background:linear-gradient(135deg,#7c3aed,#6d28d9);
    display:flex; align-items:center; justify-content:center;
    font-size:11px; color:#fff; flex-shrink:0;
  }
  .chat-mini-header .mini-info{ flex:1; }
  .chat-mini-header .mini-title{ font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:10px; color:#1a1a1a; }
  .chat-mini-header .mini-status{ font-size:8px; color:#6b7280; display:flex; align-items:center; gap:3px; }
  .chat-mini-header .mini-status::before{ content:''; width:4px; height:4px; border-radius:50%; background:#22c55e; display:inline-block; }
  .chat-mini-body{ padding:4px 10px 8px; background:#ffffff; }
  .chat-mini-msg{
    font-size:9.5px; line-height:1.4; color:#374151;
    background:#f3f4f6; padding:6px 8px; border-radius:10px; border-bottom-left-radius:3px;
  }
  .chat-mini-input{
    display:flex; border-top:1px solid #f0f0f0; background:#fafafa; padding:4px 6px; gap:3px; align-items:center;
  }
  .chat-mini-input span{
    flex:1; background:#ffffff; border:1px solid #e5e7eb; border-radius:8px;
    padding:5px 8px; font-size:9px; color:#9ca3af;
  }
  .chat-mini-input .mini-send{
    background:#7c3aed; color:#fff; border:none; border-radius:50%;
    width:22px; height:22px; display:flex; align-items:center; justify-content:center; font-size:9px;
  }
}
@keyframes miniFloat{
  0%,100%{ transform:translateY(0); }
  50%{ transform:translateY(-8px); }
}
@keyframes miniPop{
  0%{ opacity:0; transform:scale(0.3) translateY(20px); }
  100%{ opacity:1; transform:scale(1) translateY(0); }
}
