/* ==========================================================================
   piledriver.com
   One stylesheet for the whole site. Values below were copied from the
   archived DEC 2025 site (Elementor post-7 styles) so the look matches.

   Sections, top to bottom:
     1. Settings (colors, fonts, sizes)   <- change the site's colors here
     2. Fonts
     3. Base
     4. Hero (logo video + "View Reel")
     5. Project grid
     6. About
     7. Client logos
     8. Footer
     9. Video lightbox
    10. Small screens (phones)
   ========================================================================== */


/* 1. Settings ------------------------------------------------------------- */

:root {
  /* Colors */
  --page-bg: #f8f8f8;
  --text: #333333;
  --text-muted: #707070; /* original was #7e7e7e; darkened a hair to pass contrast checks */
  --heading: #000000;
  --white: #ffffff;
  --hero-bg: #856c6c;
  --hero-overlay: rgba(34, 34, 34, 0.59);
  --tile-hover-overlay: rgba(0, 0, 0, 0.81);
  --clients-overlay: rgba(0, 0, 0, 0.5);
  --footer-bg: #000000;
  --copyright-bg: #2e2e2e;
  --copyright-text: rgba(255, 255, 255, 0.59);

  /* Fonts */
  --font-heading: "Montserrat", sans-serif;
  --font-body: "Open Sans", sans-serif;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Sizes */
  --content-width: 1140px;
  --grid-gap: 10px;
  --tile-ratio: 25 / 13;
  --hero-height: 640px;

  /* Phone breakpoint is 767px (see section 10) */
}


/* 2. Fonts (self-hosted, latin only) ------------------------------------- */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/open-sans-300-latin.woff2") format("woff2");
}


/* 3. Base ----------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font-system);
  font-size: 16px;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px #000;
}


/* 4. Hero ----------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  min-height: var(--hero-height);
  padding: 0 10px;
  overflow: hidden;
  background-color: var(--hero-bg);
}

/* Animated logo video sits behind everything. The poster shows while
   the video loads, and is all phones see (same as the old site). */
.hero-video {
  position: absolute;
  inset: 0;
  background: url("../img/hero-poster.webp") center / cover no-repeat;
}

.hero-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, calc(var(--hero-height) * 16 / 9));
  aspect-ratio: 16 / 9;
  border: 0;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 1s;
}

.hero-video.is-playing iframe {
  opacity: 1;
}

/* Dark tint over the video so the white text reads */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--hero-overlay);
}

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

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  width: 50%;
  padding: 10px;
}

.hero-title {
  margin-top: 86px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}

.button {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 3px;
  background: var(--white);
  color: #000;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 2px;
  text-decoration: none;
  transition: opacity 0.3s;
}

.button:hover {
  opacity: 0.85;
}


/* 5. Project grid --------------------------------------------------------- */

/* Always 3 across on desktop/tablet and 1 across on phones, so rows stay
   even no matter how many tiles there are. */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
  padding: var(--grid-gap) 0;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: var(--tile-ratio);
  overflow: hidden;
  color: var(--white);
  text-decoration: none;
  background: #222;
}

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s;
}

/* Dark layer that fades in on hover */
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background-color 1s;
}

.tile-text {
  position: relative;
  z-index: 1;
  display: block;
  padding: 35px;
  text-align: left;
}

.tile-title,
.tile-desc {
  display: block;
  opacity: 0;
  text-transform: uppercase;
  transition: opacity 1s;
}

.tile-title {
  margin-bottom: 10px;
  font-family: var(--font-heading);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.2;
}

.tile-desc {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
}

.tile:hover img,
.tile:focus-visible img {
  transform: scale(1.2);
}

.tile:hover::after,
.tile:focus-visible::after {
  background-color: var(--tile-hover-overlay);
}

.tile:hover .tile-title,
.tile:hover .tile-desc,
.tile:focus-visible .tile-title,
.tile:focus-visible .tile-desc {
  opacity: 1;
}

/* Phones and tablets can't hover, so show titles over a soft shade */
@media (hover: none) {
  .tile::after {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0) 70%);
  }

  .tile-title,
  .tile-desc {
    opacity: 1;
  }

  .tile-text {
    padding: 20px;
  }
}


/* 6. About ---------------------------------------------------------------- */

.about {
  display: flex;
  gap: 40px;
  width: 80%;
  margin: 0 auto;
  padding: 10px;
}

.bio {
  display: flex;
  flex: 1 0 200px;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.bio-photo {
  width: 100%;
  height: auto;
}

.bio-name {
  padding-left: 10px;
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
}

.bio-role {
  margin-top: -12px;
  padding-left: 10px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
}

.social-icons {
  display: flex;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--white);
  transition: opacity 0.3s;
}

.social-icons a:hover {
  opacity: 0.9;
}

.social-icons svg {
  width: 25px;
  height: 25px;
  fill: #000;
}

.about-text {
  display: flex;
  flex: 0 0 72%;
  flex-direction: column;
  gap: 20px;
  padding: 10px;
}

.about-title {
  color: var(--heading);
  font-family: var(--font-heading);
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
}

.about-text p {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 28px;
}

.about-text p + p {
  margin-top: 8px;
}


/* 7. Client logos --------------------------------------------------------- */

.clients {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 231px;
  margin-top: 60px;
  /* Original showed this image at its full 2440px size from the top-left */
  background: url("../img/clients-bg.webp") 0 0 / 2440px auto no-repeat;
}

.clients::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--clients-overlay);
}

.logo-carousel {
  position: relative;
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  overflow: hidden;
}

.logo-track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  transition: transform 0.5s ease;
}

.logo-track li {
  display: flex;
  flex: 0 0 25%;
  justify-content: center;
}

.logo-track img {
  width: 125px;
  height: 100px;
}


/* 8. Footer --------------------------------------------------------------- */

.footer-links {
  min-height: 201px;
  padding: 50px 10px 0;
  background: var(--footer-bg);
}

.footer-links ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: block;
  padding: 13px 37px;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.copyright {
  min-height: 74px;
  margin: 0;
  padding: 20px 10px 0;
  background: var(--copyright-bg);
  color: var(--copyright-text);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}


/* 9. Video lightbox ------------------------------------------------------- */

.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-frame {
  width: min(90vw, 1140px, calc(85vh * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #000;
}

.lightbox-frame video,
.lightbox-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}


/* 10. Small screens (phones, 767px and narrower) -------------------------- */

@media (max-width: 767px) {
  .hero-video {
    background: none;
  }

  .hero-content {
    width: 100%;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }

  .tile {
    aspect-ratio: 3 / 2;
  }

  .about {
    flex-direction: column;
    gap: 40px;
    width: 100%;
    margin-top: 40px;
  }

  .bio {
    flex: none;
  }

  .about-text {
    flex: none;
  }

  .logo-track li {
    flex-basis: 50%;
  }

  .footer-links a {
    padding: 13px 14px;
  }
}


/* Respect "reduce motion" system setting */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .tile:hover img,
  .tile:focus-visible img {
    transform: none;
  }
}
