/* ============================================
   SEBA OGALDE | FOTOGRAFÍA — Estilos base
   ============================================ */

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

:root {
  /* Tipografía */
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;

  /* Paleta — blanco protagonista, gris claro de acento, sin color de marca */
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-text-secondary: #555555;
  --color-accent-bg: #ebebeb;
  --color-border: #e0e0e0;

  /* Layout */
  --header-height: 84px;
  --max-width: 1800px;
  --gap-grid: 4px;

  /* Espaciados */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 96px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; font-weight: 500; }

p {
  font-family: var(--font-body);
}

/* ============================================
   HEADER — fijo, logo izq / nav centro / WhatsApp der
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--color-border);
}

.site-header__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  white-space: nowrap;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  position: relative;
}

.site-header__nav a {
  font-size: 0.95rem;
  font-weight: 400;
  position: relative;
  padding: 4px 0;
}

.site-header__nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.site-header__icon {
  width: 20px;
  height: 20px;
  opacity: 0.85;
}

.btn-whatsapp {
  border: 1px solid var(--color-text);
  padding: 10px 20px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-whatsapp:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* ============================================
   DROPDOWN — Proyectos
   ============================================ */

.nav-dropdown {
  position: relative;
}

.nav-dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
  display: block;
}

.nav-dropdown__menu a {
  display: block;
  padding: 8px var(--space-sm);
  font-size: 0.9rem;
}

.nav-dropdown__menu a:hover {
  background: var(--color-accent-bg);
}

/* ============================================
   GRID PORTAFOLIO — masonry tipo columnas
   ============================================ */

.portfolio-grid {
  margin-top: var(--header-height);
  column-count: 5;
  column-gap: var(--gap-grid);
  padding: 0;
}

.portfolio-grid__item {
  break-inside: avoid;
  margin-bottom: var(--gap-grid);
  overflow: hidden;
}

.portfolio-grid__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.portfolio-grid__item:hover img {
  transform: scale(1.02);
}

@media (max-width: 1400px) {
  .portfolio-grid { column-count: 4; }
}

@media (max-width: 1000px) {
  .portfolio-grid { column-count: 3; }
}

@media (max-width: 700px) {
  .portfolio-grid { column-count: 2; }
}

/* ============================================
   PÁGINA INTERNA — patrón alternado imagen + texto
   ============================================ */

.content-block {
  position: relative;
  margin-top: var(--header-height);
  min-height: 90vh;
}

.content-block__image {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.content-block__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-block__text {
  position: relative;
  z-index: 2;
  background: var(--color-accent-bg);
  max-width: 480px;
  padding: var(--space-lg);
  margin: var(--space-xl) 0 var(--space-xl) var(--space-lg);
}

.content-block--reverse .content-block__text {
  margin-left: auto;
  margin-right: var(--space-lg);
}

.content-block__text h2 {
  margin-bottom: var(--space-sm);
}

.content-block__text p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
  font-size: 0.95rem;
}

.content-block__text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .content-block {
    min-height: auto;
  }
  .content-block__image {
    position: relative;
    height: 60vh;
  }
  .content-block__text {
    max-width: none;
    margin: 0;
    padding: var(--space-md);
  }
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.03em;
  border-top: 1px solid var(--color-border);
}

.site-footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================
   UTILIDADES
   ============================================ */

.pending-text {
  color: #b45309;
  font-style: italic;
  font-size: 0.85em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
