@import url('https://fonts.googleapis.com/css2?family=Special+Gothic+Expanded+One&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Stack+Sans+Text:wght@400;500;700&display=swap');

@font-face {
  font-family: 'Hiragino Kaku Gothic Std';
  src: url('/static/assets/fonts/Hiragino Kaku Gothic Std W8.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'HelveticaNeue Thin';
  src: url('/static/assets/fonts/HelveticaNeue Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}



/* Typographic helpers */
.font-display {
  font-family: 'Hiragino Kaku Gothic Std', 'Suisse Intl', sans-serif;
  font-weight: 800;
  filter: blur(0.3px);
}

.font-cormorant {
  font-family: 'Cormorant Garamond', serif;
  font-optical-sizing: auto;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.font-helvetica-bold {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.font-stack-headline {
  font-family: 'Stack Sans Headline', sans-serif;
  font-optical-sizing: auto;
  font-weight: 200;
  letter-spacing: -0.02em;
}

.font-suisse {
  font-family: 'SuisseIntl', sans-serif;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.contact-field {
  font-family: 'SuisseIntl', sans-serif;
  font-weight: 400;
  letter-spacing: -0.05em;
}

.contact-field::placeholder {
  font-family: 'SuisseIntl', sans-serif;
  font-weight: 400;
  letter-spacing: -0.05em;
}

html,
body {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  background-color: #671f21;
  /* same bg as loader */
}

body {
  background-color: #671f21;
  color: #f3f3f3;
  font-family: 'Special Gothic Expanded One', helvetica, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  text-shadow: 0 0 15px rgba(243, 243, 243, 0.3), 0 0 30px rgba(243, 243, 243, 0.15);
  transition: opacity 0.3s ease;
  padding-top: 90px;
  /* keep content below fixed header */
}

/* body.crt-loading removed */

/* Smooth link transitions */
a {
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base button transition */
button {
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

main {
  width: 100%;
  flex: 1;
  padding-top: 0;
}

/* full-screen overlay loader */
.crt-loader {
  position: fixed;
  inset: 0;
  /* top:0; right:0; bottom:0; left:0 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #671f21;
  /* solid bg so nothing bleeds through */
  z-index: 9999;
  transition: opacity 0.35s ease;
  gap: 18px;
}

.crt-loader.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.crt-spinner {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(243, 243, 243, 0.35);
  border-top-color: rgba(243, 243, 243, 0.9);
  animation: crt-spin 1s linear infinite;
  box-shadow: 0 0 30px rgba(243, 243, 243, 0.35);
}

.crt-percent {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: rgba(243, 243, 243, 0.9);
  text-shadow: 0 0 20px rgba(243, 243, 243, 0.4);
}

@keyframes crt-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Header and Footer Surfaces */
.header-surface,
.footer-surface {
  width: 100%;
  background: #671f21;
  border: 1px solid rgba(243, 243, 243, 0.18);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  isolation: isolate;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  pointer-events: auto;
  padding: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.footer-surface {
  margin-top: auto;
  position: relative;
  width: 100%;
  z-index: 100;
  background: #671f21;
}

.surface-animate {
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.surface-show {
  opacity: 1;
  transform: translateY(0);
}

.surface-hide-top {
  opacity: 0;
  transform: translateY(-80px);
}

.surface-hide-bottom {
  opacity: 0;
  transform: translateY(80px);
}

.surface-static {
  opacity: 1;
  transform: none;
}

/* Mobile Menu Styles */
@media screen and (min-width: 769px) {

  #mobile-menu-button,
  #mobile-menu {
    display: none !important;
  }
}

/* Bounce Wrapper Animation - Smoother */
.bounce-wrapper {
  opacity: 0;
  transform: translateY(30px);
  animation: bounceIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-play-state: paused;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Device-specific responsive breakpoints */

/* Mobile (iPhone, small phones) */

/* Main content */
#main-content {
  filter: blur(0.3px);
  opacity: 1;
  overflow-x: hidden;
  overflow-y: visible;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 0;
}

/* Desktop header padding */
.header-main {
  padding-top: 16px;
  padding-bottom: 16px;
}

/* Mobile override */
@media (max-width: 768px) {
  .header-main {
    padding-top: 18px;
    padding-bottom: 18px;
  }
}

/* Language Toggle Button */
#language-toggle {
  font-family: 'Suisse Intl Mono', monospace;
  font-weight: 400;
  /* Match contact-submit-btn weight */
  text-shadow: 0 0 25px rgba(243, 243, 243, 0.5), 0 0 50px rgba(243, 243, 243, 0.3);
  background: none;
  border: 2px solid rgba(243, 243, 243, 0.6);
  padding: 8px 16px;
  box-shadow: 0 0 15px rgba(243, 243, 243, 0.2), 0 0 30px rgba(243, 243, 243, 0.1);
  transition: opacity 0.3s ease;
  cursor: pointer;
  letter-spacing: -0.05em;
  /* Match contact field spacing */
}

#language-toggle:hover {
  opacity: 0.7;
}


:root {
  --crt-size: min(85vmin, 100vw);
  --crt-offset: -20px;
  /* vertical nudge; adjust as needed */
}

/* Base centering */
/* CRT sits in normal flow, centered under the header */
#crt-container {
  position: relative;
  /* NOT fixed */
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  pointer-events: auto;
  overflow: visible;
  margin-top: 16px;
  /* tweak to sit right under header */
  z-index: 0;
}

/* Mobile tweak */
@media (max-width: 768px) {
  :root {
    --crt-size: min(100vmin, 100vw);
    --crt-offset: -10px;
  }

  #crt-canvas {
    margin-top: -50px !important;
    /* adjust however you want for mobile */
  }
}

#crt-canvas-wrapper {
  width: var(--crt-size);
  max-width: 100vw;
  aspect-ratio: 1 / 1;
  height: auto;
  position: relative;
  margin: var(--crt-offset) auto 0 auto;
  /* top offset + centered */
  transform: none;
  /* ❌ no translate, no left:50% */
  transform-origin: top center;
  pointer-events: auto;
}


#crt-canvas {
  width: 100%;
  height: 100%;
  pointer-events: auto;
  touch-action: none;
  filter: drop-shadow(0 0 20px rgba(243, 243, 243, 0.4));
  margin-top: -120px;
}

/* Safari-only: remove all blur & glow site-wide */