/* ═══════════════════════════════════════════
   Sharpr Automations — Design System
   Aesthetic: "Engineered Precision"
   ═══════════════════════════════════════════ */

/* ─── CSS Reset (Josh Comeau) ─── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { line-height: 1.7; -webkit-font-smoothing: antialiased; }
img, picture, video, canvas { display: block; max-width: 100%; }
svg { display: block; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

/* ─── Design Tokens ─── */
:root {
  /* Colors */
  --coral: #D85A30;
  --coral-warm: #F0997B;
  --coral-mist: #FAECE7;
  --teal: #085041;
  --charcoal: #2C2C2A;
  --bg: #111111;
  --bg-elevated: #1a1a1a;
  --white: #FFFFFF;
  --gray: #999999;
  --gray-readable: #ABABAB;
  --glow-coral: rgba(216, 90, 48, 0.12);
  --glow-teal: rgba(8, 80, 65, 0.12);
  --border: rgba(255, 255, 255, 0.06);
  --grid: rgba(255, 255, 255, 0.04);

  /* Shadows */
  --shadow-elevated: 0 8px 32px rgba(0,0,0,0.4), 0 2px 8px rgba(0,0,0,0.3);
  --shadow-glow-coral: 0 0 60px var(--glow-coral), 0 0 120px var(--glow-coral);
  --shadow-inset: inset 0 2px 8px rgba(0,0,0,0.3);

  /* Spacing */
  --sp-xs: 8px;
  --sp-sm: 16px;
  --sp-md: 24px;
  --sp-lg: 36px;
  --sp-xl: 48px;
  --sp-2xl: 64px;
  --sp-3xl: 96px;

  /* Animation */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
}

/* ─── Typography ─── */
body {
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  color: var(--white);
  background-color: var(--bg);
  font-size: clamp(17px, 1.15vw, 19px);
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-wrap: balance;
  line-height: 1.1;
}

h1 {
  font-size: clamp(40px, 5vw, 68px);
}

h2 {
  font-size: clamp(32px, 4vw, 52px);
  margin-bottom: var(--sp-lg);
}

h3 {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

.text-secondary {
  color: var(--gray-readable);
}

.text-coral {
  color: var(--coral);
}

/* ─── Grid Background ─── */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ─── Grain Texture ─── */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.03;
}

/* ─── Skip Link ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-sm);
  background: var(--coral);
  color: var(--white);
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: 4px;
  z-index: 1000;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--sp-sm);
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--sp-sm) var(--sp-2xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.3s var(--ease-out);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: inline-block;
}

.nav-logo-text {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--white);
  white-space: nowrap;
}

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


.nav-links {
  display: flex;
  gap: var(--sp-md);
  align-items: center;
  list-style: none;
}

.nav-links a {
  color: var(--gray-readable);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.2s var(--ease-out);
  padding: var(--sp-xs) 0;
}

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

.nav-links a:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-links a:active {
  color: var(--coral);
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 16px 36px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  min-width: 44px;
  transition: transform 0.2s var(--spring), box-shadow 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}

.btn-primary {
  background: var(--coral);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(216, 90, 48, 0.3);
}

.btn-primary:hover {
  background: #c04f28;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(216, 90, 48, 0.4);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--coral-warm);
  outline-offset: 4px;
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(216, 90, 48, 0.3);
}

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

.btn-outline:hover {
  border-color: var(--coral);
  color: var(--coral);
  transform: translateY(-2px);
}

.btn-outline:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 4px;
}

.btn-outline:active {
  transform: translateY(0) scale(0.98);
}

/* ─── Sections ─── */
section {
  position: relative;
  z-index: 2;
}

.section-padding {
  padding: var(--sp-3xl) var(--sp-2xl);
}

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

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  position: relative;
  overflow: hidden;
}

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

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-xl);
  max-width: 800px;
}

.hero-headline {
  margin-bottom: var(--sp-md);
}

.hero-subhead {
  font-size: clamp(18px, 1.3vw, 20px);
  color: var(--gray-readable);
  max-width: 55ch;
  margin-bottom: var(--sp-xl);
  font-weight: 400;
  line-height: 1.7;
}

.hero-cta-row {
  display: flex;
  gap: var(--sp-sm);
  align-items: center;
  flex-wrap: wrap;
}

/* VSL Video */
.vsl-container {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-elevated);
}

.vsl-video {
  width: 100%;
  display: block;
  border-radius: 16px;
}

/* ─── SERVICES ─── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-lg);
}

.service-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--sp-lg);
  box-shadow: var(--shadow-elevated);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease-out);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--coral);
  opacity: 0;
  transition: opacity 0.2s var(--ease-out);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-elevated), 0 0 40px var(--glow-coral);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card h3 {
  color: var(--coral);
  margin-bottom: var(--sp-sm);
}

.service-card p {
  color: var(--gray-readable);
  line-height: 1.7;
  max-width: 65ch;
}

/* ─── ABOUT ─── */
.about {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(8, 80, 65, 0.08) 50%, var(--bg) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--sp-2xl);
  align-items: center;
}

.about-image-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  max-height: 520px;
}

.about-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.about-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 17, 17, 0.6) 0%, transparent 40%);
  mix-blend-mode: multiply;
}

.about-image-tint {
  position: absolute;
  inset: 0;
  background: var(--teal);
  mix-blend-mode: multiply;
  opacity: 0.15;
}

.about-text p {
  color: var(--gray-readable);
  margin-bottom: var(--sp-md);
  max-width: 65ch;
}

.about-text p:last-of-type {
  color: var(--white);
  font-weight: 500;
}

.about-text .tagline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-md);
}

/* ─── HOW IT WORKS ─── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
  counter-reset: step;
}

.step-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--sp-lg);
  box-shadow: var(--shadow-elevated);
  counter-increment: step;
  position: relative;
}

.step-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 48px;
  font-weight: 800;
  color: var(--coral);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: var(--sp-sm);
}

.step-card h3 {
  color: var(--white);
  margin-bottom: var(--sp-sm);
}

.step-card p {
  color: var(--gray-readable);
  line-height: 1.7;
}

/* Step connector lines */
.steps-grid .step-card:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -18px;
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, var(--coral) 0%, transparent 100%);
  opacity: 0.3;
}

/* ─── CONTACT / CTA ─── */
.contact {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(216, 90, 48, 0.04) 50%, var(--bg) 100%);
}

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

.contact-inner h2 {
  margin-bottom: var(--sp-md);
}

.contact-inner > p {
  color: var(--gray-readable);
  margin-bottom: var(--sp-xl);
}

/* ─── Contact Form ─── */
.contact-form {
  margin-top: var(--sp-xl);
  text-align: left;
}

.contact-form-title {
  color: var(--gray-readable);
  margin-bottom: var(--sp-md);
  text-align: center;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-readable);
}

.form-group input,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px var(--sp-sm);
  color: var(--white);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  box-shadow: var(--shadow-inset);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: var(--shadow-inset), 0 0 0 3px rgba(216, 90, 48, 0.15);
}

.form-group input:focus-visible,
.form-group textarea:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

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

.form-submit {
  margin-top: var(--sp-md);
  display: flex;
  justify-content: center;
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-xl) var(--sp-2xl);
  position: relative;
  z-index: 2;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-md);
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-logo-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
}

.footer-brand-text {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.03em;
}

.footer-tagline {
  font-size: 16px;
  color: var(--gray);
  font-style: italic;
}

.footer-links {
  display: flex;
  gap: var(--sp-md);
  align-items: center;
}

.footer-links a {
  color: var(--gray-readable);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.2s var(--ease-out);
}

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

.footer-links a:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 4px;
}

.footer-links a:active {
  color: var(--coral-warm);
}

/* ─── Scroll Animations ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--spring);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Scroll to Top ─── */
.scroll-top {
  position: fixed;
  bottom: var(--sp-lg);
  right: var(--sp-lg);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.2s var(--spring);
  box-shadow: var(--shadow-elevated);
}

.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top:hover {
  transform: translateY(-2px);
  border-color: var(--coral);
}

.scroll-top:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 4px;
}

.scroll-top:active {
  transform: scale(0.95);
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .section-padding {
    padding: var(--sp-2xl) var(--sp-lg);
  }
  .nav {
    padding: var(--sp-sm) var(--sp-lg);
  }
  .footer {
    padding: var(--sp-xl) var(--sp-lg);
  }
}

@media (max-width: 768px) {
  .section-padding {
    padding: var(--sp-xl) var(--sp-md);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-xl);
  }

  .hero {
    min-height: auto;
    padding-top: 140px;
    padding-bottom: var(--sp-2xl);
  }

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

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

  .about-image-wrapper {
    max-height: 360px;
    order: -1;
  }

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

  .steps-grid .step-card::after {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .nav {
    padding: var(--sp-sm) var(--sp-md);
  }

  .footer {
    padding: var(--sp-lg) var(--sp-md);
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 375px) {
  .hero-headline {
    font-size: 28px;
  }

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

  .hero-cta-row {
    flex-direction: column;
  }
}
