/* ============================================================
   Foremate Landing Page - Stylesheet
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --color-primary: #0EA5E9;
  --color-primary-dark: #0284C7;
  --color-primary-light: #38BDF8;
  --color-accent: #06B6D4;
  --color-slate-950: #020617;
  --color-slate-900: #0F172A;
  --color-slate-800: #1E293B;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-400: #94A3B8;
  --color-slate-300: #CBD5E1;
  --color-slate-200: #E2E8F0;
  --color-slate-100: #F1F5F9;
  --color-slate-50: #F8FAFC;
  --color-white: #FFFFFF;
  --color-green: #22C55E;
  --color-amber: #F59E0B;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;

  --transition: 0.3s ease;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-slate-900);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-dark {
  background-color: var(--color-slate-900);
  color: var(--color-white);
}

.section-light {
  background-color: var(--color-slate-50);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--color-slate-600);
  max-width: 640px;
  margin: 0 auto;
}

.section-dark .section-header p {
  color: var(--color-slate-400);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  border-color: var(--color-white);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--color-slate-900);
  color: var(--color-white);
}

.btn-dark:hover {
  background: var(--color-slate-800);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
  border-radius: var(--radius-xl);
}

.btn-icon {
  width: 1.25em;
  height: 1.25em;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition);
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--color-white);
  letter-spacing: -0.025em;
}

.navbar-logo svg {
  width: 2rem;
  height: 2rem;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-links a {
  color: var(--color-slate-300);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--transition);
}

.navbar-links a:hover {
  color: var(--color-white);
}

.navbar-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-cta .btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  color: var(--color-white);
  font-size: 1.5rem;
  font-weight: 600;
  transition: color var(--transition);
}

.mobile-nav a:hover {
  color: var(--color-primary-light);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--color-slate-950) 0%, var(--color-slate-900) 50%, #0C1A2E 100%);
  overflow: hidden;
  padding-top: 5rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 150%;
  background: radial-gradient(ellipse, rgba(14, 165, 233, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 50%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(6, 182, 212, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-content {
  flex: 1;
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  color: var(--color-primary-light);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.hero-badge svg {
  width: 1rem;
  height: 1rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-white);
  margin-bottom: 1.5rem;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--color-slate-400);
  margin-bottom: 2.5rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
}

.hero-stat {
  text-align: left;
}

.hero-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-white);
}

.hero-stat-label {
  font-size: 0.8125rem;
  color: var(--color-slate-400);
  margin-top: 0.125rem;
}

/* Hero Visual */
.hero-visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-phone {
  position: relative;
  width: 300px;
  height: 580px;
  background: linear-gradient(160deg, var(--color-slate-800), var(--color-slate-900));
  border-radius: 2.5rem;
  border: 2px solid var(--color-slate-700);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  padding: 1rem;
}

.hero-phone::before {
  content: '';
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: var(--color-slate-950);
  border-radius: 0 0 1rem 1rem;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--color-slate-800) 0%, var(--color-slate-900) 100%);
  border-radius: 1.75rem;
  padding: 2.5rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.phone-chat-bubble {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
  line-height: 1.5;
  max-width: 90%;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.phone-chat-bubble:nth-child(1) { animation-delay: 0.3s; }
.phone-chat-bubble:nth-child(2) { animation-delay: 0.8s; }
.phone-chat-bubble:nth-child(3) { animation-delay: 1.3s; }
.phone-chat-bubble:nth-child(4) { animation-delay: 1.8s; }

.phone-chat-user {
  background: var(--color-primary);
  color: var(--color-white);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.phone-chat-ai {
  background: var(--color-slate-700);
  color: var(--color-slate-200);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.phone-chat-ai .citation {
  display: inline-block;
  background: rgba(14, 165, 233, 0.2);
  color: var(--color-primary-light);
  font-size: 0.6875rem;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  margin-top: 0.375rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Features --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--color-white);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(6, 182, 212, 0.1));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--color-primary);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
  letter-spacing: -0.01em;
}

.feature-card p {
  color: var(--color-slate-600);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* --- How it Works --- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 2.25rem;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  opacity: 0.3;
}

.step-card {
  text-align: center;
  position: relative;
}

.step-number {
  width: 4.5rem;
  height: 4.5rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 1;
}

.step-number span {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-white);
}

.step-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.625rem;
}

.step-card p {
  font-size: 0.9375rem;
  color: var(--color-slate-400);
  line-height: 1.6;
}

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: var(--color-white);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-2xl);
  padding: 2.5rem 2rem;
  transition: all var(--transition);
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.pricing-card.featured {
  border: 2px solid var(--color-primary);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.pricing-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.pricing-card h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.pricing-card .price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-slate-400);
}

.pricing-card .price-note {
  font-size: 0.875rem;
  color: var(--color-slate-400);
  margin-bottom: 1.5rem;
}

.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.9375rem;
  color: var(--color-slate-600);
}

.pricing-features li svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.pricing-features li svg.check {
  color: var(--color-green);
}

.pricing-features li svg.limit {
  color: var(--color-amber);
}

.pricing-card .btn {
  width: 100%;
}

/* --- CTA Section --- */
.cta-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--color-slate-950) 0%, var(--color-slate-900) 100%);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(ellipse, rgba(14, 165, 233, 0.07) 0%, transparent 50%);
  pointer-events: none;
}

.cta-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-white);
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.125rem;
  color: var(--color-slate-400);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --- Footer --- */
.footer {
  background: var(--color-slate-950);
  color: var(--color-slate-400);
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--color-slate-800);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand .navbar-logo {
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-links-column h4 {
  color: var(--color-white);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-links-column a {
  display: block;
  font-size: 0.875rem;
  color: var(--color-slate-400);
  transition: color var(--transition);
  margin-bottom: 0.5rem;
}

.footer-links-column a:hover {
  color: var(--color-white);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-slate-800);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  transition: color var(--transition);
}

.footer-bottom-links a:hover {
  color: var(--color-white);
}

/* ============================================================
   Responsive Breakpoints
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 2.75rem;
  }

  .hero-visual {
    display: none;
  }

  .hero .container {
    justify-content: center;
  }

  .hero-content {
    text-align: center;
    max-width: 720px;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

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

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .steps-grid::before {
    display: none;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .section {
    padding: 3.5rem 0;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .section-header p {
    font-size: 1rem;
  }

  /* Navbar */
  .navbar-links,
  .navbar-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding: 8rem 0 4rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1.0625rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

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

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
  }

  /* Steps */
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* CTA */
  .cta-content h2 {
    font-size: 1.75rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.875rem;
  }

  .container {
    padding: 0 1rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .pricing-card {
    padding: 2rem 1.5rem;
  }
}
