/* ---------- Reset & base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: #141210;
  color: #f3ede4;
  font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(20, 18, 16, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

.nav nav {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 18px 20px;
}

.nav-link {
  color: #8a857c;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #f3ede4;
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 24px 72px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-line {
  font-size: clamp(20px, 4vw, 30px);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 20px;
}

.hero-sub {
  color: #c9c3b8;
  font-size: 15px;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

.hero-scope {
  color: #6b665e;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 18px;
}

/* ---------- Work / grid ---------- */
.work {
  padding: 0 16px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.work-header {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.filters {
  display: flex;
  gap: 20px;
}

.filter-btn {
  color: #8a857c;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.filter-btn.is-active,
.filter-btn:hover {
  color: #f3ede4;
  border-bottom-color: #f3ede4;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  grid-auto-flow: dense;
  gap: 6px;
}

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

.g-item {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #211e1a;
}

.g-item.span-2 {
  grid-column: span 2;
  aspect-ratio: 3 / 2;
}

@media (max-width: 640px) {
  .g-item.span-2 { grid-column: span 2; aspect-ratio: 16 / 9; }
}

.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.g-item:hover img { transform: scale(1.03); }

.g-item.g-hidden { display: none; }

.g-photo {
  cursor: pointer;
}

.g-video {
  cursor: pointer;
}

.g-video .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(243, 237, 228, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.g-video .play-icon::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid #f3ede4;
  margin-left: 3px;
}

.g-phrase {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  cursor: default;
}

.g-phrase p {
  color: #c9c3b8;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.g-phrase.has-egg { cursor: pointer; }
.g-phrase.has-egg p.revealed { color: #f3ede4; }

/* ---------- About ---------- */
.about {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 72px 24px;
  max-width: 720px;
  margin: 0 auto;
  border-top: 0.5px solid rgba(255, 255, 255, 0.08);
}

.about-photo {
  width: 140px;
  flex-shrink: 0;
}

.about-photo img {
  filter: grayscale(1);
  border-radius: 2px;
}

.about-en {
  color: #c9c3b8;
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 8px;
}

.about-es {
  color: #6b665e;
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 560px) {
  .about { flex-direction: column; text-align: center; }
}

/* ---------- Contact ---------- */
.contact {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 64px 24px 96px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.08);
}

.contact-btn {
  border: 0.5px solid rgba(255, 255, 255, 0.25);
  padding: 12px 24px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.contact-btn:hover {
  border-color: #f3ede4;
  background: rgba(255, 255, 255, 0.04);
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 9, 7, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.is-open { display: flex; }

.lightbox-frame {
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  background: #000;
}

.lightbox-frame.is-vertical {
  max-width: 420px;
  aspect-ratio: 9 / 16;
}

.lightbox-frame.is-image {
  max-width: 92vw;
  max-height: 90vh;
  width: auto;
  aspect-ratio: auto;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.lightbox-frame.is-image img {
  max-width: 92vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #f3ede4;
  font-size: 28px;
  line-height: 1;
  padding: 8px;
}

/* Landscape mobile: horizontal video fills the whole screen */
@media (orientation: landscape) and (max-height: 500px) {
  .lightbox { padding: 0; }
  .lightbox-frame:not(.is-vertical):not(.is-image) {
    max-width: 100%;
    width: 100vw;
    height: 100vh;
    aspect-ratio: auto;
  }
}
