/* to do: update root when using themes */
/* :root {
  --malibu-pink: #ff8fcf;
  --sunset-coral: #ff9f8a;
  --seafoam: #8ee3d1;
  --pool-blue: #79cfff;
  --sky-blue: #bfe8ff;
  --sand: #fff0c9;
  --palm-shadow: rgba(18, 77, 74, 0.28);
  --glass-bg: rgba(255, 255, 255, 0.18);
  --glass-border: rgba(255, 255, 255, 0.35);
  --text-dark: #124d4a;
  --text-light: #fffaf4;
  --glow: rgba(255, 170, 210, 0.45);
} */

:root {
  --page-bg: linear-gradient(
    180deg,
    #ffe3a3 0%,
    #ffc97a 25%,
    #ffd7b5 45%,
    #fffbbf 75%,
    #e3d68e 100%
  );

  --panel-bg: rgba(205, 241, 248, 0.55);
  --panel-border: rgba(255, 255, 255, 0.32);
  --panel-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 0 28px rgba(255, 215, 240, 0.28);

  --video-frame-bg: #050505;
  --video-frame-shadow: 0 24px 70px rgba(0, 0, 0, 0.45), 0 18px 40px rgba(255, 160, 220, 0.18);

  --tagline-color: #6b2e1a;

  --button-text: #5a2d00;
  --button-bg: linear-gradient(
    180deg,
    #fff6b7 0%,
    #ffc97a 45%,
    #ffd1e8 100%
  );
  --button-border: rgba(255, 255, 255, 0.85);
  --button-shadow: 0 4px 14px rgba(255, 180, 100, 0.25), 0 0 14px rgba(255, 150, 120, 0.2), inset 0 1px 0 rgba(255,255,255,0.9);

  --toggle-text: #5a2d00;
  --toggle-bg: rgba(255, 255, 255, 0.72);
  --toggle-border: rgba(255, 255, 255, 0.8);
  --toggle-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);

  --title-gradient: linear-gradient(
    180deg,
    #fff6b7 0%,
    #ffb86b 40%,
    #ff6ec7 80%
  );
}

body[data-theme="dark"] {
  --page-bg: linear-gradient(
    180deg,
    #16121f 0%,
    #24182f 28%,
    #1b2b3d 62%,
    #13232f 82%,
    #0d171d 100%
  );

  --panel-bg: rgba(33, 45, 58, 0.72);
  --panel-border: rgba(189, 220, 255, 0.18);
  --panel-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 26px rgba(114, 188, 255, 0.14);

  --video-frame-bg: #020202;
  --video-frame-shadow: 0 26px 80px rgba(0, 0, 0, 0.62), 0 0 28px rgba(255, 60, 160, 0.12);

  --tagline-color: #ffd89d;

  --button-text: #2e1800;
  --button-bg: linear-gradient(
    180deg,
    #ffe680 0%,
    #ff9d5c 45%,
    #ff8fd8 100%
  );
  --button-border: rgba(255, 245, 210, 0.75);
  --button-shadow: 0 4px 16px rgba(255, 150, 70, 0.3), 0 0 18px rgba(255, 110, 199, 0.2), inset 0 1px 0 rgba(255,255,255,0.85);

  --toggle-text: #fff1cb;
  --toggle-bg: rgba(22, 28, 38, 0.75);
  --toggle-border: rgba(255, 230, 170, 0.35);
  --toggle-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);

  --title-gradient: linear-gradient(
    180deg,
    #fff3a0 0%,
    #ff9d5c 42%,
    #ff4fc4 82%
  );
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  font-family: "Trebuchet MS", "Verdana", sans-serif;
  color: var(--text-light);
}

html {
  min-height: 100%;
  background: transparent;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--page-bg);
}

/* body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;

  background: linear-gradient(
    180deg,
    #ffe3a3 0%,
    #ffc97a 25%,
    #ffd7b5 45%,
    #fffbbf 75%,
    #e3d68e 100%
  );
} */


/* body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(180deg, #ffd4ec 0%, #ffcaa8 22%, #aee6ff 65%, #8ee3d1 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
} */

/* body {
  background: radial-gradient(circle at top, #2a2a2a, #0f0f0f);
} */


/* .theme-toggle {
  border: 3px solid #000;
  background: #ffe08a;
  color: #3a1a00;

  box-shadow: 3px 3px 0 #000;

  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;

  transition: none;
}

.theme-toggle:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 #000;
} */


.theme-toggle {
  position: fixed;
  top: 50px;
  right: 120px;
  z-index: 20;
  padding: 12px 18px;
  /* border-radius: 999px; */
  border: 2px solid var(--toggle-border);
  background: var(--toggle-bg);
  color: var(--toggle-text);
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  /* box-shadow: var(--toggle-shadow); */
  backdrop-filter: blur(8px);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

.page-shell {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.video-background-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 50px;
  margin-bottom: 90px;
  z-index: 2;

  /* position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0; */
}

.video-frame {
  background: var(--video-frame-bg);
  padding: 28px;
  /* border-radius: 24px; */
  /* box-shadow: var(--video-frame-shadow); */
}

/* .video-frame {
  background: #050505;
  padding: 28px;
  border-radius: 24px;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.45),
    0 18px 40px rgba(255, 160, 220, 0.18);
} */

.video-background {
  display: block;
  width: min(1200px, 92vw);
  height: auto;
  /* border-radius: 10px; */
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.video-tint-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(255, 143, 207, 0.22) 0%,
      rgba(255, 240, 201, 0.10) 25%,
      rgba(121, 207, 255, 0.10) 70%,
      rgba(142, 227, 209, 0.22) 100%
    );
  z-index: 1;
  pointer-events: none;
}

/* 
.grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255,255,255,0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.55) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
} */

.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 0 20px 60px;

  /* pointer-events: none; */
}

.splash-panel {
  max-width: 630px;
  width: min(82vw, 630px);
  padding: 28px 28px 30px;
  /* position: relative; */
  text-align: center;
  /* border-radius: 22px; */
  background: rgba(205, 241, 248, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
  /* box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.12),
    0 0 28px rgba(255, 215, 240, 0.28); */

  /* margin-top: -10px; */
  /* margin-top: 20px; */
}

.site-title {
  margin: 0 0 12px;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0.05em;
  text-transform: uppercase;

  background: var(--title-gradient);

  /* background: linear-gradient(
    180deg,
    #fff6b7 0%,
    #ffb86b 40%,
    #ff6ec7 80% */
  /* ); */

  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  text-shadow:
    0 1px 0 rgba(0,0,0,0.45),
    0 0 1px rgba(255, 150, 100, 0.5),
    0 0 1px rgba(255, 110, 199, 0.35);
}

/* .site-title {
  margin: 0 0 12px;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff5f7;
  text-shadow:
    0 0 10px rgba(255,255,255,0.75),
    0 0 18px rgba(255,190,220,0.45);
} */

.site-tagline {
  /* margin: 0 0 20px;
  font-size: 1.1rem;
  color: #6b2e1a;
  text-shadow:
    0 1px 0 rgba(255,255,255,0.4); */
  margin: 0 0 20px;
  font-size: 1.1rem;
  color: var(--tagline-color);
  text-shadow: 0 1px 0 rgba(255,255,255,0.18);
}

/* .site-tagline {
  margin: 0 0 20px;
  font-size: 1.1rem;
  line-height: 1.5;
  color: #fffaf5;
  text-shadow: 0 1px 8px rgba(0,0,0,0.12);
} */

.enter-link {
  display: inline-block;
  padding: 12px 26px;
  /* border-radius: 999px; */
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--button-text);
  background: var(--button-bg);
  border: 2px solid var(--button-border);
  /* box-shadow: var(--button-shadow); */
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

/* .enter-link {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #5a2d00;
  background: linear-gradient(
    180deg,
    #fff6b7 0%,
    #ffc97a 45%,
    #ffd1e8 100%
  );
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 4px 14px rgba(255, 180, 100, 0.25),
    0 0 14px rgba(255, 150, 120, 0.2),
    inset 0 1px 0 rgba(255,255,255,0.9);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
} */

/* .enter-link {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0d4f5b;
  background: linear-gradient(180deg, #ffe7f2 0%, #ffd1df 45%, #bcecff 100%);
  border: 2px solid rgba(255,255,255,0.85);
  box-shadow:
    0 4px 14px rgba(255,255,255,0.18),
    0 0 14px rgba(255,170,210,0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  pointer-events: auto;
} */

.enter-link:hover {
  transform: translateY(-1px) scale(1.0);

  /* box-shadow:
    0 10px 24px rgba(255, 180, 100, 0.35),
    0 0 20px rgba(255, 110, 199, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.9); */
}
/* 
.enter-link:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 12px 28px rgba(18, 77, 74, 0.24),
    0 0 20px rgba(255, 143, 207, 0.35);
} */

.enter-link {
  position: relative;
  overflow: hidden;
}

.enter-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.4),
    transparent
  );
  opacity: 0.6;
}

.roach {
  position: absolute;
  width: 52px;
  height: auto;
  z-index: 4;
  pointer-events: none;
  user-select: none;
  opacity: 0.92;
}

/* this was causing three errant roach bug */

/* .roach-1 {
  top: 530px;
  left: 18%;
  transform: rotate(-18deg);
}

.roach-2 {
  top: 610px;
  right: 21%;
  transform: rotate(28deg);
}

.roach-3 {
  top: 735px;
  left: 60%;
  transform: rotate(-42deg);
} */

video::-webkit-media-controls {
  display: none !important;
}

video::-webkit-media-controls-enclosure {
  display: none !important;
}

@media (max-width: 900px) {
  .video-background {
    width: 88vw;
  }

  .roach {
    width: 40px;
  }

  .roach-3 {
    top: 700px;
  }
}

@media (max-width: 640px) {
  .splash-panel {
    width: min(90vw, 630px);
    padding: 28px 20px;
    /* border-radius: 20px; */
  }

  .site-title {
    letter-spacing: 0.05em;
  }
}
.splash-panel {
  position: relative;
  max-width: 630px;
  width: min(82vw, 630px);
  padding: 28px 28px 30px;
  text-align: center;
  /* border-radius: 22px; */
  background: rgba(205, 241, 248, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
  /* box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.12),
    0 0 28px rgba(255, 215, 240, 0.28); */
}

.splash-panel {
  position: relative;
  max-width: 630px;
  width: min(82vw, 630px);
  padding: 28px 28px 30px;
  text-align: center;
  /* border-radius: 22px; */
  background: rgba(205, 241, 248, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
  /* box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.12),
    0 0 28px rgba(255, 215, 240, 0.28); */
}


/* spinny roaches under here rename and use somewhere else*/
/* .splash-panel-shell {
  position: relative;
  display: inline-block;
  padding: 40px;
}

.splash-panel {
  position: relative;
  max-width: 630px;
  width: min(82vw, 630px);
  padding: 28px 28px 30px;
  text-align: center;
  border-radius: 22px;
  background: rgba(205, 241, 248, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(8px);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.12),
    0 0 28px rgba(255, 215, 240, 0.28);
  z-index: 1;
}

.roach-edge,
.roach-corner {
  position: absolute;
  pointer-events: none;
  image-rendering: pixelated;
  z-index: 0;
}

.roach-edge {
  position: absolute;
  pointer-events: none;
  image-rendering: pixelated;
  z-index: 0;
  background-image: url("https://s3.us-east-1.amazonaws.com/henryskitchen.fun/rb_cockroach.png");
}

.roach-edge-top,
.roach-edge-bottom {
  left: 2px;
  right: 2px;
  height: 40px;
  background-size: 40px 40px;
  background-repeat: round no-repeat;
}

.roach-edge-top {
  top: 0;
}

.roach-edge-bottom {
  bottom: 0;
}

.roach-edge-left,
.roach-edge-right {
  top: 40px;
  bottom: 40px;
  width: 40px;
  background-size: 40px 40px;
  background-repeat: no-repeat round;
}

.roach-edge-left {
  left: 0;
}

.roach-edge-right {
  right: 0;
}

.splash-panel-shell {
  position: relative;
  display: inline-block;
}

.splash-panel {
  position: relative;
  z-index: 2;
}

.roach-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% + 120px);
  height: calc(100% + 120px);
  transform: translate(-50%, -50%);
  transform-origin: center;
  pointer-events: none;
  z-index: 1;
  animation: orbitSpin 6s linear infinite;
}

.orbit-roach {
  position: absolute;
  top: 0;
  left: 50%;
  width: 40px;
  height: 40px;
  transform: translateX(-50%) rotate(90deg);
  transform-origin: center;
  image-rendering: pixelated;
} */

/* .roach-orbit-1 {
  animation-delay: 0s;
}

.roach-orbit-2 {
  animation-delay: -2.5s;
}

.roach-orbit-3 {
  animation-delay: -5s;
}

.roach-orbit-4 {
  animation-delay: -7.5s;
} */

/* @keyframes orbitSpin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  } 
}*/

.splash-panel-shell {
  position: relative;
  display: inline-block;
}

.splash-panel {
  position: relative;
  z-index: 2;
}

.roach-swarm {
  position: absolute;
  inset: -30px;
  pointer-events: none;
  z-index: 3;
}

.moving-roach {
  position: absolute;
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  pointer-events: none;
  offset-path: path("M 55 15 H 665 Q 680 15 680 45 V 360 Q 680 360 665 360 H 55 Q 15 360 15 360 V 55 Q 15 15 55 15 Z");
  offset-rotate: auto 90deg;
  /* // change 18s to higher number to make more space for more roaches */
  animation: crawlLoop 18s steps(72, end) infinite;
  /* // more fluid motion animation here */
  /* animation: crawlLoop 14s linear infinite; */
  transition: opacity 0.35s ease;
}

/* // every point 9s seems good for now try other intervals maybe */
.roach-1  { animation-delay: 0s; }
.roach-2  { animation-delay: -0.9s; }
.roach-3  { animation-delay: -1.8s; }
.roach-4  { animation-delay: -2.7s; }
.roach-5  { animation-delay: -3.6s; }
.roach-6  { animation-delay: -4.5s; }
.roach-7  { animation-delay: -5.4s; }
.roach-8  { animation-delay: -6.3s; }
.roach-9  { animation-delay: -7.2s; }
.roach-10 { animation-delay: -8.1s; }
.roach-11 { animation-delay: -9s; }
.roach-12 { animation-delay: -9.9s; }
.roach-13 { animation-delay: -10.8s; }
.roach-14 { animation-delay: -11.7s; }
.roach-15 { animation-delay: -12.6s; }
.roach-16 { animation-delay: -13.5s; }
.roach-17 { animation-delay: -14.4s; }
.roach-18 { animation-delay: -15.3s; }
.roach-19 { animation-delay: -16.2s; }
.roach-20 { animation-delay: -17.1s; }

@keyframes crawlLoop {
  from {
    offset-distance: 0%;
  }
  to {
    offset-distance: 100%;
  }
}

body.light-transition .moving-roach:not(.escape-roach) {
  opacity: 0;
}

body.roach-escaping .moving-roach:not(.escape-roach) {
  opacity: 0;
}

body.roach-escaping .escape-roach {
  opacity: 1;
  z-index: 4;
}

.escape-roach.is-escaping {
  transition:
    transform var(--escape-duration, 1600ms) linear,
    opacity 220ms linear;
  transform:
    translate(var(--escape-x, 0px), var(--escape-y, 0px))
    rotate(var(--escape-rotate, 0deg));
  opacity: 0;
}

body[data-theme="dark"] .roach-swarm,
body.light-transition .roach-swarm,
body.roach-escaping .roach-swarm {
  opacity: 1;
  pointer-events: none;
}

body:not([data-theme="dark"]):not(.light-transition):not(.roach-escaping) .roach-swarm {
  opacity: 0;
  pointer-events: none;
}
