/* ============================================
   DUNNEWORLD — components.css
   Nav, custom cursor, buttons, cards, footer
   ============================================ */

/* ============================================
   CUSTOM CURSOR — Dunneworld Aperture (PNG)
   Uses the actual brand aperture mark as the cursor.
   Scales up over images (lens opens / inviting),
   tighter over links (lens stops down / precise).
   ============================================ */
.cursor-aperture {
  position: fixed;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;        /* center on the cursor point */
  pointer-events: none;
  z-index: 9999;
  opacity: 0.95;
  will-change: transform;
  transition: width 0.35s var(--ease-out),
              height 0.35s var(--ease-out),
              margin 0.35s var(--ease-out),
              opacity 0.3s var(--ease-out);
}
.cursor-aperture-img {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  /* Drop-shadow lifts the aperture off photos so it stays readable */
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5))
          drop-shadow(0 0 12px rgba(0, 0, 0, 0.35));
  transition: filter 0.35s var(--ease-out), transform 0.4s var(--ease-out);
  will-change: transform, filter;
}

/* Image hover — aperture OPENS WIDE (scales up, amber glow) */
body.cursor-hover-image .cursor-aperture {
  width: 108px;
  height: 108px;
  margin: -54px 0 0 -54px;
}
body.cursor-hover-image .cursor-aperture-img {
  filter: drop-shadow(0 0 14px rgba(244, 166, 35, 0.55))
          drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

/* Link hover — aperture STOPS DOWN (smaller, tighter, more focused) */
body.cursor-hover-link .cursor-aperture {
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
}
body.cursor-hover-link .cursor-aperture-img {
  filter: drop-shadow(0 0 8px rgba(244, 166, 35, 0.7))
          drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

body.cursor-hidden .cursor-aperture {
  opacity: 0;
}

/* Hide entirely on touch / coarse-pointer devices */
@media not all and (hover: hover) and (pointer: fine) {
  .cursor-aperture { display: none; }
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  background: transparent;
  transition: background 0.45s var(--ease-out),
              backdrop-filter 0.45s var(--ease-out),
              border-color 0.45s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
}
.nav-logo-img {
  height: 44px;
  width: auto;
  display: block;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.4));
  transition: filter 0.3s, transform 0.3s var(--ease-out);
}
.nav-logo:hover .nav-logo-img {
  transform: translateY(-1px);
}

.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}
.nav-links a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  transition: color 0.3s;
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s var(--ease-out);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--accent); }

.nav-social {
  display: flex;
  gap: 18px;
  align-items: center;
}
.nav-social a {
  color: var(--text-dim);
  transition: color 0.3s, transform 0.3s var(--ease-out);
  display: inline-flex;
  align-items: center;
}
.nav-social a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s var(--ease-out);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  display: inline-block;
  padding: 16px 48px;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.3s var(--ease-out),
              transform 0.3s var(--ease-out),
              box-shadow 0.3s var(--ease-out);
  box-shadow: 0 0 0 rgba(244, 166, 35, 0);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -8px rgba(244, 166, 35, 0.4);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-outline {
  display: inline-block;
  padding: 15px 48px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-link {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  transition: letter-spacing 0.3s var(--ease-out), color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-link:hover {
  letter-spacing: 0.2em;
  color: var(--accent-hover);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 60px var(--gutter);
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--bg);
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.footer-links {
  display: flex;
  gap: 32px;
}
.footer-links a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* ============================================
   PAGE TRANSITION OVERLAY (Phase 4)
   ============================================ */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--ease-in-out);
}
.page-transition.active {
  opacity: 1;
  pointer-events: all;
}

/* ============================================
   LOADER (Phase 2 — placeholder, expanded later)
   ============================================ */
.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 32px;
  transition: opacity 0.6s var(--ease-in-out);
}
.loader-bar {
  width: 240px;
  height: 1px;
  background: var(--hairline);
  position: relative;
  overflow: hidden;
}
.loader-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(0);
  animation: loaderProgress 1.2s var(--ease-out) forwards;
}
@keyframes loaderProgress {
  to { transform: scaleX(1); }
}
.loader-text {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.4em;
  color: var(--text-dim);
}
.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   RESPONSIVE — nav
   ============================================ */
@media (max-width: 768px) {
  .nav {
    padding: 0 var(--gutter-mobile);
  }
  .nav-links,
  .nav-social {
    display: none;
  }
  .nav-hamburger { display: flex; }
  .footer {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 48px var(--gutter-mobile);
  }
}
