/* Shhhh I'm using three different fonts, but i don't care */
@import url("https://fonts.cdnfonts.com/css/longsile");
@import url("https://fonts.cdnfonts.com/css/thegoodmonolith");
@import url("https://fonts.cdnfonts.com/css/pp-neue-montreal");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --text: #ffcc00;
  --bg: #000000;
  --highlight-bg: #ffcc00;
  --type-line-opacity: 0.05;
}

body {
  background-color: var(--bg);
  min-height: 100vh;
  overflow: hidden;
  font-family: "Longsile", sans-serif;
  position: relative;
}

/* Logo */
.logo-container {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 1001;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Gentle Matrix Rain Effect */
.matrix-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.matrix-column {
  position: absolute;
  top: -100%;
  font-family: "Courier New", monospace;
  font-size: 14px;
  color: rgba(0, 255, 0, 0.7);
  line-height: 1.5;
  white-space: nowrap;
  animation: matrixFall linear infinite;
}

@keyframes matrixFall {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  5% {
    opacity: 0.8;
  }
  95% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

.matrix-char {
  display: block;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.matrix-char.bright {
  opacity: 1;
  color: rgba(0, 255, 0, 1);
  text-shadow: 0 0 5px rgba(0, 255, 0, 0.8), 0 0 10px rgba(0, 255, 0, 0.4);
}

/* Explosion/Strobe Effects */
.explosion-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.explosion {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: explode 1.5s ease-out forwards;
}

.explosion::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 200, 0, 0.6) 30%, rgba(255, 100, 0, 0.4) 60%, transparent 100%);
  animation: pulse 1.5s ease-out forwards;
}

.explosion::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 200, 255, 0.6) 0%, rgba(0, 150, 255, 0.4) 40%, transparent 80%);
  animation: pulse 1.5s ease-out 0.1s forwards;
}

@keyframes explode {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
  }
}

.strobe-flash {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 200, 0, 0.7) 20%, rgba(255, 100, 0, 0.5) 40%, transparent 70%);
  pointer-events: none;
  animation: strobe 0.3s ease-out forwards;
  filter: blur(20px);
}

@keyframes strobe {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  20% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.cosmic-burst {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 200, 255, 0.8) 0%, rgba(100, 150, 255, 0.6) 30%, rgba(150, 100, 255, 0.4) 60%, transparent 100%);
  pointer-events: none;
  animation: cosmicBurst 2s ease-out forwards;
  filter: blur(15px);
}

@keyframes cosmicBurst {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: scale(4) rotate(180deg);
    opacity: 0;
  }
}

.background-frame {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-image: url("https://assets.codepen.io/7558/web03.webp");
  background-size: 100% 100%;
  background-position: center;
  z-index: 0;
  pointer-events: none;
}

.bottom-gradient {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40vh;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.background-image {
  position: fixed;
  width: calc(100%);
  height: calc(100vh);
  background-size: cover;
  background-position: center;
  opacity: 0;
  z-index: 1;
  mix-blend-mode: multiply;
  transition: opacity 0.8s ease-in-out;
}

.background-image.default {
  background-image: url("images/main.webp");
  opacity: 1;
}

.background-image.focus {
  background-image: url("images/bg.webp");
}

.background-image.presence {
  background-image: url("images/bg2.webp");
}

.background-image.feel {
  background-image: url("images/bg3.webp");
}

.text-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.text-item {
  position: absolute;
  color: var(--text);
  font-size: 0.8rem;
  text-transform: uppercase;
  opacity: 0.8;
  white-space: nowrap;
  font-family: "TheGoodMonolith", monospace;
  z-index: 0;
}

.text-item::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -4px;
  width: 0;
  height: calc(100% + 4px);
  background-color: var(--highlight-bg);
  z-index: 1;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.text-item.highlight::after {
  width: calc(100% + 8px);
}

.text-item.highlight-reverse::after {
  width: 0;
  right: -4px;
  left: auto;
}

.main-content {
  position: relative;
  z-index: 10;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.sliced-container {
  position: relative;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  transform: translateZ(0);
}

.text-row {
  position: relative;
  width: 100%;
  height: 140px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  z-index: 100;
}

.text-content,
.char,
.char-inner {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
}

.text-content {
  position: relative;
  font-size: 10rem;
  font-weight: normal;
  text-transform: uppercase;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  color: var(--text);
  letter-spacing: 0px;
  transition: letter-spacing 0.5s ease;
  visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.text-row:hover .text-content {
  letter-spacing: 5px;
}

.interactive-area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  cursor: pointer;
}

.char {
  display: inline-block;
  position: relative;
  overflow: hidden;
  max-width: 80px;
  transition: max-width 0.64s cubic-bezier(0.86, 0, 0.07, 1);
  margin-right: 0px;
}

.text-row.active .char::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 80%;
  background-color: rgba(255, 204, 0, 0.2);
  transform: none;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
  animation-delay: calc(var(--char-index, 0) * 0.05s);
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.char.narrow-char {
  max-width: 40px;
}

.char:last-child::after {
  display: none;
}

.char-inner {
  position: relative;
  display: inline-block;
  width: 100%;
  height: 100%;
  will-change: transform;
  transform: translate3d(-20px, 0, 0);
}

.type {
  position: fixed;
  height: 100vmax;
  width: 100vmax;
  text-transform: uppercase;
  display: none;
  justify-content: center;
  align-content: center;
  text-align: center;
  top: 50%;
  left: 50%;
  margin-top: -50vmax;
  margin-left: -50vmax;
  will-change: transform;
  z-index: 5;
  transform-style: preserve-3d;
  pointer-events: none;
}

.type-line {
  white-space: nowrap;
  font-size: clamp(7rem, 18.75vh, 15rem);
  line-height: 0.75;
  font-weight: bold;
  font-family: "PP Neue Montreal", sans-serif;
  color: #ffffff;
  opacity: var(--type-line-opacity);
  user-select: none;
  will-change: transform, opacity;
  position: relative;
}

.type-line.odd {
  z-index: 50;
}

.type-line.even {
  z-index: 150;
}

/* Mobile Optimization */

/* For tablets and smaller screens */
@media screen and (max-width: 992px) {
  .text-content {
    font-size: 7rem;
  }

  .text-row {
    height: 110px;
  }

  .type-line {
    font-size: clamp(5rem, 12vh, 10rem);
  }
}

/* For mobile phones */
@media screen and (max-width: 768px) {
  .text-content {
    font-size: 5rem;
  }

  .text-row {
    height: 80px;
    margin: 8px 0;
  }

  .type-line {
    font-size: clamp(3.5rem, 8vh, 7rem);
  }

  .text-item {
    font-size: 0.7rem;
  }
}

/* For very small screens */
@media screen and (max-width: 480px) {
  .text-content {
    font-size: 3.5rem;
  }

  .text-row {
    height: 60px;
    margin: 6px 0;
  }

  .type-line {
    font-size: clamp(2.5rem, 6vh, 5rem);
  }

  .text-item {
    font-size: 0.6rem;
  }
}

/* Hamburger Menu Styles */
.hamburger-menu-btn {
  position: fixed;
  top: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hamburger-menu-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.hamburger-menu-btn.active {
  transform: rotate(90deg);
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background-color: #000;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger-menu-btn.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-menu-btn.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Menu Overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Frost Menu */
.frost-menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  padding: 100px 60px 60px;
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.4s ease, opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* flex-start: centering tall menus clips top/bottom; scroll cannot reach hidden rows */
  justify-content: flex-start;
  overflow-y: auto;
}

.menu-overlay.active .frost-menu {
  transform: translateY(0);
  opacity: 1;
}

.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  justify-items: start;
  align-items: center;
}

.menu-link {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #000;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 400;
  font-family: "PP Neue Montreal", sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 15px 0;
  position: relative;
  transition: color 0.3s ease, transform 0.3s ease;
  transform: translateY(20px);
  opacity: 0;
  width: 100%;
}

.menu-item-icon {
  width: 28px;
  height: 28px;
  stroke: #000;
  flex-shrink: 0;
  transition: stroke 0.3s ease, transform 0.3s ease;
}

.menu-item-icon--media {
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  min-width: 24px;
  min-height: 24px;
  max-width: 28px;
  max-height: 28px;
}

svg.menu-item-icon {
  display: block;
}

.menu-overlay.active .menu-link {
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.5s ease, opacity 0.5s ease, color 0.3s ease;
}

.menu-overlay.active .menu-list li:nth-child(1) .menu-link {
  transition-delay: 0.05s;
}

.menu-overlay.active .menu-list li:nth-child(2) .menu-link {
  transition-delay: 0.1s;
}

.menu-overlay.active .menu-list li:nth-child(3) .menu-link {
  transition-delay: 0.15s;
}

.menu-overlay.active .menu-list li:nth-child(4) .menu-link {
  transition-delay: 0.2s;
}

.menu-overlay.active .menu-list li:nth-child(5) .menu-link {
  transition-delay: 0.25s;
}

.menu-overlay.active .menu-list li:nth-child(6) .menu-link {
  transition-delay: 0.3s;
}

.menu-overlay.active .menu-list li:nth-child(7) .menu-link {
  transition-delay: 0.35s;
}

.menu-overlay.active .menu-list li:nth-child(8) .menu-link {
  transition-delay: 0.4s;
}

.menu-overlay.active .menu-list li:nth-child(9) .menu-link {
  transition-delay: 0.45s;
}

.menu-overlay.active .menu-list li:nth-child(10) .menu-link {
  transition-delay: 0.5s;
}

.menu-overlay.active .menu-list li:nth-child(11) .menu-link {
  transition-delay: 0.55s;
}

.menu-link:hover {
  color: var(--text);
}

.menu-link:hover .menu-item-icon {
  stroke: var(--text);
  transform: scale(1.1);
}

.menu-link:hover .menu-item-icon--media {
  stroke: none;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
  /* iOS/Safari: respect notch + home indicator (needs viewport-fit=cover on <meta viewport>) */
  .logo-container {
    width: 80px;
    height: 80px;
    top: max(20px, env(safe-area-inset-top, 0px));
    left: max(20px, env(safe-area-inset-left, 0px));
  }

  .matrix-column {
    font-size: 10px;
  }

  .hamburger-menu-btn {
    width: 50px;
    height: 50px;
    top: max(20px, env(safe-area-inset-top, 0px));
    right: max(20px, env(safe-area-inset-right, 0px));
  }

  .hamburger-line {
    width: 20px;
  }

  .frost-menu {
    /* Match clearance to logo bottom (80px) + offset + gap; never less than ~9.5rem if insets are wrong */
    padding-top: max(
      9.5rem,
      calc(max(20px, env(safe-area-inset-top, 0px)) + 80px + 1.5rem)
    );
    padding-left: max(30px, env(safe-area-inset-left, 0px));
    padding-right: max(30px, env(safe-area-inset-right, 0px));
    padding-bottom: max(40px, env(safe-area-inset-bottom, 0px));
  }

  .menu-list {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .menu-link {
    font-size: 1.2rem;
    gap: 15px;
  }

  .menu-item-icon {
    width: 24px;
    height: 24px;
  }
}

/* Footer: social icons from admin Social Media settings */
.footer-extras {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  text-align: right;
}

.footer-inline-links {
  line-height: 1.5;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  opacity: 0.88;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.footer-social-link:hover {
  color: var(--accent, #d4af37);
  opacity: 1;
}

.footer-social-link svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}