/* ═══════════════════════════════════════════════════
   BENCH BIO — UNIFIED DESIGN SYSTEM
   Font: DM Sans (body) + DM Mono (code/labels)
   Scale: 8px base grid | 4px micro
   ═══════════════════════════════════════════════════ */

:root {
  /* ── Brand colours ── */
  --sidebar-bg:         #371e1d;
  --sidebar-mid:        #2e1918;
  --sidebar-light:      #4a2a28;
  --sidebar-hover:      rgba(255,255,255,0.07);
  --sidebar-active:     rgba(255,255,255,0.12);
  --sidebar-border:     rgba(255,255,255,0.08);
  --sidebar-ink:        #f5ede8;
  --sidebar-ink-soft:   rgba(245,237,232,0.65);
  --sidebar-ink-muted:  rgba(245,237,232,0.35);

  --navy:       #371e1d;
  --navy-mid:   #2e1918;
  --navy-light: #4a2a28;
  --navy-card:  #3d2120;

  /* ── Surface colours ── */
  --bg-page:     #f5f3f0;
  --bg-surface:  #ffffff;
  --bg-elevated: #f0ede8;
  --bg-card:     #ffffff;

  /* ── Ink / text ── */
  --ink:        #1a1210;
  --ink-soft:   #6b5c57;
  --ink-muted:  #a8978f;

  /* ── Borders ── */
  --border:        rgba(55,30,29,0.10);
  --border-hover:  rgba(55,30,29,0.18);
  --border-focus:  rgba(13,167,154,0.45);
  --border-teal:   rgba(13,167,154,0.25);

  /* ── Accent: teal ── */
  --teal:        #0da79a;
  --teal-dim:    #0b8f84;
  --teal-soft:   rgba(13,167,154,0.10);
  --teal-glow:   rgba(13,167,154,0.22);
  --teal-border: rgba(13,167,154,0.22);

  /* ── Semantic colours ── */
  --amber:       #d97706;
  --amber-soft:  rgba(217,119,6,0.10);
  --red:         #dc2626;
  --red-soft:    rgba(220,38,38,0.10);
  --green:       #059669;
  --green-soft:  rgba(5,150,105,0.10);
  --purple:      #7c3aed;
  --purple-soft: rgba(124,58,237,0.10);
  --blue:        #2563eb;
  --blue-soft:   rgba(37,99,235,0.10);

  /* ── Border radii ── */
  --r-pill:  40px;
  --r-card:  14px;
  --r-input: 10px;
  --r-sm:    8px;
  --r-xs:    6px;

  /* ── Shadows ── */
  --glow-teal:    0 0 20px rgba(13,167,154,0.20);
  --shadow-card:  0 1px 4px rgba(55,30,29,0.08), 0 4px 16px rgba(55,30,29,0.06);
  --shadow-panel: 0 4px 24px rgba(55,30,29,0.12);

  /* ── Unified typography scale ── */
  --text-xs:    0.72rem;   /* ~11.5px — labels, caps, hints */
  --text-sm:    0.84rem;   /* ~13.5px — secondary body, captions */
  --text-base:  0.94rem;   /* ~15px   — primary body */
  --text-md:    1rem;      /* 16px    — lead / sub copy */
  --text-lg:    1.125rem;  /* 18px    — card titles (small) */
  --text-xl:    1.25rem;   /* 20px    — card titles */

  /* ── Section rhythm ── */
  --section-y: clamp(40px, 5vw, 64px);
  --section-x: clamp(20px, 4vw, 40px);
  --inner-max: 1100px;
  --eyebrow-gap: 18px;
}


/* ═══ RESET ═══ */
*, *::before, *::after { padding: 0; margin: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-base);
  background: var(--bg-page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
}
a  { text-decoration: none; color: inherit; }
li { list-style: none; }
img { display: block; max-width: 100%; }
button, textarea, input { font-family: inherit; }


/* ═══ ANIMATIONS ═══ */
@keyframes fadeUp    { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseRing { 0%,100% { transform: scale(1); opacity: 0.6; } 50% { transform: scale(1.12); opacity: 0.25; } }
@keyframes blink     { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
/* floatPill and floatCard keyframes removed — motion driven by JS RAF sine loop */

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}


/* ═══════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════ */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 14px var(--section-x);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(245,243,240,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 2px 16px rgba(55,30,29,0.06);
  gap: 8px;
}

.header-logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.header-logo-mark {
  width: 30px; height: 30px;
  background: var(--ink);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #f5f3f0; font-size: 17px; flex-shrink: 0;
}
.header-logo-name {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a {
  padding: 6px 14px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: var(--r-pill);
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}
.header-nav a:hover { color: var(--ink); background: rgba(55,30,29,0.06); }

.header-cta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn-primary {
  padding: 8px 18px;
  border-radius: var(--r-pill);
  border: none;
  background: var(--ink);
  color: #f5f3f0;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  display: inline-flex; align-items: center; gap: 5px;
  text-decoration: none;
  white-space: nowrap;
  min-height: 40px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-primary:hover { background: var(--navy); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(55,30,29,0.18); }
.btn-primary:active { transform: translateY(0); }

.header-inner .btn-primary {
  background: rgba(245,243,240,0.90);
  color: var(--ink);
  border: 1px solid rgba(55,30,29,0.12);
}
.header-inner .btn-primary:hover { background: #fff; }

/* Avatar button */
.lp-avatar-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--teal);
  color: #0d1117;
  border: none;
  cursor: pointer;
  font-size: var(--text-sm); font-weight: 800;
  letter-spacing: -0.02em;
  display: none;
  align-items: center; justify-content: center;
  transition: box-shadow 0.18s, transform 0.18s;
  position: relative; z-index: 1001;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.lp-avatar-btn:hover { box-shadow: 0 0 0 3px rgba(13,167,154,0.25); transform: translateY(-1px); }

/* User popup */
.lp-user-popup {
  position: fixed;
  top: 62px; right: 16px;
  width: min(260px, calc(100vw - 32px));
  background: #1a1f2e;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  box-shadow: 0 20px 56px rgba(0,0,0,0.35), 0 4px 14px rgba(0,0,0,0.20);
  overflow: hidden;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.18s cubic-bezier(0.16,1,0.3,1), transform 0.18s cubic-bezier(0.16,1,0.3,1);
}
.lp-user-popup.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.lp-popup-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.lp-popup-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--teal); color: #0d1117; font-size: var(--text-sm); font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lp-popup-meta { flex: 1; min-width: 0; }
.lp-popup-name { font-size: var(--text-sm); font-weight: 700; color: rgba(255,255,255,0.92); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-popup-email { font-size: var(--text-xs); color: rgba(255,255,255,0.40); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-popup-menu { padding: 6px 0; }
.lp-popup-item { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 16px; border: none; background: none; color: rgba(255,255,255,0.75); font-size: var(--text-sm); font-weight: 500; cursor: pointer; text-decoration: none; transition: background 0.1s; min-height: 44px; -webkit-tap-highlight-color: transparent; }
.lp-popup-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.95); }
.lp-popup-item.danger { color: #f04438; }
.lp-popup-item.danger:hover { background: rgba(240,68,56,0.10); }
.lp-popup-item-left { display: flex; align-items: center; gap: 9px; }
.lp-popup-item-left i { font-size: var(--text-base); }
.lp-popup-chevron { font-size: var(--text-sm); opacity: 0.4; }
.lp-popup-divider { height: 1px; background: rgba(255,255,255,0.07); margin: 4px 0; }
.lp-popup-backdrop { position: fixed; inset: 0; z-index: 9998; display: none; }
.lp-popup-backdrop.open { display: block; }

.profile-pill { display: none; }
.profile-name-link { display: none !important; }
.btn-logout { display: none !important; }

@media (max-width: 640px) {
  header { padding: 10px 12px; }
  .header-inner { padding: 7px 12px; }
  .header-nav { display: none; }
  .header-logo-name { font-size: var(--text-sm); }
  .btn-primary { padding: 8px 16px; }
}
@media (max-width: 360px) {
  header { padding: 8px 10px; }
  .header-inner { padding: 6px 10px; }
}


/* ═══════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════ */
.hero-light {
  background: var(--bg-elevated);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(100px, 14vw, 140px) var(--section-x) 0;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.hl-social-proof {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: clamp(18px, 3.5vw, 28px);
  letter-spacing: 0.01em;
}

.hl-h1 {
  font-size: clamp(36px, 8.5vw, 78px);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.045em;
  line-height: 1.06;
  margin-bottom: clamp(14px, 2vw, 20px);
}
.hl-h1 em { font-style: italic; color: #9a8a6a; }

.hl-sub {
  font-size: clamp(0.90rem, 2.5vw, 1.05rem);
  color: var(--ink-soft);
  line-height: 1.72;
  max-width: 560px;
  margin: 0 auto clamp(24px, 4vw, 32px);
}

.hl-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: clamp(32px, 6vw, 52px);
}

.hl-btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: var(--text-base);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  white-space: nowrap;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.hl-btn-primary:hover { background: var(--navy); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(55,30,29,0.20); }
.hl-btn-primary:active { transform: translateY(0); }

.hl-btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  background: rgba(255,255,255,0.70);
  color: var(--ink-soft);
  border: 1px solid rgba(55,30,29,0.15);
  border-radius: var(--r-pill);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.hl-btn-ghost:hover { background: rgba(255,255,255,0.90); border-color: rgba(55,30,29,0.25); }
.hl-btn-ghost:active { transform: translateY(0); }

.hl-cta-context {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin-top: -8px;
  margin-bottom: clamp(32px, 6vw, 52px);
  letter-spacing: 0.01em;
}

.hl-card-wrap {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}
.hl-gradient-card {
  width: 100%;
  min-height: clamp(220px, 42vw, 460px);
  border-radius: clamp(14px, 3vw, 24px);
  background:
    radial-gradient(ellipse 65% 65% at 20% 40%, #c8602a 0%, transparent 55%),
    radial-gradient(ellipse 60% 55% at 80% 55%, #6b8a2a 0%, transparent 55%),
    radial-gradient(ellipse 45% 50% at 50% 10%, #d4a04a 0%, transparent 50%),
    #6b5a2a;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vw, 60px) clamp(14px, 3vw, 20px) clamp(40px, 7vw, 80px);
  overflow: hidden;
}

.hl-pill {
  position: absolute;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: rgba(255,255,255,0.92);
  border-radius: var(--r-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  /* No CSS animation — JS RAF sine loop drives the transform cross-platform */
  will-change: transform;
  opacity: 0;
  transition: opacity 0.5s ease;
}
/* nth-child overrides removed — all animation handled in JS */

.hl-pill-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-sm);
}

.hl-prompt-box {
  width: 100%;
  max-width: 520px;
  background: rgba(60,40,20,0.60);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: clamp(14px, 3vw, 18px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 48px rgba(0,0,0,0.30);
  position: relative;
  z-index: 5;
}
.hl-prompt-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 10px;
}
.hl-prompt-input {
  width: 100%;
  background: transparent;
  border: none; outline: none;
  color: rgba(255,255,255,0.85);
  font-size: clamp(0.88rem, 2.5vw, 1rem);
  font-weight: 400;
  line-height: 1.55;
  resize: none;
  min-height: 52px;
  caret-color: var(--teal);
}
.hl-prompt-input::placeholder { color: rgba(255,255,255,0.35); }
.hl-prompt-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  gap: 10px;
}
.hl-prompt-hint {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hl-prompt-send {
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--teal);
  border: none; border-radius: 10px;
  color: #fff; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
  box-shadow: 0 2px 10px rgba(13,167,154,0.40);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.hl-prompt-send:hover { background: var(--teal-dim); transform: translateY(-1px); }
.hl-prompt-send:active { transform: translateY(0); }

@media (min-width: 860px) {
  .hero-light { padding: 140px 40px 0; }
  .hl-pill { display: flex; }
}
@media (max-width: 600px) {
  .hero-light { padding-top: 108px; }
  .hl-h1 { font-size: clamp(32px, 10vw, 50px); letter-spacing: -0.04em; }
  .hl-sub { font-size: 0.92rem; }
  .hl-cta { gap: 5px; }
  .hl-btn-primary,
  .hl-btn-ghost { justify-content: center; padding: 10px 15px; font-size: 0.85rem; width: 100%; }
  .hl-prompt-box { border-radius: 12px; }
  .hl-prompt-label { font-size: 0.66rem; }
  .hl-prompt-input { min-height: 44px; }
  .hl-prompt-hint { display: none; }
}
@media (max-width: 380px) {
  .hero-light { padding-top: 96px; }
  .hl-h1 { font-size: 30px; }
  .hl-sub { font-size: 0.88rem; }
  .hl-btn-primary,
  .hl-btn-ghost { font-size: 0.92rem; padding: 14px 18px; }
}


/* ═══════════════════════════════════════════════════
   PROBLEM SECTION
   ═══════════════════════════════════════════════════ */
.problem-section {
  background: var(--bg-elevated);
  padding: var(--section-y) var(--section-x);
}
.problem-inner {
  max-width: var(--inner-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
}
.problem-left { display: flex; flex-direction: column; align-items: flex-start; }

.problem-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid rgba(220,38,38,0.18);
  padding: 4px 12px; border-radius: var(--r-pill);
  margin-bottom: var(--eyebrow-gap, 18px); width: fit-content;
}
.problem-title {
  font-size: clamp(26px, 4.5vw, 52px);
  font-weight: 800; letter-spacing: -0.04em;
  color: var(--ink); line-height: 1.07; margin-bottom: 20px;
}
.problem-title em { font-style: italic; color: #9a8a6a; }
.problem-sub {
  font-size: var(--text-base);
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 28px;
}

.problem-cards {
  position: relative;
  min-height: 380px;
  width: 100%;
}

/* Scattered floating notification cards */
.problem-notif-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  position: absolute;
  width: max-content;
  max-width: 340px;
  transition: box-shadow 0.22s, border-color 0.22s;
}
.problem-notif-card:hover {
  box-shadow: var(--shadow-panel);
  border-color: var(--border-hover);
}

/* Individual card positions — staggered scatter. Animation driven by JS RAF sine loop. */
.problem-notif-card:nth-child(1) { top: 0%;  left: 8%;  will-change: transform; opacity: 0; transition: opacity 0.5s ease; }
.problem-notif-card:nth-child(2) { top: 22%; left: 30%; will-change: transform; opacity: 0; transition: opacity 0.5s ease; }
.problem-notif-card:nth-child(3) { top: 46%; left: 4%;  will-change: transform; opacity: 0; transition: opacity 0.5s ease; }
.problem-notif-card:nth-child(4) { top: 68%; left: 22%; will-change: transform; opacity: 0; transition: opacity 0.5s ease; }

/* floatCard keyframes removed — driven by JS RAF */

.problem-notif-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  color: #fff;
}
.problem-notif-avatar--amber  { background: linear-gradient(135deg, #d97706, #f59e0b); }
.problem-notif-avatar--teal   { background: linear-gradient(135deg, #0da79a, #14b8a6); }
.problem-notif-avatar--purple { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.problem-notif-avatar--blue   { background: linear-gradient(135deg, #2563eb, #3b82f6); }

.problem-notif-body {
  flex: 1;
  min-width: 0;
}
.problem-notif-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.problem-notif-name {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.problem-notif-role {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.problem-notif-quote {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  line-height: 1.45;
  margin: 0;
  font-style: italic;
}
.problem-notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(220,38,38,0.4);
}

@media (max-width: 860px) {
  .problem-inner { grid-template-columns: 1fr; gap: 36px; }
  .problem-cards {
    position: static;
    min-height: unset;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .problem-notif-card {
    position: static;
    width: auto;
    max-width: 100%;
    /* mobile: static layout, no float animation, always visible */
    will-change: auto;
    opacity: 1 !important;
    transition: none !important;
    transform: none !important;
  }
  .problem-notif-card:nth-child(even) { align-self: flex-end; }
}
@media (max-width: 480px) {
  .problem-notif-card { padding: 12px 14px; gap: 10px; }
  .problem-notif-avatar { width: 36px; height: 36px; font-size: 0.95rem; }
  .problem-title { font-size: clamp(22px, 7vw, 32px); }
  .usecase-title { font-size: clamp(22px, 7vw, 32px); }
  .problem-sub { font-size: var(--text-sm); }
}


/* ═══════════════════════════════════════════════════
   HOW IT WORKS
   ═══════════════════════════════════════════════════ */
.hiw-section { background: var(--bg-page); padding: var(--section-y) var(--section-x); }
.hiw-section-inner { max-width: var(--inner-max); margin: 0 auto; }

.hiw-header { max-width: 700px; margin-bottom: clamp(32px, 5vw, 52px); }

.hiw-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 12px;
  background: var(--teal-soft); border: 1px solid var(--teal-border);
  border-radius: var(--r-pill);
  font-size: var(--text-xs); font-weight: 700;
  color: var(--teal); letter-spacing: 0.10em; text-transform: uppercase;
  margin-bottom: var(--eyebrow-gap, 18px);
}
.hiw-title {
  font-size: clamp(26px, 4.5vw, 52px);
  font-weight: 800; color: var(--ink);
  letter-spacing: -0.04em; line-height: 1.08; margin-bottom: 12px;
}
.hiw-title em { font-style: italic; color: #9a8a6a; }
.hiw-sub { font-size: var(--text-base); color: var(--ink-soft); line-height: 1.7; max-width: 580px; }

.hiw-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 18px;
  min-height: 340px;
  box-shadow: 0 2px 16px rgba(55,30,29,0.06);
  transition: transform 0.28s, box-shadow 0.28s;
}
.hiw-card:hover { transform: translateY(-3px); box-shadow: 0 8px 40px rgba(55,30,29,0.10); }

.hiw-card-text {
  background: var(--bg-surface);
  padding: clamp(24px, 4vw, 40px) clamp(20px, 3.5vw, 36px);
  display: flex; flex-direction: column; justify-content: center;
}
.hiw-step-num {
  display: inline-block;
  font-size: var(--text-xs); font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--bg-elevated); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: var(--r-pill);
  margin-bottom: 16px; width: fit-content;
}
.hiw-card-title {
  font-size: clamp(16px, 2.2vw, 24px);
  font-weight: 800; color: var(--ink);
  letter-spacing: -0.03em; line-height: 1.22; margin-bottom: 12px;
}
.hiw-card-desc {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  line-height: 1.72; margin-bottom: 20px;
}
.hiw-bullets { display: flex; flex-direction: column; gap: 8px; }
.hiw-bullets li {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: var(--text-sm); color: var(--ink-soft); line-height: 1.5;
}
.hiw-bullets li i { color: var(--teal); font-size: 1rem; flex-shrink: 0; margin-top: 2px; }

.hiw-card-visual {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(20px, 3.5vw, 32px) clamp(16px, 2.5vw, 24px);
  overflow: hidden;
}

.hiw-grad-1 {
  background:
    radial-gradient(ellipse 70% 65% at 20% 35%, rgba(180,100,40,0.65) 0%, transparent 60%),
    radial-gradient(ellipse 55% 55% at 80% 65%, rgba(100,130,50,0.50) 0%, transparent 60%),
    #4a3520;
}
.hiw-grad-2 {
  background:
    radial-gradient(ellipse 65% 60% at 75% 30%, rgba(13,167,154,0.45) 0%, transparent 60%),
    radial-gradient(ellipse 60% 55% at 20% 70%, rgba(55,30,29,0.60) 0%, transparent 60%),
    #1a3530;
}
.hiw-grad-3 {
  background:
    radial-gradient(ellipse 65% 60% at 25% 40%, rgba(200,110,50,0.55) 0%, transparent 60%),
    radial-gradient(ellipse 55% 55% at 78% 65%, rgba(150,110,40,0.45) 0%, transparent 60%),
    #3a2515;
}
.hiw-grad-4 {
  background:
    radial-gradient(ellipse 65% 60% at 70% 35%, rgba(5,150,105,0.45) 0%, transparent 60%),
    radial-gradient(ellipse 55% 55% at 25% 65%, rgba(124,58,237,0.30) 0%, transparent 60%),
    #0f2820;
}
.hiw-grad-5 {
  background:
    radial-gradient(ellipse 65% 60% at 25% 40%, rgba(200,110,50,0.55) 0%, transparent 60%),
    radial-gradient(ellipse 55% 55% at 78% 65%, rgba(150,110,40,0.45) 0%, transparent 60%),
    #3a2515;
}

.hiw-mockup-wrap { width: 100%; max-width: 400px; position: relative; z-index: 5; }
.hiw-mock-inner-card {
  background: #ffffff;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 16px 56px rgba(0,0,0,0.28), 0 4px 16px rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.15);
}
.hiw-mockup-prompt .hiw-mock-inner-card {
  background: rgba(30,20,15,0.72);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 18px 18px 13px;
}
.hiw-mock-header { margin-bottom: 12px; }
.hiw-mock-label {
  font-size: var(--text-xs); font-weight: 700; color: var(--teal);
  letter-spacing: 0.06em; text-transform: uppercase;
  display: flex; align-items: center; gap: 6px;
}
.hiw-mock-body { min-height: 52px; }
.hiw-mock-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.hiw-mock-send {
  width: 32px; height: 32px;
  background: var(--teal); border: none; border-radius: 8px;
  color: #fff; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 2px 10px rgba(13,167,154,0.40);
  -webkit-tap-highlight-color: transparent;
}

.hiw-mc-topbar {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.hiw-mc-title { font-size: var(--text-xs); font-weight: 700; color: var(--ink); line-height: 1.4; flex: 1; min-width: 0; }
.hiw-mc-badge {
  padding: 2px 8px;
  background: var(--teal-soft); border: 1px solid var(--teal-border);
  border-radius: 20px; font-size: 0.62rem; font-weight: 700;
  color: var(--teal); white-space: nowrap; flex-shrink: 0;
}
.hiw-mock-live { font-size: 0.62rem; font-weight: 700; color: var(--green); white-space: nowrap; flex-shrink: 0; }
.hiw-mc-steps { padding: 6px 0; }
.hiw-mc-step {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 14px;
  font-size: var(--text-xs); color: var(--ink-soft);
  border-bottom: 1px solid var(--border);
}
.hiw-mc-step:last-child { border-bottom: none; }
.hiw-mc-step.done   { color: var(--ink); }
.hiw-mc-step.active { color: var(--teal); font-weight: 600; }
.hiw-mc-step.pending { opacity: 0.45; }
.hiw-mc-step span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hiw-mc-dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--teal-soft); border: 1px solid var(--teal-border); color: var(--teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.66rem; flex-shrink: 0;
}
.hiw-mc-dot-active  { background: var(--teal); color: #fff; border-color: var(--teal); animation: pulseRing 2s ease-in-out infinite; }
.hiw-mc-dot-pending { background: var(--bg-elevated); border-color: var(--border); color: var(--ink-muted); }
.hiw-mc-time { font-size: 0.62rem; font-family: 'DM Mono', monospace; color: var(--ink-muted); flex-shrink: 0; }

.hiw-rtab {
  font-size: var(--text-xs); font-weight: 600; color: var(--ink-muted);
  padding: 3px 8px; border-radius: 20px; cursor: pointer; white-space: nowrap;
}
.hiw-rtab-active { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--ink); }

.hiw-export-btn {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 10px;
  background: var(--teal); color: #fff;
  border: none; border-radius: 7px;
  font-size: var(--text-xs); font-weight: 700;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.hiw-rs-num {
  width: 20px; height: 20px;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 700; color: var(--ink-soft); flex-shrink: 0;
}
.hiw-cite {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px;
  background: var(--teal-soft); border: 1px solid var(--teal-border); border-radius: 4px;
  font-size: 0.58rem; font-weight: 700; color: var(--teal);
  vertical-align: middle; margin-left: 2px;
}

.sv-design-tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: var(--text-xs); font-weight: 700; white-space: nowrap; }
.sv-design-tag.blue   { background: var(--blue-soft);   color: var(--blue); }
.sv-design-tag.purple { background: var(--purple-soft); color: var(--purple); }
.sv-design-tag.teal   { background: var(--teal-soft);   color: var(--teal); }
.sv-design-tag.green  { background: var(--green-soft);  color: var(--green); }

.sv-token {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0 8px; border-radius: 20px;
  font-size: var(--text-xs); font-weight: 600; vertical-align: middle;
}
.sv-token-label { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
.sv-token-x { opacity: 0.5; margin-left: 2px; }

.hiw-export-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hiw-export-table { width: 100%; border-collapse: collapse; font-size: var(--text-xs); }
.hiw-export-table thead tr { border-bottom: 1px solid var(--border); }
.hiw-export-table thead th {
  padding: 8px 12px; text-align: left;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-muted); white-space: nowrap;
}
.hiw-export-table thead th:first-child { width: 38%; }
.hiw-export-table thead th:nth-child(2) { width: 42%; }
.hiw-export-table thead th:last-child { width: 20%; text-align: right; }
.hiw-export-table tbody tr { border-bottom: 1px solid var(--border); transition: background 0.14s; }
.hiw-export-table tbody tr:last-child { border-bottom: none; }
.hiw-export-table tbody tr:hover { background: var(--bg-elevated); }
.hiw-export-table tbody td { padding: 9px 12px; vertical-align: middle; color: var(--ink-soft); line-height: 1.4; }
.hiw-export-table tbody td:first-child { font-weight: 600; color: var(--ink); }
.hiw-export-table tbody td:last-child { text-align: right; }

.hiw-status-tag { display: inline-block; font-size: 0.62rem; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); letter-spacing: 0.04em; white-space: nowrap; }
.hiw-status-mapped { background: rgba(5,150,105,0.12); color: var(--green); border: 1px solid rgba(5,150,105,0.20); }
.hiw-status-gap    { background: rgba(217,119,6,0.12); color: var(--amber); border: 1px solid rgba(217,119,6,0.20); }
.hiw-status-review { background: rgba(13,167,154,0.12); color: var(--teal); border: 1px solid var(--teal-border); }

.hiw-badge-approved {
  background: rgba(5,150,105,0.15) !important; color: #34d399 !important;
  border: 1px solid rgba(52,211,153,0.25) !important;
  font-size: 0.62rem; font-weight: 700; padding: 2px 8px; border-radius: var(--r-pill); letter-spacing: 0.04em;
}
.hiw-export-btn-primary { background: var(--teal) !important; color: #fff !important; border-color: var(--teal) !important; }
.hiw-export-btn-primary:hover { background: var(--teal-dim) !important; }

.hiw-share-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px;
  border-top: 1px solid rgba(55,30,29,0.08);
}
.hiw-share-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--text-xs); font-weight: 600; color: var(--ink-soft);
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 4px 10px;
}

@media (max-width: 860px) {
  .hiw-card { grid-template-columns: 1fr; min-height: unset; border-radius: 16px; }
  .hiw-card-flip .hiw-card-visual { order: -1; }
  .hiw-card-visual { min-height: 220px; }
  .hiw-mockup-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .hiw-mockup-wrap table { font-size: 0.66rem !important; }
  .hiw-mockup-wrap table th,
  .hiw-mockup-wrap table td { padding: 6px 8px !important; }
}
@media (max-width: 480px) {
  .hiw-card { border-radius: 12px; margin-bottom: 14px; }
  .hiw-card-title { font-size: clamp(15px, 5.5vw, 20px); }
  .hiw-card-desc  { font-size: var(--text-sm); }
  .hiw-bullets li { font-size: var(--text-xs); }
  .hiw-card-visual { min-height: 180px; }
  .hiw-mc-step { font-size: 0.68rem; padding: 7px 10px; }
  .hiw-mc-title { font-size: 0.68rem; }
  .hiw-eyebrow { font-size: 0.62rem; padding: 4px 10px; }
  .hiw-title { font-size: clamp(22px, 7vw, 32px); }
}


/* ═══════════════════════════════════════════════════
   USE CASES
   ═══════════════════════════════════════════════════ */
.usecase-section { background: var(--bg-page); padding: var(--section-y) var(--section-x); overflow: hidden; }
.usecase-inner { max-width: var(--inner-max); margin: 0 auto; }

.usecase-header { margin-bottom: clamp(36px, 5vw, 52px); max-width: 640px; }
.usecase-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--teal); background: var(--teal-soft); border: 1px solid var(--teal-border);
  padding: 4px 12px; border-radius: var(--r-pill); margin-bottom: var(--eyebrow-gap, 18px); width: fit-content;
}
.usecase-title {
  font-size: clamp(26px, 4.5vw, 52px);
  font-weight: 800; letter-spacing: -0.04em; color: var(--ink); line-height: 1.1; margin-bottom: 14px;
}
.usecase-title em { font-style: italic; color: #9a8a6a; }
.usecase-sub { font-size: var(--text-base); color: var(--ink-soft); line-height: 1.7; }

.usecase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.uc-persona-card {
  background: var(--bg-card);
  border-radius: 18px;
  padding: clamp(24px, 3.5vw, 36px) clamp(18px, 2.5vw, 28px) 28px;
  display: flex; flex-direction: column;
  transition: box-shadow 0.22s, transform 0.22s, border-color 0.22s;
  position: relative; overflow: hidden;
}
.uc-persona-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; opacity: 0; transition: opacity 0.22s;
}
.uc-persona-card:hover { box-shadow: var(--shadow-panel); transform: translateY(-4px); border-color: var(--border-hover); }
.uc-persona-card:hover::before { opacity: 1; }

.uc-persona-icon {
  width: 44px; height: 44px; border-radius: var(--r-sm);
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; margin-bottom: 20px; color: var(--ink-soft); box-shadow: var(--shadow-card);
}
.uc-persona-role { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin-bottom: 8px; }
.uc-persona-title { font-size: var(--text-lg); font-weight: 800; color: var(--ink); letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 12px; }
.uc-persona-desc { font-size: var(--text-sm); color: var(--ink-soft); line-height: 1.7; flex: 1; margin-bottom: 22px; }
.uc-persona-divider { height: 1px; background: var(--border); margin-bottom: 16px; }
.uc-persona-benefit { display: flex; align-items: flex-start; gap: 8px; font-size: var(--text-xs); color: var(--ink-soft); line-height: 1.5; }
.uc-persona-benefit i { color: var(--teal); font-size: 0.9rem; flex-shrink: 0; margin-top: 1px; }

.usecase-track-wrap, .usecase-track, .usecase-nav,
.uc-dots, .uc-nav-btn, .uc-dot, .uc-card { display: none !important; }

@media (max-width: 900px) { .usecase-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .usecase-grid { grid-template-columns: 1fr; gap: 12px; }
  .uc-persona-card { padding: 24px 18px 22px; }
  .uc-persona-title { font-size: var(--text-xl); }
}


/* ═══════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════ */
footer { background: var(--navy-mid); border-top: 1px solid rgba(55,30,29,0.15); }
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(40px, 6vw, 52px) clamp(20px, 4vw, 32px) clamp(20px, 3vw, 28px);
}
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(24px, 4vw, 40px);
  padding-bottom: clamp(28px, 4vw, 40px);
  border-bottom: 1px solid rgba(245,237,232,0.08);
}
.footer-logo { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.footer-logo-mark {
  width: 28px; height: 28px; background-color: var(--sidebar-bg); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: var(--sidebar-ink); font-size: 18px;
}
.footer-logo-name { font-size: var(--text-md); font-weight: 800; color: var(--sidebar-ink); letter-spacing: -0.03em; }
.footer-tagline { font-size: var(--text-sm); color: var(--ink-muted); line-height: 1.55; max-width: 220px; margin-bottom: 16px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--ink-muted); font-size: var(--text-md);
  transition: all 0.18s;
}
.footer-social a:hover { background: var(--teal-soft); border-color: var(--teal-border); color: var(--teal); }
.footer-col h4 { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: var(--text-sm); color: var(--sidebar-ink-soft); transition: color 0.15s; }
.footer-col ul li a:hover { color: var(--teal); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 22px;
  font-size: var(--text-xs); color: var(--ink-muted);
  font-family: 'DM Mono', monospace;
  flex-wrap: wrap; gap: 10px;
}
.footer-bottom a { color: var(--ink-muted); transition: color 0.15s; }
.footer-bottom a:hover { color: var(--teal); }

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  footer { padding-bottom: max(0px, env(safe-area-inset-bottom)); }
}

@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; gap: 22px; }
  .footer-logo-name { font-size: var(--text-base); }
}


/* ═══════════════════════════════════════════════════
   SHARED UTILITIES
   ═══════════════════════════════════════════════════ */
.section { max-width: 1200px; margin: 0 auto; padding: var(--section-y) var(--section-x); }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 14px;
}
.section-title { font-size: clamp(24px, 4vw, 48px); font-weight: 800; color: var(--ink); letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 14px; }
.section-sub { font-size: var(--text-md); color: var(--ink-soft); line-height: 1.65; max-width: 500px; }
.idea-tag {
  display: inline-flex; align-items: center;
  padding: 4px 12px;
  background: var(--teal-soft); border: 1px solid var(--teal-border);
  color: var(--teal); border-radius: var(--r-pill);
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; width: fit-content;
}


/* ═══════════════════════════════════════════════════
   GLOBAL MOBILE POLISH
   ═══════════════════════════════════════════════════ */

/* Disable hover transforms on touch devices (avoids sticky states) */
@media (hover: none) {
  .hiw-card:hover { transform: none; box-shadow: 0 2px 16px rgba(55,30,29,0.06); }
  .problem-card:hover { transform: none; box-shadow: var(--shadow-card); }
  .problem-notif-card:hover { box-shadow: var(--shadow-card); border-color: var(--border); }
  .uc-persona-card:hover { transform: none; box-shadow: none; }
  .uc-persona-card:hover::before { opacity: 0; }
  .hl-btn-primary:hover, .hl-btn-ghost:hover { transform: none; }
  .btn-primary:hover { transform: none; }
}

/* Extra-small devices */
@media (max-width: 360px) {
  :root { --section-x: 12px; }
  .hl-h1 { font-size: 28px; }
  .hiw-title { font-size: 22px; }
  .problem-title { font-size: 22px; }
  .usecase-title { font-size: 22px; }
}