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

:root {
  --color-bg: #0a0a0a;
  --color-text: #f0ece4;
  --color-accent: #d4a853;
  --font-display: 'Oswald', sans-serif;
  --font-body: 'Roboto', sans-serif;

  /* Use the real height calculated by JS, default to 1vh if JS hasn't run */
  font-size: calc((var(--vh, 1vh) * 100) / 1080 * 16);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  overflow: hidden;
}

/* Navigation */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  pointer-events: auto;
  mix-blend-mode: difference;
}

#main-nav a {
  pointer-events: auto;
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(12px, 0.8rem, 16px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.15s;
}

#main-nav a:hover {
  color: rgba(255,255,255,0.5);
}

@media (hover: none) {
  #main-nav a:hover {
    color: var(--color-text);
  }
}

.nav-brand {
  font-size: clamp(14px, 1rem, 20px) !important;
  font-weight: 700;
  letter-spacing: 0.3em;
  display: inline-flex !important;
  align-items: baseline;
  opacity: 0;
  transition: opacity 0.5s ease, color 0.15s, transform 0.4s ease;
}

.nav-brand--visible {
  opacity: 1;
}

.nav-about-letters {
  display: contents;
}

.nav-about-letters span {
  display: inline-block;
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: none;
  letter-spacing: 0.1em;
}

.nav-about-letters .about-space {
  width: 0;
  opacity: 1;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

/* Sound hint */
#sound-hint {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1001;
  font-family: var(--font-body);
  font-size: clamp(10px, 0.7rem, 14px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  animation: fadeHint 4s ease forwards;
}

@keyframes fadeHint {
  0%   { opacity: 0; }
  30%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Scroll Hint */
.scroll-tip {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1001;
  font-family: 'Roboto', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease; /* Faster but still smooth fade in */
}

.scroll-tip--visible {
  opacity: 1;
}

.scroll-tip--hidden {
  opacity: 0 !important;
  transition: opacity 0.1s ease !important; /* Near-instant fade out */
}

/* Brand */
.brand {
  font-family: var(--font-display);
  /* Use vw for width-responsiveness so it never overflows narrow screens */
  font-size: clamp(4rem, 15vw, 10rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 0.9;
  margin: 0;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  transition: color 0.15s;
}

.brand:hover {
  color: rgba(255,255,255,0.5);
}

@media (hover: none) {
  .brand:hover {
    color: inherit;
  }
}

.tagline {
  font-family: var(--font-body);
  font-weight: 300;
  /* Increased size for MEDIA */
  font-size: clamp(1.2rem, 4vw, 2.5rem);
  letter-spacing: 0.5em;
  /* Tight spacing between OFFPOST and MEDIA */
  margin-top: 1rem;
  opacity: 0.7;
}

/* Ensure the logo container always stays on top of photos */
.center-scale {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center;
  pointer-events: none;
  z-index: 100; /* High z-index to stay above collage */
}

/* Buttons — punk/editorial style */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-text);
  border: 1px solid var(--color-text);
  padding: 1rem 2.5rem;
  margin: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.btn:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* Contact modal */
.contact-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(10,10,10,0.97);
  padding: 10vh 10vw;
  font-family: var(--font-body);
  overflow-y: auto;
}

.contact-modal:target {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.contact-modal__close {
  position: absolute;
  top: 2rem;
  right: 3rem;
  font-size: 2.5rem;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.contact-modal__close:hover {
  opacity: 1;
}

.contact-modal h2 {
  font-family: var(--font-display);
  font-size: 3rem;
  letter-spacing: 0.3em;
  margin-bottom: 2rem;
}

.contact-modal input,
.contact-modal textarea {
  width: 100%;
  max-width: 500px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 1rem 0;
  margin-bottom: 1rem;
  outline: none;
}

.contact-modal button {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
  padding: 1rem 3rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.3s;
}

.contact-modal button:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.contact-socials {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.contact-socials a {
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.contact-socials a:hover {
  opacity: 1;
}
