:root {
  color-scheme: light;
  --diserta-red: #b70e12;
  --diserta-red-dark: #95090d;
  --diserta-paper: #fffdf9;
  --diserta-cream: #fbf8f3;
  --diserta-ink: #292624;
  --diserta-muted: #635b55;
  --diserta-line: #e7ded3;
  --ease-spring: cubic-bezier(0.2, 1.35, 0.5, 1);
}

@supports (transition-timing-function: linear(0, 1, 0)) {
  :root {
    --ease-spring: linear(
      0,
      0.052 4%,
      0.19 8%,
      0.39 12%,
      0.62 16%,
      0.83 20%,
      0.99 24%,
      1.1 28%,
      1.14 32%,
      1.11 36%,
      1.06 40%,
      1.02 44%,
      0.99 48%,
      0.985 52%,
      0.994 56%,
      1 60%,
      1 100%
    );
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  min-width: 320px;
  margin: 0;
}

.scroll-progress {
  position: fixed;
  z-index: 60;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--diserta-red);
  pointer-events: none;
}

::selection {
  color: #fffdf9;
  background: var(--diserta-red);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--diserta-cream);
}

::-webkit-scrollbar-thumb {
  border: 2px solid var(--diserta-cream);
  border-radius: 999px;
  background: #bc8c80;
}

a {
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--diserta-red);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  z-index: 60;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--diserta-ink);
  padding: 0.75rem 1rem;
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-menu {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.6vw, 1.65rem);
}

.site-menu a {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--diserta-ink);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 180ms ease;
}

.site-menu a:hover {
  color: var(--diserta-red);
}

.site-menu a::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--diserta-red);
  content: "";
  transition: transform 220ms ease;
}

.site-menu a:hover::after,
.site-menu a.current::after {
  transform: scaleX(1);
}

.site-menu a.current {
  color: var(--diserta-red);
  font-weight: 700;
}

.reference-hero {
  overflow: hidden;
  background: var(--diserta-cream);
}

.hero-layout {
  min-height: 442px;
}

.balance {
  text-wrap: balance;
}

.hero-copy h1 span {
  color: var(--diserta-red);
}

.hero-art {
  isolation: isolate;
  overflow: hidden;
}

.hero-art > .hero-portrait {
  z-index: 1;
  top: auto;
  right: auto;
  bottom: -5%;
  left: -8%;
  width: 116%;
  height: 116%;
  object-fit: contain;
  object-position: center bottom;
}

.hero-art > .hero-blob {
  z-index: -1;
  overflow: visible;
  transform-origin: 55% 55%;
}

.portrait-skeleton {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    opacity 260ms ease,
    visibility 260ms ease;
}

.skeleton-block {
  position: absolute;
  overflow: hidden;
  border-radius: 0.85rem;
  background: rgba(255, 253, 249, 0.94);
}

.skeleton-block::after {
  position: absolute;
  inset: 0;
  transform: translateX(-110%);
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.9) 48%, transparent 76%);
  animation: skeleton-shimmer 1.35s ease-in-out infinite;
  content: "";
}

.skeleton-face {
  top: 21%;
  left: 54%;
  width: clamp(4.5rem, 11vw, 7.25rem);
  aspect-ratio: 0.82;
  border-radius: 46% 46% 38% 38%;
}

.skeleton-body {
  right: 15%;
  bottom: -2%;
  width: 49%;
  height: 39%;
  border-radius: 42% 42% 0 0;
}

.skeleton-mic {
  top: 49%;
  left: 21%;
  width: clamp(2.5rem, 6vw, 4rem);
  height: clamp(1.35rem, 3vw, 1.8rem);
  border-radius: 999px;
}

.skeleton-caption {
  top: 38%;
  right: 4%;
  width: 16%;
  height: 12%;
  border-radius: 0.35rem;
}

.portrait-error {
  position: absolute;
  z-index: 3;
  right: 1rem;
  bottom: 1rem;
  display: none;
  border-radius: 999px;
  background: var(--diserta-paper);
  padding: 0.55rem 0.8rem;
  color: var(--diserta-red-dark);
  font-size: 0.75rem;
  font-weight: 600;
}

.hero-art[data-image-state="loaded"] .portrait-skeleton,
.hero-art[data-image-state="error"] .portrait-skeleton {
  visibility: hidden;
  opacity: 0;
}

.hero-art[data-image-state="error"] .portrait-error {
  display: block;
}

.hero-art[data-image-state="loading"] .speaker-caption {
  visibility: hidden;
}

.speaker-caption {
  text-shadow: 0 1px 12px rgba(87, 0, 0, 0.3);
  transition: opacity 180ms ease;
}

@keyframes skeleton-shimmer {
  to {
    transform: translateX(110%);
  }
}

@keyframes hero-copy-arrive {
  from {
    transform: translateY(1rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes hero-shape-arrive {
  from {
    transform: scale(0.94) rotate(-1deg);
    opacity: 0.4;
  }
  to {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

@keyframes hero-portrait-arrive {
  from {
    transform: translateY(1.25rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes caption-arrive {
  from {
    transform: translateX(0.65rem);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes scroll-content-reveal {
  from {
    transform: translateY(1.5rem) scale(0.96);
    opacity: 0.88;
  }
  35%,
  65% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateY(-1rem) scale(0.98);
    opacity: 0.92;
  }
}

@keyframes scroll-section-zoom {
  from {
    transform: scale(0.96);
  }
  50% {
    transform: scale(1);
  }
  to {
    transform: scale(0.98);
  }
}

@keyframes hero-copy-scroll {
  to {
    transform: translateY(-1rem);
    opacity: 0.9;
  }
}

@keyframes hero-art-scroll {
  to {
    transform: translateY(-2rem) scale(0.97);
  }
}

@keyframes scroll-progress {
  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy h1 {
    animation: hero-copy-arrive 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-copy > p {
    animation: hero-copy-arrive 620ms 90ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-copy > a {
    animation: hero-copy-arrive 620ms 170ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-blob {
    animation: hero-shape-arrive 800ms 100ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-art > .hero-portrait {
    animation: hero-portrait-arrive 720ms 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .speaker-caption {
    animation: caption-arrive 460ms 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .motion-reveal {
    transform: translateY(1rem);
    opacity: 0;
    transition:
      transform 560ms cubic-bezier(0.16, 1, 0.3, 1),
      opacity 460ms ease;
    transition-delay: var(--reveal-delay, 0ms);
  }

  .motion-reveal.is-visible {
    transform: translateY(0);
    opacity: 1;
  }

  .motion-reveal:focus-within {
    transform: translateY(0);
    opacity: 1;
  }

  @supports (animation-timeline: view()) {
    main > section,
    .site-footer {
      animation: scroll-section-zoom linear both;
      animation-timeline: view(block);
      animation-range: entry 0% exit 100%;
    }

    .motion-reveal {
      animation: scroll-content-reveal linear both;
      animation-timeline: view(block);
      animation-range: entry 0% exit 100%;
      transition: none;
    }

    .motion-reveal:focus-within {
      animation: none;
      transform: none;
      opacity: 1;
    }

    .hero-copy,
    .hero-art {
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: view(block);
      animation-range: exit 0% exit 100%;
    }

    .hero-copy {
      animation-name: hero-copy-scroll;
    }

    .hero-art {
      animation-name: hero-art-scroll;
    }
  }

  @supports (animation-timeline: scroll()) {
    .scroll-progress {
      animation: scroll-progress linear both;
      animation-timeline: scroll(root block);
    }
  }
}

.proof-bar {
  border-top: 1px solid #e2d6c8;
  border-bottom: 1px solid #e2d6c8;
  background: var(--diserta-paper);
}

.problem-section {
  background: #f3ede4;
}

.problem-title {
  position: relative;
  padding-top: 0.75rem;
}

.problem-title::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 1.5rem;
  height: 2px;
  background: var(--diserta-red);
  content: "";
}

.problem-title > span {
  display: block;
}

.problem-title-accent {
  color: var(--diserta-red-dark);
}

.problem-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.problem-list li {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  border-top: 1px solid var(--diserta-line);
  padding: 0.9rem 0;
  color: var(--diserta-ink);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.problem-list li:last-child {
  border-bottom: 1px solid var(--diserta-line);
}

.problem-list li::before {
  width: 0.45rem;
  height: 0.45rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--diserta-red);
  content: "";
}

.problem-cta {
  text-decoration: none;
}

.problem-cta > svg {
  transition: transform 220ms var(--ease-spring);
}

.problem-cta:hover > svg {
  transform: translateX(3px);
}

.proof-item {
  position: relative;
  display: flex;
  min-height: 142px;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem clamp(0.9rem, 2vw, 1.75rem);
}

.proof-item::before {
  width: 2rem;
  height: 2px;
  margin-bottom: 0.9rem;
  background: var(--diserta-red);
  content: "";
}

.proof-item strong {
  color: var(--diserta-red-dark);
  font-family: "Outfit", sans-serif;
  font-size: clamp(1.35rem, 1.9vw, 1.8rem);
  font-weight: 600;
  line-height: 1.08;
  text-wrap: balance;
}

.proof-item span {
  max-width: 28ch;
  margin-top: 0.55rem;
  color: var(--diserta-muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
}

.value-pill {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  border: 1px solid #e5d7ca;
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  color: #514842;
  font-size: 0.8125rem;
  font-weight: 600;
}

.program-section {
  background: #f3ede4;
}

.program-feature {
  isolation: isolate;
}

.program-feature-art {
  z-index: 0;
}

.program-feature,
.program-side {
  transition:
    transform 420ms var(--ease-spring),
    border-color 220ms ease,
    box-shadow 300ms ease;
}

.program-link {
  text-decoration: none;
  text-underline-offset: 0.3em;
}

.program-link svg {
  transition: transform 260ms var(--ease-spring);
}

.spring-button {
  transform: translateZ(0);
  transform-origin: center;
  transition:
    transform 360ms var(--ease-spring),
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 240ms ease;
  touch-action: manipulation;
}

.spring-button:hover {
  transform: translateY(-2px) scale(1.015);
}

.button-primary:hover,
.header-cta:hover,
#pilares .program-feature .spring-button:hover,
#contacto .spring-button:hover {
  box-shadow: 0 8px 18px rgba(57, 39, 31, 0.13);
}

.spring-button:active {
  transform: scale(0.97);
  transition-duration: 140ms, 180ms, 180ms, 180ms, 180ms;
}

.button-primary:active,
.header-cta:active,
#pilares .program-feature .spring-button:active,
#contacto .spring-button:active {
  box-shadow: 0 2px 7px rgba(57, 39, 31, 0.1);
}

.program-feature:hover,
.program-feature:focus-within,
.program-side:hover,
.program-side:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(57, 39, 31, 0.12);
}

.program-side:hover,
.program-side:focus-within {
  border-color: #d6b8aa;
}

.program-link:hover {
  color: var(--diserta-red-dark);
}

.program-link:hover svg {
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress {
    display: none;
  }

  .motion-reveal {
    transform: none;
    opacity: 1;
  }

  .skeleton-block::after {
    animation: none;
  }
}

.skills-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.skills-list li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 0.85rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
}

.competency-list {
  margin: 0;
  padding-left: 1.4rem;
  color: var(--diserta-muted);
  list-style: decimal;
}

.competency-list li {
  padding-left: 0.35rem;
  border-bottom: 1px solid var(--diserta-line);
  padding-bottom: 0.9rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.competency-list li::marker {
  color: var(--diserta-red);
  font-family: "Outfit", sans-serif;
  font-weight: 700;
}

.profile-art {
  isolation: isolate;
  overflow: hidden;
}

.faq-section {
  background: var(--diserta-paper);
}

.faq-list {
  border-top: 1px solid var(--diserta-line);
}

.faq-item {
  border-bottom: 1px solid var(--diserta-line);
}

.faq-item summary {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-block: 1rem;
  color: var(--diserta-ink);
  cursor: pointer;
  font-family: "Outfit", sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 600;
  line-height: 1.4;
  list-style: none;
  text-wrap: balance;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:focus-visible {
  border-radius: 0.25rem;
  outline: 2px solid var(--diserta-red);
  outline-offset: 3px;
}

.faq-item summary > svg {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  color: var(--diserta-red);
  transition: transform 260ms var(--ease-spring);
}

.faq-item[open] summary > svg {
  transform: rotate(45deg);
}

.faq-item > p {
  max-width: 65ch;
  margin: -0.15rem 2.5rem 1.35rem 0;
  color: var(--diserta-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.faq-contact {
  text-decoration: none;
}

.faq-contact > svg {
  transition: transform 220ms var(--ease-spring);
}

.faq-contact:hover > svg {
  transform: translateX(3px);
}

.profile-name {
  color: var(--diserta-red-dark);
}

.profile-blob {
  z-index: -1;
}

.profile-portrait {
  z-index: 1;
  object-fit: contain;
  object-position: center bottom;
}

@media (max-width: 767px) {
  .profile-art {
    max-width: 440px;
  }

  .profile-copy {
    padding-inline: 0.25rem;
  }
}

.contact-details a {
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 0.25em;
}

.contact-details a:hover {
  color: white;
  text-decoration-color: white;
}

.site-footer {
  border-top: 3px solid var(--diserta-red);
  background: var(--diserta-paper);
}

.site-footer-main {
  display: flex;
  min-height: 148px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2rem;
}

.site-footer-brand > p {
  margin-top: 0.7rem;
  color: var(--diserta-ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.site-footer-brand > span {
  display: block;
  margin-top: 0.25rem;
  color: var(--diserta-muted);
  font-size: 0.8125rem;
}

.footer-instagram {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--diserta-line);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  color: var(--diserta-ink);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background-color 180ms ease,
    transform 300ms var(--ease-spring);
}

.footer-instagram > svg:first-child {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--diserta-red);
}

.footer-instagram-arrow {
  width: 1rem;
  height: 1rem;
  color: var(--diserta-muted);
  transition: transform 220ms var(--ease-spring);
}

.footer-instagram:hover {
  transform: translateY(-2px);
  border-color: var(--diserta-red);
  background: #fff8f4;
  color: var(--diserta-red-dark);
}

.footer-instagram:hover .footer-instagram-arrow {
  transform: translate(2px, -2px);
}

.site-footer-bottom {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--diserta-line);
  color: var(--diserta-muted);
  font-size: 0.75rem;
}

.site-footer-bottom a {
  color: var(--diserta-ink);
  font-weight: 600;
  text-decoration: none;
}

.site-footer-bottom a:hover {
  color: var(--diserta-red);
}

@media (min-width: 1280px) {
  .proof-item + .proof-item {
    border-left: 1px solid #d8cbbd;
    padding-left: clamp(1.5rem, 2.2vw, 2.25rem);
  }

  .proof-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1279px) {
  .proof-item:nth-child(even) {
    border-left: 1px solid #d8cbbd;
  }

  .proof-item:nth-child(n + 3) {
    border-top: 1px solid #d8cbbd;
  }

  .site-header-inner {
    min-height: 76px;
  }

  .site-menu {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--diserta-line);
    background: var(--diserta-paper);
    padding: 0.5rem 1.25rem 1rem;
    box-shadow: 0 18px 28px rgba(57, 39, 31, 0.08);
  }

  .menu-toggle {
    display: inline-flex !important;
  }

  .site-menu.is-open {
    display: flex;
    flex-direction: column;
  }

  .site-menu a {
    min-height: 48px;
    align-content: center;
    border-bottom: 1px solid #eee7de;
    font-size: 0.9375rem;
  }

  .site-menu a:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 639px) {
  .hero-layout {
    min-height: 0;
  }

  .hero-copy h1 {
    font-size: clamp(2.45rem, 11vw, 3.35rem);
  }

  .hero-art {
    height: min(92vw, 360px);
    min-height: 300px;
  }

  .hero-portrait {
    left: -5%;
    width: 110%;
    height: 110%;
  }

  .speaker-caption {
    top: 30%;
    right: 2%;
    max-width: 92px;
  }

  .speaker-caption p {
    font-size: 0.65rem;
  }

  .proof-item {
    min-height: 126px;
    padding: 1rem 0.75rem;
  }

  .proof-item:nth-child(even) {
    padding-left: 1rem;
  }

  .proof-item:nth-child(n + 3) {
    padding-top: 1.1rem;
  }

  .proof-item::before {
    width: 1.5rem;
    margin-bottom: 0.7rem;
  }

  .proof-item strong {
    font-size: 1.2rem;
  }

  .proof-item span {
    margin-top: 0.45rem;
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .program-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer-main {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 1.4rem;
    padding-block: 1.75rem;
  }

  .site-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    padding-block: 0.85rem;
  }
}

@media (min-width: 640px) and (max-width: 1279px) {
  .proof-item {
    min-height: 128px;
    padding-inline: 1.5rem;
  }

  .proof-item:nth-child(even) {
    padding-left: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .spring-button,
  .program-feature,
  .program-side,
  .program-link svg,
  .problem-cta > svg,
  .site-menu a {
    transition-duration: 120ms;
    transition-timing-function: ease-out;
  }

  .spring-button:hover,
  .spring-button:active,
  .program-feature:hover,
  .program-feature:focus-within,
  .program-side:hover,
  .program-side:focus-within,
  .program-link:hover svg {
    transform: none;
  }
}
