/* ============================================
   H-OPS Website — style.css
   Sober, industrieel, mobile-first
   ============================================ */

/* --- Custom Properties --- */
:root {
  --red: #B71C1C;
  --red-hover: #8B1515;
  --anthracite: #37474F;
  --steel: #78909C;
  --light-grey: #ECEFF1;
  --white: #FFFFFF;
  --deep-blue: #263238;
  --max-width: 1140px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--anthracite);
  background: var(--white);
}

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

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

a:hover {
  text-decoration: underline;
}

/* Scroll offset for anchor links below sticky nav */
section[id] {
  scroll-margin-top: var(--nav-height);
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navigation --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--light-grey);
  height: var(--nav-height);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-nav__logo img {
  height: 40px;
  width: auto;
}

.site-nav__links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.site-nav__links a {
  color: var(--anthracite);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s, color 0.3s;
}

.site-nav__links a:hover,
.site-nav__links a.active {
  text-decoration: none;
  border-bottom-color: var(--red);
  color: var(--deep-blue);
}

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--anthracite);
  margin: 6px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.15) 60%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 80%;
  padding: 0 0 64px 0;
}

.hero__title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 20px;
  max-width: 900px;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.65;
  margin-bottom: 12px;
}

.hero__tagline {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 32px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
}

.btn:hover {
  background: var(--red-hover);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(183, 28, 28, 0.3);
}

.btn:active {
  transform: translateY(0);
}

/* --- Sections --- */
.section {
  padding: 80px 0;
}

.section--grey {
  background: var(--light-grey);
}

.section--dark {
  background: var(--deep-blue);
  color: var(--white);
}

.section__title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--deep-blue);
}

.section--dark .section__title {
  color: var(--white);
}

.section__subtitle {
  font-size: 1rem;
  color: var(--steel);
  margin-bottom: 48px;
}

.section--dark .section__subtitle {
  color: rgba(255, 255, 255, 0.6);
}

/* --- Section Header --- */
.section__header {
  margin-bottom: 48px;
}

/* --- Capability Blocks (Home) --- */
.capabilities {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* When any capability is hovered, fade siblings */
.capabilities:hover .capability {
  filter: grayscale(80%) brightness(0.7);
  transform: scale(0.98);
}

.capabilities:hover .capability:hover {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.01);
}

.capability {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s, filter 0.4s;
  cursor: pointer;
  text-decoration: none;
}

.capability::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.15) 100%);
  transition: background 0.4s;
}

.capability:hover::before {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.25) 100%);
}

.capability__content {
  position: relative;
  z-index: 1;
  padding: 32px;
  width: 100%;
  transition: transform 0.3s;
}

.capability:hover .capability__content {
  transform: translateY(-4px);
}

.capability__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.capability__text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
}

.capability__more {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}

.capability:hover .capability__more {
  opacity: 1;
  transform: translateY(0);
}

/* --- Highlight Carousel (homepage) --- */
.highlight-carousel {
  margin: 0;
}

.highlight-carousel .carousel__slide {
  aspect-ratio: 16 / 9;
}

/* --- Slide with project label overlay --- */
.carousel__slide-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  z-index: 2;
  pointer-events: none;
  padding-top: 32px;
}

/* Topic carousel — full width, prominent */
.topic-carousel {
  margin: 0 0 64px 0;
}

.topic-carousel .carousel__slide {
  aspect-ratio: 16 / 9;
}

/* --- Topic Page --- */
.topic-intro {
  padding: 0 40px;
  margin-bottom: 64px;
}

.topic-intro p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.topic-project {
  margin-bottom: 48px;
  padding: 40px;
  background: var(--light-grey);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}

.topic-project:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.topic-project:last-child {
  margin-bottom: 0;
}

.topic-project__header {
  margin-bottom: 24px;
}

.topic-project__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--deep-blue);
  margin-bottom: 4px;
}

.topic-project__client {
  font-size: 0.9rem;
  color: var(--steel);
}

.topic-project__body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

/* When project body has only text (no carousel), span full width */
.topic-project__body:has(> :only-child) {
  grid-template-columns: 1fr;
}

.topic-project__text p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.topic-project__text p:last-child {
  margin-bottom: 0;
}

.topic-project__stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat__value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--red);
  line-height: 1.2;
}

.stat__label {
  display: block;
  font-size: 0.8rem;
  color: var(--steel);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.confidential-note {
  text-align: center;
  color: var(--steel);
  font-size: 0.9rem;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--light-grey);
}

/* --- Cross-navigation (topic pages) --- */
.cross-nav {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--light-grey);
  text-align: center;
}

.cross-nav__label {
  font-size: 0.75rem;
  color: var(--steel);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.cross-nav__links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cross-nav__btn {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--anthracite);
  border: 1px solid var(--steel);
  border-radius: 4px;
  padding: 10px 20px;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
  text-decoration: none;
}

.cross-nav__btn:hover {
  color: var(--anthracite);
  background: var(--light-grey);
  border-color: var(--anthracite);
  text-decoration: none;
}

/* --- Project Cards --- */
.domain-section {
  margin-bottom: 64px;
}

.domain-section:last-child {
  margin-bottom: 0;
}

.domain-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--deep-blue);
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}

.section--dark .domain-title {
  color: var(--white);
  border-bottom-color: var(--red);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.card {
  background: var(--white);
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.section--dark .card {
  background: rgba(255, 255, 255, 0.08);
}

.card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--deep-blue);
  margin-bottom: 4px;
}

.section--dark .card__title {
  color: var(--white);
}

.card__client {
  font-size: 0.85rem;
  color: var(--steel);
  margin-bottom: 16px;
}

.section--dark .card__client {
  color: rgba(255, 255, 255, 0.5);
}

.card__text {
  font-size: 0.9rem;
  color: var(--anthracite);
  line-height: 1.7;
}

.section--dark .card__text {
  color: rgba(255, 255, 255, 0.75);
}

.card__link {
  display: inline-block;
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.02em;
  transition: color 0.3s, transform 0.2s;
}

.card__link:hover {
  text-decoration: none;
  color: var(--red-hover);
  transform: translateX(4px);
  display: inline-block;
}

/* --- Carousel --- */
.carousel {
  position: relative;
  overflow: hidden;
  margin: 32px 0;
}

.carousel__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 0;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.carousel__slide:hover img {
  transform: scale(1.03);
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  color: var(--white);
  border: none;
  width: 48px;
  height: 48px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.2s;
}

.carousel__btn:hover {
  background: rgba(0, 0, 0, 0.75);
}

.carousel__btn--prev {
  left: 12px;
}

.carousel__btn--next {
  right: 12px;
}

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--steel);
  border: none;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.3s, background 0.3s, transform 0.2s;
  padding: 0;
}

.carousel__dot:hover {
  opacity: 0.7;
  transform: scale(1.2);
}

.carousel__dot.active {
  opacity: 1;
  background: var(--red);
}

/* Mini carousel in project cards */
.carousel--mini {
  margin: 0 0 24px 0;
}

.carousel--mini .carousel__slide {
  aspect-ratio: 16 / 10;
}

.carousel--mini .carousel__btn {
  width: 36px;
  height: 36px;
  font-size: 18px;
}

.carousel--mini .carousel__dots {
  margin-top: 12px;
}

.carousel--mini .carousel__dot {
  width: 8px;
  height: 8px;
}

/* Full carousel on project detail pages */
.carousel--full {
  margin: 0;
}

.carousel--full .carousel__slide {
  aspect-ratio: 16 / 9;
}

.carousel--portrait .carousel__slide {
  aspect-ratio: 4 / 3;
}

.carousel--portrait .carousel__slide img {
  object-fit: contain;
}

/* --- Project Detail Page --- */
.project-detail {
  padding: 48px 0 80px;
}

.project-detail__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--steel);
  margin-bottom: 32px;
  transition: color 0.3s;
}

.project-detail__back:hover {
  color: var(--red);
  text-decoration: none;
}

.project-detail__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--deep-blue);
  margin-bottom: 8px;
}

.project-detail__client {
  font-size: 1rem;
  color: var(--steel);
  margin-bottom: 32px;
}

.project-detail__text {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 720px;
}

/* --- About Section --- */
.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.about-text p {
  margin-bottom: 16px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* --- Contact Section --- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.contact-info h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--deep-blue);
  margin-bottom: 24px;
}

.contact-info p {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.contact-info address {
  font-style: normal;
  line-height: 1.8;
  margin-bottom: 24px;
}

.contact-email {
  margin-top: 32px;
}

.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--anthracite);
  font-size: 0.95rem;
  margin-top: 16px;
  transition: color 0.3s, transform 0.2s;
}

.linkedin-link:hover {
  color: var(--red);
  text-decoration: none;
  transform: translateX(4px);
}

.linkedin-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: fill 0.3s;
}

/* --- Footer --- */
.site-footer {
  background: var(--deep-blue);
  color: rgba(255, 255, 255, 0.6);
  padding: 24px 0;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-footer__left img {
  height: 54px;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.site-footer__left:hover img {
  opacity: 1;
}

.site-footer__copy {
  font-size: 0.7rem;
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--deep-blue);
  color: rgba(255, 255, 255, 0.85);
  padding: 16px 24px;
  z-index: 200;
  display: none;
}

.cookie-banner.visible {
  display: block;
}

.cookie-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner__text {
  font-size: 0.85rem;
  flex: 1;
  min-width: 240px;
}

.cookie-banner__btn {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 8px 24px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s;
}

.cookie-banner__btn:hover {
  background: var(--red-hover);
}

/* --- Page Header (detail pages) --- */
.page-header {
  background: var(--deep-blue);
  padding: 48px 0;
}

.page-header__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
}

.page-header__intro {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  margin-top: 12px;
  max-width: 640px;
}

/* ============================================
   Responsive — Tablet (768px+)
   ============================================ */
@media (min-width: 768px) {
  .capabilities {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .capability {
    min-height: 400px;
  }

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

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

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

  .hero__title {
    font-size: 2.75rem;
  }

  .topic-project__body {
    grid-template-columns: 3fr 2fr;
  }

  .topic-project__body--reverse {
    grid-template-columns: 2fr 3fr;
  }

  .topic-project__body--reverse .topic-project__text {
    order: 2;
  }

  .topic-project__body--reverse .carousel {
    order: 1;
  }
}

@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero {
    min-height: 600px;
  }

  .capability {
    min-height: 440px;
  }
}

/* ============================================
   Responsive — Mobile nav
   ============================================ */
@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .site-nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--light-grey);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .site-nav__links.open {
    display: flex;
  }

  .hero__title {
    font-size: 1.75rem;
  }

  .hero__content {
    padding: 48px 0;
  }

  .section {
    padding: 48px 0;
  }

  .capability {
    min-height: 240px;
  }
}

/* --- Subtle fade-in on scroll --- */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

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