/* ===================================
   LeverageOps - V3 Complete Redesign
   Dramatic layout changes with sleek blue
   =================================== */

/* CSS Custom Properties */
:root {
  /* Sleek Blue Color System */
  --color-primary: #0066FF;
  --color-primary-light: #3385FF;
  --color-primary-dark: #0052CC;
  --color-accent: #00D4FF;

  /* Neutrals */
  --color-bg: #FAFBFC;
  --color-bg-alt: #F0F4F8;
  --color-bg-dark: #0A1628;
  --color-surface: #FFFFFF;

  --color-text: #0A1628;
  --color-text-secondary: #4A5568;
  --color-text-muted: #718096;
  --color-text-inverse: #FFFFFF;

  --color-border: #E2E8F0;
  --color-border-light: #EDF2F7;

  /* Typography - Space Grotesk for unique character */
  --font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Dramatic type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.75rem;
  --text-5xl: 3.5rem;
  --text-6xl: 4.5rem;
  --text-7xl: 6rem;

  /* Generous spacing system */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --space-40: 10rem;
  --space-48: 12rem;

  /* Layout */
  --max-width: 1440px;
  --content-width: 1200px;
  --gutter: clamp(1.5rem, 5vw, 4rem);

  /* Effects */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(10, 22, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(10, 22, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(10, 22, 40, 0.12);
  --shadow-xl: 0 24px 48px rgba(10, 22, 40, 0.16);

  --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

/* ==================
   Navigation
   ================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-6) var(--gutter);
  transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  background: rgba(250, 251, 252, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-10);
}

.nav-links {
  display: flex;
  gap: var(--space-8);
  list-style: none;
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

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

.nav-cta {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-3) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.nav-cta:hover {
  background: var(--color-text);
  color: var(--color-text-inverse);
  border-color: var(--color-text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  z-index: 1001;
  /* Ensure above mobile menu */
  position: relative;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger animation when active */
.nav-toggle.active span:first-child {
  transform: translateY(8px) rotate(45deg);
}

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

.nav-toggle.active span:last-child {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu dropdown */
@media (max-width: 768px) {
  .nav-right {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: var(--space-20) var(--space-8);
    gap: var(--space-8);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 999;
  }

  .nav-right.active,
  .nav-links.active~.nav-right,
  .nav-container:has(.nav-links.active) .nav-right {
    right: 0;
  }

  /* When nav-links has active class, show the menu */
  .nav-links.active {
    display: flex !important;
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: var(--color-bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: var(--space-24) var(--space-8);
    gap: var(--space-6);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 999;
  }

  .nav-links.active .nav-link {
    font-size: var(--text-lg);
    padding: var(--space-3) 0;
  }

  /* Overlay */
  .nav-links.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
  }
}

/* ==================
   Hero Section
   ================== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  padding: var(--space-32) var(--gutter) var(--space-16);
  max-width: var(--max-width);
  margin: 0 auto;
  gap: var(--space-12);
  align-items: center;
}

.hero-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-primary);
  width: fit-content;
}

.hero-tag-dot {
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.hero-title {
  font-size: clamp(var(--text-3xl), 4.5vw, var(--text-5xl));
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.hero-title-accent {
  color: var(--color-primary);
  font-size: 0.85em;
}

.hero-line-nowrap {
  white-space: nowrap;
}

.hero-subtitle {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  max-width: 480px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

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

.hero-visual-card {
  background: var(--color-bg-dark);
  border-radius: var(--radius-xl);
  padding: var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  min-width: 280px;
  box-shadow: var(--shadow-xl);
}

.visual-metric {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.metric-value {
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.metric-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ==================
   Buttons
   ================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

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

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

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

.btn-ghost:hover {
  background: var(--color-surface);
  border-color: var(--color-text);
}

.btn-large {
  font-size: var(--text-lg);
  padding: var(--space-5) var(--space-10);
  border-radius: var(--radius-lg);
}

/* ==================
   Section Styles
   ================== */
.section {
  padding: var(--space-32) var(--gutter);
}

.section-container {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section-header {
  margin-bottom: var(--space-24);
}

.section-number {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-6);
  letter-spacing: 0.05em;
}

.section-title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

/* ==================
   Services Section
   ================== */
.services {
  background: var(--color-surface);
}

.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  padding: var(--space-10);
  align-items: start;
  position: relative;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Watermark number in corner */
.service-row::before {
  content: attr(data-number);
  position: absolute;
  top: -20px;
  right: 20px;
  font-size: 140px;
  font-weight: 700;
  color: var(--color-border);
  opacity: 0.5;
  line-height: 1;
  pointer-events: none;
  transition: all 0.3s ease;
}

/* Hover effects */
.service-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: var(--color-surface);
}

.service-row:hover::before {
  color: var(--color-primary);
  opacity: 0.15;
}

.service-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
  z-index: 1;
}

.service-number {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.1em;
}

.service-name {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.service-desc {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 440px;
}

.service-tools {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.tool-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(0, 102, 255, 0.08);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
}

.service-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
  z-index: 1;
}

.service-list li {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  padding-left: var(--space-8);
  position: relative;
  line-height: 1.6;
}

.service-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
}

.service-divider {
  display: none;
  /* Hide dividers since we have cards now */
  height: 1px;
  background: var(--color-border);
  margin: var(--space-4) 0;
}

/* ==================
   About Section
   ================== */
.about {
  background: var(--color-bg);
}

.about-container {
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-24);
  align-items: start;
}

.about-left {
  position: sticky;
  top: var(--space-32);
}

.about-title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.about-right {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.about-text {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.about-quote {
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-text);
  font-style: italic;
  padding: var(--space-8);
  background: var(--color-surface);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-top: var(--space-8);
}

/* ==================
   CTA Section
   ================== */
.cta {
  background: var(--color-bg-dark);
  padding: var(--space-40) var(--gutter);
}

.cta-container {
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.cta-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.cta-title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: 700;
  color: var(--color-text-inverse);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.cta-text {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 480px;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
}

.cta-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Contact Form */
.contact-form-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  background: rgba(255, 255, 255, 0.05);
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-inverse);
}

.form-group input,
.form-group textarea {
  font-family: var(--font-family);
  font-size: var(--text-base);
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: var(--color-text-inverse);
  transition: all var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.12);
}

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

.form-note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
}

.form-note a {
  color: var(--color-accent);
  text-decoration: none;
}

.form-note a:hover {
  text-decoration: underline;
}

/* ==================
   Footer
   ================== */
.footer {
  background: var(--color-bg-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: var(--space-8) var(--gutter);
}

.footer-container {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-inverse);
}

.footer-copy {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: var(--space-6);
}

.footer-link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-link:hover {
  color: var(--color-text-inverse);
}

/* ==================
   Legal Pages
   ================== */
.legal-page {
  padding: var(--space-40) var(--gutter) var(--space-20);
  background: var(--color-bg);
  min-height: 100vh;
}

.legal-container {
  max-width: 800px;
  margin: 0 auto;
}

.legal-page h1 {
  font-size: var(--text-4xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
  letter-spacing: -0.03em;
}

.legal-updated {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-12);
}

.legal-page h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.legal-page p {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

.legal-page ul {
  margin-bottom: var(--space-4);
  padding-left: var(--space-8);
}

.legal-page li {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-2);
}

.legal-back {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

/* ==================
   Animations
   ================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==================
   Responsive
   ================== */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--space-12);
    padding-top: var(--space-32);
    min-height: auto;
  }

  .hero-visual {
    justify-content: flex-start;
  }

  .hero-visual-card {
    flex-direction: row;
    width: 100%;
    max-width: 100%;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .about-container {
    grid-template-columns: 1fr;
    gap: var(--space-12);
  }

  .about-left {
    position: static;
  }

  .cta-container {
    grid-template-columns: 1fr;
    gap: var(--space-10);
    text-align: center;
  }

  .cta-actions {
    align-items: center;
  }

  .cta-text {
    max-width: 100%;
  }

  .contact-form-wrapper {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    display: none;
    /* Hide contact button in nav on mobile - form is below */
  }

  /* Hero mobile fixes */
  .hero {
    padding-top: var(--space-24);
    padding-bottom: var(--space-12);
  }

  .hero-title {
    font-size: var(--text-3xl);
    line-height: 1.2;
  }

  .hero-title-accent {
    font-size: 0.9em;
  }

  .hero-line-nowrap {
    white-space: normal;
    /* Allow wrapping on mobile */
  }

  .hero-subtitle {
    font-size: var(--text-sm);
  }

  .hero-visual-card {
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-4);
  }

  .visual-metric {
    padding: var(--space-4);
  }

  .metric-value {
    font-size: var(--text-2xl);
  }

  .metric-label {
    font-size: var(--text-xs);
  }

  /* Section headers mobile */
  .section {
    padding: var(--space-16) var(--gutter);
  }

  .section-header {
    margin-bottom: var(--space-12);
  }

  .section-title {
    font-size: var(--text-2xl);
  }

  .section-number {
    font-size: var(--text-xs);
  }

  /* Service cards mobile */
  .service-row {
    padding: var(--space-6);
    margin-bottom: var(--space-4);
  }

  .service-row::before {
    font-size: 80px;
    top: -10px;
    right: 10px;
  }

  .service-name {
    font-size: var(--text-xl);
  }

  .service-desc {
    font-size: var(--text-sm);
  }

  .service-list li {
    font-size: var(--text-sm);
  }

  /* About section mobile */
  .about-title {
    font-size: var(--text-2xl);
  }

  .about-text {
    font-size: var(--text-sm);
  }

  .about-quote {
    font-size: var(--text-base);
    padding: var(--space-6);
  }

  /* CTA section mobile */
  .cta-title {
    font-size: var(--text-2xl);
  }

  .cta-text {
    font-size: var(--text-sm);
  }

  /* Contact form mobile */
  .contact-form {
    padding: var(--space-6);
  }

  .form-group input,
  .form-group textarea {
    font-size: 16px;
    /* Prevent iOS zoom on focus */
    padding: var(--space-3);
  }

  /* Footer mobile */
  .footer-container {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .footer-links {
    gap: var(--space-8);
    padding: var(--space-2) 0;
  }

  .footer-link {
    font-size: var(--text-base);
    padding: var(--space-2);
  }
}

@media (max-width: 480px) {
  :root {
    --gutter: 1rem;
  }

  .hero {
    padding-top: var(--space-20);
    padding-bottom: var(--space-10);
  }

  .hero-title {
    font-size: var(--text-2xl);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .section {
    padding: var(--space-12) var(--gutter);
  }

  .service-row::before {
    font-size: 60px;
  }

  .cta {
    padding: var(--space-16) var(--gutter);
  }

  .cta-title {
    font-size: var(--text-xl);
  }

  .btn-large {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-sm);
  }

  /* Legal pages mobile */
  .legal-page {
    padding: var(--space-24) var(--gutter) var(--space-12);
  }

  .legal-page h1 {
    font-size: var(--text-2xl);
  }

  .legal-page h2 {
    font-size: var(--text-lg);
  }
}