/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* Dark theme — default */
  --bg:         #000000;
  --ink:        #f2f2f2;
  --ink-soft:   #b8b8b8;
  --ink-mute:   #7c7c7c;
  --line:       rgba(255,255,255,0.16);
  --line-soft:  rgba(255,255,255,0.09);
  --accent:     #f2f2f2;
  --skeleton:   #000000;
  --header-bg:  rgba(0,0,0,0.86);
  --overlay:    rgba(0,0,0,0.97);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --nav-h: 76px;
  --gutter: 0px;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

:root[data-theme="light"] {
  --bg:         #ffffff;
  --ink:        #121212;
  --ink-soft:   #545454;
  --ink-mute:   #9a9a9a;
  --line:       rgba(18,18,18,0.12);
  --line-soft:  rgba(18,18,18,0.07);
  --accent:     #121212;
  --skeleton:   #ffffff;
  --header-bg:  rgba(255,255,255,0.92);
  --overlay:    rgba(10,10,10,0.96);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--bg);
  transition: background-color .3s var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; }
::selection { background: var(--ink); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  z-index: 9999; border-radius: 4px; font-weight: 500; font-size: .85rem;
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.reveal {
  opacity: 0;
  transition: opacity .7s var(--ease-soft);
}
.reveal.is-visible { opacity: 1; }
.reveal[data-split] { opacity: 1; }

/* =============================================================
   4. Typography
   ============================================================= */
.eyebrow {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.page-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* =============================================================
   5. Components
   ============================================================= */

/* --- Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: var(--header-bg);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  transition: background .3s var(--ease-out);
}
@supports not (backdrop-filter: blur(10px)) {
  .site-header { background: var(--bg); }
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(.5rem, 3vw, 1.5rem);
  min-height: var(--nav-h);
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: clamp(.75rem, 3vw, 2.5rem);
}
.wordmark {
  font-size: clamp(.85rem, 3.6vw, 1.18rem);
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.wordmark .suffix { font-weight: 400; color: var(--ink-soft); margin-left: .3em; }

.main-nav {
  display: none;
}
.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.75rem);
}
.main-nav a {
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-soft);
  padding: .4rem 0;
  position: relative;
  transition: color .3s var(--ease-out);
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: -2px;
  height: 1px;
  background: var(--ink);
  transition: right .35s var(--ease-out);
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink);
}
.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  right: 0;
}

.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-soft);
  padding: .4rem 0;
  transition: color .3s var(--ease-out);
}
.nav-dropdown-toggle::after {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .25s var(--ease-out);
}
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle[aria-current="page"] {
  color: var(--ink);
}
.nav-dropdown-toggle[aria-expanded="true"]::after {
  transform: rotate(-135deg) translateY(1px);
}
.nav-dropdown-menu {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  margin-top: .6rem;
  min-width: 140px;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: .4rem;
  display: flex;
  flex-direction: column;
  gap: .1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
}
.nav-dropdown-toggle[aria-expanded="true"] + .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: .45rem .6rem;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: background .2s var(--ease-out), color .2s var(--ease-out);
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a[aria-current="page"] {
  color: var(--ink);
  background: var(--line-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(.4rem, 2vw, 1rem);
  flex-shrink: 0;
}
.lang-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-size: .7rem;
  letter-spacing: .06em;
  font-weight: 600;
}
.lang-toggle button {
  padding: .35rem .65rem;
  color: var(--ink-mute);
  transition: background .25s var(--ease-out), color .25s var(--ease-out);
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out);
}
.theme-toggle:hover {
  background: var(--line-soft);
}
.theme-toggle svg {
  width: 15px;
  height: 15px;
  stroke: var(--ink);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
}
.nav-toggle span {
  width: 20px; height: 1.5px; background: var(--ink);
  transition: transform .3s var(--ease-out), opacity .3s var(--ease-out);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (min-width: 960px) {
  .main-nav { display: block; }
  .nav-toggle { display: none; }
}

.mobile-nav {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--bg);
  z-index: 400;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  overflow-y: auto;
}
.mobile-nav.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.mobile-nav ul {
  list-style: none;
  padding: 2rem clamp(1rem, 5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.mobile-nav a {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.mobile-nav-label {
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: .4rem;
}
.mobile-nav-sub {
  padding-left: 1.25rem;
}
.mobile-nav-sub a {
  font-size: 1.15rem;
}
@media (min-width: 960px) {
  .mobile-nav { display: none; }
}

/* --- Gallery grid (masonry via CSS columns) --- */
.gallery {
  columns: 1;
  column-gap: var(--gutter);
}
@media (min-width: 540px)  { .gallery { columns: 2; } }
@media (min-width: 960px)  { .gallery { columns: 3; } }
@media (min-width: 1280px) { .gallery { columns: 4; } }

.gallery-item {
  break-inside: avoid;
  margin-bottom: var(--gutter);
  position: relative;
  overflow: hidden;
  background: var(--skeleton);
}
.gallery-item button {
  display: block;
  width: 100%;
  cursor: zoom-in;
}
.gallery-item img {
  width: 100%;
  height: auto;
  transition: transform .8s var(--ease-out), filter .5s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover img {
    transform: scale(1.09);
  }
  .gallery-item:hover .gallery-item-caption {
    opacity: 1;
    transform: none;
  }
}
.gallery-item-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: .9rem 1rem;
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.55), transparent);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
  pointer-events: none;
}

/* --- Category kicker header --- */
.category-head {
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 3vw, 2.5rem) clamp(1.25rem, 3vw, 2rem);
  max-width: 1600px;
  margin-inline: auto;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  box-sizing: border-box;
  background: var(--overlay);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  overflow: hidden;
}
.lightbox[open],
.lightbox.is-open { display: flex; }
.lightbox::backdrop { background: transparent; }
html.lightbox-open,
html.lightbox-open body { overflow: hidden; }
.lightbox-figure {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}
.lightbox-figure img {
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: clamp(1rem, 3vw, 1.75rem);
  right: clamp(1rem, 3vw, 1.75rem);
  color: rgba(255,255,255,.8);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .4rem .2rem;
  transition: color .25s var(--ease-out);
}
.lightbox-close:hover { color: #fff; }

.lightbox-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  font-size: .72rem;
  letter-spacing: .04em;
  color: rgba(255,255,255,.5);
}
.lightbox-nav button {
  color: rgba(255,255,255,.8);
  padding: .3rem .1rem;
  border-bottom: 1px solid transparent;
  transition: color .25s var(--ease-out), border-color .25s var(--ease-out);
}
.lightbox-nav button:hover {
  color: #fff;
  border-color: rgba(255,255,255,.6);
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 3vw, 2.5rem);
  margin-top: clamp(3rem, 8vw, 6rem);
}
.site-footer-inner {
  max-width: 1600px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .78rem;
  color: var(--ink-mute);
}
.social-links {
  display: flex;
  gap: 1.25rem;
}
.social-links a {
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color .25s var(--ease-out);
}
.social-links a:hover { color: var(--ink); }

/* --- Contact page --- */
.contact-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 3vw, 2.5rem) clamp(4rem, 10vw, 7rem);
  text-align: center;
}
.contact-wrap .eyebrow { margin-bottom: 1rem; }
.contact-title {
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.contact-body {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 52ch;
  margin: 0 auto 2.25rem;
}
.email-cta {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 600;
  padding-bottom: .3rem;
  border-bottom: 2px solid var(--ink);
  transition: opacity .25s var(--ease-out);
}
.email-cta:hover { opacity: .6; }
.contact-socials {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

/* =============================================================
   6. Effects / keyframes
   ============================================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeOutUp {
  to { opacity: 0; transform: translateY(-12px); }
}
@view-transition { navigation: auto; }
::view-transition-old(root) { animation-name: fadeOutUp; animation-duration: .45s; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
::view-transition-new(root) { animation-name: fadeInUp; animation-duration: .45s; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }

/* =============================================================
   7. Responsive (see per-component breakpoints above)
   ============================================================= */

/* =============================================================
   8. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .gallery-item img { transition: filter .3s ease; }
  @media (hover: hover) and (pointer: fine) {
    .gallery-item:hover img { transform: none; }
  }
}
