:root {
  --cream: #ffffff;
  --ink: #141210;
  --accent: #f74b27;
  --nav-height: 72px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* -------------------- NAV -------------------- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(16px, 4vw, 48px);
  background: var(--cream);
  z-index: 100;
}

.nav-links {
  display: flex;
  gap: clamp(24px, 4vw, 56px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-family: "Caveat", cursive;
  font-weight: 600;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: 0.02em;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 10px 6px;
  position: relative;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link.active::after {
  transform: scaleX(1);
}

/* -------------------- PAGES -------------------- */

main {
  position: relative;
  height: 100dvh;
  width: 100%;
}

.page {
  position: absolute;
  inset: 0;
  top: var(--nav-height);
  height: calc(100dvh - var(--nav-height));
  width: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vh, 40px) clamp(16px, 4vw, 60px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.page.active {
  display: flex;
}

/* -------------------- HOME -------------------- */

.home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  gap: clamp(8px, 2vh, 24px);
}

.home-content .logo {
  max-width: min(90vw, 520px);
  max-height: 22vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transform: translateX(-50px);
}

.home-content .cowboy {
  max-width: min(90vw, 640px);
  max-height: 62vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transform: translateX(40px);
}

/* -------------------- VIDEO -------------------- */

.video-grid {
  display: flex;
  flex-direction: row;
  gap: clamp(12px, 2vw, 32px);
  width: 100%;
  height: 100%;
  align-items: stretch;
  justify-content: center;
}

.video-item {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 640px;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 100%;
  background: #000;
  border: 2px solid var(--ink);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* -------------------- SIGN UP -------------------- */

.signup-title {
  font-family: "Bevan", serif;
  font-size: clamp(24px, 4vw, 40px);
  margin: 0;
  letter-spacing: 0.02em;
}

.laylo-frame-wrap {
  width: 100%;
  max-width: 480px;
}


/* -------------------- SIGNUP POPUP -------------------- */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 16, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-box {
  position: relative;
  background: var(--cream);
  border-radius: 12px;
  padding: clamp(28px, 5vw, 44px) clamp(20px, 4vw, 36px) clamp(20px, 3vw, 28px);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 2vh, 20px);
  transform: translateY(12px);
  transition: transform 0.25s ease;
}

.popup-overlay.active .popup-box {
  transform: translateY(0);
}

.popup-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  padding: 4px 8px;
}

.popup-close:hover {
  color: var(--accent);
}

/* -------------------- RESPONSIVE -------------------- */

@media (max-width: 720px) {
  :root {
    --nav-height: 60px;
  }

  .nav-links {
    gap: 14px;
  }

  .video-grid {
    flex-direction: column;
    gap: 8px;
  }

  .video-item {
    max-width: 100%;
  }

  .home-content .cowboy {
    max-height: 50vh;
  }

  .home-content .logo {
    transform: translateX(-16px);
  }

  .signup-title {
    text-align: center;
  }
}

@media (max-width: 380px) {
  .nav-links {
    gap: 10px;
  }

  .nav-link {
    font-size: 19px;
  }
}
