/* =========================================================================
   KYLE LAMBERT PHOTOGRAPHY — dark cinematic portfolio
   Concept: "Afterimage" galleries + the draggable Mirror Seam signature
   ========================================================================= */

:root {
  --bg:        #0A0A0B;
  --bg-soft:   #111113;
  --text:      #EDEAE4;   /* warm bone */
  --muted:     #8A8F98;   /* cold pewter */
  --hairline:  rgba(237, 234, 228, 0.12);
  --hairline-2:rgba(237, 234, 228, 0.06);
  --accent:    #F4F1EA;   /* austere bone-white — the only "accent", on the live seam */

  --serif: "Bodoni Moda", "Didot", "Canela", Georgia, "Times New Roman", serif;
  --sans:  "Inter", "Söhne", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --maxw: 1320px;
  --gutter: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img {
  display: block; max-width: 100%;
  /* light image protection — deters casual save/drag (not bulletproof) */
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }

/* ---- type helpers ---- */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.serif { font-family: var(--serif); }

/* =========================================================================
   HEADER / NAV
   ========================================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  mix-blend-mode: difference;       /* stays legible over light or dark photos */
  pointer-events: none;
}
.site-header a, .site-header button { pointer-events: auto; }

.monogram { display: inline-flex; flex-direction: column; line-height: 0.9; }
.monogram__mark { display: block; line-height: 0; }
.monogram__mark svg { width: 32px; height: auto; display: block; }
.monogram__sub {
  font-size: 9px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--text);
  margin-top: 3px;
  opacity: 0.75;
}

.nav { display: flex; align-items: center; gap: clamp(20px, 4vw, 44px); }
.nav a {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---- WORK dropdown ---- */
.nav__work { position: relative; }
.nav__menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  min-width: 230px;
  background: rgba(10,10,11,0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--hairline);
  padding: 8px;
  display: grid;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s;
  mix-blend-mode: normal;
}
.nav__work:hover .nav__menu,
.nav__work:focus-within .nav__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__menu a {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px;
  padding: 11px 14px;
  letter-spacing: 0.08em;
  text-transform: none;
  font-size: 14px;
  transition: background .3s var(--ease);
}
.nav__menu a::after { display: none; }
.nav__menu a:hover { background: rgba(237,234,228,0.06); }
.nav__menu a span { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

/* =========================================================================
   INTRO (home landing)
   ========================================================================= */
.intro {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--gutter);
  position: relative;
}
.intro__name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 11vw, 9rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 1.4s var(--ease) 0.2s forwards;
}
.intro__name em { font-style: italic; }
.intro__tag {
  margin-top: 26px;
  max-width: 40ch;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: rise 1.4s var(--ease) 0.6s forwards;
}
.intro__scroll {
  position: absolute;
  bottom: 34px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: rise 1.4s var(--ease) 1s forwards, pulse 2.6s ease-in-out 2s infinite;
}

@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: .4; } 50% { opacity: .9; } }

/* =========================================================================
   THE MIRROR SEAM (signature interaction)
   ========================================================================= */
.seam {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
  touch-action: pan-y;
  user-select: none;
  cursor: ew-resize;
}
.seam__layer { position: absolute; inset: 0; }
.seam__layer img { width: 100%; height: 100%; object-fit: cover; }
.seam__mirror { transform: scaleX(-1); }          /* the doubled twin */
.seam__mirror-wrap {
  position: absolute; inset: 0;
  clip-path: inset(0 0 0 var(--pos, 50%));         /* reveal twin right of seam */
}
.seam__divider {
  position: absolute; top: 0; bottom: 0;
  left: var(--pos, 50%);
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--accent) 14%, var(--accent) 86%, transparent);
  transform: translateX(-0.5px);
  box-shadow: 0 0 14px 0 rgba(244, 241, 234, 0.28);
}
.seam__handle {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(244,241,234,0.55);
  background: rgba(10,10,11,0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  color: var(--accent);
  font-size: 13px; letter-spacing: 0.05em;
  transition: transform .5s var(--ease), background .5s var(--ease);
}
.seam:hover .seam__handle { transform: translate(-50%, -50%) scale(1.08); }
.seam__hint {
  position: absolute; left: 50%; bottom: 18px;
  transform: translateX(-50%);
  font-size: 10px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--text); opacity: 0.75;
  background: rgba(10,10,11,0.4);
  padding: 6px 12px;
  pointer-events: none;
  transition: opacity .6s var(--ease);
}
.seam.is-touched .seam__hint { opacity: 0; }

/* ---- the time scrubber (triptych: three frames of one scene) ---- */
.scrubber {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-soft);
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}
.scrub-layer { position: absolute; inset: 0; }
.scrub-layer img { width: 100%; height: 100%; object-fit: cover; }
.scrub-count {
  position: absolute; top: 16px; right: 16px; z-index: 4;
  font-size: 11px; letter-spacing: 0.18em; color: var(--text);
  background: rgba(10, 10, 11, 0.4); padding: 5px 10px;
  font-variant-numeric: tabular-nums;
}
.scrubber .seam__hint { left: 50%; bottom: 16px; transform: translateX(-50%); }
.scrubber.is-touched .seam__hint { opacity: 0; }
.scrubber:hover .seam__handle { transform: translate(-50%, -50%) scale(1.06); }
.gallery__item--tri { cursor: default; }

/* =========================================================================
   COLLECTION REEL (home)
   ========================================================================= */
.reel { padding: clamp(60px, 12vh, 140px) 0 60px; }
.reel__lead {
  padding: 0 var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto clamp(40px, 8vh, 90px);
}
.reel__lead h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.8rem, 4.5vw, 3.4rem);
  line-height: 1.05;
  max-width: 16ch;
}

.collection-card {
  position: relative;
  display: block;
  margin: 0 auto;
  max-width: var(--maxw);
  padding: clamp(40px, 8vh, 80px) var(--gutter);
  border-top: 1px solid var(--hairline-2);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.collection-card.in { opacity: 1; transform: none; }
.collection-card__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
}
@media (min-width: 880px) {
  .collection-card__grid { grid-template-columns: 1.25fr 1fr; }
  .collection-card:nth-child(even) .collection-card__media { order: 2; }
}
.collection-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
}
.collection-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.6s var(--ease);
}
.collection-card:hover .collection-card__media img { transform: scale(1.04); }
.collection-card__index {
  font-family: var(--serif);
  font-size: 13px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.collection-card__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.015em;
  margin: 14px 0 18px;
}
.collection-card__meta { color: var(--muted); font-size: 13px; letter-spacing: 0.04em; }
.collection-card__blurb { margin-top: 18px; max-width: 42ch; color: var(--text); opacity: 0.85; }
.collection-card__cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 26px;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
}
.collection-card__cta .arrow { transition: transform .5s var(--ease); }
.collection-card:hover .collection-card__cta .arrow { transform: translateX(8px); }

/* =========================================================================
   COLLECTION PAGE
   ========================================================================= */
.collection-hero { padding-top: 0; }
.collection-hero__head {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(120px, 20vh, 220px) var(--gutter) clamp(30px, 6vh, 60px);
}
.collection-hero__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.8rem, 11vw, 8rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.collection-hero__meta {
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  margin-top: 22px; color: var(--muted);
  font-size: 13px; letter-spacing: 0.04em;
}
.collection-hero__statement {
  max-width: 52ch; margin-top: 26px;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  line-height: 1.5;
}
.collection-hero__seam {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter);
}

.gallery {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(50px, 10vh, 120px) var(--gutter) 0;
  display: grid;
  gap: clamp(40px, 9vh, 120px);
}
.gallery__item {
  opacity: 0; transform: translateY(46px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  cursor: zoom-in;
}
.gallery__item.in { opacity: 1; transform: none; }
.gallery__item img {
  width: 100%; height: auto;
  transition: transform 1.6s var(--ease), opacity 1s var(--ease);
}
.gallery__item:hover img { transform: scale(1.012); }
/* alternating inset rhythm */
.gallery__item--inset { max-width: 74%; }
.gallery__item--inset:nth-of-type(even) { margin-left: auto; }
.gallery__cap {
  margin-top: 12px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}

/* prev/next collections */
.collection-nav {
  max-width: var(--maxw); margin: clamp(80px,16vh,180px) auto 0;
  padding: 40px var(--gutter);
  border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; gap: 20px;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
}
.collection-nav a { color: var(--muted); transition: color .4s var(--ease); }
.collection-nav a:hover { color: var(--text); }
.collection-nav .label { display:block; color: var(--text); font-family: var(--serif); font-size: 18px; text-transform: none; letter-spacing: 0; margin-top: 6px; }

/* =========================================================================
   ABOUT PAGE
   ========================================================================= */
.about {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(130px, 22vh, 240px) var(--gutter) 0;
  display: grid; gap: clamp(40px, 8vw, 90px);
}
@media (min-width: 880px) { .about { grid-template-columns: 0.85fr 1.15fr; align-items: start; } }
.about__portrait { position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--bg-soft); }
.about__portrait img { width:100%; height:100%; object-fit: cover; }
.about__title {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.4rem, 7vw, 5rem); line-height: 1; margin-bottom: 28px;
}
.about__statement {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(1.3rem, 2.8vw, 2rem); line-height: 1.45;
  margin-bottom: 36px;
}
.about__body p { max-width: 60ch; margin-bottom: 18px; color: var(--text); opacity: 0.85; }
.about__facts {
  margin-top: 40px; border-top: 1px solid var(--hairline);
  display: grid; gap: 0;
}
.about__fact {
  display: grid; grid-template-columns: 140px 1fr; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--hairline-2);
  font-size: 14px;
}
.about__fact dt { color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; font-size: 11px; padding-top: 3px; }

/* =========================================================================
   CONTACT PAGE
   ========================================================================= */
.contact {
  max-width: 760px; margin: 0 auto;
  padding: clamp(130px, 22vh, 240px) var(--gutter) 0;
}
.contact__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 5rem); line-height: 1;
  letter-spacing: -0.02em; margin-bottom: 22px;
}
.contact__lead { color: var(--muted); max-width: 50ch; font-size: 16px; }
.contact-form {
  margin-top: clamp(40px, 7vh, 70px);
  display: grid; gap: 30px;
}
.field { display: grid; gap: 10px; position: relative; }
.field label {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.field input, .field textarea {
  background: transparent; border: none; border-bottom: 1px solid var(--hairline);
  color: var(--text); font-family: var(--sans); font-size: 17px; padding: 10px 0;
  transition: border-color 0.4s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--text); }
.field textarea { resize: vertical; min-height: 130px; line-height: 1.6; }
/* honeypot — invisible to humans, catches bots */
.hp { position: absolute; left: -9999px; top: 0; width: 0; height: 0; opacity: 0; }
.contact-submit {
  justify-self: start; margin-top: 4px;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  border: 1px solid var(--hairline); padding: 16px 32px;
  display: inline-flex; align-items: center; gap: 12px;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), opacity 0.3s;
}
.contact-submit:hover { background: rgba(237,234,228,0.06); border-color: var(--text); }
.contact-submit:disabled { opacity: 0.5; cursor: default; }
.contact-submit .arrow { transition: transform 0.5s var(--ease); }
.contact-submit:hover .arrow { transform: translateX(8px); }
.contact-status { min-height: 1.3em; font-size: 14px; color: var(--muted); }
.contact-status.is-ok { color: var(--text); }
.contact-status.is-error { color: #D98A80; }
.contact__alt { margin-top: 40px; color: var(--muted); font-size: 14px; }
.contact__alt a { color: var(--text); border-bottom: 1px solid var(--hairline); }

/* =========================================================================
   LIGHTBOX
   ========================================================================= */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(6,6,7,0.96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity .5s var(--ease), visibility .5s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: 90vw; max-height: 82vh; width: auto; height: auto;
  object-fit: contain;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
}
.lightbox__cap {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
}
.lightbox__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text);
  border: 1px solid var(--hairline); transition: background .3s var(--ease);
  font-size: 20px;
}
.lightbox__btn:hover { background: rgba(237,234,228,0.08); }
.lightbox__prev { left: clamp(12px, 4vw, 48px); }
.lightbox__next { right: clamp(12px, 4vw, 48px); }
.lightbox__close { top: 26px; right: 26px; transform: none; width: 48px; height: 48px; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  max-width: var(--maxw); margin: clamp(90px, 16vh, 180px) auto 0;
  padding: 50px var(--gutter);
  border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px;
  color: var(--muted); font-size: 13px;
}
.site-footer a { transition: color .3s var(--ease); }
.site-footer a:hover { color: var(--text); }
.site-footer__links { display: flex; gap: 24px; letter-spacing: 0.08em; }

/* =========================================================================
   HOME HERO — work-first, full-bleed Mirror Seam with name overlaid
   ========================================================================= */
.hero {
  position: relative;
  height: 100svh;
  width: 100%;
  overflow: hidden;
}
.hero__seam { position: absolute; inset: 0; }
.hero__seam.seam { aspect-ratio: auto; height: 100%; width: 100%; cursor: ew-resize; }
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,11,0.62), rgba(10,10,11,0) 42%),
              linear-gradient(to bottom, rgba(10,10,11,0.45), rgba(10,10,11,0) 30%);
  pointer-events: none;
  z-index: 2;
}
.hero__overlay {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(56px, 11vh, 120px);
  z-index: 5;
  pointer-events: none;
  max-width: min(90vw, 720px);
}
.hero__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(20px);
  animation: rise 1.5s var(--ease) 0.3s forwards;
}
.hero__name em { font-style: italic; }
.hero__tag {
  margin-top: 18px;
  color: var(--text);
  opacity: 0;
  font-size: clamp(13px, 1.4vw, 15px);
  letter-spacing: 0.02em;
  max-width: 42ch;
  animation: rise 1.5s var(--ease) 0.7s forwards;
}
.hero__scroll {
  position: absolute;
  bottom: 30px; right: var(--gutter);
  z-index: 5; pointer-events: none;
  font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--text);
  opacity: 0;
  animation: rise 1.5s var(--ease) 1s forwards, pulse 2.8s ease-in-out 2.2s infinite;
}

/* =========================================================================
   CUSTOM CURSOR (desktop, fine pointer only)
   ========================================================================= */
@media (pointer: fine) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
  .cursor {
    position: fixed; top: 0; left: 0;
    width: 9px; height: 9px;
    border: 1px solid var(--text);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 500;
    mix-blend-mode: difference;
    transition: width .35s var(--ease), height .35s var(--ease),
                background .35s var(--ease), opacity .35s var(--ease);
    will-change: transform;
  }
  .cursor.is-lg { width: 56px; height: 56px; background: rgba(244,241,234,0.06); }
  .cursor.is-hidden { opacity: 0; }
}

/* =========================================================================
   MOTION / ACCESSIBILITY
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.001ms !important; }
  .intro__name, .intro__tag, .intro__scroll { opacity: 1 !important; transform: none !important; }
  .collection-card, .gallery__item { opacity: 1 !important; transform: none !important; }
  .hero__name, .hero__tag, .hero__scroll { opacity: 1 !important; transform: none !important; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--text); color: var(--bg); padding: 12px 18px;
}
.skip-link:focus { left: 12px; top: 12px; }
