/* hseiz — portfolio de renders de arquitectura, Mallorca */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&display=swap");

:root {
  --bg: #f4eee2;
  --bg-alt: #ece2cc;
  --ink: #1c1c1a;
  --olive: #4a4a36;
  --olive-deep: #2e2d22;
  --accent: #b06a46;
  --line: rgba(28, 28, 26, 0.14);
  --line-on-dark: rgba(244, 238, 226, 0.18);

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;

  --max: 1280px;
  --gap: clamp(1rem, 2vw, 1.75rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  font-weight: 600;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--gap);
  background: rgba(28, 28, 26, 0.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f4eee2;
}

.logo {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.logo span {
  opacity: 0.6;
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.site-nav a {
  position: relative;
  padding-bottom: 2px;
}

.site-nav a:hover {
  color: var(--accent);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  color: #f4eee2;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 28, 26, 0.15) 0%, rgba(28, 28, 26, 0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 var(--gap) 4.5rem;
  max-width: 720px;
}

.hero-content .eyebrow {
  color: #e7ddc4;
}

.hero-content h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-top: 0.6rem;
  color: #f8f4e9;
}

.hero-scroll {
  position: absolute;
  right: var(--gap);
  bottom: 2.2rem;
  z-index: 2;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f8f4e9;
  opacity: 0.75;
}

/* ---------- intro line (home) ---------- */

.intro {
  padding: 3.5rem var(--gap) 2rem;
  max-width: 760px;
}

.intro p {
  font-size: 1.05rem;
  color: var(--olive);
}

/* ---------- project grid (home) — filas con distinto nº de columnas, al estilo mir.no ---------- */

:root {
  --mosaic-gap: clamp(4px, 1vw, 16px);
}

.grid {
  display: flex;
  flex-direction: column;
  gap: var(--mosaic-gap);
  width: 100%;
  margin: 0;
}

.grid-row {
  display: grid;
  gap: var(--mosaic-gap);
}

.grid-row.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-row.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-row.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-item {
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.grid-item:hover img {
  transform: scale(1.045);
}

.grid-item-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.1rem 1.3rem;
  background: linear-gradient(180deg, rgba(28, 28, 26, 0) 0%, rgba(28, 28, 26, 0.68) 100%);
  color: #f4eee2;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.grid-item:hover .grid-item-label,
.grid-item:focus-within .grid-item-label {
  opacity: 1;
  transform: translateY(0);
}

.grid-item-label .eyebrow {
  color: #e7ddc4;
}

.grid-item-label h3 {
  font-size: 1.2rem;
  color: #fff;
  margin-top: 0.2rem;
}

@media (max-width: 900px) {
  .grid-row.cols-3,
  .grid-row.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-item-label {
    opacity: 1;
    transform: none;
    background: linear-gradient(180deg, rgba(28, 28, 26, 0) 30%, rgba(28, 28, 26, 0.72) 100%);
  }
}

@media (max-width: 560px) {
  .grid-row.cols-3,
  .grid-row.cols-4,
  .grid-row.cols-2 {
    grid-template-columns: 1fr;
  }
}

/* ---------- project page ---------- */

.project-head {
  padding: 1.5rem var(--gap) 3rem;
  max-width: 820px;
}

.project-head h1 {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  margin-top: 0.5rem;
}

.project-head p {
  margin-top: 1.1rem;
  color: var(--olive);
  max-width: 540px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap);
  padding: 0 var(--gap) 5rem;
  max-width: var(--max);
  margin: 0 auto;
}

.gallery figure {
  margin: 0;
  grid-column: span 3;
  cursor: zoom-in;
  overflow: hidden;
  background: var(--bg-alt);
}

.gallery figure.wide {
  grid-column: span 6;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery figure:hover img {
  transform: scale(1.03);
}

@media (max-width: 760px) {
  .gallery {
    grid-template-columns: 1fr;
  }
  .gallery figure,
  .gallery figure.wide {
    grid-column: 1;
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 6.5rem var(--gap) 0;
  font-size: 0.85rem;
  color: var(--olive);
}

.back-link:hover {
  color: var(--accent);
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(28, 28, 26, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
}

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

.lightbox img {
  max-width: 90vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: 0;
  color: #f4eee2;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.6rem;
  line-height: 1;
}

.lightbox-close {
  top: 1.2rem;
  right: 1.2rem;
}

.lightbox-prev {
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
}

/* ---------- footer / contact ---------- */

.site-footer {
  background: var(--olive-deep);
  color: #f4eee2;
  padding: 4.5rem var(--gap) 2.5rem;
}

.site-footer .eyebrow {
  color: #cfc9a6;
}

.site-footer h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  color: #f8f4e9;
  margin-top: 0.6rem;
  max-width: 560px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem;
  margin-top: 2.8rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-on-dark);
}

.footer-contact a {
  font-size: 1.1rem;
}

.footer-contact a:hover {
  color: var(--accent);
}

.footer-meta {
  font-size: 0.8rem;
  color: #cfc9a6;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: right;
}

@media (max-width: 600px) {
  .footer-meta {
    text-align: left;
  }
}
