/* ============================================================
   Trevor Lewis Photography — UI kit styles
   Layered on top of /colors_and_type.css.
   ============================================================ */

* { box-sizing: border-box; }

.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-page);
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .page { padding: 0 var(--pad-page-sm); }
}

/* ---- Nav ---------------------------------------------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem var(--pad-page);
  transition: background var(--dur-hover-long) var(--ease),
              color var(--dur-hover-long) var(--ease),
              backdrop-filter var(--dur-hover-long) var(--ease);
  color: var(--paper);
}
.nav--scrolled {
  background: rgba(232, 225, 208, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
}
.nav__brand {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--font-serif); font-style: italic; font-size: 1.15rem;
  cursor: pointer;
}
.nav__brand .name { font-style: normal; font-weight: 400; }
.nav__dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--rust);
  animation: dotpulse 3.5s var(--ease) infinite;
}
@keyframes dotpulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.3); opacity: 0.7; }
}
.nav__links {
  display: flex; gap: 2rem;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.7rem;
  letter-spacing: var(--tr-label-wide); text-transform: uppercase;
}
.nav__link {
  position: relative; padding: 4px 0;
  /* Clip the sliding underline so it doesn't park under the previous link. */
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  transition: color var(--dur-hover) var(--ease);
}
.nav__link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--rust);
  transform: translateX(-101%);
  transition: transform var(--dur-hover-long) var(--ease);
}
.nav__link:hover { color: var(--rust); }
.nav__link:hover::after { transform: translateX(0); }
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav { padding: 1.25rem var(--pad-page-sm); }
}

/* ---- Hero --------------------------------------------------- */

.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  color: var(--paper);
}
.hero__photo {
  position: absolute; inset: 0;
  will-change: transform;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(20,17,13,0.55) 0%,
    rgba(20,17,13,0) 25%,
    rgba(20,17,13,0) 55%,
    rgba(20,17,13,0.75) 100%);
  pointer-events: none;
}
.hero__top {
  position: absolute; top: 6rem; left: var(--pad-page); right: var(--pad-page);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.hero__top-meta {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.7rem;
  letter-spacing: var(--tr-label-wide); text-transform: uppercase;
  opacity: 0.85;
}
.hero__issue {
  font-family: var(--font-serif); font-style: italic; font-size: 0.95rem;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(232,225,208,0.4);
  border-bottom: 1px solid rgba(232,225,208,0.4);
  opacity: 0.95;
}
.hero__title {
  position: absolute; bottom: 3rem; left: var(--pad-page); right: var(--pad-page);
  max-width: 56rem;
}
.hero__eyebrow {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.7rem;
  letter-spacing: var(--tr-label-wide); text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 1.25rem;
}
.hero__h1 {
  font-family: var(--font-serif); font-weight: 300;
  font-size: var(--fs-hero); line-height: var(--lh-hero); letter-spacing: var(--tr-hero);
  font-variation-settings: "opsz" 144;
  margin: 0;
}
.hero__h1 em { color: var(--rust); font-style: italic; }
.hero__sub {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.6rem);
  opacity: 0.95;
  margin-top: 0.75rem;
}
.hero__byline {
  display: flex; justify-content: space-between;
  margin-top: 1.75rem;
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: var(--tr-label); text-transform: uppercase;
  opacity: 0.7;
}

/* Word-by-word reveal — opacity + translateY (no horizontal clip,
   so italic glyphs and overhangs survive). */
.word { display: inline-block; }
.word > span {
  display: inline-block;
  opacity: 0; transform: translateY(0.45em);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.is-shown .word > span { opacity: 1; transform: translateY(0); }

/* ---- Reveal on scroll -------------------------------------- */

.reveal { opacity: 0; transform: translateY(28px);
  transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease); }
.reveal--slow { transform: translateY(40px);
  transition-duration: var(--dur-reveal-slow); }
.reveal.is-shown { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal--slow, .word > span { opacity: 1 !important; transform: none !important; }
}

/* ---- Blurb / editor's note --------------------------------- */

.blurb {
  display: grid; grid-template-columns: 1fr 2fr; gap: 2.5rem;
  padding: 7rem 0;
}
.blurb__label {
  border-top: 2px solid var(--ink);
  padding-top: 0.85rem;
  font-family: var(--font-mono); font-weight: 500; font-size: 0.72rem;
  letter-spacing: var(--tr-label-wide); text-transform: uppercase;
  color: var(--ink);
}
.blurb__body {
  font-family: var(--font-serif); font-weight: 300;
  font-size: var(--fs-blurb); line-height: var(--lh-blurb);
  max-width: var(--max-prose); color: var(--ink);
  margin: 0;
}
.blurb__body em { color: var(--rust); font-style: italic; }
.blurb__body p { margin: 0 0 1em; }
.blurb__body p:last-child { margin-bottom: 0; }
@media (max-width: 900px) {
  .blurb { grid-template-columns: 1fr; gap: 1rem; padding: 4rem 0; }
}

/* ---- Portfolio feature ------------------------------------- */

.feature {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 3rem;
  align-items: center;
  padding: 4rem 0;
  cursor: pointer;
}
.feature--right { grid-template-columns: 1.5fr 1fr; }
.feature--right .feature__text { order: 2; }
.feature--right .feature__cover { order: 1; }

.feature__num {
  font-family: var(--font-serif); font-style: italic; font-size: 1.4rem;
  color: var(--rust);
}
.feature__title {
  font-family: var(--font-serif); font-weight: 400; font-style: italic;
  color: var(--rust);
  font-size: var(--fs-feature); line-height: 0.95; letter-spacing: var(--tr-display);
  margin: 0.4rem 0 0.5rem;
}
.feature__title em { color: var(--rust); font-style: italic; }
.feature__sub {
  font-family: var(--font-serif); font-style: italic;
  font-size: 1.15rem;
  color: var(--ink); margin-bottom: 1.25rem;
}
.feature__blurb {
  font-family: var(--font-serif); font-weight: 300; font-size: 1.05rem;
  line-height: 1.5; max-width: 28rem; color: var(--ink-soft);
  margin: 0 0 1.5rem;
}
.feature__foot {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: var(--tr-label); text-transform: uppercase;
  color: var(--ink-mute);
}
.feature__cta {
  font-family: var(--font-serif); font-style: italic;
  font-size: 0.95rem; color: var(--rust);
  text-transform: none; letter-spacing: 0;
  white-space: nowrap;
  transition: transform var(--dur-hover) var(--ease);
}
.feature:hover .feature__cta { transform: translateX(4px); }
.feature__cover {
  aspect-ratio: 4/5; overflow: hidden;
}
.feature__cover > * {
  width: 100%; height: 100%;
  transition: transform var(--dur-zoom) var(--ease), filter var(--dur-hover-long) var(--ease);
  filter: contrast(1.03) saturate(0.9);
}
.feature:hover .feature__cover > * {
  transform: scale(1.04);
  filter: contrast(1.08) saturate(0.95);
}
@media (max-width: 900px) {
  .feature, .feature--right { grid-template-columns: 1fr; gap: 1.5rem; padding: 3rem 0; }
  /* On mobile every card stacks title-then-image, regardless of desktop side. */
  .feature .feature__text,
  .feature--right .feature__text { order: 1; }
  .feature .feature__cover,
  .feature--right .feature__cover { order: 2; }
}

/* ---- Plates grid ------------------------------------------- */

.plates-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 6rem;
  border-top: 1px solid var(--rule);
  margin-bottom: 4rem;
}
.plates-head h2 {
  font-family: var(--font-serif); font-weight: 400;
  font-size: var(--fs-h2); line-height: 0.95; letter-spacing: var(--tr-display);
  margin: 1.5rem 0 0;
}
.plates-head h2 em { color: var(--rust); font-style: italic; }
.plates-head__count {
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: var(--tr-label); text-transform: uppercase;
  color: var(--ink-mute);
}

.plates {
  display: grid; grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap-x); row-gap: var(--gap-y);
  padding-bottom: 8rem;
}
.span-4  { grid-column: span 4; }
.span-5  { grid-column: span 5; }
.span-6  { grid-column: span 6; }
.span-7  { grid-column: span 7; }
.span-8  { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.shift-down { margin-top: var(--shift-down); }

@media (max-width: 900px) {
  .plates { row-gap: 2.5rem; }
  .span-4, .span-5, .span-6, .span-7, .span-8, .span-12 { grid-column: span 12; }
  .shift-down { margin-top: 0; }
  .plates-head { padding-top: 3rem; margin-bottom: 2rem; }
}

/* ---- Plate -------------------------------------------------- */

.plate { display: block; cursor: pointer; }
.plate__frame {
  position: relative; overflow: hidden;
  aspect-ratio: var(--ar, 4 / 5);
  background: var(--ink);
}
.plate__frame > * {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  transition: transform var(--dur-zoom) var(--ease), filter var(--dur-hover-long) var(--ease);
  filter: contrast(1.03) saturate(0.9);
}
.plate:hover .plate__frame > * {
  transform: scale(1.035);
  filter: contrast(1.08) saturate(0.95);
}

.plate__cap {
  position: relative;
  padding-top: 0.85rem;
  margin-top: 0.85rem;
}
.plate__cap::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px; background: var(--rule);
  transform-origin: left center;
  transition: background var(--dur-hover-long) var(--ease);
}
.plate__cap::after {
  content: '';
  position: absolute; top: 0; left: 0;
  height: 1px; width: 0;
  background: var(--rust);
  transition: width var(--dur-hover-long) var(--ease);
}
.plate:hover .plate__cap::after { width: 100%; }

.plate__row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: var(--tr-label); text-transform: uppercase;
  color: var(--ink-mute);
}
.plate__title {
  display: block;
  font-family: var(--font-serif); font-style: italic;
  font-size: var(--fs-plate-title);
  color: var(--ink);
  margin: 0.4rem 0 0.2rem;
  transition: color var(--dur-hover-long) var(--ease);
}
.plate:hover .plate__title { color: var(--rust); }
.plate__loc {
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: var(--tr-label); text-transform: uppercase;
  color: var(--ink-mute);
}
.plate__buy {
  font-family: var(--font-serif); font-style: italic; color: var(--rust);
  font-size: 0.9rem; text-transform: none; letter-spacing: 0;
  white-space: nowrap;
  transition: transform var(--dur-hover) var(--ease);
}
.plate:hover .plate__buy { transform: translateX(3px); }

/* ---- Next portfolio ---------------------------------------- */

.next-port {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  align-items: center;
  padding: 6rem 0;
  border-top: 1px solid var(--rule);
  cursor: pointer;
}
.next-port__label {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.7rem;
  letter-spacing: var(--tr-label-wide); text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 0.5rem;
}
.next-port__num {
  font-family: var(--font-serif); font-style: italic; font-size: 1.3rem; color: var(--rust);
  margin-bottom: 0.5rem;
}
.next-port__title {
  font-family: var(--font-serif); font-weight: 400; font-style: italic;
  color: var(--rust);
  font-size: clamp(2rem, 4vw, 3.5rem); line-height: 0.95; letter-spacing: var(--tr-display);
  margin: 0;
}
.next-port__sub {
  font-family: var(--font-serif); font-style: italic; font-size: 1.1rem;
  margin: 0.4rem 0 1.5rem;
}
.next-port__cta {
  font-family: var(--font-serif); font-style: italic; color: var(--rust); font-size: 1rem;
  white-space: nowrap;
  transition: transform var(--dur-hover) var(--ease);
}
.next-port:hover .next-port__cta { transform: translateX(4px); }
.next-port__cover {
  aspect-ratio: 5/4;
  overflow: hidden;
}
.next-port__cover > * {
  width: 100%; height: 100%;
  transition: transform var(--dur-zoom) var(--ease);
  filter: contrast(1.03) saturate(0.9);
}
.next-port:hover .next-port__cover > * { transform: scale(1.04); }
@media (max-width: 900px) {
  .next-port { grid-template-columns: 1fr; padding: 3rem 0; }
}

/* ---- Footer ------------------------------------------------- */

.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 5rem var(--pad-page) 3rem;
  margin-top: 4rem;
}
.footer__grid {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(232, 225, 208, 0.18);
}
.footer__brand-name {
  font-family: var(--font-serif); font-style: italic; font-size: 1.4rem;
}
.footer__brand-name .name { font-style: normal; font-weight: 400; }
.footer__tag {
  font-family: var(--font-serif); font-style: italic; font-size: 0.95rem;
  color: rgba(232, 225, 208, 0.65);
  margin-top: 0.5rem;
  max-width: 18rem;
}
.footer__col h4 {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.7rem;
  letter-spacing: var(--tr-label-wide); text-transform: uppercase;
  color: rgba(232, 225, 208, 0.55);
  margin: 0 0 1rem;
}
.footer__col ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.55rem;
}
.footer__col li {
  font-family: var(--font-serif); font-size: 1rem;
  cursor: pointer;
  transition: color var(--dur-hover) var(--ease);
}
.footer__col li:hover { color: var(--ochre); }
.footer__col li .arrow {
  display: inline-block; color: var(--rust);
  opacity: 0; transform: translateX(-6px);
  transition: opacity var(--dur-hover) var(--ease), transform var(--dur-hover) var(--ease);
}
.footer__col li:hover .arrow { opacity: 1; transform: translateX(0); }
.footer__legal {
  max-width: var(--max-w); margin: 3rem auto 0;
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: var(--tr-label); text-transform: uppercase;
  color: rgba(232, 225, 208, 0.35);
}
@media (max-width: 900px) {
  .footer { padding: 3rem var(--pad-page-sm) 2rem; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer__legal { flex-direction: column; gap: 0.5rem; }
}

/* ---- Cover (portfolio page hero) --------------------------- */

.cover {
  position: relative; height: 100vh; min-height: 600px; overflow: hidden;
  color: var(--paper);
}
.cover__photo {
  position: absolute; inset: 0;
}
.cover__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(20,17,13,0.55) 0%,
    rgba(20,17,13,0) 30%,
    rgba(20,17,13,0) 55%,
    rgba(20,17,13,0.78) 100%);
}
.cover__inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 6rem var(--pad-page) 3rem;
  max-width: var(--max-w); margin: 0 auto;
}
.cover__eyebrow {
  font-family: var(--font-mono); font-weight: 500; font-size: 0.72rem;
  letter-spacing: var(--tr-label-wide); text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 1.5rem;
}
.cover__h1 {
  font-family: var(--font-serif); font-weight: 300;
  font-size: var(--fs-cover); line-height: var(--lh-hero); letter-spacing: var(--tr-hero);
  font-variation-settings: "opsz" 144;
  margin: 0;
}
.cover__h1 em { color: var(--rust); font-style: italic; }
.cover__sub {
  font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.6rem);
  opacity: 0.95;
  margin-top: 0.75rem;
}
.cover__byline {
  display: flex; justify-content: space-between;
  margin-top: 1.75rem;
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: var(--tr-label); text-transform: uppercase;
  opacity: 0.75;
}
