/* ─── TOKENS ─────────────────────────────────────────── */
:root {
  --bg:        #d0d0d0;
  --bg-dark:   #7a7a7a;
  --surface:   rgba(0,0,0,.06);
  --bar:       #2e2e2e;
  --text:      #1a1a1a;
  --text-mid:  #3d3d3d;
  --text-soft: #5a5a5a;
  --ph-bg:     rgba(0,0,0,.13);
  --ph-border: rgba(0,0,0,.22);
  --ph-text:   rgba(0,0,0,.35);
  --white:     #ffffff;
  --nav-bg:    rgba(22,22,22,.96);
  --nav-text:  #e8e8e8;
  --line:      rgba(0,0,0,.25);
}

/* ─── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ─── SECCIONES ──────────────────────────────────────── */
.section {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, #b8b8b8 0%, #acacac 40%, #929292 100%);
  border-left: 5px solid var(--bar);
  padding: 0 60px 80px 70px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: var(--line);
}

/* ─── NAVBAR ─────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
}

#menu-toggle { display: none; }

.menu-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  background: var(--nav-bg);
  cursor: pointer;
  padding: 13px 12px;
  margin: 18px 24px;
  border-radius: 3px;
}
.menu-btn span {
  display: block;
  height: 1.5px;
  background: var(--nav-text);
  transition: transform .3s, opacity .3s;
}

#menu-toggle:checked ~ nav .menu-btn span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
#menu-toggle:checked ~ nav .menu-btn span:nth-child(2) {
  opacity: 0;
}
#menu-toggle:checked ~ nav .menu-btn span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.menu-panel {
  position: fixed;
  top: 0; right: 0;
  width: 260px;
  height: 100vh;
  background: var(--nav-bg);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 44px;
  gap: 8px;
  z-index: 998;
}

#menu-toggle:checked ~ .menu-panel {
  transform: translateX(0);
}

.menu-panel a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  font-weight: 300;
  color: var(--nav-text);
  text-decoration: none;
  letter-spacing: .04em;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: color .2s, padding-left .2s;
}
.menu-panel a:last-child { border-bottom: none; }
.menu-panel a:hover { color: #fff; padding-left: 8px; }


/* ─── PORTADA ────────────────────────────────────────── */
#portada {
  min-height: 100vh;
  justify-content: flex-end;
  padding-bottom: 150px;
}

.hero-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(5rem, 14vw, 13rem);
  line-height: .95;
  color: var(--text);
  letter-spacing: -.02em;
  margin-bottom: 28px;
}
.hero-name span { display: block; }

.hero-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 2rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* ─── SOBRE MÍ ───────────────────────────────────────── */
#sobre {
  flex-direction: row;
  align-items: center;
  gap: 60px;
  padding-top: 100px;
}

.yo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sobre-text { flex: 1; }
.sobre-photo {
  flex: 0 0 320px;
  aspect-ratio: 3/4;
  background: var(--ph-bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ph-text);
  font-size: .8rem;
  letter-spacing: .06em;
}


/* ─── TÍTULOS DE SECCIÓN ─────────────────────────────── */
.sec-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(4rem, 8vw, 6.5rem);
  color: var(--text);
  line-height: 1;
  letter-spacing: -.01em;
  margin-top: 80px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}

.sec-desc {
  font-size: 1.5rem;
  font-weight: 100;
  color: var(--text-mid);
  max-width: 1500px;
  line-height: 1.7;
  margin-bottom: 48px;
}

.sobre-bio {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.8;
  max-width: 1000px;
}
.sobre-bio strong {
  font-weight: 500;
  color: var(--text);
}

/* ─── GRILLAS DE FOTOS ───────────────────────────────── */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.grid-producto {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: auto auto;
  gap: 10px;
}

/* Placeholder */
.ph {
  background: var(--ph-bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ph-text);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: background .2s;
  cursor: pointer;
  aspect-ratio: 3/4;
  overflow: hidden;
}
.ph:hover { background: rgba(0,0,0,.18); }
.ph.land  { aspect-ratio: 4/3; }
.ph.sq    { aspect-ratio: 1/1; }
.ph.hero  { aspect-ratio: 16/9; }

.ph-retrato {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Grid Producto */
.ph-p1 { grid-column: 1; grid-row: 1 / 3; aspect-ratio: unset; }
.ph-p2 { grid-column: 2; grid-row: 1 / 3; aspect-ratio: unset; }
.ph-p3 { grid-column: 3; grid-row: 1;     aspect-ratio: 4/3; }
.ph-p4 { grid-column: 3; grid-row: 2;     aspect-ratio: 4/3; }
.ph-p5 { grid-column: 4; grid-row: 1 / 3; aspect-ratio: unset; }
.ph-p6 { grid-column: 5; grid-row: 1 / 3; aspect-ratio: unset; }

.ph-producto {
    width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── MOTORSPORT HERO ────────────────────────────────── */
#motorsport-hero {
  min-height: 100vh;
  padding: 0 0 0 5px;
  justify-content: flex-end;
  border-left: none;
}
#motorsport-hero .ph.hero-full {
  position: absolute;
  inset: 0;
  aspect-ratio: unset;
  border: none;
  border-radius: 0;
  z-index: 0;
}
#motorsport-hero .hero-overlay {
  position: relative;
  z-index: 1;
  padding: 0 60px 60px 70px;
  width: 100%;
}
#motorsport-hero .tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--white);
  letter-spacing: .08em;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
#motorsport-hero .vert-label {
  position: absolute;
  left: 16px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
  z-index: 1;
}
#motorsport-hero .vert-top { top: 32px; }
#motorsport-hero .vert-bot { bottom: 70px; }

.ph-motor {
    width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── EVENTOS HERO ───────────────────────────────────── */
#eventos-hero {
  min-height: 100vh;
  padding: 0 0 0 5px;
  justify-content: flex-end;
  border-left: 5px solid var(--bar);
}
#eventos-hero .ph.hero-full {
  position: absolute;
  inset: 0;
  aspect-ratio: unset;
  border: none;
  z-index: 0;
}
#eventos-hero .hero-overlay {
  position: relative;
  z-index: 1;
  padding: 0 60px 60px 70px;
  width: 100%;
}
#eventos-hero .tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--white);
  letter-spacing: .08em;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
#eventos-hero .vert-label {
  position: absolute;
  left: 16px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
  z-index: 1;
}
#eventos-hero .vert-top { top: 32px; }
#eventos-hero .vert-bot { bottom: 70px; }

.ph-evento {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── CONTACTO ───────────────────────────────────────── */
#contacto {
  min-height: 60vh;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 0;
}
#contacto::after { display: none; }

.contact-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 7rem);
  color: var(--text);
  letter-spacing: -.02em;
  margin-bottom: 48px;
}
.contact-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-items a,
.contact-items span {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-mid);
  letter-spacing: .08em;
  text-decoration: none;
  transition: color .2s;
}
.contact-items a:hover { color: var(--text); }

.footer-bar {
  position: absolute;
  bottom: 0; left: 5px; right: 0;
  display: flex;
  justify-content: space-between;
  padding: 14px 60px 14px 70px;
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-soft);
  border-top: 1px solid var(--line);
}

/* ─── SCROLL REVEAL ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
  .section { padding: 0 28px 60px 36px; }
  #sobre { flex-direction: column; padding-top: 80px; }
  .sobre-photo { flex: 0 0 auto; width: 100%; max-width: 340px; aspect-ratio: 3/4; align-self: center; }
  .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-producto { grid-template-columns: repeat(2, 1fr); }
  .ph-p1,.ph-p2,.ph-p3,.ph-p4,.ph-p5,.ph-p6 {
    grid-column: auto; grid-row: auto; aspect-ratio: 1/1;
  }
}
@media (max-width: 540px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-5, .grid-producto { grid-template-columns: 1fr 1fr; }
  .hero-name { font-size: clamp(4rem, 18vw, 6rem); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
