/* =============== RESET BÁSICO =============== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: "DM Sans", sans-serif;
  background: #ffffff;
  color: #111111;
  line-height: 1.5;
}

/* =============== INTRO FULLSCREEN =============== */

.intro-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 999;
}

.intro-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.intro-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-enter {
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}

.intro-symbol {
  font-size: 4rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #ffffff;
}

body.intro-active .site-header,
body.intro-active .site-main,
body.intro-active .site-footer {
  visibility: hidden;
}

/* =============== HEADER / NAV =============== */

.site-header {
  position: sticky;
  top: 0;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.logo {
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* home / store / about */
.main-nav a {
  margin-left: 1rem;
  text-decoration: none;
  text-transform: lowercase;
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 0.9rem;
  color: #111111;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
}

.main-nav a:hover {
  color: #111111;
}

.main-nav a.active {
  border-bottom-color: #111111;
}

/* =============== LAYOUT PRINCIPAL =============== */

.site-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* =============== SECCIONES =============== */

.section {
  display: none;
  padding-bottom: 3rem;
}

.section-active {
  display: block;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

/* Títulos: Selected Works / Store / About */
.section-header h1 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* =============== TOGGLE GRID / SINGLE VIEW =============== */

.view-toggle {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid #dddddd;
  background: #ffffff;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  color: #111111;
}

/* =============== HOME – GRID DE OBRAS =============== */

.gallery {
  margin-top: 1rem;
}

.gallery-grid {
  display: none;
}

/* Grid sencillo en filas, orden natural, fotos completas */
.gallery-grid.view-active {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: flex-start;
}

.work-card {
  display: flex;
  flex-direction: column;
}

.work-card img {
  width: 100%;
  height: auto;       /* respeta aspect ratio */
  object-fit: contain;
  display: block;
  margin-bottom: 0.6rem;
}

/* =============== SINGLE VIEW =============== */

.gallery-single {
  display: none;
}

.gallery-single.view-active {
  display: block;
}

.single-view-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 1rem;
}

.single-image-wrapper {
  width: 100%;
  max-width: 1000px;
}

.single-image-wrapper img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: calc(100vh - 200px);
}

/* Flechas single view */
.nav-arrow {
  border: none;
  background: transparent;
  font-size: 2rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  color: #111111;
  -webkit-text-fill-color: #111111;
}

/* =============== STORE – GRID Y TEXTOS =============== */

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.store-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #111111;
}

.store-card:visited {
  color: #111111;
}

.store-image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;     /* cuadrados */
  background: #f2f2f2;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.store-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-card-body h2 {
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.store-card-body p {
  font-family: "Fraunces", serif;
  font-weight: 100;
  font-style: italic;
  font-size: 0.9rem;
  color: #555555;
}

/* =============== PRODUCT PAGES (about-layout) =============== */

.about-layout {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;  /* foto / texto */
  gap: 2rem;
  margin-top: 1.5rem;
  align-items: flex-start;
}

.about-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

/* Título dentro del product: "Obra enmarcada — Edición limitada" */
.about-text h2 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 0.75rem;
}

/* Párrafos de los productos */
.about-text p {
  font-family: "DM Sans", sans-serif;
  font-weight: 200;
  font-size: 0.95rem;
  color: #333333;
  margin-bottom: 0.75rem;
}

/* link "Volver al store" */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 1.5rem;
  font-family: "DM Sans", sans-serif;
  font-weight: 200;
  font-size: 0.85rem;
  color: #888888;
  text-decoration: none;
}

.back-link svg {
  width: 14px;
  height: 14px;
}

/* =============== ABOUT – PÁGINA PRINCIPAL =============== */

.about-page {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
  align-items: start;
}

.about-photo {
  width: 100%;
  display: block;
  object-fit: cover;
}

.about-col h2 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.about-col p {
  font-family: "DM Sans", sans-serif;
  font-weight: 200;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: #333;
  max-width: 550px;
  line-height: 1.55;
}

/* =============== FOOTER =============== */

.site-footer {
  border-top: 1px solid #e0e0e0;
  padding: 1.5rem 1rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-instagram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-instagram svg {
  width: 18px;
  height: 18px;
  fill: #111111;
}

.footer-copy {
  font-family: "DM Sans", sans-serif;
  font-weight: 200;
  font-size: 0.8rem;
  color: #777777;
}

/* =============== RESPONSIVE =============== */

@media (max-width: 900px) {
  .about-page {
    grid-template-columns: 1fr;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .main-nav a {
    margin-left: 0;
    margin-right: 1rem;
  }

  .store-grid {
    grid-template-columns: 1fr;
  }
}
