/* =============================================================
   LAYOUT.CSS — Container · Sections · Grid · Page structure
   Responsabilidad: Estructura de página, contenedores y grids.
   NO contiene colores ni estilos visuales de componentes.
   ============================================================= */

/* ── 1. CONTENEDORES ────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: 1400px;
}

/* ── 2. SECCIONES BASE ──────────────────────────────────────── */
.section {
  padding-block: var(--space-24);
}

.section--sm  { padding-block: var(--space-12); }
.section--lg  { padding-block: var(--space-32); }
.section--alt { background-color: var(--color-surface); }
.section--dark { background-color: var(--color-surface-2); }

.section__header {
  text-align: center;
  margin-bottom: var(--space-16);
}

/* section__eyebrow removed — prohibited by BRANDING.md §7 (Nunca kickers) */

.section__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: var(--font-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-4);
  letter-spacing: var(--tracking-tight);
}

.section__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-inline: auto;
  line-height: var(--leading-loose);
}

/* ── 3. GRID SYSTEM ─────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

.grid--auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ── 4. FLEX UTILITIES ──────────────────────────────────────── */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.flex-center  { align-items: center; justify-content: center; }
.flex-between { align-items: center; justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
.gap-2  { gap: var(--space-2); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

/* ── 5. HERO ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: var(--z-base);
  background-color: var(--color-primary);
}

/* Alberto's photo — positioned right, faded into background */
.hero__photo {
  position: absolute;
  right: 0;
  bottom: 0;
  height: 100%;
  width: auto;
  max-width: 55%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.55;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.3) 20%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,1) 80%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.3) 20%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,1) 80%);
}

/* Grain texture overlay for cinematic feel */
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  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.03'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

/* Subtle gold radial light on the photo area */
.hero__bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse 60% 80% at 75% 50%, rgba(197, 165, 90, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: var(--z-raised);
  text-align: left;
  padding-left: max(var(--space-6), calc((100vw - var(--container-max)) / 2 + var(--space-6)));
  padding-right: var(--space-6);
  max-width: 600px;
}

.hero__name {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: var(--font-bold);
  color: var(--color-text);
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: var(--space-4);
}

.hero__role {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: var(--font-regular);
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
}

/* hero__cta-group removed — no CTAs per BRANDING.md §7 */

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-raised);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  opacity: 0.5;
  transition: opacity var(--duration-base) var(--ease-out);
}

.hero__scroll:hover { opacity: 1; }

.hero__scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50%      { opacity: 1;   transform: scaleY(1); }
}

/* ── 6. TWO-COLUMN SPLIT ────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }

.split--photo {
  grid-template-columns: 5fr 7fr;
}

/* Mirrored: text-first in HTML, photo on right (narrower) */
.split--photo-reverse {
  grid-template-columns: 7fr 5fr;
}

/* ── 7. STICKY NAV ─────────────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  height: 72px;
}

.nav-offset {
  padding-top: 72px;
}

/* ── 8. UTILITY SPACING ─────────────────────────────────────── */
.mt-auto { margin-top: auto; }
.mx-auto { margin-inline: auto; }
.mb-8    { margin-bottom: var(--space-8); }
.mb-12   { margin-bottom: var(--space-12); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
