:root {
  --color-gold: #c5a059;
  --color-gold-light: rgba(197, 160, 89, 0.12);
  --color-emerald: #10b981;
  --color-brand: #0f172a;
  --color-ink: #020617;
  --color-mist: #f8fafc;
  --color-border: rgba(15, 23, 42, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
  --radius-card: 1.75rem;
  --radius-pill: 999px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--color-mist);
  color: var(--color-brand);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 { font-size: clamp(2.4rem, 5vw + 0.8rem, 4.5rem); line-height: 1.06; font-weight: 900; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3vw + 0.6rem, 3rem); line-height: 1.12; font-weight: 900; letter-spacing: -0.025em; }
h3 { font-size: clamp(1.2rem, 2vw + 0.4rem, 1.75rem); font-weight: 800; letter-spacing: -0.02em; }

/* ── GLASS SYSTEM ── */
.glass {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 4px 24px rgba(15,23,42,0.07), inset 0 1px 0 rgba(255,255,255,0.8);
}

.glass-dark {
  background: rgba(15,23,42,0.75);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.glass-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.5);
  border-top: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 4px 20px rgba(15,23,42,0.06), inset 0 0 0 1px rgba(255,255,255,0.5);
  border-radius: var(--radius-card);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1), box-shadow 0.35s cubic-bezier(0.16,1,0.3,1), border-color 0.2s;
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(15,23,42,0.14), inset 0 0 0 1px rgba(197,160,89,0.3);
  border-color: rgba(197,160,89,0.35);
}

/* Legacy compat */
.premium-glass { background: var(--glass-bg); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); border: 1px solid var(--glass-border); box-shadow: 0 10px 40px rgba(0,0,0,0.04); }
.glass-island { background: rgba(255,255,255,0.6); backdrop-filter: blur(20px); border-radius: 999px; border: 1px solid rgba(255,255,255,0.6); box-shadow: 0 8px 32px rgba(15,23,42,0.08); }
.premium-card { transition: all 0.4s cubic-bezier(0.16,1,0.3,1); background: rgba(255,255,255,0.7); border: 1px solid var(--color-border); box-shadow: 0 4px 20px rgba(0,0,0,0.04); overflow: hidden; }
.premium-card:hover { transform: translateY(-6px) scale(1.01); box-shadow: 0 24px 60px rgba(0,0,0,0.12); border-color: rgba(197,160,89,0.4); }

/* ── SCORE BADGE ── */
.score-badge {
  background: linear-gradient(135deg, #f8f0dc, #fdf5e4);
  color: #92610a;
  border: 1px solid rgba(197,160,89,0.4);
}

/* ── AI SEARCH ── */
.ai-search-input {
  width: 100%;
  padding: 1.25rem 1.75rem;
  padding-right: 5rem;
  font-size: 1.05rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(15,23,42,0.1);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 8px 32px rgba(15,23,42,0.08), inset 0 1px 0 rgba(255,255,255,1);
  transition: all 0.25s;
  outline: none;
  color: var(--color-brand);
}
.ai-search-input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 4px rgba(197,160,89,0.12), 0 8px 32px rgba(15,23,42,0.08);
  background: #fff;
}
.ai-search-button {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  width: 3.2rem;
  height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.ai-search-button:hover { background: var(--color-gold); transform: translateY(-50%) scale(1.06); }

/* ── PORTAL THEME VARS ── */
.portal-theme {
  --pt-color: var(--color-brand);
  --pt-light: rgba(15,23,42,0.06);
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
  from { opacity:0; transform:translateY(24px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeIn {
  from { opacity:0; }
  to   { opacity:1; }
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: 0.6; }
}

.animate-fade-in-up  { animation: fadeInUp 0.6s cubic-bezier(0.16,1,0.3,1) both; }
.animate-fade-in     { animation: fadeIn 0.4s ease both; }
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

/* ── MESH GRADIENT ── */
.mesh-hero {
  background: 
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(197,160,89,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(16,185,129,0.05) 0%, transparent 60%),
    #f8fafc;
}

/* ── TEXT GRADIENT ── */
.text-gradient-gold {
  background: linear-gradient(135deg, #c5a059 0%, #f0d080 50%, #c5a059 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── PORTAL CHIP for landing pages ── */
.portal-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1.5px solid currentColor;
  opacity: 0.95;
}
