@font-face {
  font-family: 'EmberModernDisplayStd';
  src: url('./fonts/EmberModernDisplayStd-Regular.ttf') format('trueType');
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: 'EmberModernDisplayStd';
  src: url('./fonts/EmberModernDisplayStd-Bold.ttf') format('trueType');
  font-weight: 400;
  font-style: normal
}

@font-face {
  font-family: 'AmazonEmberMono';
  src: url('./fonts/AmazonEmberMono_Rg.ttf') format('trueType');
  font-weight: 200;
  font-style: normal;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
}

body {
    background-image: url(assets/background.jpg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding-top: 0px;
    padding-bottom: 10px;
    margin-top: -80px;
}

h1 {
    font-family: 'EmberModernDisplayStd';
    font-weight: 400;
    font-size: clamp(50px, 4vw, 95px);
    line-height: .5;
}

p {
    font-family: 'AmazonEmberMono';
    font-size: clamp(28px, 1.2vw, 95px);
}

a {
    font-family: 'AmazonEmberMono';
    font-size: clamp(28px, 1.2vw, 95px);
    color: white;
    text-decoration: none;
}

.header {
    width: 100%;
    height: 272px;
    padding-left: 6vw;
    padding-right: 6vw;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-start;
}

.logo img {
    width: clamp(200px, 12vw, 500px);
    min-width: 150px;
    height: auto;
    margin-left: -25px;
    margin-bottom: -28px;
}

.orange-h1 {
    color: #ff6200;
}

.cta {
    margin-top: -15px;
    margin-bottom: 12px;
    margin-left: auto;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);   /* 4 equal columns */
    grid-template-rows: repeat(3, 1fr);      /* 3 equal rows */
    gap: 31px; 
    padding-left: 6vw;
    padding-right: 6vw;
}

.thumbnail {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: rgba(255,255,255,0.00);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;                       /* fills the box while maintaining aspect ratio */
  transition: transform 0.3s ease;
}

.footer {
  display: flex;
  width: 100%;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  padding-left: 6vw;
  padding-right: 6vw;
  padding-top: 50px;
}


/* ======= Inline “fullscreen” overlay (no native fullscreen) ======= */
.video-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;

  /* dark backdrop */
  background: rgba(0, 0, 0, 0.9);

  /* account for iOS notches/safe areas */
  padding: max(12px, env(safe-area-inset-top))
           max(12px, env(safe-area-inset-right))
           max(12px, env(safe-area-inset-bottom))
           max(12px, env(safe-area-inset-left));
}

/* lock background scroll while overlay is open */
.body--locked { overflow: hidden; }

/* The frame that holds the video */
.video-frame {
  width: min(92vw, 1600px);
  height: min(92dvh, 900px);      /* use dynamic vh for mobile browser chrome */
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: black;
  display: flex;
}

/* The actual video fills the frame with letterboxing */
.video-frame > video {
  width: 100%;
  height: 100%;
  object-fit: contain;            /* show entire video without cropping */
  background: black;
}

/* Close button */
.video-close {
  position: absolute;
  top: 25px; right: 10px;
  padding: 8px 12px;
  font-size: 22px;
  line-height: 1;
  border-radius: 10px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  cursor: pointer;
}

/* (Optional) clicking the dark backdrop closes */
.video-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
}

/* make sure clicks on frame don’t bubble to backdrop */
.video-frame { position: relative; z-index: 1; }

@media (max-width: 1675px) {
  h1 {
    font-size: clamp(38px, 4vw, 95px);
}

  p {
      font-size: clamp(16px, 1.4vw, 95px);
  }

  a {
      font-size: clamp(16px, 1.4vw, 95px);
  }

  .thumbnail-grid {
    gap: 1vw; 
  }

}


/* ===============================
   Phone PORTRAIT (stack header + 1 column)
   =============================== */
@media (max-width: 1000px) {

  .header {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 6vw;
    height: auto;
    text-align: left;
    margin-top: 80px;
  }

  .logo img {
    max-width: 40vw;
    width: auto;
    height: auto;
    transform: none; /* undo desktop nudges */
    margin-top: -10vw;
    margin-left: -2vw;
    /* margin-bottom: -20px; */
    display: block;
  }

  .title { 
    text-align: left; 
    margin-left: 3vw;
    margin-top: -20px;
  }

  .title h1 { font-size: clamp(24px, 7vw, 45px); }

  
  .cta {
    margin: 0; 
    margin-left: 3vw;
    text-align: left;
    white-space: normal;
  }
  .cta p { font-size: clamp(12px, 3.6vw, 16px); margin: 0; }

  .thumbnail-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 column */
    gap: 16px;
    width: 85vw;               /* ~85% of viewport width */
    margin: 16px auto 24px;    /* centered column */
    padding: 0;
    height: auto;              /* let content drive height */
  }

  .thumbnail {
    width: 100%;
    overflow: hidden;
  }

  .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
  }

  .footer a {
    display: inline-block;
    font-size: clamp(12px, 3.6vw, 16px);
    text-align: left;
    margin: -15px 3vw 50px 3vw ;
  }
}

/* ================================
tiny width screens
=============================== */

@media (max-width: 900px) {
  .orange-h1 {
    line-height: .8;
  }
}

/* iPad & tablets (both orientations): make the video nearly full-screen */
@media (min-width: 768px) {
  /* shrink the overlay padding so the frame gets more room */
  .video-overlay {
    padding: max(6px, env(safe-area-inset-top))
             max(6px, env(safe-area-inset-right))
             max(6px, env(safe-area-inset-bottom))
             max(6px, env(safe-area-inset-left));
  }

  /* bigger than base (92vw/92dvh) */
  .video-frame {
    width: 98vw;
    height: 98dvh;
    border-radius: 8px; 
  }
}
