/* ============================================
   Elena Marsh — Photographer Portfolio
   Editorial / Magazine aesthetic
   ============================================ */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Palette — warm editorial */
  --cream: #f5f0e8;
  --cream-dark: #ebe3d5;
  --ink: #1a1815;
  --ink-soft: #3d3833;
  --ink-muted: #7a7268;
  --gold: #b8956a;
  --gold-dark: #9a7a52;
  --white: #faf8f4;
  --line: rgba(26, 24, 21, 0.12);

  /* Typography */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max-width: 1400px;
  --gutter: 2rem;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

/* ---------- Utility ---------- */
.section-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 1.2rem;
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-dark);
}

.section-desc {
  font-size: 1.1rem;
  color: var(--ink-muted);
  max-width: 600px;
  line-height: 1.7;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 2.2rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--ink);
  color: var(--cream);
}

.btn--primary:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--cream);
}

.btn--large {
  padding: 1.1rem 2.8rem;
  font-size: 0.85rem;
}

/* ---------- Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: all 0.4s ease;
}

.nav.scrolled {
  background: rgba(245, 240, 232, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.nav__brand-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
}

.nav__brand-sub {
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav__links a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.3s;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s;
}

.nav__links a:hover::after {
  width: 100%;
}

.nav__links a:hover {
  color: var(--ink);
}

.nav__cta {
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--ink);
  transition: all 0.3s;
}

.nav__cta::after {
  display: none;
}

.nav__cta:hover {
  background: var(--ink);
  color: var(--cream);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: all 0.3s;
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(26, 24, 21, 0.3) 0%,
    rgba(26, 24, 21, 0.45) 50%,
    rgba(26, 24, 21, 0.7) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}

.hero__eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cream);
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.hero__title {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--cream);
  margin-bottom: 2.5rem;
}

.hero__title em {
  font-style: italic;
  font-weight: 400;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero .btn--primary {
  background: var(--cream);
  color: var(--ink);
}

.hero .btn--primary:hover {
  background: var(--gold);
  color: var(--cream);
}

.hero .btn--ghost {
  color: var(--cream);
  border-color: rgba(245, 240, 232, 0.5);
}

.hero .btn--ghost:hover {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hero__scroll span {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.7);
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(245, 240, 232, 0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50% { transform: scaleY(1.3); opacity: 1; }
}

/* ---------- Statement ---------- */
.statement {
  padding: 6rem var(--gutter);
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.statement__text {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- Work ---------- */
.work {
  padding: 5rem var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
}

.work__header {
  text-align: center;
  margin-bottom: 3rem;
}

.work__header .section-label,
.work__header .section-title {
  text-align: center;
}

.work__header .section-desc {
  margin: 0 auto;
}

.work__filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.6rem 1.4rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.filter-btn.active {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.work__item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--cream-dark);
  transition: opacity 0.4s, transform 0.4s;
}

.work__item.hidden {
  display: none;
}

.work__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.work__item:hover img {
  transform: scale(1.05);
}

.work__item-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(26, 24, 21, 0.85), transparent);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s, transform 0.4s;
}

.work__item:hover .work__item-meta,
.work__item:focus .work__item-meta {
  opacity: 1;
  transform: translateY(0);
}

.work__item-cat {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.work__item-title {
  display: block;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--cream);
}

/* Masonry-like varying heights */
.work__item:nth-child(1) { grid-row: span 2; }
.work__item:nth-child(4) { grid-row: span 2; }
.work__item:nth-child(8) { grid-row: span 2; }

/* ---------- About ---------- */
.about {
  padding: 6rem var(--gutter);
  background: var(--cream-dark);
}

.about__grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.about__image {
  position: sticky;
  top: 6rem;
}

.about__image img {
  width: 100%;
  height: auto;
  filter: grayscale(15%);
}

.about__content .section-label,
.about__content .section-title {
  margin-bottom: 1.2rem;
}

.about__text {
  margin-bottom: 2.5rem;
}

.about__text p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.about__text em {
  color: var(--gold-dark);
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.stat__num {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
}

.stat__label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* ---------- Services ---------- */
.services {
  padding: 6rem var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
}

.services__header {
  text-align: center;
  margin-bottom: 3rem;
}

.services__header .section-desc {
  margin: 0 auto;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  padding: 2.5rem 2rem;
  border: 1px solid var(--line);
  background: var(--white);
  transition: all 0.4s;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26, 24, 21, 0.08);
}

.service-card__icon {
  color: var(--gold-dark);
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--ink);
}

.service-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-muted);
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.service-card__price {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--gold-dark);
  margin-bottom: 1rem;
}

.service-card__link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.3s;
}

.service-card__link:hover {
  color: var(--gold-dark);
}

/* ---------- Journal ---------- */
.journal {
  padding: 6rem var(--gutter);
  background: var(--cream-dark);
}

.journal__header {
  text-align: center;
  margin-bottom: 3rem;
}

.journal__grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.journal__entry {
  padding: 2rem;
  border-top: 2px solid var(--ink);
}

.journal__date {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.8rem;
}

.journal__title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--ink);
}

.journal__entry p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-muted);
  margin-bottom: 1.2rem;
}

.journal__link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.3s;
}

.journal__link:hover {
  color: var(--gold-dark);
}

/* ---------- Contact ---------- */
.contact {
  padding: 8rem var(--gutter);
  text-align: center;
  background: var(--ink);
  color: var(--cream);
}

.contact__inner {
  max-width: 800px;
  margin: 0 auto;
}

.contact .section-label {
  color: var(--gold);
}

.contact__title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.contact__title em {
  font-style: italic;
  color: var(--gold);
}

.contact__desc {
  font-size: 1.1rem;
  color: rgba(245, 240, 232, 0.6);
  margin-bottom: 2.5rem;
}

.contact__actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

.contact .btn--primary {
  background: var(--cream);
  color: var(--ink);
}

.contact .btn--primary:hover {
  background: var(--gold);
  color: var(--cream);
}

.contact .btn--ghost {
  color: var(--cream);
  border-color: rgba(245, 240, 232, 0.4);
}

.contact .btn--ghost:hover {
  background: var(--cream);
  color: var(--ink);
  border-color: var(--cream);
}

.contact__details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  border-top: 1px solid rgba(245, 240, 232, 0.15);
  padding-top: 2.5rem;
}

.contact__detail {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
}

.contact__detail-label {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
}

.contact__detail-value {
  font-size: 0.9rem;
  color: rgba(245, 240, 232, 0.8);
  line-height: 1.5;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 2.5rem var(--gutter);
  border-top: 1px solid rgba(245, 240, 232, 0.1);
}

.footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer__brand {
  display: flex;
  flex-direction: column;
}

.footer__brand-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
}

.footer__brand-sub {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.5);
}

.footer__nav {
  display: flex;
  gap: 2rem;
}

.footer__nav a {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.6);
  transition: color 0.3s;
}

.footer__nav a:hover {
  color: var(--gold);
}

.footer__copy {
  font-size: 0.7rem;
  color: rgba(245, 240, 232, 0.4);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26, 24, 21, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox__content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lightbox__content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox__caption {
  font-family: var(--serif);
  font-size: 0.9rem;
  color: rgba(245, 240, 232, 0.7);
  font-style: italic;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
  padding: 1rem;
  opacity: 0.6;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  opacity: 1;
}

.lightbox__close {
  top: 1.5rem;
  right: 1.5rem;
}

.lightbox__prev {
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__next {
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

/* ---------- Responsive ---------- */
@media (max-width: 968px) {
  .work__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .work__item:nth-child(1),
  .work__item:nth-child(4),
  .work__item:nth-child(8) {
    grid-row: span 1;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about__image {
    position: static;
    max-width: 400px;
  }

  .services__grid,
  .journal__grid {
    grid-template-columns: 1fr;
  }

  .contact__details {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 1.25rem;
  }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--cream);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.4s ease;
    z-index: 99;
  }

  .nav__links.active {
    right: 0;
  }

  .nav__toggle {
    display: flex;
    z-index: 101;
  }

  .nav__toggle.active span {
    background: var(--ink);
  }

  .hero__title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__actions .btn {
    width: 100%;
    text-align: center;
  }

  .work__grid {
    grid-template-columns: 1fr;
  }

  .about__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .statement {
    padding: 4rem var(--gutter);
  }

  .lightbox__prev {
    left: 0.5rem;
  }

  .lightbox__next {
    right: 0.5rem;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
