/* =========================================================
   ELIAS MARCHETTI — PREMIUM PHOTOGRAPHY PORTFOLIO
   ========================================================= */

:root {
  --bg: #0d0d0f;
  --bg-soft: #141417;
  --surface: #1a1a1e;
  --ink: #f4f1ea;
  --ink-muted: #a9a39a;
  --accent: #c9a86a;
  --accent-soft: rgba(201, 168, 106, 0.14);
  --line: rgba(244, 241, 234, 0.1);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1280px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

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

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }

::selection { background: var(--accent); color: #0d0d0f; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2c2c30; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* =========================================================
   PRELOADER
   ========================================================= */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.preloader.hidden { opacity: 0; visibility: hidden; }
.preloader__inner { text-align: center; }
.preloader__mark {
  font-family: var(--serif); font-size: 4rem; color: var(--accent);
  display: block; margin-bottom: 1rem; animation: pulse 1.4s infinite;
}
.preloader__bar {
  width: 180px; height: 2px; background: var(--line);
  margin: 0 auto; overflow: hidden; border-radius: 2px;
}
.preloader__bar span {
  display: block; height: 100%; width: 0; background: var(--accent);
  animation: load 1.6s ease forwards;
}
.preloader__text { margin-top: 1rem; font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-muted); }
@keyframes load { to { width: 100%; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* =========================================================
   CURSOR
   ========================================================= */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none;
  z-index: 999; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-dot { width: 8px; height: 8px; background: var(--accent); }
.cursor-ring {
  width: 36px; height: 36px; border: 1px solid rgba(244,241,234,0.35);
  transition: width 0.25s, height 0.25s, border-color 0.25s, background 0.25s;
}
.cursor-ring.hover { width: 60px; height: 60px; border-color: var(--accent); background: rgba(201,168,106,0.1); }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* =========================================================
   NAVIGATION
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 5vw;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), backdrop-filter 0.4s;
}
.nav.scrolled {
  background: rgba(13,13,15,0.82);
  backdrop-filter: blur(14px);
  padding: 16px 5vw;
  border-bottom: 1px solid var(--line);
}
.nav__logo { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; letter-spacing: 0.05em; }
.nav__logo span { color: var(--accent); }
.nav__links { display: flex; gap: 2.4rem; }
.nav__link {
  position: relative; font-size: 0.82rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-muted);
  transition: color 0.3s;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--accent); transition: width 0.35s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { width: 100%; }
.nav__cta {
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 12px 24px; border: 1px solid var(--accent); color: var(--accent);
  transition: background 0.3s, color 0.3s;
}
.nav__cta:hover { background: var(--accent); color: #0d0d0f; }
.nav__burger { display: none; flex-direction: column; gap: 6px; z-index: 110; }
.nav__burger span { width: 26px; height: 2px; background: var(--ink); transition: 0.4s var(--ease); }
.nav__burger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__burger.active span:nth-child(2) { opacity: 0; }
.nav__burger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 105; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  opacity: 0; visibility: hidden; transition: 0.5s var(--ease);
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu__links { display: flex; flex-direction: column; gap: 1.6rem; text-align: center; }
.mobile-menu__links a {
  font-family: var(--serif); font-size: 2rem; color: var(--ink);
  opacity: 0; transform: translateY(20px); transition: 0.4s var(--ease);
}
.mobile-menu.open .mobile-menu__links a { opacity: 1; transform: translateY(0); }
.mobile-menu__links a:hover { color: var(--accent); }
.mobile-menu__foot { position: absolute; bottom: 40px; text-align: center; color: var(--ink-muted); font-size: 0.85rem; }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; height: 100vh; min-height: 640px; display: flex; align-items: flex-end; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); animation: heroZoom 2.4s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,13,15,0.35) 0%, rgba(13,13,15,0.05) 40%, rgba(13,13,15,0.88) 100%);
}
.hero__content { position: relative; z-index: 2; padding: 0 5vw 14vh; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.hero__eyebrow {
  font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.4rem;
}
.hero__title {
  font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 6.5vw, 5.4rem);
  line-height: 1.05; letter-spacing: -0.01em;
}
.hero__title .line { display: block; overflow: hidden; }
.reveal-line {
  display: block; transform: translateY(110%); opacity: 0;
  animation: lineUp 1s var(--ease) forwards;
}
.reveal-line:nth-child(2) { animation-delay: 0.15s; }
.reveal-line:nth-child(3) { animation-delay: 0.3s; }
@keyframes lineUp { to { transform: translateY(0); opacity: 1; } }
.hero__sub { max-width: 520px; margin-top: 1.6rem; color: var(--ink-muted); font-size: 1.05rem; font-weight: 300; }
.hero__actions { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }

.hero__scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-muted);
}
.hero__scroll-line { width: 1px; height: 46px; background: var(--line); overflow: hidden; }
.hero__scroll-line::after {
  content: ""; display: block; width: 1px; height: 100%;
  background: var(--accent); animation: scrollLine 1.8s ease infinite;
}
@keyframes scrollLine { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

.hero__meta {
  position: absolute; top: 50%; right: 5vw; transform: translateY(-50%);
  z-index: 2; display: flex; flex-direction: column; gap: 3rem; align-items: flex-end;
  color: var(--ink-muted); font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
  writing-mode: vertical-rl; opacity: 0.6;
}
@media (max-width: 900px) { .hero__meta { display: none; } }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-block; padding: 16px 34px; font-size: 0.82rem;
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  transition: transform 0.3s var(--ease), background 0.3s, color 0.3s, border 0.3s;
}
.btn--light { background: var(--ink); color: #0d0d0f; }
.btn--light:hover { background: var(--accent); color: #0d0d0f; transform: translateY(-3px); }
.btn--ghost { border: 1px solid rgba(244,241,234,0.4); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.btn--dark { background: var(--ink); color: #0d0d0f; }
.btn--dark:hover { background: var(--accent); transform: translateY(-3px); }

/* =========================================================
   SECTION HEADINGS
   ========================================================= */
.section-head { max-width: 720px; margin-bottom: 3.5rem; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head__eyebrow {
  font-size: 0.75rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.section-head__title {
  font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.15;
}
.section-head__title em { font-style: italic; color: var(--accent); }
.section-head__desc { margin-top: 1.2rem; color: var(--ink-muted); }

/* =========================================================
   STATS
   ========================================================= */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  max-width: var(--maxw); margin: 0 auto; padding: 6rem 5vw;
  border-bottom: 1px solid var(--line);
}
.stats__item { text-align: center; }
.stats__num {
  font-family: var(--serif); font-size: clamp(2.4rem, 4vw, 3.6rem);
  color: var(--accent); display: block; line-height: 1;
}
.stats__label { color: var(--ink-muted); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 0.6rem; display: block; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); row-gap: 2.6rem; } }

/* =========================================================
   WORK / GALLERY
   ========================================================= */
.work { max-width: var(--maxw); margin: 0 auto; padding: 8rem 5vw; }

.filters { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 3rem; }
.filter {
  padding: 10px 22px; border: 1px solid var(--line); border-radius: 100px;
  font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-muted); transition: 0.3s;
}
.filter:hover { border-color: var(--accent); color: var(--accent); }
.filter.active { background: var(--accent); border-color: var(--accent); color: #0d0d0f; font-weight: 500; }

.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem;
}
.gallery__item {
  position: relative; overflow: hidden; cursor: pointer;
  aspect-ratio: 4 / 5; border-radius: 2px; background: var(--surface);
}
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.9s var(--ease);
}
.gallery__item figcaption {
  position: absolute; inset: 0; padding: 1.6rem;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, rgba(13,13,15,0) 40%, rgba(13,13,15,0.82) 100%);
  opacity: 0; transition: opacity 0.5s var(--ease);
}
.gallery__item figcaption span {
  font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.4rem; transform: translateY(12px); transition: 0.5s var(--ease) 0.05s;
}
.gallery__item figcaption h3 {
  font-family: var(--serif); font-weight: 500; font-size: 1.3rem;
  transform: translateY(12px); transition: 0.5s var(--ease) 0.1s;
}
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item:hover figcaption { opacity: 1; }
.gallery__item:hover figcaption span, .gallery__item:hover figcaption h3 { transform: translateY(0); }

/* filter animation */
.gallery__item.hide { display: none; }
.gallery__item.anim-in { animation: fadeIn 0.6s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

.work__more { text-align: center; margin-top: 4rem; }

@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }

/* =========================================================
   ABOUT
   ========================================================= */
.about {
  max-width: var(--maxw); margin: 0 auto; padding: 8rem 5vw;
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 5rem; align-items: center;
  border-top: 1px solid var(--line);
}
.about__media { position: relative; }
.about__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; border-radius: 2px; }
.about__frame {
  position: absolute; top: -18px; left: -18px; right: 18px; bottom: 18px;
  border: 1px solid rgba(201,168,106,0.35); z-index: -1; border-radius: 2px;
}
.about__badge {
  position: absolute; bottom: -24px; right: -10px;
  background: var(--accent); color: #0d0d0f; padding: 1.2rem 1.6rem;
  display: flex; align-items: center; gap: 1rem;
}
.about__badge strong { font-family: var(--serif); font-size: 2.2rem; line-height: 1; }
.about__badge span { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.4; }
.about__text { color: var(--ink-muted); margin-top: 1.2rem; font-weight: 300; }
.about__list { margin: 2rem 0; }
.about__list li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; color: var(--ink-muted); }
.about__list li span {
  color: var(--accent); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  display: inline-block; width: 110px;
}
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: 4rem; } }

/* =========================================================
   SERVICES
   ========================================================= */
.services { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8rem 5vw; }
.services .section-head, .testimonials .section-head { max-width: 720px; }
.cards { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.card {
  background: var(--surface); border: 1px solid var(--line); padding: 2.2rem 1.8rem;
  display: flex; flex-direction: column; transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}
.card:hover { transform: translateY(-8px); border-color: var(--accent); background: #1e1e23; }
.card__num { font-family: var(--serif); color: var(--accent); font-size: 1.1rem; margin-bottom: 1.6rem; }
.card__title { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; margin-bottom: 0.8rem; }
.card__text { color: var(--ink-muted); font-size: 0.92rem; font-weight: 300; flex: 1; }
.card__link { color: var(--accent); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 1.6rem; transition: letter-spacing 0.3s; }
.card__link:hover { letter-spacing: 0.16em; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.testimonials { padding: 8rem 5vw; max-width: 900px; margin: 0 auto; }
.slider { overflow: hidden; }
.slider__track { display: flex; transition: transform 0.7s var(--ease); }
.slide { flex: 0 0 100%; text-align: center; padding: 0 1rem; }
.slide__stars { color: var(--accent); letter-spacing: 0.4em; margin-bottom: 1.6rem; font-size: 1.1rem; }
.slide__quote {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  line-height: 1.6; color: var(--ink); max-width: 720px; margin: 0 auto;
}
.slide__author { margin-top: 2rem; font-weight: 600; letter-spacing: 0.05em; }
.slide__role { color: var(--ink-muted); font-size: 0.85rem; }
.slider__controls { display: flex; align-items: center; justify-content: center; gap: 1.6rem; margin-top: 2.6rem; }
.slider__btn {
  width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 50%;
  font-size: 1.1rem; color: var(--ink); transition: 0.3s;
}
.slider__btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.slider__dots { display: flex; gap: 8px; }
.slider__dots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: 0.3s; }
.slider__dots .dot.active { background: var(--accent); width: 24px; border-radius: 4px; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 8rem 5vw; }
.contact__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem;
}
.contact__text { color: var(--ink-muted); margin-top: 1.2rem; font-weight: 300; }
.contact__details { margin-top: 2.4rem; }
.contact__details li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); display: flex; gap: 1.2rem; align-items: baseline; font-size: 0.95rem; }
.contact__details li span { color: var(--accent); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; min-width: 70px; }
.contact__details a { transition: color 0.3s; }
.contact__details a:hover { color: var(--accent); }

.contact__form { background: var(--surface); border: 1px solid var(--line); padding: 2.6rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form__group { margin-bottom: 1.4rem; }
.form__group label { display: block; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 0.5rem; }
.form__group input, .form__group select, .form__group textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line); color: var(--ink);
  padding: 14px 16px; font-family: inherit; font-size: 0.95rem; border-radius: 2px;
  transition: border-color 0.3s; resize: vertical;
}
.form__group input:focus, .form__group select:focus, .form__group textarea:focus {
  outline: none; border-color: var(--accent);
}
.form__group input::placeholder, .form__group textarea::placeholder { color: #55524c; }
.form__group select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a9a39a' fill='none' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.form__submit { width: 100%; }
.form__status { margin-top: 1rem; text-align: center; font-size: 0.9rem; min-height: 1.2em; }
.form__status.success { color: #7fd6a0; }
.form__status.error { color: #e58a8a; }
@media (max-width: 900px) { .contact__inner { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  padding: 5rem 5vw 2rem; max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem;
}
.footer__logo { font-family: var(--serif); font-size: 1.8rem; font-weight: 600; }
.footer__logo span { color: var(--accent); }
.footer__tag { color: var(--ink-muted); margin-top: 1rem; max-width: 260px; font-weight: 300; }
.footer h4 { font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.2rem; }
.footer__col a, .footer__col p { display: block; color: var(--ink-muted); font-size: 0.92rem; margin-bottom: 0.7rem; transition: color 0.3s; }
.footer__col a:hover { color: var(--ink); }
.footer__addr { font-weight: 300; }
.footer__bottom {
  grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 1.6rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem;
  color: var(--ink-muted); font-size: 0.8rem;
}
@media (max-width: 800px) { .footer { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer { grid-template-columns: 1fr; } }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(10,10,12,0.95);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: 0.4s var(--ease);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox__content { max-width: 84vw; max-height: 84vh; text-align: center; }
.lightbox__content img {
  max-width: 100%; max-height: 72vh; object-fit: contain;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.lightbox__content figcaption { margin-top: 1.4rem; }
.lightbox__content h3 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; }
.lightbox__content p { color: var(--ink-muted); font-size: 0.9rem; }
.lightbox__close {
  position: absolute; top: 28px; right: 34px; font-size: 2.6rem; color: var(--ink);
  transition: color 0.3s, transform 0.3s; z-index: 2; line-height: 1;
}
.lightbox__close:hover { color: var(--accent); transform: rotate(90deg); }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; width: 58px; height: 58px; border: 1px solid var(--line);
  border-radius: 50%; color: var(--ink); transition: 0.3s; z-index: 2;
}
.lightbox__nav:hover { border-color: var(--accent); color: var(--accent); }
.lightbox__nav--prev { left: 3vw; }
.lightbox__nav--next { right: 3vw; }

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   RESPONSIVE NAV
   ========================================================= */
@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
}
