/* OpScale Tech Solutions - Optimized Styles */

/* ========================================
   CSS Custom Properties & Reset
   ======================================== */

:root {
  --primary: #1f2937;
  --secondary: #6b7280;
  --accent: #10b981;
  --background: #ffffff;
  --background-alt: #f9fafb;
  --white: #ffffff;
  --text-light: #374151;
  --border-light: #e5e7eb;
  --border-focus: #3b82f6;
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --border-radius: 0.5rem;
  --border-radius-lg: 1rem;
  --transition: all 0.2s ease-in-out;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  /* Removed overflow: hidden and height: 100% to restore normal scrolling */
}

body {
  min-height: 100vh;
  background-color: var(--background);
  color: var(--primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  color: var(--primary);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 1rem 0;
}

p {
  margin: 0 0 1rem 0;
  color: var(--text-light);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover, a:focus {
  color: var(--primary);
  text-decoration: underline;
}

/* ========================================
   Form Elements
   ======================================== */

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition);
}

input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
}

/* ========================================
   Media & Lists
   ======================================== */

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

ul, ol {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* ========================================
   Header & Navigation
   ======================================== */

header {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5em;
  text-decoration: none;
  color: var(--white);
  transition: var(--transition);
}

.logo:hover,
.logo:focus {
  color: var(--accent);
  text-decoration: none;
}

.logo-icon {
  color: var(--accent);
  display: flex;
  align-items: center;
}

.logo-accent {
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5em 0.2em;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover, 
.nav-links a:focus {
  color: var(--accent);
  border-bottom-color: var(--accent);
  outline: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: rgba(31, 41, 55, 0.85);
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.hero:hover .hero-bg-image,
.hero:focus-within .hero-bg-image {
  transform: scale(1.08);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  padding: 2rem 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin: 0 auto 1rem;
  line-height: 1.1;
  color: #f8f9fa;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: #f8f9fa;
}

/* ========================================
   Buttons & CTA
   ======================================== */

.cta-btn {
  background-color: var(--accent);
  color: var(--white);
  text-decoration: none;
  border: none;
  padding: 1em 2.5em;
  font-size: 1.1rem;
  border-radius: 2em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: background-color 0.2s, transform 0.2s;
  display: inline-block;
}

.cta-btn:hover, 
.cta-btn:focus {
  background-color: #059669; /* darker green */
  color: var(--white);
  transform: translateY(-3px);
  outline: none;
  text-decoration: none;
}

.nav-cta {
  font-size: 1em;
  padding: 0.5em 1.2em;
  line-height: 1.5;
  vertical-align: middle;
  /* Remove extra vertical space and align with nav links */
}

/* ========================================
   Sections
   ======================================== */

.section {
  padding: 4rem 1.5rem;
}

.section-content {
  max-width: 1400px;
  margin: 0 auto;
}

.section-alt {
  background-color: var(--background-alt);
}

.section-title {
  text-align: center;
  font-size: 2.25rem;
  margin-bottom: 3rem;
  color: var(--primary);
  font-weight: 700;
}

/* ========================================
   Solutions Section
   ======================================== */

.solution-item {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.solution-item:nth-child(even) {
  flex-direction: row-reverse;
}

.solution-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background-color: var(--accent);
  border-radius: 50%;
  color: var(--white);
}

.solution-item h3 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.solution-item p {
  font-size: 1.1rem;
  color: var(--secondary);
  margin: 0;
}

/* ========================================
   Process Section
   ======================================== */

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

.process-step {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.process-step:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.process-step-number {
  background-color: var(--accent);
  color: var(--white);
  font-weight: 700;
  font-size: 1.5rem;
  width: 2.5em;
  height: 2.5em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 1.5rem;
}

.process-step h3 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.process-step p {
  color: var(--secondary);
  margin: 0;
}

/* ========================================
   Contact Section
   ======================================== */

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

.contact-subtitle {
  font-size: 1.2rem;
  color: var(--secondary);
  margin-top: -2.5rem;
  margin-bottom: 2.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.contact-form-wrapper {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.contact-form {
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary);
  text-align: left;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-light);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

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

.contact-form .cta-btn {
  width: 100%;
  margin-top: 1rem;
}

/* ========================================
   Footer
   ======================================== */

footer {
  background: var(--primary);
  color: #f8f9fa;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
  margin-top: auto;
}

footer p {
  color: #f8f9fa !important;
  margin: 0.5rem 0;
}

footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  display: inline-block;
}

footer a:hover,
footer a:focus {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ========================================
   Accessibility
   ======================================== */

.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 1001;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
}

/* ========================================
   Animations
   ======================================== */

@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
  }
  
  .fade-in.delay-1 { animation-delay: 0.1s; }
  .fade-in.delay-2 { animation-delay: 0.2s; }
  .fade-in.delay-3 { animation-delay: 0.3s; }
  .fade-in.delay-4 { animation-delay: 0.4s; }
  
  @keyframes fadeInUp {
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* ========================================
   Privacy Policy Page
   ======================================== */

.privacy-container {
  display: grid;
  grid-template-columns: 1fr minmax(auto, 700px) 1fr;
  min-height: 60vh;
  background: var(--background-alt);
}

.privacy-content {
  grid-column: 2;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  padding: 2.5rem 2rem;
  margin: 2.5rem 0;
}

.privacy-content h1 {
  color: var(--primary);
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.privacy-content h2 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.5rem;
}

.privacy-content p {
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.privacy-content ul {
  margin-bottom: 1rem;
  color: var(--text-light);
}

.privacy-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.privacy-content a {
  color: var(--accent);
  text-decoration: underline;
}

.privacy-content a:hover,
.privacy-content a:focus {
  color: var(--primary);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 900px) {
  .process-steps {
    grid-template-columns: 1fr;
  }
  
  .solution-item, 
  .solution-item:nth-child(even) {
    flex-direction: column;
    text-align: center;
  }

  .privacy-container {
    grid-template-columns: 1fr;
    background: var(--white);
  }
  
  .privacy-content {
    grid-column: 1;
    margin: 1.5rem;
    padding: 1.5rem;
    box-shadow: none;
    border-radius: 0;
  }
}

@media (max-width: 800px) {
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--primary);
    flex-direction: column;
    width: 100%;
    padding: 1rem 0;
    display: none;
    box-shadow: var(--shadow);
  }
  
  .nav-links.open {
    display: flex;
    align-items: center;
  }
  
  .nav-toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  .hero-content {
    padding: 3rem 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 3rem 1rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
  
  .nav-container {
    padding: 0.75rem 1rem;
  }

  .privacy-content {
    margin: 1rem;
    padding: 1rem;
  }
  
  .privacy-content h1 {
    font-size: 2rem;
  }
  
  .privacy-content h2 {
    font-size: 1.25rem;
  }
}

/* ========================================
   Enhanced Typography & Spacing
   ======================================== */

.pain-story p {
  font-size: clamp(1rem, 2.5vw, 1.2em);
}
