/* ============================================================
   estilo.css — Francisco Battistella
   Hoja de estilos universal para todo el sitio.
   Importada desde cada página HTML con:
   <link rel="stylesheet" href="estilo.css" />
   ============================================================ */

/* ── RESET & VARIABLES ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0e0d0b;
  --bg2:      #141310;
  --ink:      #e8e0d0;
  --ink-dim:  #9a9080;
  --gold:     #c9a84c;
  --gold-dim: #7a6230;
  --rule:     rgba(201,168,76,0.18);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── GRAIN OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.06'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.45;
}

/* ── HEADER ── */
header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 2.5rem 4rem;
  border-bottom: 1px solid var(--rule);
  animation: fadeDown 1s ease both;
}

.header-rule {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-dim));
}
.header-rule.right {
  background: linear-gradient(to left, transparent, var(--gold-dim));
}

.site-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  letter-spacing: 0.25em;
  text-align: center;
  color: var(--gold);
  text-transform: uppercase;
}

a.site-title:hover { color: var(--ink); transition: color 0.2s; }

/* ── HERO ── */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 80vh;
  max-width: 1300px;
  margin: 0 auto;
  padding: 6rem 4rem 4rem;
  gap: 5rem;
  align-items: center;
}

.hero-text { animation: fadeUp 1.1s 0.2s ease both; }

h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(3rem, 5.5vw, 6rem);
  font-weight: 400;
  line-height: 1.08;
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}

h1 span {
  display: block;
  color: var(--gold);
}

.hero-bio {
  font-size: 1.15rem;
  color: var(--ink-dim);
  font-style: italic;
  max-width: 480px;
  line-height: 1.9;
  border-left: 1px solid var(--gold-dim);
  padding-left: 1.5rem;
}

/* ── FOTO PRINCIPAL ── */
.hero-visual {
  animation: fadeUp 1.1s 0.4s ease both;
  flex-shrink: 0;
}

.photo-main {
  position: relative;
  width: 280px;
  aspect-ratio: 3/4;
  background: var(--bg2);
  border: 1px solid var(--rule);
  overflow: hidden;
}

.photo-main img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  /* Filtro de color para integrar la foto con la paleta del sitio.
     Ajustá los valores a tu gusto: más sepia = más cálido, más grayscale = más neutro */
  filter: grayscale(100%) sepia(30%) contrast(1.1) brightness(0.9);
}

/* Esquinas decorativas doradas sobre la foto principal */
.photo-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--gold-dim);
  border-style: solid;
  opacity: 0.6;
  z-index: 2;
}
.photo-corner.tl { top: 12px;    left: 12px;  border-width: 1px 0 0 1px; }
.photo-corner.tr { top: 12px;    right: 12px; border-width: 1px 1px 0 0; }
.photo-corner.bl { bottom: 12px; left: 12px;  border-width: 0 0 1px 1px; }
.photo-corner.br { bottom: 12px; right: 12px; border-width: 0 1px 1px 0; }

/* ── FOTOS DE SECCIÓN ── */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.section-thumb {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  background: var(--bg2);
  border: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}

.section-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  /* Mismo filtro que la foto principal para coherencia visual */
  /* filter: grayscale(100%) sepia(30%) contrast(1.1) brightness(0.9); */
}

/* ── DIVISOR ── */
.divider {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 4rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.divider-ornament {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--gold-dim);
  text-transform: uppercase;
}

/* ── SECCIONES ── */
.sections {
  max-width: 1300px;
  margin: 0 auto;
  padding: 5rem 4rem 8rem;
  animation: fadeUp 1.1s 0.6s ease both;
}

.sections-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 3rem;
}

.section-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  border: 1px solid var(--rule);
}

.section-item {
  display: block;
  text-decoration: none;
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease;
  cursor: pointer;
}

.section-item:last-child { border-right: none; }

.section-item::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.section-item:hover { background: rgba(201,168,76,0.04); }
.section-item:hover::before { transform: scaleX(1); }

.section-number {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--gold-dim);
  margin-bottom: 1rem;
}

.section-name {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.05em;
}

.section-desc {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-dim);
  line-height: 1.6;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-dim);
  font-size: 0.8rem;
  font-style: italic;
}

/* ── ANIMACIONES ── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  header { padding: 2rem; }
  .hero {
    grid-template-columns: 1fr;
    padding: 4rem 2rem 2rem;
    min-height: auto;
    gap: 3rem;
  }
  .hero-visual { order: -1; }
  .photo-main { width: 60%; margin: 0 auto; aspect-ratio: 3/4; max-height: none; }
  .sections { padding: 3rem 2rem 5rem; }
  .section-list { grid-template-columns: 1fr; }
  .section-item { border-right: none; border-bottom: 1px solid var(--rule); }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; padding: 1.5rem 2rem; }
}
