@font-face {
  font-family: 'ME_Graph_Mono';
  src: url('../assets/fonts/MEGraphMono-Regular.woff2') format('woff2'),
       url('../assets/fonts/MEGraphMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-background: #fff;
  --color-logo-bg: #ffffff;
  --color-logo-text: #242424;
  --color-video-bg: #fff;
  --color-links-bg: #ffffff;
  --color-links-text: #242424;
  --color-link-border: rgba(36, 36, 36, 0.15);

  --font-size-logo: clamp(5rem, 18vw, 14rem);
  --font-size-caption: clamp(1rem, 2vw, 1.5rem);
  --font-size-link-title: clamp(1.75rem, 4vw, 3.5rem);
  --font-size-link: clamp(1rem, 1.8vw, 1.375rem);

  --content-max-width: min(80vw, 1200px);
  --grid-gap: clamp(1.5rem, 5vw, 4rem);
  --surface-overlay-opacity-strong: 0.92;
  --surface-overlay-opacity-light: 0.75;

  /* Button and UI constants */
  --border-radius-button: 70px;
  --font-size-button: 12px;
  --sound-icon-height: 72px;
  --sound-icon-height-mobile: 32px;
  --button-padding: 7px 18px;
  --button-padding-mobile: 6px 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: var(--color-background);
  color: var(--color-logo-text);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

a {
  color: #5e5e5e;
  text-decoration: none;
  position: relative;
  display: inline-block;
  background: #dddddd;
  padding: var(--button-padding);
  border-radius: var(--border-radius-button);
  font-family: 'ME_Graph_Mono', monospace;
  font-size: var(--font-size-button);
  font-weight: 400;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  transition: all 200ms ease;
}

a:hover,
a:focus-visible {
  background: #c5c5c5;
  color: #4a4a4a;
}


.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.surface-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
}

.surface-stage[data-active-surface="none"] {
  pointer-events: none;
}

.surface {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  isolation: isolate;
  transition: opacity 120ms ease;
}

.surface[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.surface .panel__inner {
  width: min(100%, var(--content-max-width));
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 6rem);
  position: relative;
  z-index: 1;
}

.surface::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.surface[aria-hidden="false"]::before {
  opacity: 1;
}

.surface--logo {
  color: var(--color-logo-text);
}

.surface--logo::before {
  background: rgb(255 255 255 / var(--surface-overlay-opacity-strong));
}

.surface--links {
  color: var(--color-links-text);
}

.surface--links::before {
  background: rgb(255 255 255 / var(--surface-overlay-opacity-light));
}

.surface--logo .panel__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.surface--links .panel__inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-loop {
  position: relative;
  z-index: 0;
  pointer-events: none;
}

.loop-sequence {
  display: flex;
  flex-direction: column;
}

.panel {
  position: relative;
  min-height: 100vh;
  display: block;
}

.panel--surface {
  min-height: 100vh;
  pointer-events: none;
  background: transparent;
}

.panel__sticky {
  position: relative;
  height: 100vh;
  display: grid;
  place-items: center;
  z-index: 1;
  padding: 0;
}

.panel__inner {
  width: min(100%, var(--content-max-width));
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 6rem);
}


.logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: var(--content-max-width);
}

.logo-placeholder img {
  width: 100%;
  height: auto;
  max-width: var(--content-max-width);
}

.logo-caption {
  margin-top: clamp(1.5rem, 4vw, 3rem);
  font-size: var(--font-size-caption);
  text-align: center;
  letter-spacing: 0.08em;
}

.panel--video {
  position: relative;
  background: transparent;
  padding: 0;
}

.panel--video .panel__sticky {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  padding: 0;
  pointer-events: none;
}

.panel-video-shell {
  position: relative;
  width: var(--content-max-width);
  aspect-ratio: 5 / 3;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: visible;
  border-radius: 20px;
  background: #ffffff;
  pointer-events: auto;
}

.panel-video-shell::before,
.panel-video-shell::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 50vh;
  pointer-events: none;
  z-index: 1;
}

.panel-video-shell::before {
  top: auto;
  bottom: 100%;
  background: linear-gradient(0deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.panel-video-shell::after {
  top: 100%;
  bottom: auto;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.panel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 0;
  border-radius: inherit;
  background: #ffffff;
}

.youtube-container {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 0;
  border-radius: inherit;
  background: #ffffff;
  overflow: hidden;
  pointer-events: none;
}

.youtube-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: inherit;
  object-fit: contain;
  pointer-events: none;

}

@media (max-width: 59.99rem) {
  .panel--video .panel__sticky {
    height: 100vh;
    min-height: 100vh;
  }

  .panel-video-shell {
    width: 95vw;
    aspect-ratio: 5 / 3;
    max-height: none;
  }
}

.video-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.25rem, 3vw, 2rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  color: rgba(17, 17, 17, 0.7);
  pointer-events: none;
  z-index: 2;
  transition: opacity 350ms ease;
  border-radius: inherit;
}

.video-fallback.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.panel--video-secondary .panel__sticky {
  z-index: 4;
}

.links-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 10px;
  margin-block: clamp(1.5rem, 5vw, 5rem);
}

.link-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-bottom: 10px;
}

.link-group:last-child {
  padding-bottom: 0;
}

.link-group__title {
  margin: 0;
  font-family: 'ME_Graph_Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  color: #000;
  white-space: nowrap;
  flex-shrink: 0;
  width: 200px;
  padding-top: 3px;
  text-align: center;
}

.link-group__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  gap: 4px;
}


.panel--video-secondary .video-fallback {
  color: rgba(17, 17, 17, 0.7);
}

/* Sound toggle button */
.sound-toggle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 300ms ease, visibility 300ms ease;
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
}

.panel--video:hover .sound-toggle {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 59.99rem) {
  .sound-toggle {
    opacity: 1;
    visibility: visible;
    top: auto;
    left: auto;
    bottom: 1rem;
    right: 1rem;
    transform: none;
  }

}

.sound-text {
  font-family: 'ME_Graph_Mono', monospace;
  font-size: var(--font-size-button);
  font-weight: 400;
  text-transform: uppercase;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: var(--button-padding);
  border-radius: var(--border-radius-button);
  transition: opacity 200ms ease, background 300ms ease, color 300ms ease;
  white-space: nowrap;
}

.sound-toggle:hover .sound-text {
  background: white;
  color: #242424;
}

.sound-text--mute {
  opacity: 1;
}

.sound-text--unmute {
  opacity: 0;
  position: absolute;
}

.sound-toggle.is-unmuted .sound-text--mute {
  opacity: 0;
}

.sound-toggle.is-unmuted .sound-text--unmute {
  opacity: 1;
}

@media (min-width: 60rem) {
  .links-grid {
    width: auto;
  }
}


@media (max-width: 40rem) {
  /* Prevent any element from exceeding viewport width */
  * {
    max-width: 100vw;
    box-sizing: border-box;
  }

  .panel__inner {
    padding-inline: clamp(1rem, 5vw, 3rem);
  }

  .logo-caption {
    letter-spacing: 0.04em;
  }

  /* Mobile logo styling - center aligned, width 90vw */
  .surface--logo .panel__inner {
    width: 90vw;
    max-width: 90vw;
    padding: 0;
  }

  .logo-placeholder {
    width: 100%;
    max-width: 100%;
  }

  .logo-placeholder img {
    width: 100%;
    height: auto;
  }

  /* Mobile links layout - names left, links right (similar to desktop) */
  .surface--links .panel__inner {
    width: 90vw;
    max-width: 90vw;
    padding: clamp(1rem, 3vw, 2rem);
    box-sizing: border-box;
  }

  .link-group {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
  }

  .link-group__title {
    width: 100%;
    flex-shrink: 0;
  }

  .link-group__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  /* Make buttons more flexible on mobile */
  .link-group__list a {
    padding: var(--button-padding-mobile);
    font-size: 11px;
    white-space: nowrap;
    min-width: -webkit-fill-available;
    min-width: -moz-fit-content;
    min-width: fit-content;
  }


}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01s !important;
    scroll-behavior: auto !important;
  }
}
