/* Abordage (self-hosted) */
@font-face {
  font-family: 'Abordage';
  src: url('./fonts/Abordage-Regular.woff2') format('woff2'),
       url('./fonts/Abordage-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

/* Base styles */
body {
  margin: 0;
  font-family: 'Abordage', serif;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 100px;
  padding: 80px 0;
  background-color: #131313;
  color: #ffffff;
}

main {
    display: flex;
    padding-left: 200px;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 200px;
}

/* Header layout */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 100px;
  box-sizing: border-box;
  text-align: center;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 100px;
  box-sizing: border-box;
  text-align: center;
}

.work-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 50px;
  width: 100%;
}

section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.video-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.video-bg video {
  opacity: 0;
  pointer-events: none;
}

/* Video container stays fixed behind content */
.video-bg video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;      /* scale dynamically */
  height: 50%;     /* fill vertically */
  transform: translate(-50%, -50%); /* center horizontally & vertically */
  object-fit: cover;               /* cover the screen without distortion */
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  pointer-events: none;
}

/* Hover rules remain the same */
.work-list:has(.sec1:hover) ~ .video-bg #vid1 {
  opacity: 1;
}

.work-list:has(.sec2:hover) ~ .video-bg #vid2 {
  opacity: 1;
}

.work-list:has(.sec3:hover) ~ .video-bg #vid3 {
  opacity: 1;
}

.work-list:has(.sec4:hover) ~ .video-bg #vid4 {
  opacity: 1;
}

.work-list {
  position: relative;
  z-index: 1;
}

/* Hide others */
.work-list:has(.sec1:hover) ~ .video-bg video:not(#vid1),
.work-list:has(.sec2:hover) ~ .video-bg video:not(#vid2),
.work-list:has(.sec3:hover) ~ .video-bg video:not(#vid3),
.work-list:has(.sec4:hover) ~ .video-bg video:not(#vid4) {
  opacity: 0;
}

.one-degree h2 {
    color: #17BD99;
}

.one-home h2 {
  color: #35BFFF;
}

.unite-us h2 {
  color: #CC3D3D;
}

.zoom h2 {
  color: #FFDE72;
}

/* Logo font */
h1 {
  font-family: 'League Script', cursive;
  margin: 0;
  font-size: 80px;
}

/* Section headers */
h2, h3 {
  font-family: 'Knewave', sans-serif;
  margin: 0;
  font-size: 40px;
}

/* Body copy */
p {
  line-height: 1.3;
  margin: 0;
}

/* Mobile breakpoint: stack header vertically */
@media (max-width: 768px) {
  header, footer {
    flex-direction: column;
    align-items: center; /* center items when stacked */
    gap: 20px; /* space between logo and text */
    padding: 0px 20px; /* adjust padding for smaller screens */
  }
  main {
    padding-left: 60px;
    flex-direction: column;
  }
  .preview {
    display: none;
  }

  .video-bg video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;      /* scale dynamically */
    height: 25%;     /* fill vertically */
    transform: translate(-50%, -50%); /* center horizontally & vertically */
  }
}

/* Make the anchor fill the section */
.clickable-section {
  display: block;
  text-decoration: none !important; /* remove underline */
  color: inherit !important;         /* use your text color */
  -webkit-tap-highlight-color: transparent; /* remove highlight on iOS */
  overflow: hidden; /* ensures smooth transform animations */
}

.clickable-section:hover,
.clickable-section:active {
  text-decoration: none;
  color: inherit;
}

/* Apply transform and color transitions to h2 and p */
.clickable-section h2,
.clickable-section p {
  display: inline-block; /* needed for smooth transform */
  transition: transform 0.3s ease, color 0.3s ease;
  transform-origin: left center;
}

/* Hover effect: subtle pop & color change */
.clickable-section:hover h2 {
  transform: translateY(-3px);
  color: #fff;
  transform: scale(1.1);
}

.clickable-section:hover p {
  transform: translateY(-2px);
  color: #d5d5d5;
}


/* Change cursor on hover */
.clickable-section:hover {
  cursor: pointer;
}