/* ============================================================
   davideph.it — Design System
   Luxury Minimal Photography Portfolio
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Variables ── */
:root {
  --white:       #FFFFFF;
  --gold:        #C6A962;
  --gold-light:  #D4BC84;
  --gold-dim:    rgba(198,169,98,.15);
  --black:       #0A0A0A;
  --grey:        #F5F5F5;
  --grey-mid:    #E8E8E8;
  --text-soft:   #888888;
  --text-body:   #333333;

  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'DM Sans', system-ui, sans-serif;

  --ease:        cubic-bezier(.4,0,.2,1);
  --ease-out:    cubic-bezier(0,0,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);

  --radius:      4px;
  --radius-lg:   12px;

  --nav-h:       72px;
  --section-pad: clamp(80px, 12vw, 140px);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
ul { list-style: none; }

/* ── Typography ── */
.serif { font-family: var(--font-serif); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -.01em;
}

.display-xl {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.display-lg {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
}
.display-md {
  font-size: clamp(1.6rem, 3vw, 2.8rem);
}

.caption {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all .3s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.08);
  opacity: 0;
  transition: opacity .2s;
}
.btn:hover::after { opacity: 1; }

.btn-gold {
  background: var(--gold);
  color: var(--black);
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(198,169,98,.35);
}

.btn-outline {
  border: 1px solid rgba(255,255,255,.4);
  color: var(--white);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

.btn-outline-dark {
  border: 1px solid rgba(10,10,10,.25);
  color: var(--black);
}
.btn-outline-dark:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
}
.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

.section { padding: var(--section-pad) 0; }
.section-sm { padding: calc(var(--section-pad) * .6) 0; }

.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ── Gold Divider ── */
.gold-rule {
  display: block;
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 20px auto;
}
.gold-rule-left {
  margin: 20px 0;
}

/* ── Navigation ── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background .4s var(--ease), backdrop-filter .4s, box-shadow .4s;
}
#nav.scrolled {
  background: rgba(10,10,10,.88);
  backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.nav-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--white);
  letter-spacing: .04em;
  font-style: italic;
  transition: color .2s;
}
.nav-logo:hover { color: var(--gold); }
.nav-logo span { color: var(--gold); font-style: normal; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width .3s var(--ease);
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }
.nav-links .btn { margin-left: 8px; padding: 10px 22px; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  padding: 4px;
}
.nav-burger span {
  display: block;
  height: 1.5px;
  background: var(--white);
  transition: all .3s var(--ease);
  transform-origin: left;
}
.nav-burger.open span:nth-child(1) { transform: rotate(40deg) translateY(-1px); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: rotate(-40deg) translateY(1px); }

.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}
.nav-mobile.open {
  display: flex;
  opacity: 1;
  pointer-events: all;
}
.nav-mobile a {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--white);
  font-style: italic;
  transition: color .2s;
}
.nav-mobile a:hover { color: var(--gold); }

/* ── Hero ── */
#hero {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 600px;
  overflow: hidden;
  background: var(--black);
}

.hero-slides {
  position: absolute;
  inset: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.4s var(--ease), transform 8s linear;
}
.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}
.hero-slide.prev {
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,10,10,.35) 0%,
    rgba(10,10,10,.15) 40%,
    rgba(10,10,10,.6) 100%
  );
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 0 24px;
  padding-top: var(--nav-h);
}

.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp .8s .4s var(--ease) forwards;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 9vw, 7.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--white);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp .9s .55s var(--ease) forwards;
}
.hero-title em {
  font-style: italic;
  color: var(--gold);
}
.hero-tagline {
  margin-top: 20px;
  font-family: var(--font-sans);
  font-size: clamp(14px, 2vw, 17px);
  font-weight: 300;
  color: rgba(255,255,255,.72);
  letter-spacing: .04em;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp .8s .7s var(--ease) forwards;
}
.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 44px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp .8s .85s var(--ease) forwards;
}

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.5);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  animation: pulse 2.5s infinite;
}
.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: lineGrow 2.5s infinite;
}

.hero-dots {
  position: absolute;
  bottom: 36px;
  right: clamp(20px, 5vw, 60px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hero-dot {
  width: 2px;
  height: 18px;
  background: rgba(255,255,255,.25);
  border-radius: 2px;
  transition: all .3s;
  cursor: pointer;
}
.hero-dot.active {
  height: 32px;
  background: var(--gold);
}

/* ── Section: About / Intro ── */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}
.intro-image-wrap {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 2px;
}
.intro-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 6s linear;
}
.intro-image-wrap:hover img { transform: scale(1.04); }
.intro-image-badge {
  position: absolute;
  bottom: 28px; right: -20px;
  background: var(--white);
  padding: 16px 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
}
.intro-image-badge .num {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
}
.intro-image-badge p {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 2px;
}
.intro-text .caption { margin-bottom: 16px; }
.intro-text h2 { margin-bottom: 24px; }
.intro-text p {
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.intro-text .btn { margin-top: 12px; }

/* ── Section: Services / Categories ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 60px;
}
.service-card {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  cursor: pointer;
}
.service-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
  filter: brightness(.75);
}
.service-card:hover img {
  transform: scale(1.06);
  filter: brightness(.65);
}
.service-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,.75) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 28px;
  color: var(--white);
}
.service-card-overlay .caption { margin-bottom: 8px; }
.service-card-overlay h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
}
.service-card-arrow {
  position: absolute;
  top: 28px; right: 28px;
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.8);
  transition: all .3s var(--ease);
}
.service-card:hover .service-card-arrow {
  opacity: 1;
  transform: scale(1);
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Portfolio Grid ── */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.filter-btn {
  padding: 9px 22px;
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--grey-mid);
  border-radius: 100px;
  color: var(--text-soft);
  transition: all .25s;
  background: var(--white);
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}

.portfolio-grid {
  columns: 3 280px;
  gap: 10px;
}
.portfolio-item {
  break-inside: avoid;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 2px;
}
.portfolio-item img {
  width: 100%;
  display: block;
  transition: transform .6s var(--ease);
  filter: brightness(.95);
}
.portfolio-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,.0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .4s var(--ease);
}
.portfolio-item-overlay::before {
  content: '';
  width: 44px; height: 44px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  transform: scale(0);
  transition: transform .35s var(--ease-spring);
}
.portfolio-item-overlay::after {
  content: '+';
  position: absolute;
  font-size: 1.4rem;
  color: var(--gold);
  transform: scale(0);
  transition: transform .35s .05s var(--ease-spring);
}
.portfolio-item:hover img {
  transform: scale(1.05);
  filter: brightness(.75);
}
.portfolio-item:hover .portfolio-item-overlay {
  background: rgba(10,10,10,.35);
}
.portfolio-item:hover .portfolio-item-overlay::before,
.portfolio-item:hover .portfolio-item-overlay::after {
  transform: scale(1);
}
.portfolio-item.hidden {
  display: none;
}

/* ── Lightbox ── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(8,8,8,.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
  backdrop-filter: blur(8px);
}
#lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.lightbox-img-wrap {
  position: relative;
  max-width: 92vw;
  max-height: 88vh;
}
.lightbox-img-wrap img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 2px;
  transform: scale(.96);
  transition: transform .35s var(--ease-spring);
}
#lightbox.open .lightbox-img-wrap img { transform: scale(1); }

.lightbox-close, .lightbox-prev, .lightbox-next {
  position: fixed;
  width: 48px; height: 48px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.2rem;
  transition: all .2s;
  cursor: pointer;
  background: rgba(10,10,10,.5);
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(10,10,10,.8);
}
.lightbox-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: .2em;
  color: rgba(255,255,255,.5);
}

/* ── Testimonial ── */
.testimonial-section {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: var(--section-pad) 0;
}
.testimonial-section blockquote {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  color: var(--white);
  max-width: 780px;
  margin: 24px auto;
}
.testimonial-section cite {
  font-size: 12px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold);
  font-style: normal;
}

/* ── Instagram Strip ── */
.instagram-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.instagram-strip a {
  aspect-ratio: 1;
  overflow: hidden;
  display: block;
  position: relative;
}
.instagram-strip a img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease), filter .5s;
}
.instagram-strip a:hover img {
  transform: scale(1.08);
  filter: brightness(.7);
}
.instagram-strip a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold-dim);
  opacity: 0;
  transition: opacity .3s;
}
.instagram-strip a:hover::after { opacity: 1; }

/* ── Footer ── */
#footer {
  background: var(--black);
  color: rgba(255,255,255,.55);
  padding: 60px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .nav-logo { font-size: 1.5rem; margin-bottom: 16px; }
.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  max-width: 280px;
}
.footer-col h5 {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 13px;
  line-height: 2.2;
  transition: color .2s;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
}
.footer-bottom span { letter-spacing: .05em; }
.footer-socials { display: flex; gap: 16px; }
.footer-socials a {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  transition: all .2s;
}
.footer-socials a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ── Keyframes ── */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}
@keyframes lineGrow {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Loader ── */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: opacity .6s .2s var(--ease), visibility .6s .2s;
}
#page-loader.loaded {
  opacity: 0;
  visibility: hidden;
}
.loader-logo {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.8rem;
  color: var(--white);
}
.loader-logo span { color: var(--gold); }
.loader-bar {
  width: 120px;
  height: 1px;
  background: rgba(255,255,255,.15);
  position: relative;
  overflow: hidden;
}
.loader-bar::after {
  content: '';
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0;
  background: var(--gold);
  animation: loadBar 1.2s var(--ease) forwards;
}
@keyframes loadBar {
  to { width: 100%; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .intro-grid { grid-template-columns: 1fr; }
  .intro-image-badge { right: 16px; }
  .services-grid { grid-template-columns: 1fr; gap: 2px; }
  .service-card { aspect-ratio: 4/3; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .instagram-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .portfolio-grid { columns: 2 160px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .instagram-strip { grid-template-columns: repeat(3, 1fr); }
  .hero-dots { display: none; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
