/* ═══════════════════════════════════════════════════════════════
   main.css — base layout, CSS variables, background
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --color-bg:     #000000;
  --color-text:   #fbf3fa;
  --color-blue:   #1e3a8a;
  --color-pink:   rgba(251, 243, 250, 0.15);
  --color-gold:   #b8960c;

  --font-body:    'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-script:  'Great Vibes', cursive;

  /* ── Background GIF — change this line to swap backgrounds ── */
  --bg-image: url('/images/046.gif');
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  color: inherit;
}

html {
  font-size: 16px;
}

body {
  background-color: #000000;
  color: var(--color-text);
  font-family: var(--font-body);
  overflow: hidden; /* #main handles scroll */
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Hide any leftover blob elements */
.bg-blob { display: none !important; }

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img, video {
  display: block;
  max-width: 100%;
}

/* ── Main scroll container — snapping ──────────────────────────── */
#main {
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none; /* hide scrollbar */
}

#main::-webkit-scrollbar {
  display: none;
}

/* ── Fixed header nav ──────────────────────────────────────────── */
#corner-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 40px;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#corner-nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 28px;
}

#corner-nav.visible {
  opacity: 1;
  pointer-events: auto;
}

#nav-info,
#nav-contact,
#corner-nav-center {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: text-decoration 0.1s;
}

#nav-info:hover,
#nav-contact:hover,
#corner-nav-center:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

#corner-nav-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

/* ── Back button — inside corner-nav-right ─────────────────────── */
#back-btn {
  font-family: var(--font-body);
  font-size: 20px;
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: text-decoration 0.1s;
}

#back-btn:hover {
  text-decoration: underline;
}

/* Keep back-btn in layout flow when hidden — prevents nav reflow */
#back-btn[hidden] {
  display: block !important;
  visibility: hidden;
  pointer-events: none;
}

/* ── Overlays shell ────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 14, 26, 0.96);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.overlay[aria-hidden="true"] {
  display: none;
}

/* ── Loading screen ────────────────────────────────────────────── */
#loading-screen {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 9999;
  overflow: hidden;
  transition: opacity 0.7s ease;
}

#loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-circle {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(251, 243, 250, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--color-text);
  transform: scale(0);
  transform-origin: center;
}

/* ── Mobile viewport: dvh so #main + sections match actual visible height ── */
@media (max-width: 768px) {
  body {
    min-height: 100dvh;
    overflow: hidden;
  }

  #main {
    height: 100dvh;
  }
}

/* ── Mobile header ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  #corner-nav {
    padding: 16px;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: space-between;
  }

  #corner-nav-center {
    display: none;
  }

  #nav-info,
  #nav-contact {
    font-size: 14px;
    white-space: nowrap;
  }

  /* "CONTACT AND LINKS" → "LINKS" on mobile */
  #nav-contact {
    font-size: 0 !important;
  }
  #nav-contact::after {
    content: 'LINKS';
    font-size: 14px;
    letter-spacing: 0.08em;
  }

  /* Back button: absolute so LINKS stays at INFO's level.
     Appears just below LINKS, right-aligned. */
  #corner-nav-right {
    position: relative;
    gap: 0;
  }

  #back-btn {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    right: 0 !important;
    font-size: 24px !important;
    line-height: 1 !important;
  }

  #back-btn[hidden] {
    display: none !important;
  }
}

/* ── Utility ───────────────────────────────────────────────────── */
.script {
  font-family: var(--font-script);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
