/* ==========================================================================
   home — eagle parallax hero (motion in home.js)
   ========================================================================== */

:root {
  --ink: #0b0f12;
  --font-display: "Inter Tight", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html,
body {
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
  border-radius: 4px;
}

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

/* --- scene ---------------------------------------------------------------- */

.hero {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background: #8fa3c2;
}

/* one per photo; sized and placed by home.js. no z-index / opacity / transform
   here so each layer can stack above or below the name */
.scene {
  position: absolute;
  inset: 0;
}

/* WebGL path: two full-screen canvases (behind and in front of the name) draw the
   scenes; the <img> layers stay as the no-WebGL fallback */
.gl-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero.gl .scene {
  display: none;
}

.layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

/* the name stays put while scenes change around it: back layers sit below
   (z 1-4), front layers above (z 6+) */
.title {
  position: absolute;
  z-index: 5;
  top: 37%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 1.4s ease;
}

.js .title {
  opacity: 0;
}

.js .hero.is-ready .title {
  opacity: 1;
}

.title h1 {
  font-weight: 900;
  font-size: 16.5vw;
  line-height: 0.8;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.3);
}

@media (max-aspect-ratio: 3 / 4) {
  .title { top: 45%; }
  .title h1 { font-size: 22vw; }
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 16%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.6), transparent 34%),
    radial-gradient(ellipse at center, transparent 62%, rgba(0, 0, 0, 0.55));
}

.curtain {
  display: none;
}

.js .curtain {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 100;
  background: var(--ink);
  pointer-events: none;
  transition: opacity 1.2s ease;
}

.js .hero.is-ready .curtain {
  opacity: 0;
}

/* --- chrome ----------------------------------------------------------------- */

.bar {
  position: absolute;
  z-index: 60;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--gutter);
  padding-top: max(1.25rem, env(safe-area-inset-top));
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.bar a {
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.bar a:hover {
  background: #fff;
  border-color: #fff;
  color: #111;
  text-shadow: none;
}

/* big section list, bottom left */
.list {
  position: absolute;
  z-index: 60;
  left: var(--gutter);
  bottom: max(clamp(1.25rem, 5vh, 2.75rem), env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.list a {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s var(--ease), opacity 0.25s;
}

.list .n {
  padding-top: 0.25em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0;
  opacity: 0.75;
}

.list:hover a { opacity: 0.5; }
.list a:hover,
.list a:focus-visible { opacity: 1; transform: translateX(10px); }

/* tagline + contact, bottom right */
.aside {
  position: absolute;
  z-index: 60;
  right: var(--gutter);
  bottom: max(clamp(1.25rem, 5vh, 2.75rem), env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.contact {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.contact a {
  opacity: 0.85;
  transition: opacity 0.2s;
}

.contact a:hover,
.contact a:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 600px) {
  .aside { font-size: 0.74rem; }
}

@media (prefers-reduced-motion: reduce) {
  .list a { transition: none; }
}
