/* ── Fonts ── */
@font-face {
  font-family: 'EditorialNew';
  src: url('fonts/EditorialNew-Ultralight.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FoundersGrotesk';
  src: url('fonts/FoundersGroteskCondensed-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── Palette ── */
:root {
  --bg: #f7f6f5;
  --fg: #1a1a1a;
  --fg-muted: rgba(26, 26, 26, 0.55);
  --border: rgba(0, 0, 0, 0.07);
  --border-hover: rgba(0, 0, 0, 0.18);
  --surface: #f7f6f5;
  --overlay: rgba(0, 0, 0, 0.93);
  --font-heading: 'FoundersGrotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'EditorialNew', Georgia, serif;
  --header-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light only;
}

body {
  font-family: var(--font-body);
  font-weight: 200;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 26px 40px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.site-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 1;
}

.site-title a {
  transition: opacity 0.25s;
}

.site-title a:hover {
  opacity: 0.5;
}

/* ── Navigation ── */
.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  padding: 4px 0;
  transition: opacity 0.25s;
}

.nav-link:hover {
  opacity: 0.6;
}

/* ── Works Dropdown ── */
.nav-dropdown {
  position: relative;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.dropdown-arrow {
  width: 13px;
  height: 13px;
  transition: transform 0.3s var(--ease-out);
  opacity: 0.5;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
  opacity: 0.8;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  padding: 6px 0;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s, transform 0.25s var(--ease-out);
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-item {
  display: block;
  padding: 6px 20px;
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.dropdown-item:hover {
  opacity: 0.5;
}

/* ── Mobile Menu ── */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  align-self: center;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--fg);
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
  transform-origin: center;
}

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

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

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

/* ── Main Content ── */
.main-content {
  flex: 1;
  margin-top: var(--header-h);
}

/* ── Hero / Home ── */
.hero {
  width: 100%;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.hero img {
  max-width: 680px;
  max-height: calc(100vh - var(--header-h) - 96px);
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  animation: heroReveal 0.8s var(--ease-out) 0.15s forwards;
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ── Page Sections ── */
.page-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 40px 100px;
  min-height: calc(100vh - var(--header-h) - 60px);
}

/* ── Gallery ── */
.gallery-header {
  margin-bottom: 44px;
}

.gallery-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 1;
}

.masonry-grid {
  columns: 4;
  column-gap: 16px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}

.masonry-item.revealed {
  opacity: 1;
}

.masonry-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s var(--ease-out), filter 0.5s var(--ease-out);
}

.masonry-item:hover img {
  transform: scale(1.03);
  filter: brightness(0.93);
}

/* ── Lightbox ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-in-out), visibility 0.35s;
  cursor: zoom-out;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  cursor: default;
  transition: opacity 0.2s;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  background: none;
  border: none;
  padding: 8px;
  line-height: 0;
}

.lightbox-close svg {
  width: 20px;
  height: 20px;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
  background: none;
  border: none;
  padding: 20px;
  line-height: 0;
  user-select: none;
}

.lightbox-nav svg {
  width: 24px;
  height: 24px;
}

.lightbox-nav:hover {
  opacity: 1;
}

.lightbox-prev {
  left: 8px;
}

.lightbox-next {
  right: 8px;
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.45);
  user-select: none;
}

/* ── About ── */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.about-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.about-text {
  padding-top: 8px;
}

.about-text h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 64px;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 28px;
  line-height: 1;
}

.about-text p {
  font-size: 22px;
  line-height: 1.75;
  margin-bottom: 16px;
  color: var(--fg-muted);
}

/* ── Contact ── */
.contact-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - var(--header-h) - 160px);
  justify-content: center;
}

.contact-content h2 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 64px;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 28px;
  line-height: 1;
}

.contact-content p {
  font-size: 22px;
  line-height: 1.75;
  margin-bottom: 32px;
  color: var(--fg-muted);
  max-width: 390px;
}

.contact-content a.email-link {
  font-family: var(--font-heading);
  font-size: 16px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-hover);
  padding-bottom: 3px;
  transition: opacity 0.25s;
}

.contact-content a.email-link:hover {
  opacity: 0.5;
}

.social-links {
  display: flex;
  gap: 24px;
  margin-top: 36px;
}

.social-links a {
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  opacity: 0.45;
  transition: opacity 0.25s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.social-links a:hover {
  opacity: 1;
}

/* ── Footer ── */
.site-footer {
  font-family: var(--font-heading);
  padding: 28px 40px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--fg-muted);
  opacity: 0.6;
  border-top: 1px solid var(--border);
}

/* ── Transitions ── */
.page-enter {
  opacity: 0;
  transform: translateY(6px);
}

.page-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .masonry-grid {
    columns: 2;
    column-gap: 12px;
  }

  .masonry-item {
    margin-bottom: 12px;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 680px) {
  :root {
    --header-h: 56px;
  }

  .header-inner {
    padding: 0 20px;
    height: var(--header-h);
    align-items: center;
  }

  .site-title {
    font-size: 19px;
    letter-spacing: -0.2px;
  }

  .mobile-toggle {
    display: flex;
    z-index: 101;
  }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 20px 16px;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease-out),
                visibility 0.25s,
                transform 0.25s var(--ease-out);
  }

  .main-nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .main-nav .nav-dropdown {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .main-nav .nav-dropdown .nav-link {
    padding: 0;
    border-bottom: none;
  }

  .main-nav > .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .dropdown-menu {
    position: static;
    transform: none;
    border: none;
    box-shadow: none;
    padding: 8px 0 4px 16px;
    opacity: 1;
    visibility: visible;
    display: none;
  }

  .nav-dropdown.open .dropdown-menu {
    display: block;
    transform: none;
  }

  .dropdown-item {
    padding: 12px 0;
    font-size: 14px;
  }

  .hero {
    padding: 32px 24px;
  }

  .hero img {
    max-width: 100%;
  }

  .page-section {
    padding: 36px 24px 60px;
  }

  .masonry-grid {
    columns: 1;
  }

  .gallery-title,
  .about-text h2,
  .contact-content h2 {
    font-size: 14px;
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
  }

  .mobile-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .lightbox-nav {
    padding: 12px;
  }

  .lightbox-prev {
    left: 4px;
  }

  .lightbox-next {
    right: 4px;
  }
}
