/* styles.css */

:root { --vh: 1vh; }

/* === GLOBAL STYLES === */

@keyframes iv-unhide { to { opacity: 1; } }

body {
  margin: 0;
  font-family: 'Urbanist', sans-serif;
  background-color: #f0fcfb;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  opacity: 0;
  animation: iv-unhide 0s 4s forwards;
}

body.iv-ready {
  opacity: 1;
  transition: opacity 200ms ease;
  animation: none;
}

input, select, textarea {
  font-size: 16px;
}

a {
  text-decoration: none;
  color: black;
}

.container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 700px;
  background-color: #f0fcfb;
  box-sizing: border-box;
  padding-top: 55px;
  padding-bottom: 45px;
  overflow: hidden;
}

body.overlay-active {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

/* === VIDEO WRAPPER & CONTAINER === */
.video-wrapper {
  height: calc((var(--vh, 1vh) * 100) - 80px);
  width: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  min-height: 220px;
}

.video-container {
  height: 100%;
  width: auto;
  position: relative;
  overflow: hidden;
  pointer-events: auto;
  margin: 0 auto;
  contain: layout;
  background-color: #f0fcfb;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

/* Center poster overlay (sits above <video>, below postinfo/hotspots) */
.postimg-overlay {
  position: absolute;
  inset: 0;
  height: 100%;
  width: auto;
  margin: 0 auto;
  object-fit: cover;
  display: none;
  opacity: 0;
  transition: opacity 250ms ease;
  pointer-events: none;
  z-index: 50;
}

.postimg-overlay.is-on {
  display: block;
  opacity: 1;
}

/* Match the live container's geometry so neighbor posters never squish */
.neighbor-frame {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  contain: layout;
}

#videoPlayer {
  height: 100%;
  width: 100%;
  object-fit: cover;
  display: block;
}

/* === HOTSPOTS === */
.hotspot {
  position: absolute;
  z-index: 999;
}

.hotspot.play-pause {
  width: 70%;
  height: 50%;
  top: 10%;
  left: 15%;
}

.hotspot.chapter-forward {
  width: auto;
  height: 60%;
  right: 0;
  top: 0;
}

.hotspot.chapter-backward {
  width: auto;
  height: 60%;
  left: 0;
  top: 0;
}

/* === VOLUME & SHARE WRAPPERS === */
.volume-wrapper {
  position: absolute;
  z-index: 1001;
  top: 93%;
  right: 1%;
  width: 9%;
  height: 6%;
}

.volume-wrapper img {
  width: 100%;
  height: 100%;
}

.share-wrapper {
  position: absolute;
  z-index: 1001;
  top: 86%;
  right: 1%;
  width: 9%;
  height: 6%;
}

.share-wrapper img {
  width: 100%;
  height: 100%;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

/* === POSTINFO === */
.postinfo-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  display: block;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.postinfo-title-line1,
.postinfo-title-line2,
.postinfo-title-line3,
.postinfo-description-line1,
.postinfo-description-line2,
.postinfo-description-line3,
.postinfo-description-line4,
.postinfo-byline,
.postinfo-dateline {
  font-family: 'Raleway', sans-serif;
}

.postinfo-title-line1,
.postinfo-title-line2,
.postinfo-title-line3 {
  font-weight: 800;
  background-color: white;
  display: inline-block;
  padding-left: 1%;
  padding-right: 1%;
  white-space: nowrap;
  margin-bottom: 0.5%;
}

.postinfo-description-line1,
.postinfo-description-line2,
.postinfo-description-line3,
.postinfo-description-line4 {
  font-weight: 400;
  background-color: white;
  display: inline-block;
  padding-left: 1%;
  padding-right: 1%;
  white-space: nowrap;
  margin-bottom: 0.5%;
}

.postinfo-byline,
.postinfo-dateline {
  font-weight: 400;
  background-color: white;
  display: inline-block;
  padding-left: 1%;
  padding-right: 1%;
  margin-bottom: 0.5%;
}

/* --- POSTINFO SLIDE-IN --- */
.video-wrapper.iv-prep .postinfo-wrapper {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-12px);
  transition: none;
}

.video-wrapper.iv-reveal .postinfo-wrapper {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: transform 0.25s ease, opacity 0.25s ease, visibility 0s linear 0s;
}

/* Hide postinfo once playback has started */
body.has-started .video-wrapper.iv-reveal .postinfo-wrapper {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-12px);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* === HEADER & NAVIGATION === */
header {
  background-color: #f0fcfb;
  height: 55px;
  padding-top: 0;
  border-bottom: 1px solid black;
  box-sizing: border-box;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.logo {
  position: relative;
  left: 5px;
  bottom: 5px;
  width: 189px;
  height: auto;
}

.header-nav {
  position: relative;
  margin-left: auto;
  padding-right: 0px;
}

.header-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav ul li {
  margin-right: 15px;
}

.header-nav ul li a {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: black;
  position: relative;
  bottom: 5px;
}

/* === BOTTOM NAV === */
.bottom-nav {
  background-color: #f0fcfb;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 45px;
  box-sizing: border-box;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  border-top: 1px solid black;
  justify-content: space-between;
}

.bottom-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
}

.align-left {
  margin-left: 0;
  margin-right: auto;
}

.align-right {
  margin-left: auto;
  margin-right: 0px;
}

.bottom-nav ul li {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.bottom-nav ul li a {
  color: black;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.1em;
  transition: color 0.3s ease;
  height: 100%;
  display: flex;
  align-items: center;
}

.bottom-nav a:hover {
  color: #555;
}

.bottom-nav a.is-disabled {
  opacity: 0.01;
  pointer-events: none;
  cursor: default;
}

/* === OVERLAYS === */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(240, 252, 251, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.overlay.active {
  display: flex;
}

.overlay .close-button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  background-image: url('closebutton.png');
  background-size: cover;
  cursor: pointer;
  border: none;
  background-color: transparent;
}

.overlay-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 300px;
  max-width: 320px;
  min-height: 200px;
  padding: 20px;
  background-color: white;
  border: 1px solid black;
  box-sizing: border-box;
  text-align: center;
}

.gray-link {
  color: #555555;
}

.confirm-text {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.1em;
  margin-top: 10px;
  color: black;
  text-transform: lowercase;
  text-align: center;
}

.overlay-content input[type="email"] {
  width: 100%;
  font-family: 'Urbanist', sans-serif;
  font-size: 13pt;
  padding: 10px;
  border: 1px solid black;
  border-radius: 4px;
  box-sizing: border-box;
  margin-bottom: 15px;
}

.overlay-content .button {
  width: 100px;
  height: auto;
  border: none;
  background: none;
  cursor: pointer;
}

.overlay-content .button:hover {
  background-color: #f0fcfb;
}

.overlay-404 {
  font-family: 'Urbanist', sans-serif;
  font-size: 20pt;
  color: black;
  font-weight: bold;
  text-align: center;
}

.overlay-ty {
  font-family: 'Urbanist', sans-serif;
  font-size: 20pt;
  color: black;
  font-weight: bold;
  text-align: center;
}

#overlay-orientation {
  position: fixed;
  inset: 0;
  background: #f0fcfb;
  z-index: 2000;
  display: none;
}

/* === SHARE OVERLAY === */
.share-link-box {
  width: 100%;
  font-family: 'Urbanist', sans-serif;
  font-size: 13pt;
  padding: 10px;
  border: 1px solid black;
  border-radius: 4px;
  box-sizing: border-box;
  margin-bottom: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  background-color: #f0fcfb;
  color: black;
  cursor: text;
  text-align: center;
}

.copy-button {
  width: 30px;
  height: 30px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.copy-button:hover {
  background-color: darkgray;
}

.copied-message {
  font-family: 'Urbanist', sans-serif;
  font-size: 20pt;
  color: black;
  font-weight: bold;
  text-align: center;
}

/* === TIMER === */
.timer-wrapper {
  position: absolute;
  z-index: 1000;
  top: 1%;
  right: 1%;
  width: auto;
  height: 4vh;
  opacity: 0.7;
}

body:not(.has-started) .timer-wrapper {
  display: none !important;
}

/* Timer text inside the box (used by JS as .chapter-title) */
.chapter-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Urbanist', sans-serif;
  color: white;
  font-size: 1.7vh;
  font-weight: 300;
  text-align: center;
  white-space: nowrap;
}

/* === SECTION BOX === */
.section-wrapper {
  position: absolute;
  z-index: 1000;
  top: 1%;
  left: 1%;
  width: auto;
  height: 4vh;
  opacity: 0.85;
  background-color: rgba(0, 0, 0, 0.8);
  border: none;
  padding: 0 1.5vh;
  display: none;
  align-items: center;
  font-family: 'Urbanist', sans-serif;
  font-size: 1.8vh;
  font-weight: 300;
  color: white;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
}

.section-wrapper.visible {
  display: flex;
}

/* Section menu overlay */
.section-menu-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 1% 0 0 1%;
}

.section-menu-overlay.visible {
  display: flex;
}

.section-menu {
  background-color: #f0fcfb;
  border: 1px solid black;
  padding: 0;
  min-width: 30vh;
  max-width: 50vh;
  font-family: 'Urbanist', sans-serif;
  color: black;
}

.section-menu-header {
  padding: 1.5vh 2vh;
  font-size: 2vh;
  font-weight: 500;
  border-bottom: 1px solid black;
  cursor: pointer;
  text-align: left;
}

.section-menu-header:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.section-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.section-menu-item {
  padding: 1vh 2vh;
  font-size: 1.8vh;
  font-weight: 300;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  text-align: left;
}

.section-menu-item:last-child {
  border-bottom: none;
}

.section-menu-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.section-menu-item.current {
  font-weight: 700;
}

/* === LINKBOX === */
.linkbox-wrapper {
  position: absolute;
  top: 62%;
  left: 50%;
  transform: translateX(-50%);
  height: 6vh;
  width: auto;
  aspect-ratio: 400 / 70;
  opacity: .95;
  pointer-events: auto;
  z-index: 1000;
  cursor: pointer;
}

.linkbox-wrapper img {
  width: 100%;
  height: 100%;
  display: block;
}

.linkbox-text {
  position: absolute;
  top: 0;
  left: 10%;
  right: 2%;
  height: 100%;
  display: flex;
  align-items: center;
  color: black;
  font-size: 2.5vh;
  font-family: 'Urbanist', sans-serif;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  pointer-events: none;
}

/* === SWIPE RAIL === */
main.video-wrapper {
  position: relative;
  overflow: hidden;
  background-color: #f0fcfb;
  background-image: none;
  background-size: auto;
  background-position: center;
}

.swipe-rail {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 100% 100% 100%;
  will-change: transform;
  transform: translateY(-100%);
  touch-action: pan-y;
  pointer-events: none;
  transition: transform 220ms ease;
}

.swipe-rail.swiping {
  transition: none;
}

.swipe-rail.capturing {
  pointer-events: auto;
}

.swipe-slide {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.swipe-slide .video-container,
.swipe-slide .neighbor-frame {
  position: relative;
  height: 100%;
  width: auto;
  margin: 0 auto;
  max-width: none;
}

.swipe-video-lite {
  display: block;
  height: 100%;
  width: auto;
  object-fit: cover;
  margin: 0 auto;
  background: #f0fcfb;
}

/* === MIN-HEIGHT GATE === */
body.too-short::before {
  content: "";
  position: fixed;
  inset: 0;
  background: #f0fcfb;
  z-index: 2000;
  pointer-events: auto;
}

/* === PRELOAD IMAGES === */
.preload-images {
  width: 0;
  height: 0;
  overflow: hidden;
  background-image: url('closebutton.png'), url('subscribe.png'), url('email.png');
}

/* === COOKIE CONSENT BANNER === */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 600px;
  background-color: white;
  border: 1px solid black;
  padding: 20px;
  box-sizing: border-box;
  z-index: 10000;
  font-family: 'Urbanist', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner p {
  margin: 0 0 15px 0;
}

.cookie-banner a {
  color: black;
  text-decoration: underline;
}

.cookie-banner-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.cookie-banner-buttons a {
  color: black;
  text-decoration: none;
  font-family: 'Urbanist', sans-serif;
  font-size: 14px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: inline;
}

.cookie-banner-buttons a:visited {
  color: black;
}

/* === PRIVACY OVERLAY === */
#overlay-privacy .overlay-content {
  max-height: 80vh;
  overflow-y: auto;
}

#overlay-privacy h2 {
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: 20px;
  margin-top: 0;
  margin-bottom: 5px;
}

#overlay-privacy h3 {
  font-family: 'Raleway', sans-serif;
  font-weight: 800;
  font-size: 13px;
  margin-top: 15px;
  margin-bottom: 0;
}

#overlay-privacy p {
  font-size: 13px;
  margin-top: 5px;
  margin-bottom: 0;
}

#overlay-privacy .overlay-content > p:first-of-type {
  margin-bottom: 10px;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .cookie-banner {
    width: 90%;
    padding: 15px;
    font-size: 13px;
  }
  
  .cookie-banner-buttons a {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .logo {
    width: 180px;
  }
  
  .overlay-content {
    padding: 15px;
    max-width: 300px;
  }
}

@media (max-height: 700px) {
  #overlay-privacy h2 {
    font-size: 18px !important;
  }
  
  #overlay-privacy h3 {
    font-size: 12px !important;
  }
  
  #overlay-privacy p {
    font-size: 12px !important;
  }
}

@media (max-height: 600px) {
  #overlay-privacy h2 {
    font-size: 16px !important;
  }
  
  #overlay-privacy h3 {
    font-size: 11px !important;
  }
  
  #overlay-privacy p {
    font-size: 11px !important;
  }
}
