/* === GrepMind Design System v2 === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* --- Tokens --- */
:root {
  color-scheme: dark light;
  --ink:       #0e1117;
  --ink-soft:  #1a1f2b;
  --ink-mid:   #242b3a;
  --muted:     #8b95a8;
  --quiet:     #6b7688;
  --paper:     #faf9f6;
  --panel:     #ffffff;
  --line:      #e2dfd8;
  --graphite:  #0e1117;
  --teal:      #00d4aa;
  --teal-glow: rgba(0, 212, 170, 0.35);
  --violet:    #7c5cfc;
  --violet-glow: rgba(124, 92, 252, 0.30);
  --amber:     #f0a040;
  --coral:     #ef5350;
  --sage:      #e0f0e4;
  --wash:      #f3f0e9;
  --accent-gradient: linear-gradient(135deg, #00d4aa 0%, #7c5cfc 100%);
  --accent-gradient-reverse: linear-gradient(135deg, #7c5cfc 0%, #00d4aa 100%);
  --glass-bg:  rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.10);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-lg: 0 24px 72px rgba(14,17,23,0.18);
  --shadow-glow: 0 0 60px rgba(0, 212, 170, 0.12), 0 0 120px rgba(124, 92, 252, 0.08);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; }
img { display: block; max-width: 100%; }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 170, 0.15); }
  50%      { box-shadow: 0 0 40px rgba(0, 212, 170, 0.30), 0 0 80px rgba(124, 92, 252, 0.15); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

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

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px clamp(20px, 4vw, 56px);
  background: rgba(14, 17, 23, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  transition: background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: rgba(14, 17, 23, 0.92);
  box-shadow: 0 4px 24px rgba(0,0,0,0.20);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.brand img { width: 36px; height: 36px; }
.brand.small img { width: 28px; height: 28px; }

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
}
.site-header nav a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--transition);
}
.site-header nav a:hover { color: var(--teal); }

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.75) !important;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  text-decoration: none;
}
.lang-switch:hover {
  border-color: var(--teal);
  color: var(--teal) !important;
  background: rgba(0, 212, 170, 0.08);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* --- Hero (Dark) --- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(120px, 15vh, 180px) clamp(20px, 4vw, 56px) clamp(60px, 8vh, 100px);
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0, 212, 170, 0.08), transparent),
              radial-gradient(ellipse 60% 50% at 75% 60%, rgba(124, 92, 252, 0.06), transparent),
              var(--graphite);
  text-align: center;
  overflow: hidden;
  color: #fff;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('assets/grepmind-hero.png') center 60% / clamp(600px, 70vw, 1200px) auto no-repeat;
  opacity: 0.06;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  max-width: 860px;
  animation: fadeInUp 1s ease both;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(0, 212, 170, 0.10);
  border: 1px solid rgba(0, 212, 170, 0.20);
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 24px;
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 900;
}
.hero h1 .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
}
h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-lede {
  max-width: 700px;
  margin: 0 auto 36px;
  color: rgba(255, 255, 255, 0.65);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* --- Buttons --- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}
.button.primary {
  background: var(--accent-gradient);
  color: #0e1117;
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.25);
}
.button.primary:hover {
  box-shadow: 0 8px 36px rgba(0, 212, 170, 0.40);
  transform: translateY(-2px);
}
.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.button.secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
}
.button.dark {
  background: var(--ink);
  color: #fff;
}
.button.dark:hover {
  background: var(--ink-soft);
  transform: translateY(-2px);
}

/* --- Hero Visual --- */
.hero-visual {
  position: relative;
  margin: 48px auto 0;
  max-width: 900px;
  animation: scaleIn 1.2s 0.3s ease both;
}
.hero-visual img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Signal Strip --- */
.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--ink-soft);
}
.signal-strip div {
  padding: 32px clamp(20px, 4vw, 42px);
  background: var(--ink);
  color: #fff;
  transition: background var(--transition);
}
.signal-strip div:hover { background: var(--ink-mid); }
.signal-strip strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal);
}
.signal-strip span {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.92rem;
}

/* --- Sections --- */
.section {
  padding: clamp(72px, 9vw, 140px) clamp(20px, 4vw, 56px);
}
.section-copy { max-width: 620px; }
.section-copy p, .cta-section p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* --- Why GrepMind --- */
.why-section {
  background: var(--paper);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.why-card {
  position: relative;
  padding: 32px 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  overflow: hidden;
}
.why-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition);
}
.why-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 212, 170, 0.2);
}
.why-card:hover::before { opacity: 1; }
.why-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: 12px;
  font-size: 1.4rem;
}
.why-icon.teal   { background: rgba(0, 212, 170, 0.12); }
.why-icon.violet { background: rgba(124, 92, 252, 0.12); }
.why-icon.amber  { background: rgba(240, 160, 64, 0.12); }
.why-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* --- Feature Sections (Split) --- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

/* --- Feature Grid --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.feature-grid article,
.workflow-steps article,
.roadmap-grid article {
  position: relative;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  overflow: hidden;
}
.feature-grid article:hover,
.workflow-steps article:hover,
.roadmap-grid article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.feature-grid p,
.workflow-steps p,
.roadmap-grid p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  border-radius: 12px;
  background: rgba(0, 212, 170, 0.10);
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 800;
}

/* --- Workflow (Dark) --- */
.workflow {
  background: var(--graphite);
  color: #fff;
}
.workflow .eyebrow {
  background: rgba(0, 212, 170, 0.10);
  border-color: rgba(0, 212, 170, 0.20);
  color: var(--teal);
}
.workflow h2 { max-width: 900px; }

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.workflow-steps article {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  backdrop-filter: blur(8px);
}
.workflow-steps article:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(0, 212, 170, 0.25);
}
.workflow-steps h3 { color: #fff; }
.workflow-steps p { color: rgba(255, 255, 255, 0.55); }

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: var(--accent-gradient);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

/* --- Privacy Band --- */
.privacy-band {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: center;
  background: #f0f3ec;
}
.privacy-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.privacy-list div {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.privacy-list div:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.privacy-list strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.privacy-list span {
  display: block;
  color: var(--muted);
  font-size: 0.93rem;
}

/* --- Agent Section --- */
.agent-section {
  background: var(--graphite);
  color: #fff;
}
.agent-section .eyebrow {
  background: rgba(124, 92, 252, 0.12);
  border-color: rgba(124, 92, 252, 0.25);
  color: var(--violet);
}
.agent-section .section-copy p { color: rgba(255, 255, 255, 0.60); }

.agent-ladder {
  display: grid;
  gap: 14px;
}
.agent-ladder article {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  border-left: 4px solid var(--teal);
}
.agent-ladder article:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateX(4px);
}
.agent-ladder article:nth-child(2) { border-left-color: var(--amber); }
.agent-ladder article:nth-child(3) { border-left-color: var(--coral); }
.agent-ladder article:nth-child(4) { border-left-color: var(--violet); }

.agent-ladder span {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}
.agent-ladder p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.94rem;
}

/* --- Scenarios --- */
.scenarios-section {
  background: var(--paper);
}
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.scenario-card {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.scenario-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.scenario-role {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(0, 212, 170, 0.08);
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.scenario-card .scenario-q {
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
}
.scenario-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* --- Roadmap --- */
.roadmap { background: var(--wash); }
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.roadmap-grid article { min-height: 220px; }
.roadmap-grid article h3 {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.95rem;
}

/* --- Trust / CTA --- */
.trust-section {
  background: var(--paper);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.trust-card {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--transition);
}
.trust-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.trust-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 14px;
  font-size: 1.5rem;
}
.trust-card h3 { font-size: 1rem; }
.trust-card p { margin-bottom: 0; color: var(--muted); font-size: 0.92rem; }

.cta-section {
  position: relative;
  padding: clamp(80px, 10vw, 140px) clamp(20px, 4vw, 56px);
  background: var(--graphite);
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 50%, rgba(0, 212, 170, 0.06), transparent),
              radial-gradient(ellipse 50% 40% at 70% 60%, rgba(124, 92, 252, 0.05), transparent);
  pointer-events: none;
}
.cta-section > * { position: relative; }
.cta-section h2 { max-width: 800px; margin: 0 auto 20px; }
.cta-section p {
  max-width: 600px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.55);
}
.cta-section a { color: var(--teal); font-weight: 700; }
.cta-section a:hover { color: #fff; }

/* --- Footer --- */
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 28px clamp(20px, 4vw, 56px);
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--quiet);
}
.site-footer .brand { font-size: 0.95rem; }
.site-footer nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 28px);
}
.site-footer nav a {
  color: var(--quiet);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.site-footer nav a:hover { color: var(--teal); }
.site-footer p { margin: 0; font-size: 0.85rem; }

/* --- Legal Pages --- */
.legal-main {
  max-width: 860px;
  padding: clamp(120px, 12vw, 160px) clamp(20px, 4vw, 56px) clamp(60px, 8vw, 100px);
}
.legal-main h1 {
  margin-bottom: 20px;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}
.legal-main h2 {
  margin-top: 48px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}
.legal-main p, .legal-main li {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}
.legal-main a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-main a:hover { color: var(--violet); }
.legal-main .eyebrow {
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.15);
}

/* --- Support Page --- */
.support-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}
.support-options article {
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.support-options article:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.support-options h2 { font-size: 1.15rem; margin-top: 0; }
.support-options a { color: var(--teal); font-weight: 600; }

/* --- Responsive: Tablet --- */
@media (max-width: 1080px) {
  .split,
  .privacy-band { grid-template-columns: 1fr; }
  .split.reverse { direction: ltr; }

  .why-grid,
  .scenarios-grid,
  .trust-grid { grid-template-columns: repeat(2, 1fr); }

  .workflow-steps,
  .roadmap-grid { grid-template-columns: repeat(2, 1fr); }

  .signal-strip { grid-template-columns: repeat(2, 1fr); }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .site-footer nav { justify-content: center; }
}

/* --- Responsive: Mobile --- */
@media (max-width: 720px) {
  .site-header {
    position: fixed;
  }
  .site-header nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 20px;
    background: rgba(14, 17, 23, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    gap: 16px;
  }
  .site-header nav.open { display: flex; }
  .site-header nav a { font-size: 1rem; color: rgba(255,255,255,0.8); }
  .mobile-toggle { display: block; }

  h1 { font-size: clamp(2.6rem, 12vw, 3.8rem); }

  .hero { min-height: auto; padding-top: 120px; padding-bottom: 60px; }
  .hero-visual img { border-radius: var(--radius-md); }

  .signal-strip,
  .feature-grid,
  .workflow-steps,
  .privacy-list,
  .roadmap-grid,
  .support-options,
  .why-grid,
  .scenarios-grid,
  .trust-grid { grid-template-columns: 1fr; }

  .agent-ladder article {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .button { width: 100%; }
}
