/* The Curator — shared styles */
:root {
  --charcoal: #0a0a0a;
  --matte: #111111;
  --brass: #b8860b;
  --mahogany: #3b1c0a;
  --ash: #a1a1aa;
}

html, body {
  background: var(--charcoal);
  color: var(--ash);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  scroll-behavior: smooth;
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  letter-spacing: 0.02em;
  color: #e7e5e4;
}

/* Cinematic background image treatment: blurred + darkened, behind content */
.cine-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(3px) grayscale(0.4) contrast(1.1) brightness(0.6);
  transform: scale(1.02); /* just enough to hide the 1px blurred edges */
  z-index: 0;
  will-change: filter;
  background-attachment: fixed; /* parallax: lock image so dark sections slide over it */
}

/* Cinematic vignette: edges heavily darkened, center behind typography light */
.cine-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%,
      rgba(10,10,10,0.15) 0%,
      rgba(10,10,10,0.25) 35%,
      rgba(10,10,10,0.55) 65%,
      rgba(10,10,10,0.92) 100%);
}

.cine-foreground { position: relative; z-index: 2; }

/* Warm (Reserve) variant */
.cine-bg--warm { filter: blur(3px) grayscale(0.3) contrast(1.1) brightness(0.55) sepia(0.15); }
/* Per-page override: drop grayscale so warm bronze / gold tones shine through (e.g. watch face) */
.cine-bg--gold { filter: blur(3px) contrast(1.1) brightness(0.6) saturate(1.15); }
.cine-overlay--warm {
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%,
      rgba(30,15,5,0.18) 0%,
      rgba(25,12,4,0.3) 35%,
      rgba(15,8,3,0.6) 65%,
      rgba(8,4,2,0.94) 100%);
}

/* Glass panel */
.glass {
  background: rgba(17,17,17,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Form container — clearer separation from background */
.form-glass {
  background: rgba(17,17,17,0.6);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Refined rectangular button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 2.4rem;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #d6d3d1;
  border: 1px solid rgba(255,255,255,0.22);
  background: transparent;
  transition: color .4s ease, border-color .4s ease, background-color .4s ease;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}
.btn:hover {
  color: #0a0a0a;
  background: var(--brass);
  border-color: var(--brass);
}
.btn--light:hover {
  color: #0a0a0a;
  background: #f5f5f4;
  border-color: #f5f5f4;
}
.btn--brass {
  border-color: rgba(184,134,11,0.55);
  color: #d4a017;
}
.btn--brass:hover { background: var(--brass); border-color: var(--brass); color: #0a0a0a; }

/* Hairline dividers */
.hairline { height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent); }

/* Fade-in on load */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.fade-up { opacity: 0; animation: fadeUp 1.2s ease forwards; }
.fade-up.d1 { animation-delay: .15s; }
.fade-up.d2 { animation-delay: .35s; }
.fade-up.d3 { animation-delay: .55s; }
.fade-up.d4 { animation-delay: .75s; }
@keyframes pageFade { from { opacity: 0; } to { opacity: 1; } }
.page-fade { animation: pageFade 1.4s ease forwards; }

/* Subheader eyebrow */
.eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--brass);
  font-family: 'Inter', sans-serif;
}

/* Nav link */
.nav-link {
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #a8a29e;
  transition: color .3s ease;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}
.nav-link:hover { color: #f5f5f4; }
.nav-link--brass { color: #b8860b; }
.nav-link--active {
  position: relative;
}
.nav-link--active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(184, 134, 11, 0.5);
}
.nav-link--brass:hover { color: #d4a017; }

/* Form inputs */
.field {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.20);
  padding: 1rem 1.25rem;
  color: #e7e5e4;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  outline: none;
  transition: border-color .35s ease, background-color .35s ease;
  font-family: 'Inter', sans-serif;
  appearance: none;
  border-radius: 0;
}
.field::placeholder { color: rgba(255,255,255,0.40); letter-spacing: 0.12em; }
.field:focus { border-color: var(--brass); background: rgba(184,134,11,0.04); }

select.field {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0l5 6 5-6z' fill='%23a1a1aa'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  padding-right: 2.75rem;
}
select.field option { background: #111; color: #e7e5e4; }

/* Brass rule under section headings */
.rule-brass { width: 3.5rem; height: 1px; background: var(--brass); margin: 1.5rem 0 0; }

/* Custom webkit scrollbar — thin, charcoal track, muted dark thumb */
html { scrollbar-width: thin; scrollbar-color: #333 var(--charcoal); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--charcoal); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #4a3a14; }

/* Scroll reveal (IntersectionObserver adds .is-visible) */
.reveal {
  opacity: 0;
  transform: translateY(1.5rem); /* ~ translate-y-6 */
  transition: opacity 1.1s ease-out, transform 1.1s ease-out;
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.reveal[data-delay="3"] { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Global analog film grain — tactile matte-paper texture over dark backgrounds */
.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 150px 150px;
}

/* ============ MOBILE ============ */
@media (max-width: 767px) {
  /* background-attachment: fixed is unsupported/janky on iOS Safari — drop it on touch */
  .cine-bg {
    background-attachment: scroll;
    filter: blur(2px) grayscale(0.4) contrast(1.1) brightness(0.6);
  }
  .cine-bg--warm { filter: blur(2px) grayscale(0.3) contrast(1.1) brightness(0.55) sepia(0.15); }
  .cine-bg--gold { filter: blur(2px) contrast(1.1) brightness(0.6) saturate(1.15); }

  /* Slightly stronger vignette on small screens so text stays legible */
  .cine-overlay {
    background:
      radial-gradient(ellipse 90% 65% at 50% 42%,
        rgba(10,10,10,0.10) 0%,
        rgba(10,10,10,0.30) 40%,
        rgba(10,10,10,0.65) 75%,
        rgba(10,10,10,0.95) 100%);
  }
  .cine-overlay--warm {
    background:
      radial-gradient(ellipse 90% 65% at 50% 42%,
        rgba(30,15,5,0.14) 0%,
        rgba(25,12,4,0.34) 40%,
        rgba(15,8,3,0.68) 75%,
        rgba(8,4,2,0.96) 100%);
  }

  /* Pull hero text up on mobile — negative margin overrides flex centering */
  .hero-text-container { margin-top: -6rem; }

  /* Bigger touch targets for buttons */
  .btn { padding: 1.05rem 1.8rem; font-size: 0.68rem; letter-spacing: 0.3em; }

  /* Inputs: larger text (16px+) avoids iOS zoom-on-focus; comfortable tap height */
  .field { padding: 1.05rem 1.1rem; font-size: 1rem; letter-spacing: 0.05em; }

  /* Slightly lighter grain on small screens */
  .grain { opacity: 0.14; }

  /* Mobile nav */
  .nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    margin-right: -8px;
    background: transparent;
    border: none;
    cursor: pointer;
  }
  .nav-burger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: #d6d3d1;
    transition: transform .35s ease, opacity .25s ease;
  }
  .nav-burger--active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-burger--active span:nth-child(2) { opacity: 0; }
  .nav-burger--active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .mobile-menu {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .4s ease, visibility 0s linear .4s;
  }
  .mobile-menu--open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .4s ease;
  }
  .mobile-menu__bg {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .mobile-menu__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 101;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #a8a29e;
    transition: color .25s ease, transform .25s ease;
  }
  .mobile-menu__close:active {
    color: #f5f5f4;
    transform: scale(1.15);
  }
  #mobile-menu nav a {
    display: block;
    font-size: 1.75rem;
    font-weight: 300;
  }

  /* Pull menu links higher — offset the flex centering upward */
  #mobile-menu { padding-bottom: 8rem; }

  /* Active page indicator in mobile menu — line spans the full word width */
  .menu-link--active {
    position: relative;
    display: inline-block;
  }
  .menu-link--active::after {
    content: "";
    position: absolute;
    bottom: -0.35rem;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(184, 134, 11, 0.6);
  }

  /* Hamburger fallback */
  #mobile-menu-toggle { display: inline-flex; }

  /* Structural divider between nav links and CTA */
  .menu-divider {
    width: 3rem;
    height: 1px;
    background: rgba(184, 134, 11, 0.3);
    margin: 2.5rem 0;
  }

  /* Grounding footer anchor */
  .menu-footer__text {
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-size: 0.625rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #737373;
    margin: 0;
  }
}
@media (min-width: 768px) {
  #mobile-menu-toggle { display: none; }
}

/* Tactical monospace metadata — technical readout / flight-log style */
.tag-mono {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(200, 170, 90, 0.65);
}
