/* AISuite Liquid Glass Theme */
:root {
  /* Brand colors */
  --brand-blueviolet: #8A2BE2; /* Primary */
  --brand-orangered: #FF4500;  /* Secondary */
  --brand-yellowred: #FF8A00;  /* Tertiary */

  --surface-dark: #0a0f1a;      /* deep near-black */
  --surface-darker: #060a12;    /* darker */
  --text: #e6eaf2;
  --text-dim: #a9b0c2;

  --gradient-brand: linear-gradient(135deg, var(--brand-blueviolet), var(--brand-orangered) 50%, var(--brand-yellowred));
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 900px at -10% -10%, rgba(10,15,26,0.92), rgba(10,15,26,0.65) 60%, rgba(10,15,26,0)),
              radial-gradient(900px 700px at 110% -10%, rgba(138,43,226,0.25), rgba(138,43,226,0) 60%),
              radial-gradient(900px 700px at -10% 110%, rgba(255,69,0,0.2), rgba(255,69,0,0) 60%);
  min-height: 100vh;
}

/* Allow content to scroll behind the fixed pill bar; respect safe-area */
main { padding-bottom: env(safe-area-inset-bottom); }

/* Hero spacing so content is on the page, not inside glass */
.hero { padding: clamp(96px, 18vh, 180px) 0 clamp(64px, 14vh, 140px); }

.container {
  width: min(1160px, 92%);
  margin: 0 auto;
}

/* Background polish */
.site-bg {
  position: fixed; inset: 0; z-index: -2;
  background-image: url('../bgop2.jpeg');
  background-size: cover; /* full-bleed */
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* static on scroll */
  /* Strong blur (~60%) and slight scale to avoid edge clipping */
  filter: blur(12px);
  transform: scale(1.06) rotateY(180deg);
  will-change: transform;
}
.site-noise {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='table' tableValues='0 0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light; opacity: .08;
}

/* Liquid material tokens */
.material-base {
  --mat-blur: 20px; --mat-sat: 180%; --mat-alpha: 0.18; --mat-stroke: 0.55;
  background: rgba(255,255,255,var(--mat-alpha));
  border: 1px solid rgba(255,255,255,var(--mat-stroke));
  backdrop-filter: blur(var(--mat-blur)) saturate(var(--mat-sat));
  -webkit-backdrop-filter: blur(var(--mat-blur)) saturate(var(--mat-sat));
}
.material-thin { --mat-blur: 14px; --mat-sat: 165%; --mat-alpha: 0.14; --mat-stroke: 0.45; }
.material-regular { --mat-blur: 20px; --mat-sat: 180%; --mat-alpha: 0.20; --mat-stroke: 0.55; }
.material-thick { --mat-blur: 28px; --mat-sat: 190%; --mat-alpha: 0.28; --mat-stroke: 0.65; }

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 50;
  padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(6,10,18,0.85), rgba(6,10,18,0.55) 60%, rgba(6,10,18,0));
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
}
.navbar .container { display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-weight: 800; letter-spacing: 0.2px; color: var(--text); }
.brand-accent { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--gradient-brand); box-shadow: 0 0 18px rgba(138,43,226,0.65), 0 0 0 4px rgba(138,43,226,0.16) inset; }

/* Fixed top-left brand */
.brand-fixed { position: fixed; top: 16px; left: 16px; z-index: 40; padding: 8px 12px; border-radius: 999px; text-decoration: none;
  background: rgba(6,10,18,0.35); border: 1px solid rgba(255,255,255,0.18);
  -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%);
}

/* Pill tabbar inspired by Liquid Glass segmented control */
.liquid-tabbar {
  display: inline-flex; gap: 6px; padding: 6px; border-radius: 999px; position: relative; overflow: hidden;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.48);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 10px 24px rgba(0,0,0,0.25);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  margin-left: auto;
}
.dock-bottom {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(clamp(14px, 3.5vmin, 28px) + env(safe-area-inset-bottom));
  z-index: 1000;
  /* Reduced overall width by ~30% */
  width: min(574px, 64%);
  justify-content: space-between;
  padding: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.12));
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 10px 26px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.7);
}
.liquid-tabbar::before{
  content:""; position:absolute; inset:0; border-radius:999px; pointer-events:none;
  background: radial-gradient(180px 180px at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.35), rgba(255,255,255,0) 60%);
  filter: blur(18px); opacity:.35; transition: opacity .25s ease;
}
.liquid-tabbar::after{ content:""; position:absolute; inset:0; border-radius:inherit; background: var(--glass-noise, none); mix-blend-mode: soft-light; opacity:.08; }
.flow-indicator{
  position:absolute; top:4px; bottom:4px; left:6px; width:0; border-radius:999px; z-index:0;
  background: rgba(255,255,255,0.9);
  border:1px solid rgba(255,255,255,0.95);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 8px 22px rgba(0,0,0,0.25);
  transition: left .28s cubic-bezier(.2,.8,.2,1), width .28s cubic-bezier(.2,.8,.2,1);
}
.liquid-tab { display:flex; align-items:center; gap:10px; padding:10px 16px; border-radius:999px; position:relative; z-index:1; text-decoration:none; transition: transform .15s ease; }
.dock-bottom .liquid-tab { color: rgba(15,18,27,0.9); }
.dock-bottom .liquid-tab span { font-weight: 600; }
.liquid-tab svg { width: 18px; height: 18px; fill: currentColor; opacity: 0.9; }
.liquid-tab:hover { transform: translateY(-1px); }
.liquid-tab.is-active { color: #0b0f17; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 96px) 0; }
.hero-card { position: relative; border-radius: 26px; overflow: hidden; }
.liquid-surface { position: relative; border-radius: 22px; box-shadow: 0 24px 70px rgba(0,0,0,0.32); }
.liquid-surface { --mat-blur: 22px; --mat-sat: 185%; --mat-alpha: 0.18; --mat-stroke: 0.55; background: rgba(255,255,255,var(--mat-alpha)); border:1px solid rgba(255,255,255,var(--mat-stroke)); -webkit-backdrop-filter: blur(var(--mat-blur)) saturate(var(--mat-sat)); backdrop-filter: blur(var(--mat-blur)) saturate(var(--mat-sat)); }
.liquid-surface .glare { position:absolute; inset:-20%; pointer-events:none; }
.liquid-surface .glare::before { content:""; position:absolute; top:-10%; left:-30%; width:60%; height:220%; background: linear-gradient(75deg, rgba(255,255,255,.20) 0%, rgba(255,255,255,.10) 40%, rgba(255,255,255,0) 60%); transform: rotate(8deg); filter: blur(10px); opacity:.45; }
.liquid-surface .sweep { position:absolute; inset:0; pointer-events:none; }
.liquid-surface .sweep::before { content:""; position:absolute; top:0; left:-120%; width:240%; height:100%; background: linear-gradient( to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.16) 50%, rgba(255,255,255,0) 100% ); transform: rotate(12deg); opacity:0; transition: opacity .8s ease, left .8s ease; }
.liquid-surface:hover .sweep::before { opacity: 1; left: 120%; }

.hero-content { padding: clamp(24px, 5vw, 56px); position: relative; z-index: 1; }
.eyebrow { letter-spacing: .22em; text-transform: uppercase; color: var(--text-dim); font-weight: 600; margin-bottom: 12px; font-size: 12px; }
.hero h1 { font-size: clamp(28px, 5vw, 52px); line-height: 1.08; margin: 6px 0 10px; }
.gradient-text { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.subhead { color: var(--text-dim); max-width: 68ch; margin: 6px 0 18px; font-size: clamp(14px, 2.2vw, 18px); }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }

.liquid-button { display:inline-flex; align-items:center; justify-content:center; gap:10px; padding:12px 22px; border-radius:999px; border:1px solid rgba(255,255,255,0.65); background: rgba(255,255,255,0.18); color: var(--text); text-decoration:none; -webkit-backdrop-filter: blur(14px) saturate(165%); backdrop-filter: blur(14px) saturate(165%); box-shadow: 0 12px 28px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.55); transition: transform .15s ease, box-shadow .25s ease, color .2s ease; }
.liquid-button:hover { transform: translateY(-1px); box-shadow: 0 16px 36px rgba(0,0,0,0.32); }
.btn-primary { background-image: var(--gradient-brand); color: #0b0f17; border-color: rgba(255,255,255,0.85); }
.btn-secondary { background: rgba(255,255,255,0.16); color: var(--text); }

/* Shared section heading + utilities */
.section-head { margin: 0 0 10px; font-size: clamp(20px, 3.4vw, 32px); letter-spacing: 0.2px; }
.dim { color: var(--text-dim); }
.trust-bar { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 999px; margin-top: 10px; }

/* Pain / Problem-Solver — Scrollytelling */
.pain { padding: 24px 0 36px; }
.pain-layout { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 18px; align-items: start; }
.pain-layout > .section-head { grid-column: 1 / -1; margin-bottom: 4px; }

.pain-viz { position: sticky; top: clamp(72px, 12vh, 120px); align-self: start; min-height: 360px; padding: 12px; overflow: hidden; }
.pain-viz .viz-svg { width: 100%; height: auto; display: block; }
.viz-layer { position: absolute; inset: 12px; opacity: 0; transform: translateY(6px) scale(0.995); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.viz-layer.is-active { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.pain-steps { display: flex; flex-direction: column; gap: 16px; padding-bottom: 6vh; }
.step { position: relative; padding: 16px 16px 16px 34px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.08); transition: background .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease; }
.step h3 { margin: 2px 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--text-dim); }
.step.is-active { background: rgba(255,255,255,0.24); border-color: rgba(255,255,255,0.46); transform: translateY(-2px); box-shadow: 0 14px 36px rgba(80,140,255,0.22), inset 0 1px 0 rgba(255,255,255,0.7); }
.step.is-active h3 { color: #ffffff; }
.step.is-active p { color: #edf4ff; }
/* Left-edge pointer triangle, sits in the gap between columns */
.step.is-active::before { content: ''; position: absolute; left: -14px; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-style: solid; border-width: 14px 14px 14px 0; border-color: transparent rgba(158,194,255,0.95) transparent transparent; filter: drop-shadow(0 4px 10px rgba(60,120,255,0.5)); z-index: 2; }
/* Remove old right pointer */
.step.is-active::after { content: none; }

/* KPI Outcome Board */
.kpi-board { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; position: relative; }
.kpi-tile { padding: 16px; border-radius: 16px; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.20); box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 10px 26px rgba(0,0,0,0.25); }
.kpi-label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); font-weight: 700; margin-bottom: 6px; }
.kpi-value { font-weight: 800; font-size: clamp(22px, 4vw, 30px); line-height: 1.1; color: #fff; }
.kpi-value .num { display: inline-block; min-width: 1ch; }
.kpi-delta { margin-top: 6px; font-weight: 700; font-size: 12px; letter-spacing: .02em; }
.delta-up { color: #e65a5a; }  /* red for worse */
.delta-down { color: #47d17e; } /* green for improved */

/* Trend highlight on KPI tiles */
.kpi-tile.is-good { border-color: rgba(71, 209, 126, 0.55); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 0 1px rgba(71,209,126,0.35), 0 16px 36px rgba(20,255,160,0.18); }
.kpi-tile.is-bad { border-color: rgba(230, 90, 90, 0.55); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 0 0 1px rgba(230,90,90,0.35), 0 16px 36px rgba(255,60,60,0.18); }

/* Solution state glow */
.pain-viz.is-solution .kpi-tile {
  border-color: rgba(71, 209, 126, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    0 0 0 1px rgba(71, 209, 126, 0.25),
    0 18px 40px rgba(20, 255, 160, 0.15);
}

/* KPI Explainer */
.kpi-explain { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); }
.kpi-cause .cause-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); font-weight: 800; margin-right: 8px; }
.kpi-cause .cause-text { color: #fff; font-weight: 700; }
.kpi-effect { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; color: #cfe8ff; }
.kpi-effect .arrow { opacity: 0.8; }
.kpi-impacts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chip { padding: 6px 10px; font-size: 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.08); color: #e8f1ff; }
.chip.is-on { background: rgba(120,170,255,0.18); border-color: rgba(120,170,255,0.42); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.6); }

/* Highlight impacted tiles */
.kpi-tile.is-impacted { border-color: rgba(160,200,255,0.55); box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 0 0 1px rgba(120,170,255,0.3), 0 14px 32px rgba(60,120,255,0.18); }

/* Mobile layout */
@media (max-width: 700px) {
  .kpi-board { grid-template-columns: 1fr; }
  .kpi-explain { grid-template-columns: 1fr; }
}

/* Services */
.services { padding: 24px 0 72px; }
.services-sub { margin: 2px 0 12px; }
.modules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.module-card { position: relative; padding: 18px; border-radius: 16px; overflow: hidden; transition: transform .16s ease, box-shadow .25s ease, border-color .25s ease; }
.module-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gradient-brand); opacity: .6; }
.module-card:hover { transform: translateY(-2px); box-shadow: 0 16px 42px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.65); }
.module-card .badge { position: absolute; top: 10px; right: 10px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.42); -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%); }
.module-card h3 { margin: 0 0 6px; font-size: 18px; }
.module-card .summary { margin: 0 8px 10px 0; color: var(--text-dim); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 12px; color: #e8f1ff; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.22); box-shadow: inset 0 1px 0 rgba(255,255,255,0.45); }
.module-card:hover .tag { border-color: rgba(138,43,226,0.45); box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 0 0 1px rgba(138,43,226,0.20); }

/* Toolkit */
.toolkit { padding: 24px 0 72px; }
.toolkit .intro, .toolkit-sub { color: var(--text-dim); max-width: 70ch; }
/* Non-liquid presentation: outlined strips */
.toolkit-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; margin-top: 12px; align-items: stretch; }
.tool-lead { padding: 18px; border-radius: 16px; background: linear-gradient(180deg, rgba(12,16,26,0.85), rgba(12,16,26,0.55)); border: 1px solid rgba(180,200,255,0.12); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
.tool-list { display: grid; grid-template-rows: repeat(3, 1fr); gap: 12px; }
.tool-item { padding: 14px 16px; border-radius: 14px; border: 1px dashed rgba(180,200,255,0.22); background: rgba(255,255,255,0.03); transition: transform .15s ease, border-color .2s ease; }
.tool-item:hover { transform: translateY(-1px); border-color: rgba(138,43,226,0.45); }
.tool-item h3 { margin: 0 0 6px; font-size: 16px; }
.tool-item p { margin: 0; color: var(--text-dim); }
.toolkit-cta { margin-top: 14px; }

@media (max-width: 960px){
  .toolkit-grid { grid-template-columns: 1fr; }
  .tool-list { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px){
  .tool-list { grid-template-columns: 1fr; }
}

/* Modal (Liquid Glass) */
.modal { position: fixed; inset: 0; display: none; place-items: center; z-index: 1200; }
.modal.open { display: grid; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,8,14,0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-dialog { position: relative; width: min(860px, 92%); padding: 18px 18px 56px; border-radius: 22px; }
.modal-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.55); background: rgba(255,255,255,0.16); color: #fff; font-weight: 800; cursor: pointer; -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%); }
.modal-content { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; align-items: center; }
.modal-title { margin: 0 0 6px; font-size: 20px; }
.modal-summary { margin: 0; color: var(--text-dim); }
.modal-graphic { min-height: 180px; border-radius: 16px; background: radial-gradient(240px 140px at 30% 30%, rgba(138,43,226,0.25), rgba(138,43,226,0) 60%), radial-gradient(220px 140px at 70% 70%, rgba(255,69,0,0.22), rgba(255,69,0,0) 60%); border: 1px solid rgba(255,255,255,0.18); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5); position: relative; overflow: hidden; }
.modal-graphic::after { content: ''; position: absolute; inset: -30%; background: conic-gradient(from 0deg, rgba(255,255,255,0.12), rgba(255,255,255,0)); animation: spin 14s linear infinite; filter: blur(16px); opacity: .6; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal-actions { position: absolute; right: 18px; bottom: 14px; }

/* Global helpers */
body.no-scroll { overflow: hidden; }
.module-card { cursor: pointer; }
/* generic bullets styling (used in modal) */
.bullets { margin: 10px 0 0 0; padding-left: 1.2em; }
.bullets li { margin: 6px 0; }

/* Proof */
.proof { padding: 24px 0 72px; }
.proof-tabs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.proof-tab { padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(180,200,255,0.28); background: rgba(255,255,255,0.06); color: var(--text); font-weight: 700; letter-spacing: .2px; cursor: pointer; transition: transform .12s ease, border-color .2s ease, background .2s ease; }
.proof-tab:hover { transform: translateY(-1px); border-color: rgba(138,43,226,0.55); }
.proof-tab.is-active { background: rgba(255,255,255,0.22); color: #0b0f17; border-color: rgba(255,255,255,0.65); box-shadow: inset 0 1px 0 rgba(255,255,255,0.7); }
.proof-dynamic { margin-top: 12px; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 12px; align-items: start; }
.case-panel { padding: 18px; border-radius: 16px; }
.case-panel h3 { margin: 0 0 8px; font-size: 18px; }
.case-panel p { margin: 0 0 8px; color: var(--text-dim); }
.metrics-panel { padding: 18px; border-radius: 16px; }
.metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { padding: 12px; border-radius: 12px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); box-shadow: inset 0 1px 0 rgba(255,255,255,0.45); }
.metric .label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); font-weight: 800; }
.metric .values { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 6px; }
.metric .before { color: #e65a5a; font-weight: 800; }
.metric .arrow { opacity: .7; }
.metric .after { color: #47d17e; font-weight: 800; }
.quote { margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(180,200,255,0.18); color: #cfe8ff; font-style: italic; }

/* Final CTA */
.final-cta { padding: 36px 0 120px; text-align: center; }

/* Product Showcase */
.product { padding: 24px 0 72px; }
.product .intro { color: var(--text-dim); margin: 2px 0 12px; text-align: center; }
.device-macbook { width: min(980px, 96%); margin: 12px auto 0; padding: 18px 18px 24px; }
.device-notch { width: 120px; height: 10px; border-radius: 0 0 10px 10px; margin: 0 auto 10px; background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.12)); border: 1px solid rgba(255,255,255,0.45); box-shadow: inset 0 1px 0 rgba(255,255,255,0.7); }
.device-screen { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #02060d; border: 1px solid rgba(255,255,255,0.35); box-shadow: inset 0 1px 0 rgba(255,255,255,0.45); }
.screen-shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.screen-shot.is-active { opacity: 1; }
.device-base { width: 60%; height: 8px; margin: 12px auto 0; border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.12)); border: 1px solid rgba(255,255,255,0.45); box-shadow: inset 0 1px 0 rgba(255,255,255,0.7); }

/* CogniFace bubble (assistant face) */
.cp-face {
  position: fixed;
  right: 16px;
  bottom: calc(clamp(14px, 3.5vmin, 28px) + env(safe-area-inset-bottom));
  width: 60px; height: 60px; border-radius: 50%;
  z-index: 1105; /* above pill bar (1000), below modal (1200) */
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
  backdrop-filter: blur(14px) saturate(165%);
  box-shadow: 0 14px 36px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.6);
  display: none; /* created by JS; becomes block when animating or shown */
  align-items: center; justify-content: center;
  color: #fff;
  transform: translateX(120%);
  opacity: 0;
  will-change: transform, opacity;
}
.cp-face.is-visible { display: flex; }
.cp-face.settled { transform: translateX(0) !important; opacity: 1 !important; }
.cp-face.roll-in { animation: cpRollIn .6s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes cpRollIn {
  0% { transform: translateX(120%) rotate(0deg); opacity: 0; }
  100% { transform: translateX(0) rotate(360deg); opacity: 1; }
}
.cp-face.bounce { animation: cpBounceDrop 1.2s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes cpBounceDrop {
  0%   { transform: translateX(0) translateY(-120px) scale(1); }
  38%  { transform: translateX(0) translateY(0) scale(1.02); }
  55%  { transform: translateX(0) translateY(-40px) scale(1); }
  72%  { transform: translateX(0) translateY(0) scale(1.01); }
  85%  { transform: translateX(0) translateY(-14px) scale(1); }
  100% { transform: translateX(0) translateY(0) scale(1); }
}
/* subtle ground shadow reacting with bounce */
.cp-face::after{
  content:""; position:absolute; left:12%; right:12%; bottom:-6px; height:12px;
  background: radial-gradient(50% 60% at 50% 50%, rgba(0,0,0,0.35), rgba(0,0,0,0) 70%);
  filter: blur(6px); opacity: 0; pointer-events: none;
}
.cp-face.bounce::after{ animation: cpBounceShadow 1.2s ease forwards; }
@keyframes cpBounceShadow{
  0%{ opacity: 0; transform: scaleX(0.6); }
  38%{ opacity: .45; transform: scaleX(1); }
  55%{ opacity: .32; transform: scaleX(0.8); }
  72%{ opacity: .40; transform: scaleX(1); }
  100%{ opacity: .38; transform: scaleX(1); }
}
.cp-face .face {
  position: relative; width: 100%; height: 100%;
}
  .cp-face .eye {
    position: absolute; top: 10px;
    width: 8px; height: 8px; border-radius: 50%;
    background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transform-origin: center; transform: scaleY(0.15);
  }
  .cp-face .eye.left { left: 18px; }
  .cp-face .eye.right { right: 18px; }
.cp-face.eyes-open .eye { animation: cpEyesPop .6s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes cpEyesPop {
  0% { transform: scaleY(0.15); }
  70% { transform: scaleY(1.2); }
  100% { transform: scaleY(1); }
}
  .cp-face .mouth { position: absolute; left: 50%; bottom: 11px; width: 28px; height: 16px; transform: translateX(-50%); }
  .cp-face .mouth::before { content: ""; position: absolute; left: 50%; top: 8px; width: 18px; height: 3px; transform: translateX(-50%); background: #fff; border-radius: 3px; opacity: .9; transition: opacity .25s ease; }
  .cp-face .mouth::after { content: ""; position: absolute; left: 50%; top: 0px; width: 24px; height: 16px; transform: translateX(-50%) scale(1); border: 0 solid transparent; border-bottom: 3px solid #fff; border-radius: 0 0 40px 40px; opacity: 0; transition: opacity .25s ease, transform .3s ease; }
.cp-face.smile .mouth::before,
.cp-face.happy .mouth::before { opacity: 0; }
.cp-face.smile .mouth::after,
.cp-face.happy .mouth::after { opacity: 1; transform: translateX(-50%) scale(1); }
.cp-face.sad .mouth::before { opacity: 0; }
.cp-face.sad .mouth::after { opacity: 1; transform: translateX(-50%) scale(1) rotate(180deg); }

/* Speech bubble */
  .cp-speech {
    position: absolute; right: 0; bottom: calc(100% + 8px);
    max-width: none; padding: 8px 12px; border-radius: 12px;
    background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.55);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    backdrop-filter: blur(10px) saturate(160%);
    color: #fff; font-weight: 600; font-size: 12px; letter-spacing: 0; white-space: nowrap; display: inline-block; line-height: 1.2;
    box-shadow: 0 10px 26px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.6);
    opacity: 0; transform: translateY(6px);
    pointer-events: none;
  }
.cp-speech::after{ content:""; position:absolute; right: 8px; bottom: -6px; width: 10px; height: 10px; transform: rotate(45deg); background: rgba(255,255,255,0.18); border-right:1px solid rgba(255,255,255,0.55); border-bottom:1px solid rgba(255,255,255,0.55); }
.cp-speech.show { animation: cpSpeechIn .35s ease forwards; }
@keyframes cpSpeechIn { to { opacity: 1; transform: translateY(0); } }

/* Mobile: allow anchoring near the pill bar's right edge */
  @media (max-width: 640px){
    .cp-face { width: 54px; height: 54px; }
    .cp-speech { font-size: 11px; }
  }

/* Chat drawer (right side) */
.cp-chat { position: fixed; inset: 0; display: none; z-index: 1150; }
.cp-chat.open { display: block; }
.cp-chat::before { content: ""; position: absolute; inset: 0; background: rgba(4,8,14,0.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.cp-chat .cp-chat-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(420px, 92%);
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
  border-left: 1px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.20);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: -18px 0 42px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.6);
  display: grid; grid-template-rows: auto auto 1fr; overflow: hidden;
}
.cp-chat.open .cp-chat-panel { transform: translateX(0); }
.cp-chat-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.28); }
.cp-chat-header .title { font-weight: 800; letter-spacing: .2px; }
.cp-chat-close { width: 32px; height: 32px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.55); background: rgba(255,255,255,0.16); color: #fff; font-weight: 800; cursor: pointer; }
.cp-chat-tabs { display: flex; gap: 8px; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.22); }
.cp-chat-tabs .tab { padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(180,200,255,0.28); background: rgba(255,255,255,0.10); color: #fff; font-weight: 700; cursor: pointer; }
.cp-chat-tabs .tab.is-active { background: var(--gradient-brand); color: #0b0f17; border-color: rgba(255,255,255,0.65); box-shadow: inset 0 1px 0 rgba(255,255,255,0.7); }
.cp-chat-body { display: grid; grid-template-rows: 1fr; height: 100%; }
.cp-chat-body .pane { display: none; height: 100%; }
.cp-chat-body .pane.is-active { display: grid; grid-template-rows: 1fr auto; }
.cp-chat-body .pane.ai { position: relative; }
.cp-chat-messages { padding: 12px; overflow-y: auto; }
.cp-chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.10); }
.cp-chat-input input[type="text"] { flex: 1; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.45); background: rgba(255,255,255,0.14); color: #fff; outline: none; }
.cp-chat-input .send { padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.65); background: var(--gradient-brand); color: #0b0f17; font-weight: 800; cursor: pointer; }
.msg { display: flex; margin: 6px 0; }
.msg .bubble { max-width: 85%; padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.45); background: rgba(255,255,255,0.14); box-shadow: inset 0 1px 0 rgba(255,255,255,0.55); }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: rgba(180,200,255,0.22); border-color: rgba(180,200,255,0.45); }
.msg.bot { justify-content: flex-start; }
.msg.bot .bubble { background: rgba(255,255,255,0.12); }
.cp-contact-form { display: grid; gap: 8px; padding: 12px; }
.cp-contact-form .row { display: grid; gap: 8px; }
.cp-contact-form .field { display: grid; gap: 6px; }
.cp-contact-form label { font-size: 12px; letter-spacing: .06em; text-transform: none; color: var(--text-dim); font-weight: 700; }
.cp-contact-form .phone-line { display: grid; grid-template-columns: 140px 1fr; gap: 8px; align-items: center; }
.cp-contact-form .code-input { padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.45); background: rgba(255,255,255,0.14); color: #fff; outline: none; width: 100%; }
.cp-contact-form input, .cp-contact-form textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.45); background: rgba(255,255,255,0.14); color: #fff; outline: none; }
.cp-contact-form .send { justify-self: end; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.65); background: var(--gradient-brand); color: #0b0f17; font-weight: 800; cursor: pointer; }

@media (max-width: 640px){
  .cp-contact-form .phone-line { grid-template-columns: 110px 1fr; }
}

/* Floating scroll-to-bottom button in chat */
.cp-chat .scroll-to-bottom {
  position: absolute;
  right: 16px;
  bottom: 70px; /* sits above input area */
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  backdrop-filter: blur(10px) saturate(160%);
  box-shadow: 0 10px 26px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.6);
}
.cp-chat .scroll-to-bottom.is-show { display: inline-flex; }

/* Footer */
.site-footer { padding: 18px 0 80px; border-top: 1px solid rgba(255,255,255,0.06); background: linear-gradient(180deg, rgba(6,10,18,0), rgba(6,10,18,0.4)); }
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-links { display: flex; gap: 12px; }
.foot-links a { color: var(--text-dim); text-decoration: none; }
.foot-links a:hover { color: var(--text); }

/* Feature grid */
.preview { padding: 44px 0 72px; }
.grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 20px; border-radius: 16px; border:1px solid rgba(255,255,255,0.55); background: rgba(255,255,255,0.14); -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%); box-shadow: 0 14px 36px rgba(0,0,0,0.28); }
.feature h3 { margin: 0 0 8px; }
.feature p { margin: 0; color: var(--text-dim); }

/* Why section */
.why { padding: 24px 0 80px; }
.why-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; align-items: start; }
.why-copy h2 { margin: 0 0 12px; font-size: clamp(20px, 3.4vw, 32px); }
.why-copy p { margin: 0 0 12px; color: var(--text-dim); line-height: 1.6; }
.why-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.why-card { min-height: 140px; padding: 16px; border-radius: 16px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 10px; }
.why-card h3 { margin: 0; font-size: 18px; letter-spacing: 0.2px; }
.why-icon { width: 40px; height: 40px; display: block; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.28)); }

/* Impact section */
.impact { padding: 28px 0 64px; }
.impact .section-head { margin: 0 0 16px; font-size: clamp(18px, 3vw, 26px); }
.impact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.impact-card { padding: 18px; border-radius: 16px; }
.impact-value { margin: 0 0 6px; font-size: clamp(22px, 4.2vw, 36px); line-height: 1; color: #fff; font-weight: 800; }
.impact-label { margin: 0; color: var(--text-dim); font-weight: 600; letter-spacing: .2px; }

/* Who section */
.who { padding: 24px 0 80px; }
.who .section-head { margin: 0 0 16px; font-size: clamp(18px, 3vw, 26px); }
.who-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.who-item { padding: 16px; border-radius: 16px; display: flex; flex-direction: column; gap: 8px; }
.who-top { display: flex; align-items: center; gap: 10px; }
.who-icon { width: 36px; height: 36px; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.28)); }
.who-item h3 { margin: 0; font-size: 18px; }
.who-item p { margin: 0; color: var(--text-dim); line-height: 1.5; }

/* Responsive */
@media (max-width: 960px){ .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px){
  .grid { grid-template-columns: 1fr; }
  .hero { padding: clamp(72px, 14vh, 120px) 0 clamp(80px, 16vh, 140px); }
  .impact-grid { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr; gap: 18px; }
  .why-cards { grid-template-columns: 1fr 1fr; }
  .who-grid { grid-template-columns: 1fr 1fr; }
  /* Icon-only pill bar on mobile */
  .dock-bottom { width: min(320px, 92%); padding: 4px; gap: 2px; }
  .dock-bottom .liquid-tab span { display: none; }
  .liquid-tab { padding: 8px 10px; gap: 0; }
  .liquid-tab svg { width: 18px; height: 18px; }
  .dock-bottom .flow-indicator { top: 3px; bottom: 3px; }
  /* Brand compaction */
  .brand-fixed { top: 12px; left: 12px; padding: 6px 10px; }
  .brand-name { font-size: 14px; font-weight: 700; }
  /* New sections responsive */
  .pain-layout { grid-template-columns: 1fr; }
  .pain-viz { position: relative; top: 0; min-height: 260px; }
  .pain-steps { padding-bottom: 0; }
  .modules-grid { grid-template-columns: 1fr; }
  .proof-dynamic { grid-template-columns: 1fr; }
}

/* Tablet services layout */
@media (max-width: 960px){
  .modules-grid { grid-template-columns: 1fr 1fr; }
}

/* Backdrop-filter fallback */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .liquid-surface, .liquid-button, .liquid-tabbar, .feature { background: rgba(255,255,255,0.85) !important; border-color: rgba(200,200,210,0.7) !important; color: #0b0f17 !important; box-shadow: 0 12px 28px rgba(0,0,0,0.18) !important; }
  .btn-primary { background: #fff !important; }
}

/* ============================ */
/* Auth: Login page             */
/* ============================ */
.platform-login { 
  width: min(880px, 92%); margin: clamp(80px, 14vh, 140px) auto; 
  padding: clamp(18px, 3vw, 24px);
}
.login-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; align-items: center; }
.login-copy h2 { margin: 0 0 8px; }
.login-form { display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.22); }
.login-form .field { display: grid; gap: 6px; }
.login-form label { font-size: 12px; letter-spacing: .06em; color: var(--text-dim); font-weight: 700; }
.login-form input { padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.35); background: rgba(255,255,255,0.14); color: #fff; outline: none; }
.login-form .hint { font-size: 12px; }
.login-form .error { margin-top: 4px; color: #ff8a8a; font-weight: 700; min-height: 18px; }
@media (max-width: 820px){ .login-grid { grid-template-columns: 1fr; } }

/* ============================ */
/* Platform layout              */
/* ============================ */
.platform { padding: clamp(56px, 8vh, 80px) 0 0; }
.platform-shell { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - clamp(56px, 8vh, 80px)); }
.platform-sidebar { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-right: 1px solid rgba(255,255,255,0.18); }
.platform-sidebar .brand-mini { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.22); }
.platform-nav { display: grid; gap: 6px; }
.platform-nav .nav-item { 
  display: flex; align-items: center; gap: 10px; 
  padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18); color: #fff; font-weight: 700; cursor: pointer;
  text-align: left;
}
.platform-nav .nav-item.is-active { background: var(--gradient-brand); color: #0b0f17; border-color: rgba(255,255,255,0.65); box-shadow: inset 0 1px 0 rgba(255,255,255,0.7); }
.platform-main { display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.platform-topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.08); }
.platform-topbar .crumb { font-weight: 800; letter-spacing: .2px; }
.platform-topbar .logout { padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.45); background: rgba(255,255,255,0.14); color: #fff; font-weight: 700; cursor: pointer; }
.platform-content { padding: 16px; overflow: auto; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card { padding: 16px; border-radius: 16px; }
.is-hidden { display: none !important; }

/* Sidebar footer profile */
.sidebar-footer { margin-top: auto; position: relative; }
.profile-mini { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.22); cursor: pointer; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: rgba(255,255,255,0.22); border: 1px solid rgba(255,255,255,0.45); color: #0b0f17; }
.profile-mini .meta .name { font-weight: 800; }
.profile-menu { position: absolute; left: 10px; bottom: 56px; display: none; min-width: 180px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.45); box-shadow: 0 16px 40px rgba(0,0,0,0.35); z-index: 20; }
.profile-menu.open { display: block; }
.profile-link { width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.08); color: #fff; font-weight: 700; cursor: pointer; }
.profile-link + .profile-link { margin-top: 6px; }

@media (max-width: 1024px){
  .platform-shell { grid-template-columns: 220px 1fr; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px){
  .platform-shell { grid-template-columns: 1fr; }
  .platform-sidebar { position: sticky; top: 0; z-index: 5; }
  .cards-grid { grid-template-columns: 1fr; }
}

/* ============================ */
/* Automation Library (Workflows)*/
/* ============================ */
.auto-panel { display: grid; gap: 12px; }
.auto-panel { grid-column: 1 / -1; }
.auto-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auto-search input { 
  width: 360px; max-width: 70vw; padding: 12px 14px; border-radius: 12px; 
  border: 1px solid rgba(255,255,255,0.35); background: rgba(255,255,255,0.12); color: #fff; outline: none;
}
.auto-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.auto-tag { 
  padding: 6px 10px; border-radius: 999px; font-weight: 700; 
  border: 1px solid rgba(255,255,255,0.28); background: rgba(255,255,255,0.08); color: #fff; cursor: pointer;
}
.auto-tag.is-active { background: var(--gradient-brand); color: #0b0f17; border-color: rgba(255,255,255,0.65); box-shadow: inset 0 1px 0 rgba(255,255,255,0.7); }
.auto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.auto-card { display: grid; gap: 8px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.22); }
.auto-card h4 { margin: 0; font-size: 16px; }
.auto-card .desc { color: var(--text-dim); font-size: 14px; }
.auto-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.auto-card .chip { padding: 4px 8px; border-radius: 999px; font-size: 12px; border: 1px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.08); }
.auto-actions { display: flex; gap: 8px; }
.auto-actions a { text-decoration: none; }
.btn-ghost { padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.35); background: rgba(255,255,255,0.10); color: #fff; font-weight: 700; cursor: pointer; }

@media (max-width: 1080px){ .auto-search input { width: 320px; } }
@media (max-width: 720px){ .auto-search input { width: 100%; } }

/* GPT Interface */
.gpt-panel { display: grid; gap: 14px; grid-column: 1 / -1; }
.gpt-form { display: grid; grid-template-columns: repeat(3, minmax(200px, 1fr)); gap: 12px; }
.gpt-row { display: grid; gap: 6px; }
.gpt-row label { font-weight: 700; color: #cfe0ff; }
.gpt-form select, .gpt-form textarea {
  width: 100%; padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.35); background: rgba(255,255,255,0.10); color: #fff; outline: none;
}
.gpt-controls { display: flex; gap: 10px; align-items: center; }
.gpt-chat { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); }
.gpt-chat .bubble { padding: 0; border-radius: 0; background: transparent; border: none; box-shadow: none; }
@media (max-width: 1024px){ .gpt-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px){ .gpt-form { grid-template-columns: 1fr; } }

/* Polished selects */
.gpt-select {
  appearance: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.10));
  border: 1px solid rgba(255,255,255,0.45);
  color: #0b0f17;
  font-weight: 700;
  padding: 10px 36px 10px 12px;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 8px 24px rgba(0,0,0,0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230b0f17' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.gpt-select:focus { outline: 2px solid rgba(168,191,255,0.9); border-color: rgba(255,255,255,0.85); }

/* Liquid input/textarea */
.liquid-input {
  width: 100%;
  color: #0b0f17;
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.45);
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.10));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 8px 24px rgba(0,0,0,0.18);
}
.liquid-input::placeholder { color: rgba(11,15,23,0.55); font-weight: 600; }
.liquid-input:focus { outline: 2px solid rgba(168,191,255,0.9); border-color: rgba(255,255,255,0.85); }

.gpt-prompt { min-height: 44px; resize: none; overflow: hidden; }

/* Segmented mode toggle: liquid glass look */
.gpt-mode-toggle { 
  padding: 6px; border-radius: 999px; 
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.10));
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 10px 28px rgba(0,0,0,0.22);
}
.gpt-mode-toggle .liquid-tab { 
  background: rgba(255,255,255,0.85);
  color: #0b0f17; border: 1px solid rgba(255,255,255,0.65);
  border-radius: 999px; padding: 10px 16px; font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 4px 10px rgba(0,0,0,0.16);
}
.gpt-mode-toggle .liquid-tab.is-active { background: #fff; }
.gpt-mode-toggle .flow-indicator { 
  height: calc(100% - 12px); top: 6px; bottom: 6px; border-radius: 999px; 
  background: linear-gradient(180deg, rgba(168,191,255,0.35), rgba(168,191,255,0.15));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

/* Chat alignment and containers */
.gpt-msg { display: flex; width: 100%; align-items: baseline; gap: 8px; }
.gpt-msg.user { justify-content: flex-end; }
.gpt-msg.user .bubble { background: transparent; border: none; box-shadow: none; }
.gpt-msg.assistant { justify-content: flex-start; }
.gpt-msg.assistant .bubble { background: transparent; border: none; box-shadow: none; }
/* Chat bubble sizing and wrapping */
.gpt-msg .bubble { width: fit-content; max-width: 85%; overflow-wrap: anywhere; word-break: break-word; }
.gpt-msg.assistant .bubble { max-width: 75%; }

/* Chat avatars */
.msg-avatar { 
  width: 20px; height: 20px; border-radius: 50%; 
  flex: 0 0 20px; 
  display: inline-flex; align-items: center; justify-content: center;
  vertical-align: baseline; /* align with first text line */
}
.msg-avatar.user { 
  display: inline-flex; align-items: center; justify-content: center; 
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 12px; font-weight: 800; line-height: 1; 
  background: rgba(255,255,255,0.85); color: #0b0f17; 
  border: 1px solid rgba(255,255,255,0.65);
}

/* Developer layout: static shell with internal scroll */
.gpt-dev { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.gpt-messages { display: grid; gap: 8px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.gpt-stream { scroll-behavior: smooth; }

@media (max-width: 960px){
  .gpt-dev { grid-template-columns: 1fr; }
}
