/* Alejandra Álvarez · sitio personal
   Paleta y tipografía en variables para ajustar todo desde aquí. */

:root {
  --blush: #f3d5cf;
  --blush-soft: #f8e5e0;
  --cream: #fcf8f4;
  --white: #ffffff;
  --ink: #2b1e3f;
  --ink-soft: #5b4f6b;
  --line: rgba(43, 30, 63, 0.14);
  --accent: #b5583f;

  --display: "Sora", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 5vw, 56px);
  --max: 1160px;
  --header-h: 76px;

  color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; }

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

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
}
.skip:focus { top: 12px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Encabezado ---------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.header.is-scrolled {
  background: rgba(252, 248, 244, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}

.header__inner {
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.nav {
  display: flex;
  gap: clamp(18px, 2vw, 28px);
}
.nav a,
.lang button {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.nav a { padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover { border-bottom-color: currentColor; }

.brand {
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand__short { display: none; letter-spacing: 0.08em; font-size: 1.125rem; font-weight: 600; }

.header__tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
}
.lang { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.lang button {
  appearance: none;
  background: none;
  border: 0;
  padding: 6px 2px;
  color: var(--ink-soft);
  font-family: inherit;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { color: var(--ink); border-bottom: 1px solid var(--ink); }

.burger {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease, top 0.2s ease;
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 24px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 19.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 19.5px; transform: rotate(-45deg); }

/* ---------- Portada ---------- */

.hero {
  position: relative;
  background: var(--blush);
  min-height: clamp(620px, 100svh, 840px);
  overflow: hidden;
  isolation: isolate;
}

/* Franja diagonal que une la portada con la sección siguiente */
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: clamp(54px, 9vw, 120px);
  background: var(--cream);
  clip-path: polygon(0 0, 100% 62%, 100% 100%, 0 100%);
  z-index: 1;
}

.hero__inner {
  position: relative;
  max-width: var(--max);
  min-height: inherit;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
}

.hero__copy {
  position: relative;
  z-index: 3;
  padding: calc(var(--header-h) + 36px) 0 150px;
  max-width: 640px;
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(2rem, 3.9vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }

.hero__lead {
  margin-top: 26px;
  max-width: 34em;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}

.hero__actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
}

.btn {
  display: inline-block;
  background: var(--white);
  color: var(--ink);
  padding: 15px 30px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(43, 30, 63, 0.08), 0 8px 24px rgba(43, 30, 63, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(43, 30, 63, 0.1), 0 14px 30px rgba(43, 30, 63, 0.12);
}

.link {
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.link:hover { text-decoration-thickness: 2px; }

/* Retrato: recorte con fondo transparente anclado al borde inferior */
.portrait {
  position: relative;
  z-index: 2;
  align-self: end;
  justify-self: end;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 100%;
  margin-right: calc(var(--gutter) * -0.5);
}
.portrait picture { display: contents; }
.portrait img {
  flex: none;
  width: min(118%, 660px);
  max-width: none;
  height: auto;
}

/* Si todavía no hay foto en assets/foto-alejandra.png, se muestra una silueta */
.portrait.is-empty { height: min(86%, 660px); min-height: 420px; justify-content: center; }
.portrait.is-empty img { display: none; }
.portrait.is-empty::before {
  content: "";
  width: min(100%, 420px);
  height: 92%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 520'%3E%3Cg fill='%232b1e3f' opacity='.13'%3E%3Cellipse cx='200' cy='150' rx='74' ry='88'/%3E%3Cpath d='M170 220h60v60q0 18 30 30l60 22q60 24 60 100v88H20v-88q0-76 60-100l60-22q30-12 30-30z'/%3E%3C/g%3E%3C/svg%3E") center bottom / contain no-repeat;
}

.scroll {
  position: absolute;
  left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  bottom: clamp(22px, 4vw, 40px);
  z-index: 3;
  width: 28px;
  height: 56px;
  display: grid;
  place-items: center;
}
.scroll span {
  position: relative;
  display: block;
  width: 1px;
  height: 44px;
  background: var(--ink);
  animation: nudge 2.4s ease-in-out infinite;
}
.scroll span::after {
  content: "";
  position: absolute;
  left: -4px;
  bottom: 0;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  transform: rotate(45deg) translate(-1px, -1px);
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- Secciones ---------- */

.section { padding: clamp(72px, 11vw, 136px) 0; }
.section--blush { background: var(--blush-soft); }

.section__head { margin-bottom: clamp(36px, 6vw, 64px); }
.section__head h2,
.contact h2 {
  margin-top: 14px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: clamp(26px, 3.4vw, 40px);
}
.card__n {
  display: block;
  font-family: var(--display);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent);
}
.card h3 {
  margin-top: 18px;
  font-size: clamp(1.2rem, 1.8vw, 1.4rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.card p:last-child { margin-top: 12px; color: var(--ink-soft); }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 5vw, 72px);
  border-top: 1px solid var(--line);
  padding-top: clamp(28px, 4vw, 44px);
}
.stat__n {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.3rem, 4.4vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}
.stat p:last-child { color: var(--ink-soft); }

.note {
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

/* Enlace a la página de ejemplos (dentro de Resultados) */
.examples-cta {
  margin-top: clamp(40px, 6vw, 72px);
  padding: clamp(24px, 4vw, 40px);
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}
.examples-cta__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  letter-spacing: -0.025em;
  line-height: 1.25;
}
.examples-cta__text { margin-top: 6px; color: var(--ink-soft); max-width: 36em; }
.examples-cta .btn { background: var(--ink); color: var(--white); box-shadow: none; }
.examples-cta .btn:hover { box-shadow: 0 10px 24px rgba(43, 30, 63, 0.2); }

/* Tarjetas de ejemplos (página ejemplos.html) */
.examples__group {
  margin: clamp(28px, 4vw, 44px) 0 16px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.example-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
.example {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
}
.example__media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: #ebe3f2;
  overflow: hidden;
}
.example__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Portada tipográfica mientras no exista la imagen en assets/ejemplos/ */
.example__fmt {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  letter-spacing: -0.03em;
  color: var(--ink);
  opacity: 0.55;
}
.example__media.has-image .example__fmt { display: none; }
.example__media.is-empty img { display: none; }
.example__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  padding: 22px 24px 26px;
}
.example__tag {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.example h3,
.example h4 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0;
}
.example__body p:not(.example__tag) { font-size: 0.9375rem; line-height: 1.6; color: var(--ink-soft); }
.example .link { margin-top: auto; padding-top: 6px; }

.about { display: grid; grid-template-columns: 0.8fr 1.4fr; gap: clamp(28px, 6vw, 88px); align-items: start; }
.about .section__head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 32px); }
.about__text {
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.6;
}
.about__text + .about__text { margin-top: 16px; color: var(--ink-soft); }

.facts {
  margin: clamp(32px, 4vw, 48px) 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px clamp(24px, 4vw, 48px);
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.facts dt {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.facts dd { margin: 0; font-size: 1rem; }
.facts__wide { grid-column: 1 / -1; }

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips li {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 6px 12px;
  font-size: 0.875rem;
  line-height: 1.3;
}

.contact { text-align: center; }
.contact__inner { max-width: 760px; }
.contact__links {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px clamp(28px, 6vw, 64px);
}
.contact__links a {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.25rem, 3.6vw, 2.1rem);
  letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}
.contact__links a:hover { border-bottom-width: 2px; }

.footer { background: var(--cream); border-top: 1px solid var(--line); padding: 26px 0; font-size: 0.875rem; color: var(--ink-soft); }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }

/* Botón flotante, como el globo de chat de la referencia */
.float {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 40;
  background: var(--white);
  color: var(--ink);
  padding: 12px 22px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(43, 30, 63, 0.1), 0 10px 28px rgba(43, 30, 63, 0.14);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.float.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- Página de ejemplos ---------- */

.nav a[aria-current="page"] { border-bottom-color: currentColor; }

.page-head {
  background: var(--blush);
  padding: calc(var(--header-h) + clamp(44px, 7vw, 88px)) 0 clamp(44px, 6vw, 80px);
}
.page-head h1 {
  margin-top: 16px;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.page-head__lead { margin-top: 20px; max-width: 38em; color: var(--ink-soft); }
.page-head__links { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px 32px; }

.work { padding: clamp(56px, 8vw, 104px) 0; }
.work--blush { background: var(--blush-soft); }
.work:not(.work--blush) + .work:not(.work--blush) { border-top: 1px solid var(--line); }
.work__grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
.work h2 {
  margin-top: 12px;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.employer + .employer {
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
}
.employer__name {
  margin-top: 12px;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.work__label {
  margin-bottom: 14px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.work__org {
  margin-top: 8px;
  color: var(--accent);
  font-family: var(--display);
  font-weight: 500;
  font-size: 1rem;
}
.work__list {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 12px;
  color: var(--ink-soft);
}
.work__list li::marker { color: var(--accent); }

.video {
  margin: clamp(32px, 5vw, 56px) 0 0;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: clamp(20px, 3.5vw, 48px);
  align-items: center;
}
.video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--ink);
}
.video figcaption p:not(.work__label) { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.6; }

.gallery { display: grid; gap: clamp(12px, 1.8vw, 20px); margin-top: clamp(32px, 5vw, 56px); }
.gallery img { width: 100%; height: auto; background: var(--white); }
.gallery--courses { grid-template-columns: repeat(6, 1fr); }
.gallery--courses .c-sq { grid-column: span 2; }
.gallery--courses .c-wide { grid-column: span 3; }
.gallery--two { grid-template-columns: repeat(2, 1fr); }
.gallery--photos { grid-template-columns: repeat(2, 1fr); }
.gallery--photos img { aspect-ratio: 16 / 10; object-fit: cover; }

.work .section__head { margin-bottom: clamp(28px, 4vw, 44px); }

/* ---------- Tablet y móvil ---------- */

@media (max-width: 1080px) {
  .header__inner { grid-template-columns: auto 1fr; }
  .brand__full { display: none; }
  .brand__short { display: inline; }
  .header__tools { gap: 6px; }
  .burger { display: block; }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--cream);
    box-shadow: 0 12px 24px rgba(43, 30, 63, 0.1);
    padding: 8px var(--gutter) 16px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 0.75rem; }

  /* el menú abierto necesita fondo en el encabezado */
  .header.menu-open { background: var(--cream); }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }

  .hero { min-height: 0; }
  .hero__inner { grid-template-columns: 1fr; align-items: start; }
  .hero__copy { padding: calc(var(--header-h) + 40px) 0 28px; max-width: none; }
  .portrait {
    justify-self: center;
    justify-content: center;
    width: min(100%, 460px);
    margin-right: 0;
  }
  .portrait img { width: 100%; }
  .hero::after { height: 56px; }
  .scroll { display: none; }

  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about .section__head { position: static; margin-bottom: 28px; }
}

@media (max-width: 1000px) {
  .example-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .work__grid { grid-template-columns: 1fr; }
  .video { grid-template-columns: 1fr; }
  .gallery--courses .c-sq,
  .gallery--courses .c-wide { grid-column: span 6; }
  .gallery--two,
  .gallery--photos { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .example-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  body { font-size: 1rem; }
  .facts { grid-template-columns: 1fr; }
  .hero__actions { gap: 16px 22px; }
  .btn { padding: 14px 26px; }
}
