/* css/styles.css */
:root {
  --color-bg: #1f2630;
  --color-surface: #2d3644;
  --color-surface-alt: #262e3a;
  --color-text: #e8ebf0;
  --color-text-muted: #aab3c2;
  --color-heading: #f4f6f9;
  --color-primary: #171c24;
  --color-primary-rgb: 23, 28, 36;
  --color-accent: #f5a524;
  --color-accent-text: #f5a524;
  --color-accent-contrast: #141a2b;
  --color-border: #3a4556;
  --radius: 14px;
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --container-width: 1140px;
  --space-section: 96px;
  --transition-base: 0.6s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

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

a {
  color: inherit;
}

h1, h2, h3 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  color: var(--color-heading);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent-text);
  margin: 0 0 0.75em;
}

.section-title {
  font-size: clamp(1.75rem, 2.5vw, 2.5rem);
}

.section-title--center {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.section-body {
  color: var(--color-text-muted);
  max-width: 60ch;
}

.section-body--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-tagline {
  font-weight: 600;
  color: var(--color-heading);
  margin-top: 1.5em;
}

.section-tagline--center {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* Header & nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-primary);
  color: #fff;
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: #fff;
  margin-right: auto;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand__mark {
  width: 56px;
  height: 56px;
  margin: -8px 0;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}

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

.lang-switcher {
  display: flex;
  gap: 6px;
}

.lang-switcher button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

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

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: #fff;
}

/* Hero */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.hero-bg img.is-active {
  opacity: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  /* dark behind the text on the left, lighter on the right so the photos show */
  background: linear-gradient(90deg, rgba(var(--color-primary-rgb), 0.85) 0%, rgba(var(--color-primary-rgb), 0.6) 45%, rgba(var(--color-primary-rgb), 0.25) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.25rem);
  max-width: 14ch;
}

.hero-subtitle {
  font-size: 1.1rem;
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.85);
}

.hero-tagline {
  font-weight: 600;
  color: var(--color-accent);
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  margin-top: 1.5em;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}

/* Sections */
.section {
  padding: var(--space-section) 24px;
  max-width: var(--container-width);
  margin: 0 auto;
  scroll-margin-top: 80px;
}

.section--alt {
  max-width: none;
  background: var(--color-surface-alt);
}

.section--alt > * {
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
}

.reveal, .process-step {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.reveal.is-visible, .process-step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.section-grid--reverse {
  direction: rtl;
}

.section-grid--reverse > * {
  direction: ltr;
}

.section-grid__media img,
.section-grid__media video {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.media-crossfade {
  position: relative;
  aspect-ratio: 3 / 2;
}

.media-crossfade img,
.media-crossfade video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* white to match the white edges of narrow slides (letterbox blends in) */
  background: #fff;
  opacity: 0;
  transition: opacity 1.5s ease;
}

/* fill the 3:2 frame like the other section images; keep the worker and the operator in view */
.media-crossfade video {
  object-fit: cover;
  object-position: 75% center;
}

.media-crossfade img.is-active,
.media-crossfade video.is-active {
  opacity: 1;
}

.pill-list {
  list-style: none;
  padding: 0;
  margin: 1.5em 0 0;
  display: grid;
  gap: 10px;
}

.pill-list li {
  position: relative;
  padding-left: 28px;
  color: var(--color-text);
}

.pill-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.pill-list--grid {
  grid-template-columns: 1fr 1fr;
}

/* Process */
.process-arc {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 56px;
}

.process-step {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 28px 20px;
  border: 1px solid var(--color-border);
  flex: 1 1 170px;
  max-width: 210px;
  text-align: center;
  margin-top: var(--arc-offset, 0);
  position: relative;
}

.process-step h3 {
  margin-bottom: 8px;
}

.process-step p {
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Reveal with a stagger via animation, so hover transitions stay instant. */
.process-step.is-visible {
  animation: process-in 0.6s ease backwards;
  transition: transform 0.15s ease-out, border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}

.process-step:nth-child(2).is-visible { animation-delay: 0.1s; }
.process-step:nth-child(3).is-visible { animation-delay: 0.2s; }
.process-step:nth-child(4).is-visible { animation-delay: 0.3s; }
.process-step:nth-child(5).is-visible { animation-delay: 0.4s; }

@keyframes process-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (hover: hover) {
  .process-step.is-visible:hover {
    transform: translateY(-10px) scale(1.16);
    border-color: var(--color-accent);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
    z-index: 1;
  }
}

.process-step__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  font-weight: 700;
  margin-bottom: 12px;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.team-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 28px;
  border: 1px solid var(--color-border);
  text-align: center;
}

.avatar-circle {
  position: relative;
  width: 160px;
  height: 160px;
  font-size: 2rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 16px;
}

/* the photo covers the initials; if the file is missing, main.js removes the img */
.avatar-circle img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.team-card__role {
  color: var(--color-accent-text);
  font-weight: 600;
  margin: 0.25em 0 1em;
}

.team-card__bio {
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

/* Contact */
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 1.5em;
}

.contact-link {
  text-decoration: none;
  font-weight: 600;
  color: var(--color-heading);
}

.section-grid--top {
  align-items: start;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 28px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.contact-form__full {
  grid-column: 1 / -1;
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 10px 12px;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.contact-form [aria-invalid="true"] {
  border-color: #e5484d;
}

.contact-form__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-form__actions .btn {
  margin-top: 0;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.contact-form__actions .btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.contact-form__status {
  margin: 0;
  font-size: 0.9rem;
}

.contact-form__status[data-kind="success"] {
  color: #4cc38a;
}

.contact-form__status[data-kind="error"] {
  color: #ff8b8b;
}

/* Footer */
.site-footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  padding: 24px;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 860px) {
  .section-grid {
    grid-template-columns: 1fr;
  }

  .section-grid--reverse {
    direction: ltr;
  }

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

  .pill-list--grid {
    grid-template-columns: 1fr;
  }

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

  .process-step {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    padding: 16px 24px;
    display: none;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }
}