/* =============================================================================
   MEDINTERACTIV — Home Page Styles (index.css)
   Depends on design-system.css for all CSS custom properties
   ============================================================================= */


/* =============================================================================
   SITE HEADER / NAVIGATION
   ============================================================================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  transition:
    background-color var(--transition-normal),
    box-shadow var(--transition-normal);
}

.site-header.scrolled {
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  gap: var(--space-8);
}

/* Logo */
.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 2.25rem;
  width: auto;
  transition: filter var(--transition-normal);
}

.site-header:not(.scrolled) .nav-logo-img {
  filter: brightness(0) invert(1);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-accent-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.site-header.scrolled .nav-link {
  color: var(--color-gray-700);
}

.site-header.scrolled .nav-link:hover {
  color: var(--color-brand-primary);
}

/* Language toggle */
.lang-toggle {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.85);
  padding: 0.3rem 0.6rem;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast),
    background-color var(--transition-fast);
}

.lang-toggle:hover {
  color: var(--color-white);
  border-color: var(--color-white);
  background-color: rgba(255, 255, 255, 0.12);
}

.site-header.scrolled .lang-toggle {
  color: var(--color-gray-700);
  border-color: var(--color-gray-300);
}

.site-header.scrolled .lang-toggle:hover {
  color: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
}

/* Nav actions row */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: var(--space-2);
  width: 40px;
  height: 40px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 1px;
  transition:
    transform var(--transition-fast),
    opacity var(--transition-fast);
}

.site-header.scrolled .nav-toggle-bar {
  background-color: var(--color-gray-700);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* =============================================================================
   HERO SECTION
   ============================================================================= */

.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-brand-primary);
}

/* Background layers */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: var(--z-below);
}

.hero-bg-molecules {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(27, 52, 119, 0.3) 0%,
    transparent 50%,
    rgba(255, 118, 0, 0.04) 100%
  );
}

/* Hero content layout */
.hero-content {
  position: relative;
  z-index: var(--z-base);
  padding-top: calc(var(--nav-height) + var(--space-16));
  padding-bottom: var(--space-24);
}

.hero-text {
  width: 100%;
}

/* Eyebrow line + label */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: var(--space-6);
}

.hero-eyebrow-line {
  display: block;
  width: 2.5rem;
  height: 1px;
  background-color: var(--color-accent-orange);
  flex-shrink: 0;
}

/* Headline */
.hero-heading {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
  margin-bottom: var(--space-8);
}

.hero-heading-light {
  font-size: clamp(3rem, 6.5vw, 8rem);
  font-weight: var(--weight-light);
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}

.hero-heading-bold {
  font-size: clamp(4.5rem, 10.5vw, 13rem);
  font-weight: var(--weight-extrabold);
  color: var(--color-white);
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-wrap: balance;
}

/* Subheadline */
.hero-subheadline {
  font-size: clamp(var(--text-base), 1.2vw, 1.125rem);
  font-weight: var(--weight-regular);
  color: rgba(255, 255, 255, 0.65);
  line-height: var(--leading-relaxed);
  max-width: 55ch;
  margin-bottom: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* CTA row */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.hero-scroll-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.hero-scroll-line {
  display: block;
  width: 1px;
  height: 3rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0%, 100% { opacity: 0.3; transform: scaleY(1); transform-origin: top; }
  50%       { opacity: 0.8; transform: scaleY(1.15); }
}

/* Hero entrance animations */
.hero-anim {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-fade-up 800ms var(--ease-primary) forwards;
}

.hero-anim--1 { animation-delay: 200ms; }
.hero-anim--2 { animation-delay: 380ms; }
.hero-anim--3 { animation-delay: 560ms; }
.hero-anim--4 { animation-delay: 700ms; }
.hero-anim--5 { animation-delay: 900ms; }

/* scroll-margin-top on section anchors so sticky nav doesn't cover them */
#servicii,
#cum-lucram,
#contact {
  scroll-margin-top: var(--nav-height);
}

@keyframes hero-fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =============================================================================
   SERVICES INTRO STRIP
   ============================================================================= */

.services-intro {
  padding-block: var(--space-16) var(--space-12);
  background-color: var(--color-off-white);
  text-align: center;
  border-bottom: 1px solid var(--color-gray-200);
}

.services-intro-heading {
  font-size: clamp(var(--text-xl), 4vw, var(--text-2xl));
  font-weight: var(--weight-regular);
  color: var(--color-brand-primary);
  margin-bottom: var(--space-4);
  line-height: var(--leading-tight);
}

.services-intro-statement {
  font-size: clamp(var(--text-base), 1.5vw, var(--text-lg));
  font-weight: var(--weight-light);
  color: var(--color-gray-600);
  max-width: 60ch;
  margin-inline: auto;
  line-height: var(--leading-relaxed);
}

.services-intro .section-eyebrow {
  margin-bottom: var(--space-4);
}


/* =============================================================================
   SERVICES GRID SECTION
   ============================================================================= */

.services-grid-section {
  padding-block: var(--space-16) var(--space-24);
  background-color: var(--color-off-white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

/* Service card */
.service-card {
  transition-delay: var(--delay, 0ms);
}

.service-card.reveal-on-scroll {
  transition-delay: var(--delay, 0ms);
}

.service-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--space-8);
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  transition:
    box-shadow var(--transition-normal),
    transform var(--transition-normal),
    border-color var(--transition-normal);
}

.service-card-inner:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--color-gray-300);
}

/* Left border accent — pseudo-element that animates in on hover */
.service-card-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--color-accent-orange);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--transition-normal);
  border-radius: 0 0 0 var(--radius-sm);
}

.service-card-inner:hover .service-card-accent {
  transform: scaleY(1);
}

/* Icon */
.service-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-sm);
  background-color: rgba(27, 52, 119, 0.06);
  color: var(--color-brand-primary);
  margin-bottom: var(--space-6);
  flex-shrink: 0;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.service-card-inner:hover .service-card-icon {
  background-color: rgba(255, 118, 0, 0.08);
  color: var(--color-accent-orange);
}

/* Category tag — solid color, no opacity, for WCAG 1.4.3 contrast compliance */
.service-card-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gray-700);
  margin-bottom: var(--space-2);
}

/* Title */
.service-card-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-brand-primary);
  margin-bottom: var(--space-4);
  line-height: var(--leading-snug);
}

/* Description */
.service-card-description {
  font-size: var(--text-sm);
  color: var(--color-gray-600);
  line-height: var(--leading-relaxed);
  flex: 1;
}


/* =============================================================================
   PROCESS / HOW WE WORK SECTION
   ============================================================================= */

.process {
  padding-block: var(--space-16);
  background-color: var(--color-gray-900);
}

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

.process-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  position: relative;
}

/* Connecting line between steps */
.process-steps::before {
  content: '';
  position: absolute;
  top: 1.75rem;
  left: calc(100% / 6 + var(--space-8));
  right: calc(100% / 6 + var(--space-8));
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 118, 0, 0.25) 20%,
    rgba(255, 118, 0, 0.25) 80%,
    transparent
  );
  pointer-events: none;
}

.process-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition-delay: var(--delay, 0ms);
}

.process-step.reveal-on-scroll {
  transition-delay: var(--delay, 0ms);
}

.process-step-number {
  font-size: 1.75rem;
  font-weight: var(--weight-extrabold);
  color: var(--color-accent-orange);
  letter-spacing: -0.04em;
  line-height: 1;
}

.process-step-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--color-white);
  margin-top: var(--space-2);
}

.process-step-description {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.55);
  line-height: var(--leading-relaxed);
}


/* =============================================================================
   CTA + CONTACT — UNIFIED SECTION
   ============================================================================= */

.cta-contact {
  padding-block: var(--space-16);
  background-color: var(--color-brand-primary);
  position: relative;
  overflow: hidden;
}

.cta-contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Reuse existing eyebrow/heading/subtext tokens — kept for both sections */
.cta-banner-eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: var(--space-4);
}

.cta-banner-heading {
  font-size: clamp(1.75rem, 3.5vw, var(--text-2xl));
  font-weight: var(--weight-regular);
  color: var(--color-white);
  margin-bottom: var(--space-4);
  line-height: var(--leading-tight);
}

.cta-banner-subtext {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.6);
  line-height: var(--leading-relaxed);
}

.cta-contact-headline {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-12);
  position: relative;
  z-index: var(--z-base);
}

/* Horizontal contact row */
.cta-contact-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: start;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: var(--space-12);
  position: relative;
  z-index: var(--z-base);
}

/* Thin vertical divider between items */
.cta-contact-sep {
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
  align-self: stretch;
  min-height: 4rem;
}

.cta-contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-4) var(--space-8);
  gap: var(--space-2);
}

/* Small circular icon badge */
.cta-contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 118, 0, 0.4);
  border-radius: 50%;
  color: var(--color-accent-orange);
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}

.cta-contact-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: var(--space-1);
}

.cta-contact-value {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-white);
  text-decoration: none;
  transition: color var(--transition-fast);
  line-height: var(--leading-normal);
}

a.cta-contact-value:hover {
  color: var(--color-accent-orange);
}

.cta-contact-address {
  font-style: normal;
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  color: rgba(255, 255, 255, 0.75);
  line-height: var(--leading-relaxed);
}


/* =============================================================================
   SITE FOOTER
   ============================================================================= */

.site-footer {
  background-color: var(--color-gray-900);
  color: rgba(255, 255, 255, 0.7);
  padding-top: var(--space-8);
  padding-bottom: var(--space-4);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-logo-link {
  display: inline-flex;
}

.footer-logo {
  height: 2rem;
  width: auto;
  filter: brightness(0) invert(0.75);
}

.footer-tagline {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.60);
  line-height: var(--leading-relaxed);
}

.footer-col-heading {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: var(--space-4);
}

.footer-nav ul,
.footer-contact ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-nav a,
.footer-contact a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition-fast);
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--color-white);
}

.footer-address {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.60);
  line-height: var(--leading-relaxed);
  margin-top: var(--space-2);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  gap: var(--space-4);
}

.footer-copyright {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.55);
}

.lang-toggle--footer {
  color: rgba(255, 255, 255, 0.60);
  border-color: rgba(255, 255, 255, 0.35);
}

.lang-toggle--footer:hover {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.08);
}


/* =============================================================================
   RESPONSIVE — TABLET (≤ 1024px)
   ============================================================================= */

@media (max-width: 1024px) {
  :root {
    --container-padding: var(--space-8);
  }

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

  .cta-contact-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cta-contact-sep {
    width: 100%;
    height: 1px;
    min-height: 0;
    background: rgba(255, 255, 255, 0.12);
    align-self: auto;
  }

  .cta-contact-item {
    padding: var(--space-8) var(--space-4);
  }

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

}


/* =============================================================================
   RESPONSIVE — MOBILE (≤ 768px)
   ============================================================================= */

@media (max-width: 768px) {
  :root {
    --container-padding: var(--space-4);
    --nav-height: 4rem;
  }

  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-brand-primary);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-8);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition:
      opacity var(--transition-normal),
      transform var(--transition-normal);
    z-index: var(--z-overlay);
  }

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

  .nav-link {
    font-size: var(--text-base);
    color: rgba(255, 255, 255, 0.9);
  }

  .site-header.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.9);
  }

  /* Hero */
  .hero-content {
    padding-top: calc(var(--nav-height) + var(--space-12));
    padding-bottom: var(--space-16);
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .hero-scroll-indicator {
    display: none;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  /* Process: single column */
  .process-steps {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* =============================================================================
   REDUCED MOTION
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .hero-anim {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

}
