/* clasesdefoto.com — Sergio Lubezky
   Sin frameworks, sin JavaScript, sin fuentes externas. */

:root {
  --bg: #ffffff;
  --ink: #222222;
  --muted: #5b5f66;
  --line: #e4e4e4;
  --accent: #1f3fd0;
  --accent-dark: #162fa8;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1080px;
  --fs-body: 1.0625rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  padding-bottom: 88px; /* espacio para el botón flotante en celular */
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
}

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

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
}
.skip:focus { left: 8px; z-index: 10; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* Encabezado (sobre la portada) */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 16px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.2rem;
  text-decoration: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}
.brand img { width: 44px; height: 44px; }
.brand:hover { color: #fff; }
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.95rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}
.nav a { color: rgba(255, 255, 255, 0.9); text-decoration: none; }
.nav a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.nav .nav-wa { color: #fff; font-weight: 600; }
.nav-extra { display: none; }

/* Botones */
.btn {
  display: inline-block;
  padding: 0.85em 1.5em;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 6px;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn-line {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.btn-line:hover { background: var(--accent); color: #fff; }

/* Portada a pantalla completa: el texto va en el cielo, sobre las nubes */
.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: 520px;
  min-height: min(100vh, 1200px);
  min-height: min(100svh, 1200px);
  overflow: hidden;
  color: #fff;
  background: #2b2140;
}
.hero picture {
  position: absolute;
  inset: 0;
}
.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.3) 0, rgba(0, 0, 0, 0) 70%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.4) 38%, rgba(0, 0, 0, 0.12) 62%, rgba(0, 0, 0, 0) 78%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding-top: clamp(96px, 18vh, 210px);
  padding-bottom: 56px;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}
.hero h1 {
  max-width: 13em;
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 7vw, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.hero .lead {
  max-width: 38em;
  margin: 0 0 28px;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.95);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
.hero .btn { background: #fff; color: var(--accent); text-shadow: none; }
.hero .btn:hover { background: #e9edff; color: var(--accent-dark); }
.hero .hero-link { color: #fff; text-underline-offset: 4px; }
.hero .hero-link:hover { color: #fff; }

/* Secciones */
.section {
  padding: 64px 0;
}
.section h2 {
  max-width: 18em;
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  line-height: 1.15;
}
.section p {
  max-width: 38em;
  margin: 0 0 16px;
  font-size: var(--fs-body);
}
.section-border { border-top: 1px solid var(--line); }

.stack > div + div { margin-top: 48px; }

/* Sesiones */
.section .sessions-intro { margin-bottom: 24px; }
.session {
  display: grid;
  gap: 20px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}
.session-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.95rem;
}
.session h3 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.2;
}
.session p { max-width: 30em; margin: 0; }
.session-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.pos-top { object-position: 50% 30%; }
.pos-mid { object-position: 50% 55%; }
.pos-low { object-position: 50% 45%; }
.section .format {
  max-width: none;
  margin: 8px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 1.1rem;
}

/* Sobre mí */
.about {
  display: grid;
  gap: 28px;
}
.about-photo {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 15%;
}

/* Galería */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 28px;
}
.gallery a { display: block; }
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.section .gallery-link { max-width: none; margin: 24px 0 0; }

/* Más allá de las clases */
.section .more-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  max-width: none;
  margin: 24px 0 0;
}

/* Preguntas */
.faq { max-width: 44em; }
.faq details {
  border-top: 1px solid var(--line);
}
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--muted);
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 20px; color: var(--muted); }

/* Contacto */
.contact { padding-bottom: 80px; }
.contact p { margin-bottom: 28px; }

/* Pie */
.site-footer {
  padding: 32px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.social { display: flex; gap: 4px; }
.social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -6px 0;
}
.site-footer .copy {
  flex-basis: 100%;
  max-width: none;
  margin: 8px 0 0;
  font-size: 0.875rem;
}

/* Botón flotante de WhatsApp (solo celular) */
.wa-float {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  text-align: center;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.22);
}

/* Celular: sin botón duplicado en la portada */
@media (max-width: 759px) {
  .hero .btn { display: none; }
  .hero-copy { padding-top: 88px; }
}

/* Tablet y escritorio */
@media (min-width: 760px) {
  :root { --fs-body: 1.125rem; }
  body { padding-bottom: 0; }
  .wa-float { display: none; }

  .site-header { padding: 24px 0; }
  .section { padding: 88px 0; }

  .session {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
  }

  .about {
    grid-template-columns: 380px 1fr;
    gap: 64px;
    align-items: start;
  }

  .gallery { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

/* Menú completo solo cuando hay espacio para el nombre largo */
@media (min-width: 980px) {
  .nav-extra { display: inline; }
}

/* Celular o tableta en horizontal (poca altura) */
@media (max-height: 520px) and (orientation: landscape) {
  .site-header { padding: 10px 0; }
  .brand img { width: 36px; height: 36px; }
  .brand { font-size: 1.05rem; }
  .hero-copy { padding-top: 64px; padding-bottom: 28px; }
  .hero h1 { max-width: 22em; margin-bottom: 10px; font-size: clamp(1.5rem, 7vh, 2.25rem); }
  .hero .lead { max-width: 42em; margin-bottom: 14px; font-size: 0.95rem; line-height: 1.45; }
}
