/* ============================================================
   WILDNOTIZEN — Travel and wildlife photography
   Redesign: pure black-and-white, editorial serif typography,
   reference: modern wildlife photographer portfolios (large
   wordmark over one strong animal photo, images lead, no
   accent color competing with the photos)
   ============================================================ */

:root{
  --bg: #060606;
  --bg-panel: #0e0e0e;
  --bg-panel-2: #131313;
  --ink: #f5f4f0;
  --ink-dim: #8f8d87;
  --ink-faint: #55534d;
  --line: #232220;
  --hair: #2c2b28;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --max-w: 1400px;
  --edge: clamp(1.25rem, 4vw, 3.5rem);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img{
  max-width: 100%; display: block;
  outline: 1px solid rgba(255,255,255,0.1); outline-offset: -1px;
  /* Casual copy-protection: no drag-out, no iOS long-press "Save Image"
     callout, not individually selectable. Deterrent only, not real DRM. */
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}
a{ color: inherit; text-decoration: none; }
::selection{ background: var(--ink); color: var(--bg); }

a:focus-visible, button:focus-visible{
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.wrap{
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

.mono-tag{
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.mono-tag .dot{ color: var(--ink-faint); }

/* ---------- Top bar ---------- */
/* Scrim sits behind the topbar so its mix-blend-mode text always reads
   against a near-black backdrop, regardless of how bright the photo
   beneath it is. Without this, a light hero image (snow, ice, sky) can
   land the blend in the mid-grey range where difference-blended white
   text becomes nearly invisible. */
.topbar-scrim{
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 130px;
  z-index: 49;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6,6,6,0.65) 0%, rgba(6,6,6,0) 100%);
}

.topbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--edge);
  mix-blend-mode: difference;
}

.wordmark{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 1.1rem;
  color: #fff;
}

.logo-mark{
  height: 1.5em;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.topbar nav a{
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
/* Invisible hit-area extension: the visible label stays small and
   typographic, but the tappable area meets the ~44px touch target
   guideline without disturbing the layout. */
.topbar nav a::before{
  content: "";
  position: absolute;
  inset: -15px -10px;
}

/* ---------- Ticker: thin scrolling announcement bar under the topbar ---------- */
.ticker{
  position: fixed;
  top: var(--topbar-h, 76px);
  left: 0; right: 0;
  z-index: 48;
  height: 28px;
  overflow: hidden;
  background: rgba(6,6,6,0.82);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ticker-track{
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  animation: ticker-scroll 26s linear infinite;
}

.ticker-item{
  display: flex;
  align-items: center;
  padding: 0 2rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}

@keyframes ticker-scroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce){
  .ticker-track{ animation: none; width: 100%; justify-content: center; }
  .ticker-item:not(:first-child){ display: none; }
}

/* ---------- Hero: big wordmark over one strong wildlife photo ---------- */
.hero{
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-media{ position: absolute; inset: 0; z-index: 0; }
.hero-media picture{ display: block; width: 100%; height: 100%; }
.hero-media img{
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.15);
  animation: kenburns 26s ease-out forwards;
}

@keyframes kenburns{
  from{ transform: scale(1); }
  to{ transform: scale(1.06); }
}

.hero::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,6,6,0.05) 0%, rgba(6,6,6,0.2) 50%, rgba(6,6,6,0.94) 100%);
  z-index: 1;
}

.hero-content{
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 var(--edge) clamp(2rem, 6vw, 4.5rem);
}

.hero-coords{
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1.1rem;
  display: block;
}
.hero-coords .dot{ color: var(--ink-faint); }

.hero h1{
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.2rem, 11vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
  color: #fff;
}

.hero-byline{
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  letter-spacing: 0.03em;
  color: var(--ink-dim);
  margin: 0 0 1.2rem;
}

.hero p.lede{
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  color: var(--ink-dim);
  max-width: 40ch;
  margin: 0;
}

.scroll-cue{
  position: absolute;
  right: var(--edge);
  bottom: clamp(1.5rem, 4vw, 3rem);
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-dim);
  writing-mode: vertical-rl;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.scroll-cue::after{ content:""; width:1px; height:40px; background: var(--ink-faint); }

/* ---------- Section scaffolding ---------- */
section{ position: relative; }

.section-head{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  padding-top: clamp(4rem, 10vw, 7rem);
  border-top: 1px solid var(--line);
}

.section-head h2{
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  margin: 0;
}

.section-head .section-note{
  max-width: 28ch;
  text-align: right;
}

/* ---------- Title block (intro text) ---------- */
.title-block{
  padding: clamp(3rem, 8vw, 5rem) 0 clamp(1.5rem, 5vw, 3rem);
}

.title-block .intro-text{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 38ch;
  margin: 0;
}

/* ---------- Trip grid ---------- */
.trip-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  padding-bottom: clamp(4rem, 10vw, 7rem);
}
@media (max-width: 640px){ .trip-grid{ grid-template-columns: 1fr; } }

.trip-card{
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg-panel);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.trip-card.is-visible{ opacity: 1; transform: translateY(0); }

.trip-card img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.25);
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1), filter 0.6s ease;
}
.trip-card:hover img{ transform: scale(1.06); filter: grayscale(0); }

.trip-card::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,6,6,0) 40%, rgba(6,6,6,0.9) 100%);
}

.trip-card-label{
  position: absolute; z-index: 2;
  left: 1.25rem; right: 1.25rem; bottom: 1.25rem;
}
.trip-card-label .mono-tag{ margin-bottom: 0.4rem; display: block; }
.trip-card-label h3{
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 1.6rem;
  margin: 0;
  color: #fff;
}

.trip-card.disabled{ cursor: default; }
.trip-card.disabled img{ filter: grayscale(0.75) brightness(0.5); }
.trip-card.disabled:hover img{ transform: none; filter: grayscale(0.75) brightness(0.5); }
.trip-card.disabled .trip-card-label h3{ color: var(--ink-dim); }

/* ---------- Behind the Lens ---------- */
.about-block{
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
  padding-bottom: clamp(4rem, 10vw, 7rem);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.about-block.is-visible{ opacity: 1; transform: translateY(0); }

@media (max-width: 640px){
  .about-block{ grid-template-columns: 1fr; }
}

.about-media{
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg-panel);
}
.about-media .about-slide{
  position: absolute; inset: 0;
  opacity: 0;
  animation: slideFade 18s ease-in-out infinite;
  animation-fill-mode: both;
}
.about-media .about-slide:nth-child(1){ animation-delay: 0s; }
.about-media .about-slide:nth-child(2){ animation-delay: 6s; }
.about-media .about-slide:nth-child(3){ animation-delay: 12s; }
.about-media .about-slide img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  filter: grayscale(0.25);
  transition: transform 1.1s cubic-bezier(.2,.7,.2,1), filter 0.6s ease;
}
.about-block:hover .about-media .about-slide img{ transform: scale(1.06); filter: grayscale(0); }

.about-media::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,6,6,0) 65%, rgba(6,6,6,0.85) 100%);
  pointer-events: none;
  z-index: 1;
}

.about-media-tag{
  position: absolute; z-index: 2;
  left: 1.1rem; bottom: 1rem;
  color: #fff;
}

.about-media .slide-dots{
  position: absolute; z-index: 2;
  right: 1.1rem; bottom: 1.05rem;
  display: flex; gap: 0.35rem;
}
.about-media .slide-dots span{
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
}
.about-media .slide-dots span.active-hint{ background: #fff; }

.about-text p{
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.65;
  color: var(--ink-dim);
  max-width: 46ch;
  margin: 0;
}
.about-text p + p{ margin-top: 1rem; }

/* ---------- Slideshow section ---------- */
.slideshow-section{ padding: 0 0 clamp(3rem, 8vw, 5rem); }

.slideshow-hero{
  position: relative;
  width: 100%;
  height: clamp(360px, 46vw, 560px);
  overflow: hidden;
  background: var(--bg-panel);
}

.slideshow-hero .slide{
  position: absolute; inset: 0;
  opacity: 0;
  animation: slideFade 18s ease-in-out infinite;
  animation-fill-mode: both;
}
.slideshow-hero .slide img{
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.1);
}
.slideshow-hero .slide:nth-child(1){ animation-delay: 0s; }
.slideshow-hero .slide:nth-child(2){ animation-delay: 6s; }
.slideshow-hero .slide:nth-child(3){ animation-delay: 12s; }

.slideshow-hero .slide::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,6,6,0.05) 0%, rgba(6,6,6,0.1) 55%, rgba(6,6,6,0.78) 100%);
}

.slideshow-hero .slide-tag{
  position: absolute; left: 1.25rem; bottom: 1.1rem; z-index: 2; color: #fff;
}

@keyframes slideFade{
  0%{ opacity: 0; } 5%{ opacity: 1; } 28%{ opacity: 1; } 33.34%{ opacity: 0; } 100%{ opacity: 0; }
}

.slideshow-hero .slide-dots{
  position: absolute; right: 1.25rem; bottom: 1.2rem; z-index: 2;
  display: flex; gap: 0.4rem;
}
.slideshow-hero .slide-dots span{
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
}
.slideshow-hero .slide-dots span.active-hint{ background: #fff; }

/* ---------- Footer ---------- */
footer{
  padding: clamp(3rem, 6vw, 4rem) 0;
  border-top: 1px solid var(--line);
}
.footer-top{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-links{
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.rights-note{
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.6;
  color: var(--ink-faint);
  max-width: 46ch;
  margin: 1.25rem 0 0;
}
footer .mono-tag a{ position: relative; color: var(--ink-dim); }
footer .mono-tag a:hover{ color: var(--ink); }
footer .mono-tag a::before{
  content: "";
  position: absolute;
  inset: -16px -8px;
}

/* ---------- Trip page: narrative ---------- */
.narrative{
  padding: clamp(4rem, 9vw, 6.5rem) 0 clamp(2rem, 6vw, 3.5rem);
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(2rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}
@media (max-width: 860px){ .narrative{ grid-template-columns: 1fr; } }

.narrative .field-log{
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 2;
  color: var(--ink-dim);
}
.narrative .field-log dt{ color: var(--ink-dim); }
.narrative .field-log dd{ margin: 0 0 0.7rem; color: var(--ink); }

.narrative .story p{
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink);
  max-width: 58ch;
  margin: 0 0 1.2rem;
}
.narrative .story p:first-child::first-letter{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.4rem;
  float: left;
  line-height: 0.8;
  padding: 0.1rem 0.5rem 0 0;
  color: var(--ink);
}

/* ---------- Gallery (masonry via columns) ---------- */
.gallery{
  padding-bottom: clamp(4rem, 10vw, 7rem);
  column-count: 2;
  column-gap: clamp(1rem, 2vw, 1.5rem);
}
@media (max-width: 720px){ .gallery{ column-count: 1; } }

.gallery-item{
  break-inside: avoid;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  position: relative;
  overflow: hidden;
  background: var(--bg-panel);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.gallery-item.is-visible{ opacity: 1; transform: translateY(0); }
.gallery-item img{
  width: 100%;
  filter: grayscale(0.2);
  transition: transform 0.9s cubic-bezier(.2,.7,.2,1), filter 0.5s ease;
}
.gallery-item:hover img{ transform: scale(1.04); filter: grayscale(0); }

.gallery-caption{
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 1.5rem 1.1rem 1rem;
  background: linear-gradient(180deg, rgba(6,6,6,0) 0%, rgba(6,6,6,0.88) 100%);
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.gallery-item:hover .gallery-caption,
.gallery-item:focus-within .gallery-caption{ opacity: 1; transform: translateY(0); }
.gallery-caption .mono-tag{ color: #fff; }

/* Touch devices have no hover: the caption would otherwise never be
   reachable, hiding the species/location tag entirely. Show it at rest. */
@media (hover: none){
  .gallery-caption{ opacity: 1; transform: translateY(0); }
}

/* ---------- Back link ---------- */
.back-link{
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: clamp(2rem, 5vw, 3rem) 0 0;
}
.back-link:hover{ color: var(--ink); }
.back-link .arrow{ color: var(--ink-faint); }

/* ---------- Legal pages (no photo hero, so clear the fixed topbar by hand) ---------- */
.legal-header{
  padding: clamp(7rem, 16vw, 9.5rem) 0 clamp(2rem, 5vw, 3rem);
}
.legal-header h1{
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.legal-header .lede{
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--ink-dim);
  max-width: 46ch;
  margin: 0;
}
.legal-narrative{ padding-bottom: clamp(2rem, 5vw, 3rem); }
.legal-footnote{ padding-bottom: clamp(4rem, 8vw, 5rem); }
.legal-caveat{ color: var(--ink-faint); margin: 0 0 0.25rem; }
.legal-footnote .back-link{ padding-top: 0.75rem; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .hero-media img{ animation: none; }
  .trip-card, .gallery-item{ transition: none; opacity: 1; transform: none; }
  .trip-card img, .gallery-item img{ transition: none; }
  .slideshow-hero .slide{ animation: none; opacity: 0; }
  .slideshow-hero .slide:first-child{ opacity: 1; }
  .about-media .about-slide{ animation: none; opacity: 0; }
  .about-media .about-slide:first-child{ opacity: 1; }
}
