/* ===========================
   Rimstone AI — Stylesheet
   =========================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent: #e8a030;
  --accent-hover: #f0b848;
  --accent-glow: rgba(232, 160, 48, 0.15);
  --border: #222222;
  --border-hover: #333333;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 20px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 60px;
  letter-spacing: -0.02em;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.25s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.1rem;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

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

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  background: var(--accent) !important;
  color: var(--bg-primary) !important;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600 !important;
  transition: all 0.25s ease !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

.nav-toggle.active span:first-child {
  transform: rotate(45deg) translate(3px, 3px);
}

.nav-toggle.active span:last-child {
  transform: rotate(-45deg) translate(3px, -3px);
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
  max-width: 900px;
}

.hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 48px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Problem --- */
.problem {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.problem-text h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.problem-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.problem-stats {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.stat {
  padding-left: 24px;
  border-left: 3px solid var(--accent);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --- Services --- */
.services {
  padding: 120px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  transition: all 0.3s ease;
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.service-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
  display: block;
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* --- Process --- */
.process {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  padding: 48px 0;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 1px;
  flex-shrink: 0;
}

.step h3 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.step p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 700px;
  padding-left: 52px;
}

.step-divider {
  height: 1px;
  background: var(--border);
}

/* --- Results --- */
.results {
  padding: 120px 0;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 28px;
  text-align: center;
  transition: all 0.3s ease;
}

.result-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.result-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
}

.result-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.result-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Who We Help --- */
.who {
  padding: 120px 0;
  background: var(--bg-secondary);
}

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

.who-card {
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.who-card:hover {
  border-color: var(--accent);
}

.who-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent);
}

.who-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* --- CTA --- */
.cta {
  padding: 120px 0;
}

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

.cta-inner h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.cta-inner > p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 40px;
}

.cta-note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- Footer --- */
.footer {
  padding: 80px 0 40px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  margin-bottom: 60px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  gap: 80px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .results-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 24px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    align-self: flex-start;
  }

  .hero {
    min-height: auto;
    padding: 140px 0 80px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
  }

  .problem-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

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

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

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

  .step p {
    padding-left: 0;
  }

  .footer-inner {
    flex-direction: column;
    gap: 40px;
  }

  .footer-links {
    gap: 40px;
  }

  .section-title {
    margin-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}
