/* ══════════════════════════════════════════════
   CHAR.DEVELOPER — Clerk-Inspired Design System
   ══════════════════════════════════════════════ */

:root {
  /* ── Backgrounds ── */
  --bg: #FFFFFF;
  --bg-subtle: #FAFAFA;
  --bg-muted: #F3F4F6;
  --bg-dark: #0F0F11;
  --bg-dark-card: rgba(255,255,255,0.04);
  --bg-dark-card-hover: rgba(255,255,255,0.07);

  /* ── Text ── */
  --text: #111827;
  --text-secondary: #4B5563;
  --text-muted: #9CA3AF;
  --text-on-dark: #F9FAFB;
  --text-on-dark-secondary: #9CA3AF;

  /* ── Borders ── */
  --border: #E5E7EB;
  --border-subtle: #F3F4F6;
  --border-dark: rgba(255,255,255,0.08);

  /* ── Accent ── */
  --accent: #6C47FF;
  --accent-hover: #5835DB;
  --accent-subtle: rgba(108,71,255,0.08);

  /* ── Shadows (Clerk multi-layer) ── */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 50px -12px rgba(0,0,0,0.12);
  --shadow-card: 0 0 0 1px var(--border), 0 2px 4px rgba(0,0,0,0.04), 0 8px 16px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 0 0 1px var(--border), 0 4px 8px rgba(0,0,0,0.06), 0 16px 32px rgba(0,0,0,0.1);
  --shadow-float: 0 0 0 1px rgba(0,0,0,0.03), 0 2px 4px rgba(0,0,0,0.04), 0 12px 24px rgba(0,0,0,0.06);

  /* ── Fonts ── */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'DM Mono', 'Fira Code', monospace;

  /* ── Radius ── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
}

/* ── RESET ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── LAYOUT ── */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section { padding: 6rem 0; }

/* ── TYPOGRAPHY ── */
h1 {
  font-family: var(--font);
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--text);
}

h2 {
  font-family: var(--font);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h3 {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.sec-label {
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}

.sec-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 1rem 0;
  transition: all 0.3s ease;
  background: rgba(255,255,255,0);
}

nav.stuck {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.nav-i {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-btn {
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  transition: all 0.2s;
  background: var(--bg);
}

.nav-btn:hover {
  background: var(--bg-muted);
  border-color: var(--text-muted);
}

/* Mobile nav */
.brgr {
  display: none;
  background: none;
  border: none;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.brgr span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s;
}

.mob {
  display: none;
  position: fixed;
  top: 56px;
  inset-inline: 0;
  z-index: 499;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
}

.mob.open { display: flex; }

.mob a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: color 0.2s;
}

.mob a:hover { color: var(--text); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(108,71,255,0.3);
}

.btn-outline {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-muted);
  border-color: var(--text-muted);
}

.btn-dark {
  background: var(--text);
  color: #fff;
}

.btn-dark:hover {
  background: #000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-ghost:hover { opacity: 0.8; }

/* ── HERO ── */
#hero {
  padding: 10rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 70%);
  pointer-events: none;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(108,71,255,0.15);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

#hero h1 { margin-bottom: 1.25rem; }

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-ctas {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat-n {
  font-family: var(--font);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

.stat-n span { color: var(--accent); }

.stat-l {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ── LOGOS BAR ── */
.logos-bar {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.logos-bar p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.logos-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.logos-row span {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

/* ── INTERACTIVE STACK (Clerk Components style) ── */
.stack-section {
  padding: 6rem 0;
  background: var(--bg);
}

.stack-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 3rem;
  align-items: start;
}

.stack-left {
  position: sticky;
  top: 120px;
}

.stack-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 2rem;
}

.stack-tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: var(--font);
}

.stack-tab:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.stack-tab.active {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: rgba(108,71,255,0.15);
  font-weight: 600;
}

.stack-tab .tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.2s;
  flex-shrink: 0;
}

.stack-tab.active .tab-dot {
  background: var(--accent);
}

.stack-tab code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-left: auto;
}

.stack-tab.active code {
  color: var(--accent);
}

.stack-preview {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  height: 520px;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.stack-preview-item {
  position: absolute;
  inset: 2rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.4s ease;
  pointer-events: none;
  overflow-y: auto;
}

.stack-preview-item.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* Preview: n8n workflow mock */
.preview-workflow {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.workflow-node {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.workflow-node:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.workflow-node-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.workflow-node-text {
  flex: 1;
}

.workflow-node-text strong {
  font-size: 0.85rem;
  display: block;
  margin-bottom: 2px;
}

.workflow-node-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.workflow-connector {
  width: 2px;
  height: 20px;
  background: var(--border);
  margin-left: 2.5rem;
  position: relative;
}

.workflow-connector::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Preview: Chat mock */
.preview-chat {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.chat-header-text strong {
  font-size: 0.85rem;
  display: block;
}

.chat-header-text span {
  font-size: 0.72rem;
  color: #22c55e;
}

.chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
}

.chat-msg {
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 80%;
  animation: msg-in 0.4s ease backwards;
}

.chat-msg.bot {
  background: var(--bg);
  border: 1px solid var(--border);
  align-self: flex-start;
}

.chat-msg.user {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Preview: Data table mock */
.preview-table {
  height: 100%;
}

.mock-table {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.mock-table-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 100px;
  padding: 0.7rem 1rem;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mock-table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 100px;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: background 0.15s;
}

.mock-table-row:hover { background: var(--bg-subtle); }
.mock-table-row:last-child { border-bottom: none; }

.status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  display: inline-block;
}

.status-badge.ok { background: #dcfce7; color: #166534; }
.status-badge.pending { background: #fef3c7; color: #92400e; }
.status-badge.error { background: #fee2e2; color: #991b1b; }

/* Preview: Integration diagram */
.preview-integration {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 1.5rem;
}

.integration-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.integration-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.integration-box:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.integration-box strong {
  font-size: 0.82rem;
  display: block;
  margin-top: 0.25rem;
}

.integration-box span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.integration-arrow {
  font-size: 1.2rem;
  color: var(--accent);
}

.integration-center {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.25rem 2rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(108,71,255,0.3);
}

.integration-center strong {
  font-size: 0.9rem;
  display: block;
}

.integration-center span {
  font-size: 0.72rem;
  opacity: 0.8;
}

/* Preview: UI mock */
.preview-ui {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ui-browser {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  flex: 1;
}

.ui-browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.8rem;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border);
}

.ui-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ui-browser-url {
  flex: 1;
  margin-left: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.ui-browser-body {
  padding: 1.25rem;
}

/* ── TECH GRID ── */
.tech-grid-section {
  padding: 4rem 0;
  background: var(--bg);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tech-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
  cursor: default;
}

.tech-cell:nth-child(6n) { border-right: none; }
.tech-cell:nth-last-child(-n+6) { border-bottom: none; }

.tech-cell:hover {
  background: var(--bg-subtle);
}

.tech-cell svg, .tech-cell img {
  width: 32px;
  height: 32px;
  opacity: 0.5;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
  fill: currentColor;
}

.tech-cell:hover svg, .tech-cell:hover img {
  opacity: 1;
  fill: var(--tech-color, currentColor);
  transform: scale(1.1);
}

.tech-cell span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}

.tech-cell:hover span { color: var(--text); }

/* ── DARK SERVICES SECTION (Clerk-style) ── */
.dark-section {
  background: var(--bg-dark);
  padding: 6rem 0;
  color: var(--text-on-dark);
}

.dark-section .sec-label { color: var(--accent); }
.dark-section h2 { color: var(--text-on-dark); }
.dark-section .sec-subtitle { color: var(--text-on-dark-secondary); }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 3rem;
}

.bento-card {
  background: var(--bg-dark);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}

.bento-card:hover {
  background: var(--bg-dark-card-hover);
}

.bento-card.span-2 {
  grid-column: span 2;
}

.bento-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.bento-card h3 {
  color: var(--text-on-dark);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.bento-card p {
  font-size: 0.88rem;
  color: var(--text-on-dark-secondary);
  line-height: 1.7;
}

/* ── METHOD / PROCESO ── */
.method-section { padding: 6rem 0; }

.method-timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 3rem;
  position: relative;
}

.method-timeline::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--border);
}

.method-step {
  text-align: center;
  position: relative;
  padding: 0 0.75rem;
}

.method-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  margin: 18px auto 1.5rem;
  position: relative;
  z-index: 1;
  transition: all 0.3s;
}

.method-step:hover .method-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-subtle);
}

.method-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.method-step h3 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  margin-top: 0.25rem;
}

.method-step p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── PORTFOLIO / CASES ── */
.cases-section { padding: 6rem 0; }

.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.case-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}

.case-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.case-thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-muted);
  position: relative;
}

.case-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.case-card:hover .case-thumb img {
  transform: scale(1.03);
}

.case-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.case-thumb-overlay span {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(0,0,0,0.5);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
}

.case-card:hover .case-thumb-overlay { opacity: 1; }

.case-body {
  padding: 1.5rem;
}

.case-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.case-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.case-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.case-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.case-tag {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  color: var(--text-secondary);
}

/* ── ABOUT ── */
.about-section { padding: 6rem 0; }

.about-inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
  align-items: start;
}

.about-img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}

.about-text h2 { margin-bottom: 1rem; }

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.about-socials {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.about-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: all 0.2s;
}

.about-social-btn:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent);
}

/* ── TESTIMONIALS (Clerk floating style) ── */
.test-section {
  padding: 6rem 0;
  background: var(--bg-subtle);
  overflow: hidden;
}

.test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.test-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-float);
  transition: all 0.3s;
}

.test-card:nth-child(2) { transform: translateY(1.5rem); }

.test-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.test-card:nth-child(2):hover { transform: translateY(calc(1.5rem - 2px)); }

.test-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 0.75rem;
}

.star {
  color: #FBBF24;
  font-size: 0.85rem;
}

.test-quote {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.test-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.test-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.test-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.test-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── CONTACT ── */
.contact-section {
  padding: 6rem 0;
}

.contact-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
  text-align: left;
}

.contact-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.contact-card:hover {
  box-shadow: var(--shadow-md);
}

.contact-card h3 { margin-bottom: 0.5rem; }

.contact-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* Form */
.cform { text-align: left; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 0.4rem;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-group textarea { resize: vertical; min-height: 100px; }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
}

.foot-i {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.foot-logo {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.foot-logo span { color: var(--accent); }

.foot-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.foot-soc {
  display: flex;
  gap: 1.5rem;
}

.foot-soc a {
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.foot-soc a:hover { color: var(--text); }

.foot-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── SCROLL REVEAL ── */
.rv {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.rv.on {
  opacity: 1;
  transform: translateY(0);
}

.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }

/* ── MODAL ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg);
  border-radius: var(--radius-xl);
  max-width: 800px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.modal-slider {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--bg-muted);
}

.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transition: all 0.2s;
  z-index: 2;
}

.slider-btn:hover {
  box-shadow: var(--shadow-md);
}

.slider-prev { left: 12px; }
.slider-next { right: 12px; }

.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.sdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.2s;
}

.sdot.on { background: #fff; }

.modal-content { padding: 2rem; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.modal-n {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.modal-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.modal-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.modal-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.ptag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent);
}

.modal-footer {
  display: flex;
  gap: 1rem;
}

.modal-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: opacity 0.2s;
}

.modal-link:hover { opacity: 0.8; }

.modal-link-ghost {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .stack-layout {
    grid-template-columns: 1fr;
  }

  .stack-left {
    position: static;
  }

  .stack-tabs {
    flex-direction: row;
    overflow-x: auto;
  }

  .stack-tab {
    white-space: nowrap;
  }

  .stack-preview { min-height: 350px; }

  .bento-grid {
    grid-template-columns: 1fr 1fr;
  }

  .bento-card.span-2 { grid-column: span 1; }

  .method-timeline {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .method-timeline::before { display: none; }

  .method-step {
    text-align: left;
    padding: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
  }

  .method-dot { margin: 0; }

  .about-inner {
    grid-template-columns: 1fr;
  }

  .about-img {
    max-width: 300px;
  }

  .tech-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .wrap { padding: 0 1.5rem; }
  section { padding: 4rem 0; }

  .nav-links { display: none; }
  .nav-btn { display: none; }
  .brgr { display: flex; }

  #hero { padding: 8rem 0 4rem; }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }

  .cases-grid { grid-template-columns: 1fr; }
  .test-grid { grid-template-columns: 1fr; }
  .test-card:nth-child(2) { transform: none; }
  .test-card:nth-child(2):hover { transform: translateY(-2px); }
  .contact-cards { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .tech-grid { grid-template-columns: repeat(3, 1fr); }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .foot-i {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}
