/* ============================================
   Blue Ridge Ops — Styles
   ============================================ */

/* --- Design Tokens --- */
:root {
  --primary: #1A2E4F;
  --primary-light: #4A80B5;
  --primary-dark: #0E1B30;
  --accent: #4ECDC4;
  --accent-light: #7EDDD6;
  --accent-dark: #38B2A9;
  --blue-mid: #5B8EC2;
  --bg: #FFFFFF;
  --bg-alt: #F4F7FA;
  --bg-dark: #0E1B30;
  --text: #2C3E50;
  --text-light: #64748B;
  --text-on-dark: #C8D6E5;
  --border: #E2E8F0;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 100px;
  --shadow-sm: 0 1px 3px rgba(15, 33, 55, 0.06);
  --shadow-md: 0 4px 16px rgba(15, 33, 55, 0.08);
  --shadow-lg: 0 8px 32px rgba(15, 33, 55, 0.1);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1160px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* --- Accessibility --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 1001;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0.5rem;
}

*:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.btn:focus-visible {
  outline-offset: 4px;
}

.form-group input:focus-visible,
.form-group textarea:focus-visible {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.25);
}

/* --- Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

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

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--primary);
}

.nav-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

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

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

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

.nav-links a:not(.btn):hover::after,
.nav-links a:not(.btn).active::after {
  width: 100%;
}

.nav-links a:not(.btn).active {
  color: var(--primary);
}

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(14, 27, 48, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: var(--bg-alt);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
  font-weight: 700;
}

.btn-sm:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn-block {
  width: 100%;
}

/* --- Hero --- */
.hero {
  padding: clamp(7rem, 16vh, 10rem) 0 clamp(4rem, 10vh, 7rem);
  background: linear-gradient(175deg, var(--bg) 60%, var(--bg-alt) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  line-height: 1.15;
  color: var(--primary-dark);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-content h1 em {
  color: var(--accent);
  font-style: italic;
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-light);
  max-width: 520px;
  margin-bottom: 2rem;
  line-height: 1.75;
}

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

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(78, 205, 196, 0.1);
  border: 1px solid rgba(78, 205, 196, 0.25);
  border-radius: var(--radius-pill);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--primary);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

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

.hero-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 340px;
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.hero-card-header svg {
  color: var(--accent);
}

.hero-card-metric {
  margin-bottom: 1.5rem;
}

.metric-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--primary-dark);
  line-height: 1;
}

.metric-label {
  font-size: 0.825rem;
  color: var(--text-light);
  margin-top: 4px;
}

.hero-card-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 80px;
}

.bar {
  flex: 1;
  height: var(--h);
  background: var(--primary-light);
  border-radius: 4px 4px 0 0;
  opacity: 0.25;
  transition: opacity 0.3s ease;
}

.bar:nth-child(even) { opacity: 0.4; }
.bar:nth-child(odd) { opacity: 0.2; }
.bar.bar-accent {
  background: linear-gradient(180deg, var(--accent), var(--blue-mid));
  opacity: 1;
}

/* --- Sections --- */
.section {
  padding: clamp(4rem, 10vw, 7rem) 0;
}

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

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--primary-dark);
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.015em;
}

.section-title em {
  color: var(--accent);
  font-style: italic;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--text-light);
  max-width: 560px;
  margin-bottom: 3rem;
  line-height: 1.75;
}

/* --- Services Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--blue-mid));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

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

.service-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 58, 92, 0.06);
  border-radius: 14px;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.service-card p {
  font-size: 0.925rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.service-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  background: rgba(78, 205, 196, 0.12);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.service-card-cta {
  background: linear-gradient(145deg, var(--bg-alt), var(--bg));
  border-style: dashed;
  display: flex;
  flex-direction: column;
}

.service-card-cta p {
  flex: 1;
}

.service-card-cta .btn {
  align-self: flex-start;
}

/* --- About --- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
}

.about-content p {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.about-list li svg {
  flex-shrink: 0;
  margin-top: 3px;
}

.about-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.about-card-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 58, 92, 0.06);
  border-radius: 50%;
  margin: 0 auto 1.25rem;
}

.about-card h4 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.about-card p {
  font-size: 0.925rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

/* --- Process --- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

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

.process-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.process-step h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.process-step p {
  font-size: 0.925rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* --- FAQ --- */
.faq-grid {
  max-width: 740px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: var(--accent);
}

.faq-item summary {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:hover {
  color: var(--accent-dark);
}

.faq-item p {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.75;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info p {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 400px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.contact-item a {
  color: var(--text);
  transition: color 0.2s ease;
}

.contact-item a:hover {
  color: var(--accent);
}

.contact-form {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}

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

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(45, 95, 138, 0.1);
}

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

.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
  border-color: #EF4444;
}

.form-group input:invalid:not(:placeholder-shown):focus,
.form-group textarea:invalid:not(:placeholder-shown):focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

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

.form-note {
  font-size: 0.825rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 1rem;
}

/* --- Footer --- */
.footer {
  background: var(--bg-dark);
  padding: 3rem 0 2rem;
  color: var(--text-on-dark);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .nav-logo {
  color: #fff;
}

.footer .nav-logo-img {
  height: 36px;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-on-dark);
  margin-top: 0.5rem;
  max-width: 300px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.footer-social a {
  color: var(--text-on-dark);
  transition: color 0.2s ease;
}

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

.footer-social svg {
  display: block;
}

.footer-nav {
  display: flex;
  gap: 4rem;
}

.footer-links,
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links h5,
.footer-contact h5 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 0.25rem;
}

.footer-links a,
.footer-contact a,
.footer-contact span {
  font-size: 0.9rem;
  color: var(--text-on-dark);
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
}

.footer-bottom p {
  font-size: 0.825rem;
  color: rgba(203, 213, 225, 0.6);
}

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

@media (max-width: 1100px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

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

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

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

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

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

  .footer-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-nav {
    gap: 3rem;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s ease, opacity 0.35s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

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

  .process-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.25rem;
  }

  .stat-divider {
    width: 40px;
    height: 1px;
  }

  .contact-form {
    padding: 1.5rem;
  }

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

/* --- Back to Top --- */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  box-shadow: var(--shadow-md);
  z-index: 900;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

#back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}
