/*
Theme Name: PH Portfolio CC
Theme URI: https://sandbox.pabloherrera.design
Description: Portfolio de Pablo Herrera — UX/UI Designer. Child theme de Twenty Twenty-Five.
Author: Pablo Herrera
Author URI: https://pabloherrera.design
Template: twentytwentyfive
Version: 1.0.0
Text Domain: ph-portfolio
*/

/* ==========================================================================
   0. RESET — Anular estilos de Twenty Twenty-Five
   ========================================================================== */

/* Desactivar el layout de bloques de WP que interfiere */
body .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

body .is-layout-constrained > .alignfull {
  max-width: none;
}

/* Reset tipografía del parent theme */
body,
.editor-styles-wrapper {
  font-family: var(--ph-font-body) !important;
  font-size: var(--ph-text-base) !important;
  line-height: 1.6 !important;
  color: var(--ph-text-primary) !important;
  background-color: var(--ph-home-bg) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   1. DESIGN TOKENS — Extraídos de Figma (Case Study — CORE 360 Light)
   ========================================================================== */

:root {
  /* --- Tipografía --- */
  --ph-font-display: 'Literata', Georgia, serif;
  --ph-font-body: 'Onest', system-ui, -apple-system, sans-serif;

  /* --- Escala tipográfica --- */
  --ph-text-xs: 0.6875rem;    /* 11px — labels uppercase (was 9px, WCAG fix) */
  --ph-text-sm: 0.6875rem;    /* 11px — captions */
  --ph-text-caption: 0.75rem; /* 12px — image captions (was 10px, WCAG fix) */
  --ph-text-base: 0.875rem;   /* 14px — meta grid values */
  --ph-text-body: 1rem;       /* 16px — body text */
  --ph-text-body-lg: 0.9375rem; /* 15px — callout body */
  --ph-text-section: 1rem;    /* 16px — section tags */
  --ph-text-subtitle: 1.25rem;  /* 20px — caso de estudio label */
  --ph-text-nav: 0.75rem;     /* 12px — nav text */
  --ph-text-h2: 2.125rem;     /* 34px — section headings */
  --ph-text-h1: 3rem;         /* 48px — hero heading */
  --ph-text-next: 2rem;       /* 32px — next case heading */

  /* --- Colores: Paleta principal --- */
  --ph-accent: #28d1a7;
  --ph-accent-bright: #04d4a1;
  --ph-accent-dark: #02a17a;
  --ph-accent-bg: #f0fbf7;

  /* --- Colores: Texto --- */
  --ph-text-primary: #1a1a18;
  --ph-text-secondary: #727171;
  --ph-text-muted: #9c9889;

  /* --- Colores: Superficies --- */
  --ph-bg: #FAFAF8;
  --ph-bg-placeholder: #f4eff5;
  --ph-border: rgba(0, 0, 0, 0.08);
  --ph-separator: #d9d5ce;

  /* --- Layout --- */
  --ph-content-max: 960px;
  --ph-page-max: 1440px;
  --ph-padding-section: 72px;
  --ph-padding-hero-top: 80px;
  --ph-padding-nav: 32px;
  --ph-gap-section: 20px;
  --ph-radius: 10px;

  /* --- Tracking --- */
  --ph-tracking-wide: 0.6px;
  --ph-tracking-wider: 1px;
  --ph-tracking-widest: 1.2px;
  --ph-tracking-section: 1.4px;

  /* --- Home-specific (de home.css) --- */
  --ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out-strong: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ph-home-bg: #ffffff;
  --ph-home-bg-alt: #F4F3F0;
  --ph-home-tag-bg: #E8F5F1;

  /* --- Superficies adicionales --- */
  --ph-bg-warm:     #f0f0ec;
  --ph-bg-surface:  #FAFAF8;
  --ph-bg-alt:      #f4f3f0;
  --ph-text-body-sm: #6b6860;
  --ph-accent-opacity: rgba(40, 209, 167, 0.9);
}

/* ==========================================================================
   2. GOOGLE FONTS — Literata + Onest
   ========================================================================== */

/* Cargadas via functions.php — ver wp_enqueue_style */

/* ==========================================================================
   3. FOCUS VISIBLE — Global keyboard navigation styles
   ========================================================================== */

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

.ph-nav__hamburger:focus-visible,
.ph-mobile-menu__close:focus-visible {
  outline: none;
}

.ph-gate-form__field input:focus-visible {
  outline: none;
  border-color: var(--ph-accent);
}

/* ==========================================================================
   4. SELECTION
   ========================================================================== */

::selection {
  background: var(--ph-accent);
  color: #fff;
}

/* ==========================================================================
   5. LAYOUT GLOBAL
   ========================================================================== */

html {
  overflow-x: hidden;
}

.ph-page {
  max-width: var(--ph-page-max);
  margin: 0 auto;
  background: var(--ph-home-bg);
}

.ph-section {
  max-width: var(--ph-page-max);
  margin: 0 auto;
  padding: 50px 240px;
  display: flex;
  flex-direction: column;
  gap: var(--ph-gap-section);
}

/* ==========================================================================
   5. NAVEGACIÓN (UNIFICADA)
   ========================================================================== */

.ph-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--ph-padding-nav);
  max-width: var(--ph-page-max);
  margin: 0 auto;
  font-family: var(--ph-font-body);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--ph-text-muted);
  white-space: nowrap;
}

/* Nav específica para home (fixed + blur) */
.ph-nav--home {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 2rem;
  max-width: 100%;
  margin: 0;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.ph-nav--home.scrolled {
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--ph-border);
}

/* Logo de nav */
.ph-nav__logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.ph-nav__logo img {
  display: block;
  height: 28px;
  width: auto;
}

.ph-nav__right {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.ph-nav__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ph-nav__links a {
  font-family: var(--ph-font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ph-text-muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .ph-nav__links a:hover { 
    color: var(--ph-text-primary); 
  }
}

.ph-nav__back {
  font-size: var(--ph-text-nav);
  letter-spacing: var(--ph-tracking-wide);
  color: var(--ph-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ph-nav__back:hover {
  color: var(--ph-text-primary);
}

.ph-nav__label {
  font-size: var(--ph-text-sm);
  letter-spacing: 0.7px;
}

/* Theme Toggle */
.ph-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: var(--ph-home-bg-alt);
  color: var(--ph-text-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
  padding: 0;
  position: relative;
}

@media (hover: hover) and (pointer: fine) {
  .ph-theme-toggle:hover {
    background: var(--ph-border);
    color: var(--ph-text-primary);
  }
}

/* Mostrar sol en light, luna en dark */
.ph-theme-toggle__icon--dark  { display: none; }
.ph-theme-toggle__icon--light { display: block; }

[data-theme="dark"] .ph-theme-toggle__icon--light { display: none; }
[data-theme="dark"] .ph-theme-toggle__icon--dark  { display: block; }

/* Language switch */
.ph-lang-switch {
  display: flex;
  gap: 2px;
  background: var(--ph-home-bg-alt);
  border-radius: 6px;
  padding: 3px;
}

.ph-lang-btn {
  font-family: var(--ph-font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
  color: var(--ph-text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
}
.ph-lang-btn:hover,
.ph-lang-btn:focus {
  text-decoration: none;
}

.ph-lang-btn.active {
  background: white;
  color: var(--ph-text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

@media (hover: hover) and (pointer: fine) {
  .ph-lang-btn:hover:not(.active) { 
    color: var(--ph-text-primary); 
  }
}

/* ==========================================================================
   6. HERO — Case Study + Home
   ========================================================================== */

.ph-hero {
  padding-top: 120px;
  padding-bottom: 150px;
  position: relative;
}

.ph-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background: var(--ph-bg);
  z-index: -1;
}

[data-theme="dark"] .ph-hero::before {
  background: #222220;
}



.ph-hero__label {
  font-family: var(--ph-font-body);
  font-weight: 400;
  font-size: var(--ph-text-subtitle);
  color: var(--ph-accent);
  line-height: normal;
}

.ph-hero__title {
  font-family: var(--ph-font-display);
  font-size: var(--ph-text-h1);
  line-height: 1.13;
  letter-spacing: -0.8px;
  color: var(--ph-text-primary);
  font-style: normal;
  font-optical-sizing: auto;
  margin: 0;
}

.ph-hero__title em,
.ph-hero__title i {
  font-family: var(--ph-font-display);
  font-style: italic;
  color: var(--ph-accent);
}

.ph-hero__intro {
  font-family: var(--ph-font-body);
  font-weight: 400;
  font-size: var(--ph-text-body);
  line-height: 1.75;
  color: var(--ph-text-secondary);
  margin: 0;
}

/* Home Hero */
.ph-home-hero {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 6rem 120px 4rem;
  position: relative;
  background: var(--ph-home-bg);
}

.ph-home-hero__content {
  max-width: 720px;
}

.ph-home-hero__tag {
  font-family: var(--ph-font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ph-text-muted);
  margin: 0 0 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: ph-fadeUp 0.8s var(--ease-out-expo) 0.2s forwards;
}

.ph-home-hero__title {
  font-family: var(--ph-font-display);
  font-size: clamp(2.24rem, 5.2vw, 4rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ph-text-primary);
  margin: 0 0 1.75rem;
  font-style: normal;
  opacity: 0;
  transform: translateY(30px);
  animation: ph-fadeUp 1s var(--ease-out-expo) 0.35s forwards;
}

.ph-home-hero__title em {
  font-family: var(--ph-font-display);
  font-style: italic;
  color: var(--ph-accent);
}

.ph-home-hero__desc {
  font-family: var(--ph-font-body);
  font-size: 1.05rem;
  color: var(--ph-text-secondary);
  max-width: 540px;
  line-height: 1.7;
  margin: 0;
  opacity: 0;
  transform: translateY(20px);
  animation: ph-fadeUp 0.8s var(--ease-out-expo) 0.55s forwards;
}

.ph-home-hero__scroll {
  position: absolute;
  bottom: 2rem;
  right: 120px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: ph-fadeUp 0.8s var(--ease-out-expo) 1s forwards;
}

.ph-home-hero__scroll span {
  font-family: var(--ph-font-body);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ph-text-muted);
  writing-mode: vertical-rl;
}

.ph-home-hero__scroll-line {
  width: 1px;
  height: 48px;
  background: var(--ph-separator);
  position: relative;
  overflow: hidden;
}

.ph-home-hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--ph-accent);
  animation: ph-scrollDown 2s ease-in-out infinite;
}

/* ==========================================================================
   7. META GRID — Ficha rápida del proyecto
   ========================================================================== */

/* --- Meta Bar — barra horizontal compacta --- */

.ph-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  background: var(--ph-home-bg);
  overflow: hidden;
}

.ph-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-family: var(--ph-font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ph-text-secondary);
  white-space: nowrap;
  position: relative;
}

.ph-meta-item + .ph-meta-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--ph-border);
}

.ph-meta-icon {
  color: var(--ph-accent);
  flex-shrink: 0;
}

/* --- Chips de herramientas --- */

.ph-meta-tools-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ph-meta-tools__chip {
  font-family: var(--ph-font-body);
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1;
  color: var(--ph-text-muted);
  background: transparent;
  border: 1px solid var(--ph-border);
  border-radius: 4px;
  padding: 4px 9px;
  white-space: nowrap;
}

/* --- Resultado clave — bloque separado bajo el excerpt --- */

.ph-meta-outcome {
  padding: 10px 14px;
  background: var(--ph-accent-bg);
  border: 1px solid rgba(40, 209, 167, 0.2);
  border-radius: var(--ph-radius);
  margin-top: 4px;
}

.ph-meta-outcome__text {
  font-family: var(--ph-font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--ph-text-secondary);
  line-height: 1.6;
  margin: 0;
  font-style: italic;
}

/* ==========================================================================
   8. SECTION TAG — Encabezados de sección con línea
   ========================================================================== */

.ph-section-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 20px;
  overflow: hidden;
}

.ph-section-tag__text {
  font-family: var(--ph-font-body);
  font-weight: 500;
  font-size: var(--ph-text-section);
  letter-spacing: var(--ph-tracking-section);
  text-transform: uppercase;
  color: var(--ph-accent-bright);
  white-space: nowrap;
  margin: 0;
}

.ph-section-tag__line {
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.18);
}

/* ==========================================================================
   9. SECTION HEADING — Títulos de sección
   ========================================================================== */

.ph-section__heading {
  font-family: var(--ph-font-display);
  font-size: var(--ph-text-h2);
  line-height: 1.18;
  letter-spacing: -0.5px;
  color: var(--ph-text-primary);
  font-style: normal;
  font-optical-sizing: auto;
  margin: 0 0 var(--ph-gap-section);
}

.ph-section__heading em,
.ph-section__heading i {
  font-family: var(--ph-font-display);
  font-style: italic;
  color: var(--ph-accent-bright);
}

/* ==========================================================================
   10. IMPACT CALLOUT — Bloque destacado con acento lateral
   ========================================================================== */

.ph-callout {
  background: var(--ph-accent-bg);
  border: 1px solid rgba(40, 209, 167, 0.25);
  border-radius: var(--ph-radius);
  padding: 28px 32px;
}

.ph-callout__accent {
  display: none;
}

.ph-callout__content {
  flex: 1;
  font-family: var(--ph-font-body);
  font-weight: 400;
  font-size: var(--ph-text-body-lg);
  line-height: 1.8;
  color: var(--ph-text-primary);
}

.ph-callout__content p {
  margin: 0 0 1em;
}

.ph-callout__content p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   11. IMAGE PLACEHOLDER — Contenedores de imagen
   ========================================================================== */

.ph-image-block {
  width: 100%;
  max-width: var(--ph-content-max);
  margin: var(--ph-gap-section) auto 0;
  border-radius: var(--ph-radius);
}

.ph-image-block:not(.ph-image-block--hscroll) {
  overflow: hidden;
}

.ph-image-block img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   12. BODY TEXT — Textos largos
   ========================================================================== */

.ph-body-text {
  max-width: var(--ph-content-max);
  margin: 0 auto;
  font-family: var(--ph-font-body);
  font-weight: 400;
  font-size: var(--ph-text-body);
  line-height: 1.75;
  color: var(--ph-text-primary);
}

.ph-body-text p {
  margin: 0 0 1.5em;
}

.ph-body-text p:last-child {
  margin-bottom: 0;
}

.ph-body-text strong,
.ph-card__body strong {
  font-weight: 600;
  color: var(--ph-text-primary);
}

.ph-body-text em,
.ph-card__body em {
  font-style: italic;
}

.ph-card__body a {
  color: var(--ph-accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.ph-body-text a {
  color: var(--ph-accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.ph-body-text a:hover {
  color: var(--ph-accent);
}

/* ==========================================================================
   13. IMAGE CAPTION — Descripciones de imágenes
   ========================================================================== */

.ph-slider-captions .ph-image-caption {
  display: none;
}

.ph-slider-captions .ph-image-caption.is-active {
  display: flex;
}

.ph-image-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
}

.ph-image-caption__title {
  font-family: var(--ph-font-body);
  font-weight: 500;
  font-size: var(--ph-text-sm);
  color: var(--ph-text-primary);
  margin: 0;
}

.ph-image-caption__desc {
  font-family: var(--ph-font-body);
  font-weight: 400;
  font-size: var(--ph-text-caption);
  line-height: 1.5;
  color: var(--ph-text-muted);
  margin: 0;
}

/* ==========================================================================
   14. SLIDER — Swiper integration
   ========================================================================== */

.ph-slider {
  width: 100%;
  max-width: var(--ph-content-max);
  margin: 0 auto;
  padding-bottom: 12px;
}

.ph-slider .swiper-pagination-bullet {
  background: var(--ph-text-muted);
  opacity: 0.3;
}

.ph-slider .swiper-pagination-bullet-active {
  background: var(--ph-accent);
  opacity: 1;
}

.ph-slider .swiper-button-next,
.ph-slider .swiper-button-prev {
  color: var(--ph-text-muted);
}

.ph-slider .swiper-button-next:hover,
.ph-slider .swiper-button-prev:hover {
  color: var(--ph-text-primary);
}

/* ==========================================================================
   15. SEPARATOR
   ========================================================================== */

.ph-separator {
  width: 100%;
  height: 1px;
  background: var(--ph-separator);
  border: none;
  margin: 0;
}

/* ==========================================================================
   16. NEXT CASE — Bloque de navegación al siguiente caso
   ========================================================================== */

.ph-next-case {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 0;
  gap: 16px;
  text-align: center;
  text-decoration: none;
}

.ph-next-case:hover .ph-next-case__title {
  color: var(--ph-accent-dark);
}

.ph-next-case__label {
  font-family: var(--ph-font-body);
  font-weight: 500;
  font-size: var(--ph-text-xs);
  letter-spacing: var(--ph-tracking-section);
  text-transform: uppercase;
  color: var(--ph-text-muted);
  margin: 0;
}

.ph-next-case__title {
  font-family: var(--ph-font-display);
  font-size: var(--ph-text-next);
  line-height: 1.19;
  color: var(--ph-text-primary);
  font-style: normal;
  margin: 0;
  transition: color 0.3s ease;
}

.ph-next-case__cta {
  font-family: var(--ph-font-body);
  font-weight: 500;
  font-size: var(--ph-text-nav);
  letter-spacing: var(--ph-tracking-wide);
  text-transform: uppercase;
  color: var(--ph-accent-dark);
  margin: 0;
}

/* ==========================================================================
   17. FOOTER (UNIFICADA)
   ========================================================================== */

.ph-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ph-padding-nav);
  max-width: var(--ph-page-max);
  margin: 0 auto;
  font-family: var(--ph-font-body);
  font-weight: 400;
  font-size: var(--ph-text-nav);
  color: var(--ph-text-muted);
}

.ph-footer__links {
  display: flex;
  gap: 24px;
}

.ph-footer__links a {
  color: var(--ph-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ph-footer__links a:hover {
  color: var(--ph-text-primary);
}

/* Home Footer */
.ph-home-footer {
  padding: 2rem 240px;
  text-align: center;
  border-top: 1px solid var(--ph-separator);
  font-family: var(--ph-font-body);
  font-size: 0.8rem;
  color: var(--ph-text-muted);
  background: var(--ph-home-bg);
}

/* ==========================================================================
   18. COVER IMAGE — Imagen principal del caso
   ========================================================================== */

.ph-cover {
  width: 100%;
  margin-bottom: var(--ph-padding-section);
}

.ph-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--ph-radius);
}

/* ==========================================================================
   19. HOME PAGE WRAPPER
   ========================================================================== */

.ph-home {
  background: var(--ph-home-bg);
  overflow-x: hidden;
  max-width: var(--ph-page-max);
  margin: 0 auto;
}

/* ==========================================================================
   20. HOME CASES — Grid 2 columnas
   ========================================================================== */

.ph-home-cases {
  padding: 0 120px 4rem;
  /*border-top: 1px solid var(--ph-separator);*/
  background: var(--ph-home-bg);
}

.ph-home-cases__header {
  padding: 3rem 0 2rem;
}

.ph-home-cases__label {
  font-family: var(--ph-font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ph-text-muted);
  margin: 0;
}

.ph-home-cases__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* ==========================================================================
   21. CARD — Vertical (imagen arriba, info abajo)
   ========================================================================== */

.ph-card {
  opacity: 1;
}

.ph-card__link {
  display: grid;
  grid-template-columns: 45% 1fr;
  gap: 0;
  text-decoration: none;
  color: inherit;
  border-radius: var(--ph-radius);
  overflow: hidden;
  border: 1px solid var(--ph-border);
  background: white;
  transition: box-shadow 0.3s ease, transform 0.3s var(--ease-out-strong);
  min-height: 340px;
}

@media (hover: hover) and (pointer: fine) {
  .ph-card__link:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
  }
}

.ph-card__link:active {
  transform: scale(0.99);
}

/* Image */
.ph-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: auto;
  background: var(--ph-home-bg-alt);
  min-height: 280px;
}

.ph-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out-expo);
}

@media (hover: hover) and (pointer: fine) {
  .ph-card__link:hover .ph-card__image img {
    transform: scale(1.04);
  }
}

/* Placeholder */
.ph-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
}

.ph-card__grid-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.06;
}

.ph-card__placeholder-label {
  font-family: var(--ph-font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ph-text-muted);
  z-index: 1;
  background: rgba(255, 255, 255, 0.8);
  padding: 5px 12px;
  border-radius: 4px;
}

/* Info */
.ph-card__info {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
}

.ph-card__number {
  font-family: var(--ph-font-display);
  font-size: 0.8rem;
  color: var(--ph-text-muted);
}

.ph-card__title {
  font-family: var(--ph-font-display);
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--ph-text-primary);
  margin: 0;
}

[data-theme="dark"] .ph-card__title {
  color: var(--ph-accent);
}

.ph-card__subtitle {
  font-family: var(--ph-font-body);
  font-size: 0.85rem;
  color: var(--ph-text-secondary);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tags */
.ph-card__tags {
  display: none;
}

.ph-card__tag {
  font-family: var(--ph-font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: var(--ph-home-tag-bg);
  border-radius: 4px;
  color: var(--ph-accent-dark);
}

/* Meta */
.ph-card__meta {
  display: flex;
  gap: 1.5rem;
  padding-top: 0.25rem;
}

.ph-card__meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ph-card__meta-label {
  font-family: var(--ph-font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ph-text-muted);
}

.ph-card__meta-value {
  font-family: var(--ph-font-body);
  font-size: 0.8rem;
  color: var(--ph-text-primary);
}

/* CTA */
.ph-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ph-font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ph-accent);
  padding-top: 0.25rem;
  transition: gap 0.3s var(--ease-out-strong);
}

.ph-card__cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease-out-strong);
}

.ph-card__cta-lock {
  opacity: 0.55;
  flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
  .ph-card__link:hover .ph-card__cta { gap: 0.85rem; }
  .ph-card__link:hover .ph-card__cta svg { transform: translateX(3px); }
  .ph-card__link:hover .ph-card__cta-lock { transform: none; }
}

/* ==========================================================================
   22. HOME ABOUT — Mismo padding que single (240px)
   ========================================================================== */

.ph-home-about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding: 5rem 120px;
  border-top: 1px solid var(--ph-separator);
  background: var(--ph-home-bg);
}

.ph-home-about__intro h2 {
  font-family: var(--ph-font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ph-text-primary);
  font-style: normal;
  margin: 0;
}

.ph-home-about__intro h2 em {
  font-family: var(--ph-font-display);
  font-style: italic;
  color: var(--ph-accent);
}

.ph-home-about__text p {
  font-family: var(--ph-font-body);
  font-size: 0.95rem;
  color: var(--ph-text-secondary);
  line-height: 1.75;
  margin: 0 0 1.25rem;
}

.ph-home-about__details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding-top: 1rem;
}

.ph-home-about__group h4 {
  font-family: var(--ph-font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ph-text-muted);
  margin: 0 0 0.75rem;
}

.ph-home-about__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ph-home-about__group li {
  font-family: var(--ph-font-body);
  font-size: 0.85rem;
  color: var(--ph-text-secondary);
}

.ph-home-about__group--wide {
  grid-column: 1 / -1;
}

.ph-home-about__competencies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.ph-home-about__subgroup h5 {
  font-family: var(--ph-font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ph-text-muted);
  margin: 0 0 0.5rem;
  opacity: 0.7;
}

/* ==========================================================================
   23. HOME CONTACT — Mismo padding
   ========================================================================== */

.ph-home-contact {
  padding: 5rem 240px;
  border-top: 1px solid var(--ph-separator);
  text-align: center;
  background: var(--ph-home-bg);
}

.ph-home-contact h2 {
  font-family: var(--ph-font-display);
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ph-text-primary);
  font-style: normal;
  margin: 0 0 1rem;
}

.ph-home-contact h2 em {
  font-family: var(--ph-font-display);
  font-style: italic;
  color: var(--ph-accent);
}

.ph-home-contact__sub {
  font-family: var(--ph-font-body);
  font-size: 0.95rem;
  color: var(--ph-text-secondary);
  max-width: 440px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.ph-home-contact__links {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.ph-home-contact__link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--ph-font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ph-text-primary);
  text-decoration: none;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--ph-separator);
  border-radius: 8px;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.15s var(--ease-out-strong);
}

.ph-home-contact__link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
  .ph-home-contact__link:hover {
    border-color: var(--ph-accent);
    background: var(--ph-accent-bg);
  }
}

.ph-home-contact__link:active {
  transform: scale(0.97);
}

/* ==========================================================================
   24. LANGUAGE SWITCHER
   ========================================================================== */

.ph-lang-switcher {
  display: flex;
  gap: 8px;
}

.ph-lang-switcher__item {
  font-family: var(--ph-font-body);
  font-weight: 500;
  font-size: var(--ph-text-xs);
  letter-spacing: var(--ph-tracking-wide);
  text-transform: uppercase;
  color: var(--ph-text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
}

.ph-lang-switcher__item:hover {
  color: var(--ph-text-primary);
}

.ph-lang-switcher__item--active {
  color: var(--ph-accent-dark);
  background: var(--ph-accent-bg);
}

/* ==========================================================================
   25. MICROANIMACIONES — Fade-in al scroll
   ========================================================================== */

.ph-animate {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ph-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger para children dentro de secciones visibles */
.ph-visible > *:nth-child(1) { transition-delay: 0s; }
.ph-visible > *:nth-child(2) { transition-delay: 0.06s; }
.ph-visible > *:nth-child(3) { transition-delay: 0.12s; }
.ph-visible > *:nth-child(4) { transition-delay: 0.18s; }
.ph-visible > *:nth-child(5) { transition-delay: 0.24s; }

/* ==========================================================================
   26. KEYFRAMES
   ========================================================================== */

@keyframes ph-fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ph-scrollDown {
  0% { top: -100%; }
  50% { top: 100%; }
  100% { top: 100%; }
}

@keyframes ph-scrollRight {
  0%   { left: -100%; }
  50%  { left: 100%; }
  100% { left: 100%; }
}

/* Horizontal scroll indicator — reemplaza la scrollbar nativa */
.ph-hscroll-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  width: 100%;
}

.ph-hscroll-indicator__line {
  flex: 1;
  height: 3px;
  background: var(--ph-separator);
  position: relative;
  overflow: hidden;
}

.ph-hscroll-indicator__line::after {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--ph-accent);
  animation: ph-scrollRight 2s ease-in-out infinite;
}

.ph-hscroll-indicator span {
  font-family: var(--ph-font-body);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ph-text-muted);
  white-space: nowrap;
}

/* ==========================================================================
   27. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .ph-home-hero__tag,
  .ph-home-hero__title,
  .ph-home-hero__desc,
  .ph-home-hero__scroll {
    animation-duration: 0.01ms;
    transform: none;
  }

  .ph-card {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ph-home-hero__scroll-line::after {
    animation: none;
  }
}

/* ==========================================================================
   28. RESPONSIVE
   ========================================================================== */

/* Tablet */
@media (max-width: 1200px) {
  .ph-section {
    padding-left: 120px;
    padding-right: 120px;
  }

  .ph-home-hero { 
    padding-left: 120px; 
    padding-right: 120px; 
  }

  .ph-home-hero__scroll { 
    right: 120px; 
  }

  .ph-home-cases { 
    padding-left: 120px; 
    padding-right: 120px; 
  }

  .ph-home-about { 
    padding-left: 120px; 
    padding-right: 120px; 
  }

  .ph-home-contact { 
    padding-left: 120px; 
    padding-right: 120px; 
  }

  .ph-home-footer { 
    padding-left: 120px; 
    padding-right: 120px; 
  }
}

@media (max-width: 960px) {
  .ph-section {
    padding-left: 48px;
    padding-right: 48px;
  }

  .ph-hero__title {
    font-size: 2.25rem;
    line-height: 1.22;
  }

  .ph-section__heading {
    font-size: 1.75rem;
    line-height: 1.21;
  }

  .ph-home-hero { 
    padding-left: 48px; 
    padding-right: 48px; 
  }

  .ph-home-hero__scroll { 
    right: 48px; 
  }

  .ph-home-cases { 
    padding-left: 48px; 
    padding-right: 48px; 
  }

  .ph-home-cases__grid {
    gap: 1.5rem;
  }

  .ph-card__link {
    grid-template-columns: 42% 1fr;
    min-height: 280px;
  }

  .ph-home-about {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 4rem 48px;
  }

  .ph-home-contact { 
    padding: 4rem 48px; 
  }

  .ph-home-footer { 
    padding: 2rem 48px; 
  }
}

/* Mobile menu overlay */
.ph-mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 101;
  background: var(--ph-home-bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.ph-mobile-menu.is-open {
  display: flex;
}

.ph-mobile-menu__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.ph-mobile-menu__links a {
  font-family: var(--ph-font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--ph-text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ph-mobile-menu__links a:hover {
  color: var(--ph-accent);
}

.ph-mobile-menu__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ph-text-muted);
}

/* Isotipo centrado en mobile menu */
.ph-mobile-menu__isotipo {
  display: block;
  margin-bottom: 1rem;
}

/* Language switcher en mobile menu */
.ph-lang-switch--mobile {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* Theme toggle en mobile menu */
.ph-theme-toggle--mobile {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ph-text-muted);
  margin-top: 1rem;
}

/* Hamburger button */
.ph-nav__hamburger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ph-text-muted);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .ph-nav__hamburger {
    display: flex;
  }

  .ph-lang-switch:not(.ph-lang-switch--mobile),
  .ph-theme-toggle:not(.ph-theme-toggle--mobile) {
    display: none;
  }

  /* Header opaco en mobile */
  .ph-nav--home.scrolled {
    background: rgba(250, 250, 248, 1);
  }

  /* Contenido comienza más abajo para no solaparse con header fixed */
  .ph-home,
  .ph-page {
    padding-top: 60px;
  }
}

@media (max-width: 640px) {
  .ph-section {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .ph-nav {
    padding: 16px 20px;
  }

  .ph-nav--home {
    padding: 1rem 1.25rem;
  }

  .ph-nav__links {
    display: none;
  }

  .ph-hero {
    padding-top: 48px;
  }

  .ph-hero__title {
    font-size: 1.75rem;
    line-height: 1.29;
  }

  .ph-hero__label {
    font-size: 1rem;
  }

  .ph-section__heading {
    font-size: 1.5rem;
    line-height: 1.25;
  }

  .ph-callout {
    padding: 20px 20px 20px 0;
    gap: 16px;
  }

  .ph-next-case {
    padding: 40px 20px;
  }

  .ph-next-case__title {
    font-size: 1.5rem;
    line-height: 1.33;
  }

  .ph-footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 24px 20px;
  }

  .ph-home-hero {
    padding: 1.25rem 20px 3rem;
  }

  .ph-home-hero__title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .ph-home-hero__scroll { 
    display: none; 
  }

  .ph-home-cases {
    padding: 0 20px 3rem;
  }

  .ph-home-cases__header { 
    padding: 2rem 0 1.25rem; 
  }

  .ph-home-cases__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .ph-card__link {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .ph-card__image {
    min-height: 220px;
  }

  .ph-card__info {
    padding: 1.25rem;
  }

  .ph-card__meta {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .ph-home-about {
    padding: 3rem 20px;
  }

  .ph-home-about__details {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .ph-home-contact {
    padding: 3rem 20px;
  }

  .ph-home-contact__links {
    flex-direction: column;
    align-items: center;
  }

  .ph-home-footer {
    padding: 1.5rem 20px;
  }
}

/* ==========================================================================
   30. DARK MODE — Variables via [data-theme="dark"]
   ========================================================================== */

[data-theme="dark"] .ph-section-tag__line {
  background: rgba(255, 255, 255, 0.18);
}

/* Nav sticky — fondo claro hardcodeado necesita override */
[data-theme="dark"] .ph-nav--home.scrolled {
  background: rgba(24, 24, 22, 0.88);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Cards de proyectos — background white hardcodeado */
[data-theme="dark"] .ph-card__link {
  background: var(--ph-bg-surface);
}

/* Logo — color gris oscuro en dark mode */
[data-theme="dark"] .ph-nav__logo img {
  filter: invert(1) hue-rotate(3deg) brightness(0.65) saturate(0.2);
}

/* Language button activo — background white hardcodeado */
[data-theme="dark"] .ph-lang-btn.active {
  background: var(--ph-bg-surface);
  color: var(--ph-text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Card placeholder label — fondo blanco sobre placeholder */
[data-theme="dark"] .ph-card__placeholder-label {
  background: rgba(0, 0, 0, 0.45);
  color: var(--ph-text-secondary);
}

/* Placeholder colores pastel (inline style PHP) — oscurecer en dark con overlay */
[data-theme="dark"] .ph-card__placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 14, 0.72);
  z-index: 0;
  pointer-events: none;
}

/* Spread divider — sombra negra invisible en dark */
[data-theme="dark"] .ph-spread__divider {
  box-shadow: 0 0 16px rgba(40, 209, 167, 0.25);
}

[data-theme="dark"] {
  --ph-bg:              #1c1c1a;
  --ph-bg-warm:         #141412;
  --ph-bg-surface:      #222220;
  --ph-bg-alt:          #1f1f1d;
  --ph-bg-placeholder:  #1a1917;
  --ph-accent-bg:       rgba(40, 209, 167, 0.08);
  --ph-text-primary:    #f0f0ec;
  --ph-text-secondary:  #9c9889;
  --ph-text-muted:      #8a8880;
  --ph-text-body-sm:    #8a8880;
  --ph-border:          rgba(255, 255, 255, 0.06);
  --ph-separator:       rgba(255, 255, 255, 0.1);
  --ph-home-bg:         #0f0f0e;
  --ph-home-bg-alt:     #181816;
  --ph-home-tag-bg:     rgba(40, 209, 167, 0.1);
}

/* ==========================================================================
   31. SECTION BACKGROUNDS — Variantes de fondo por tipo
   ========================================================================== */

/* Alternating backgrounds para marcar inicio/fin de sección */
.ph-page--case-study .ph-section:nth-of-type(even) {
}

/* Sección con fondo blanco puro (contraste sobre warm) */
.ph-section--timeline {
}

/* ==========================================================================
   32b. QUOTE (Reflexión) — Caja de reflexión con comilla decorativa
   ========================================================================== */

.ph-reflection-box {
  background: var(--ph-bg-surface);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.ph-reflection-box__mark {
  font-family: var(--ph-font-display);
  font-size: 86px;
  line-height: 1;
  color: var(--ph-accent-opacity);
  display: block;
  height: 40px;
  margin: 0;
}

.ph-reflection-box__body {
  font-family: var(--ph-font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--ph-text-body-sm);
}

.ph-reflection-box__body p {
  margin: 0 0 0.75em;
}

.ph-reflection-box__body p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   32. TIMELINE — Fases con dot y línea conectora
   ========================================================================== */

.ph-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 32px;
  display: flex;
  flex-direction: column;
}

.ph-timeline__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 64px;
}

/* Línea vertical */
.ph-timeline__item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 10px;
  bottom: 0;
  width: 1px;
  background: var(--ph-separator);
}

/* Dot */
.ph-timeline__item::after {
  content: '';
  position: absolute;
  left: -28px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ph-accent);
  flex-shrink: 0;
}

/* Último dot: vacío (indica fin) */
.ph-timeline__item:last-child::after {
  background: transparent;
  border: 1.5px solid var(--ph-separator);
}

.ph-timeline__num {
  font-family: var(--ph-font-body);
  font-weight: 500;
  font-size: var(--ph-text-body);
  letter-spacing: var(--ph-tracking-widest);
  text-transform: uppercase;
  color: var(--ph-accent-bright);
  margin: 0;
  line-height: normal;
}

.ph-timeline__title {
  font-family: var(--ph-font-display);
  font-size: var(--ph-text-body);
  line-height: 1.38;
  color: var(--ph-text-primary);
  font-style: normal;
  margin: 0 0 16px 0;
}

.ph-timeline__desc {
  font-family: var(--ph-font-body);
  font-size: var(--ph-text-base);
  line-height: 1.57;
  color: var(--ph-text-secondary);
  margin: 0;
}

.ph-timeline__desc p {
  margin: 0 0 0.75em;
}

.ph-timeline__desc p:last-child {
  margin-bottom: 0;
}

/* --- Timeline entrance animations --- */
.ph-timeline__item--will-animate {
  opacity: 0;
  transform: translateY(12px);
}

.ph-timeline__item--will-animate::after {
  transform: scale(0);
  transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

.ph-timeline__item--will-animate:not(.ph-timeline__item--last)::before {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 500ms cubic-bezier(0.23, 1, 0.32, 1);
}

.ph-timeline__item--visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 400ms cubic-bezier(0.23, 1, 0.32, 1),
              transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
}

.ph-timeline__item--dot-visible::after {
  transform: scale(1);
}

.ph-timeline__item--will-animate.ph-timeline__item--line-visible:not(.ph-timeline__item--last)::before {
  clip-path: inset(0 0 0% 0);
}

@media (prefers-reduced-motion: reduce) {
  .ph-timeline__item--will-animate {
    opacity: 0;
    transform: none;
  }
  .ph-timeline__item--visible {
    opacity: 1;
    transition: opacity 300ms ease;
    transform: none;
  }
  .ph-timeline__item--will-animate::after,
  .ph-timeline__item--will-animate:not(.ph-timeline__item--last)::before {
    transition: none;
    transform: none;
    clip-path: none;
  }
}

/* Media dentro de un item del timeline */
.ph-timeline__item > .ph-image-block,
.ph-timeline__item > .ph-slider,
.ph-timeline__item > .ph-monitor-frame,
.ph-timeline__item > .ph-simple-frame,
.ph-timeline__item > figure {
  margin-top: 50px;
}

/* ==========================================================================
   33. CASE STUDY CARDS — Grid de cards con número, título, pros/cons
   ========================================================================== */

.ph-cards {
  display: grid;
  gap: 24px;
}

.ph-cards--100 { grid-template-columns: 1fr; }
.ph-cards--50  { grid-template-columns: repeat(2, 1fr); }
.ph-cards--30  { grid-template-columns: repeat(3, 1fr); }
.ph-cards--25  { grid-template-columns: repeat(4, 1fr); }

/* Reset del .ph-card de home cuando está dentro de .ph-cards */
.ph-cards .ph-card {
  opacity: 1;
  transform: none;
  transition: none;
  background: var(--ph-bg-surface);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 12px;
  overflow: hidden;
  min-width: 0;
}

/* Todos los hijos ocupan las 2 columnas excepto num */
.ph-cards .ph-card > * {
  grid-column: 1 / -1;
}

/* num solo ocupa col 1 */
.ph-cards .ph-card__num {
  grid-column: 1;
  font-family: var(--ph-font-body);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1;
  color: var(--ph-accent);
  margin: 0;
  align-self: baseline;
}

/* title ocupa col 2 cuando hay num antes */
.ph-cards .ph-card__num + .ph-card__title {
  grid-column: 2;
  margin-top: 0;
}

.ph-cards .ph-card__title {
  grid-column: 1 / -1;
  font-family: var(--ph-font-display);
  font-size: 1.125rem;
  line-height: 24px;
  color: var(--ph-text-primary);
  font-style: normal;
  margin: 0;
  align-self: baseline;
}

/* hscroll: el card necesita overflow visible para el scroll */
.ph-cards .ph-card:has(.ph-image-block--hscroll) {
  overflow: visible;
}

.ph-cards .ph-card__body {
  font-family: var(--ph-font-body);
  font-size: var(--ph-text-base);
  line-height: 1.6;
  color: var(--ph-text-secondary);
  margin: 0;
  align-self: start;
  word-break: break-word;
}

.ph-cards .ph-card__body ul {
  padding-left: 0;
  margin: 25px 0;
  list-style: none;
}

.ph-cards .ph-card__body ul > li {
  padding-bottom: 14px;
  line-height: 1.6;
}

.ph-cards .ph-card__body ul > li + li {
  padding-top: 14px;
  border-top: 1px solid var(--ph-border);
}

.ph-cards .ph-card__body ul > li:last-child {
  padding-bottom: 0;
}

.ph-cards .ph-card__body ul > li > strong:first-child {
  display: block;
  color: var(--ph-text-primary);
  font-weight: 600;
  margin-bottom: 6px;
}

.ph-cards .ph-card__body ul > li > strong:first-child + br {
  display: none;
}

/* Separador entre body y listas */
.ph-cards .ph-card__list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ph-cards .ph-card__list li {
  font-family: var(--ph-font-body);
  font-size: var(--ph-text-base);
  line-height: 20px;
  padding-left: 18px;
  position: relative;
}

/* Pros */
.ph-cards .ph-card__list--pros {
  border-top: 1px solid var(--ph-border);
  padding-top: 12px;
  margin-top: 8px;
}

.ph-cards .ph-card__list--pros li {
  color: var(--ph-text-primary);
}

.ph-cards .ph-card__list--pros li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: var(--ph-accent);
  font-weight: 600;
  line-height: 20px;
}

/* Cons */
.ph-cards .ph-card__list--cons {
  border-top: 1px solid var(--ph-border);
  padding-top: 12px;
  margin-top: 0;
}

.ph-cards .ph-card__list--cons li {
  color: var(--ph-text-muted);
}

.ph-cards .ph-card__list--cons li::before {
  content: '−';
  position: absolute;
  left: 0;
  color: var(--ph-text-muted);
  line-height: 20px;
}

/* Media dentro de card — ocupa todo el ancho disponible entre los paddings */
.ph-cards .ph-card > .ph-image-block:not(.ph-image-block--hscroll),
.ph-cards .ph-card > .ph-slider,
.ph-cards .ph-card > .ph-monitor-frame,
.ph-cards .ph-card > .ph-spread,
.ph-cards .ph-card > figure:not(.ph-image-block--hscroll) {
  margin: 12px 0 0;
  width: 100%;
  max-width: none;
  overflow: hidden;
  border-radius: var(--ph-radius);
}

/* ==========================================================================
   34. IMAGE BLOCK VARIANTS
   ========================================================================== */

/* Full width — 100vw real. Funciona porque la sección está fuera de .ph-page (sin overflow-x: hidden) */
.ph-image-block--full {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  border-radius: 0;
  height: 70vh;
  background-size: cover;
  background-position: center 50%;
  background-repeat: no-repeat;
}

/* Horizontal scroll — override de .ph-image-block */
.ph-image-block.ph-image-block--hscroll {
  max-width: none;
  height: 600px;
  overflow-x: scroll;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thick;
  scrollbar-color: var(--ph-accent) var(--ph-accent-bg);
  cursor: grab;
  border-radius: var(--ph-radius);
}

.ph-image-block.ph-image-block--hscroll:active {
  cursor: grabbing;
}

/* Ocultar scrollbar nativo — el indicador custom lo reemplaza */
.ph-image-block.ph-image-block--hscroll {
  scrollbar-width: none;
}

.ph-image-block.ph-image-block--hscroll::-webkit-scrollbar {
  display: none;
}

/* ==========================================================================
   SPREAD IMAGE — before/after split comparison con divider draggable
   ========================================================================== */

.ph-spread {
  position: relative;
  width: 100%;
  border-radius: var(--ph-radius);
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
}

/* Grid checkerboard sutil sobre el fondo */
.ph-spread::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--ph-border, rgba(128,128,128,0.12)) 1px, transparent 1px),
    linear-gradient(90deg, var(--ph-border, rgba(128,128,128,0.12)) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

/* Label "← Drag →" centrado abajo, desaparece al hover */
.ph-spread::after {
  content: "← Drag →";
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--ph-font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ph-text-primary);
  background: var(--ph-bg, #fff);
  border-radius: 4px;
  padding: 4px 12px;
  opacity: 0.85;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.ph-spread:hover::after {
  opacity: 0;
}

@media (hover: none) {
  .ph-spread::after {
    content: "← Swipe →";
  }
}

/* Panel "antes" — ocupa todo el espacio y define la altura del contenedor */
.ph-spread__before {
  position: relative;
  width: 100%;
  z-index: 1;
}

.ph-spread__before img {
  width: 100%;
  height: auto;
  display: block;
}

/* Panel "después" — superpuesto con clip-path diagonal */
.ph-spread__after {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: polygon(58% 0%, 100% 0%, 100% 100%, 42% 100%);
  overflow: hidden;
}

.ph-spread__after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Línea divisora diagonal */
.ph-spread__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--ph-accent);
  transform: translate(-50%) skew(-10deg);
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.18);
  animation: ph-spread-entry 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

@keyframes ph-spread-entry {
  from {
    opacity: 0;
    transform: translate(-50%) skew(-10deg) scaleY(0.8);
  }
  to {
    opacity: 1;
    transform: translate(-50%) skew(-10deg) scaleY(1);
  }
}

.ph-image-block.ph-image-block--hscroll img {
  width: auto !important;
  max-width: none !important;
  height: 100%;
  max-height: none;
  display: block;
}

/* ==========================================================================
   35. SLIDER VARIANTS — Monitor y Simple
   ========================================================================== */

/* Monitor frame — padding-bottom crea la altura (funciona en flex/grid, aspect-ratio no) */
.ph-monitor-frame {
  position: relative;
  width: 100%;
  max-width: min(var(--ph-content-max), 100%);
  margin: 0 auto;
  padding-bottom: 71.607%; /* 641.6001/895.9996 × 100 */
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.ph-cards .ph-card > .ph-monitor-frame {
  border-radius: 0;
}

/* Bezel: detrás del screen, forma el chrome del navegador */
.ph-monitor-frame__bezel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

/* Screen: área de pantalla del SVG — viewBox 896×642: x=12.8 y=40.6 right=13.2 bottom=12.0 */
.ph-monitor-frame__screen {
  position: absolute;
  z-index: 2;
  top: 6.33%;
  left: 1.43%;
  right: 1.47%;
  bottom: 1.87%;
  overflow: hidden;
  background: var(--ph-bg-warm);
  border-radius: 0 0 12px 12px;
}

/* Slider ocupa todo el screen — absolute fill, sin flex, sin porcentajes en cadena */
.ph-slider--monitor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ph-slider--monitor .swiper-wrapper,
.ph-slider--monitor .swiper-slide {
  width: 100%;
  height: 100%;
}

.ph-slider--monitor .swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* Dots — debajo del frame, en flujo normal */
.ph-monitor-frame__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

.ph-monitor-frame__pagination .swiper-pagination-bullet {
  width: 6px;
  height: 6px;
  background: var(--ph-text-muted);
  opacity: 0.4;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.25s, background 0.25s;
  display: inline-block;
}

.ph-monitor-frame__pagination .swiper-pagination-bullet-active {
  background: var(--ph-accent);
  opacity: 1;
}

/* Simple frame — clipea el slider */
.ph-simple-frame {
  width: 100%;
  max-width: min(var(--ph-content-max), 100%);
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  border-radius: 20px;
}

.ph-cards .ph-card > .ph-simple-frame {
  border-radius: 0;
}

.ph-simple-frame__bezel {
  display: none;
}

.ph-simple-frame__screen {
  width: 100%;
}

/* Simple slider — ancho 100%, alto lo dicta la imagen */
.ph-slider--simple {
  width: 100%;
}

.ph-slider--simple .swiper-wrapper {
  display: flex;
  align-items: flex-start;
}

.ph-slider--simple .swiper-slide {
  width: 100%;
  flex-shrink: 0;
}

.ph-slider--simple .swiper-slide img {
  display: block;
  width: 100%;
  height: auto;
}

/* Controls bar — flechas en extremos, dots centrados */
.ph-simple-frame__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  position: relative;
}

.ph-simple-frame__controls .swiper-pagination {
  position: static;
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.ph-simple-frame__controls .swiper-pagination-bullet {
  width: 6px;
  height: 6px;
  background: var(--ph-text-muted);
  opacity: 0.4;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.25s, background 0.25s;
  display: inline-block;
  margin: 0;
}

.ph-simple-frame__controls .swiper-pagination-bullet-active {
  background: var(--ph-accent);
  opacity: 1;
}

.ph-simple-frame__controls .swiper-button-prev,
.ph-simple-frame__controls .swiper-button-next {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 18px;
  line-height: 1;
  color: var(--ph-text-muted);
  transition: color 0.2s;
  flex-shrink: 0;
}

.ph-simple-frame__controls .swiper-button-prev::after,
.ph-simple-frame__controls .swiper-button-next::after {
  display: none;
}

.ph-simple-frame__controls .swiper-button-prev:hover,
.ph-simple-frame__controls .swiper-button-next:hover {
  color: var(--ph-text-primary);
}

/* ==========================================================================
   36. RESPONSIVE — Nuevos componentes
   ========================================================================== */

@media (max-width: 1200px) {
  .ph-cards--25 { grid-template-columns: repeat(2, 1fr); }
  .ph-cards--30 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .ph-cards--50,
  .ph-cards--30,
  .ph-cards--25 {
    grid-template-columns: 1fr 1fr;
  }

  .ph-image-block.ph-image-block--hscroll {
    height: 360px;
  }
}

@media (max-width: 640px) {
  .ph-cards--50,
  .ph-cards--30,
  .ph-cards--25 {
    grid-template-columns: 1fr;
  }

  .ph-cards .ph-card {
    padding: 20px;
  }

  .ph-timeline {
    padding-left: 20px;
  }

  .ph-image-block--hscroll {
    height: 260px;
  }
}

/* ==========================================================================
   SECTION NAV — Navegación vertical fija por secciones
   ========================================================================== */

.ph-section-nav {
  position: fixed;
  left: 30px;
  top: 22%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 200;
  pointer-events: none;
}

.ph-section-nav__item {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  pointer-events: all;
  cursor: pointer;
  padding: 4px 0;
}

.ph-section-nav__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ph-text-muted);
  opacity: 0.4;
  transition: opacity 0.2s ease, transform 0.25s ease, background 0.2s ease;
  flex-shrink: 0;
}

.ph-section-nav__label {
  font-family: var(--ph-font-sans, 'Onest', sans-serif);
  font-size: var(--ph-text-sm);
  color: var(--ph-text-muted);
  white-space: nowrap;
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0.7;
  user-select: none;
}

.ph-section-nav__item:hover .ph-section-nav__dot {
  opacity: 0.75;
}

.ph-section-nav__item:hover .ph-section-nav__label {
  opacity: 0.8;
}

.ph-section-nav__item.is-active .ph-section-nav__dot {
  opacity: 1;
  transform: scale(1.5);
  background: var(--ph-text-primary);
}

.ph-section-nav__item.is-active .ph-section-nav__label {
  color: var(--ph-text-primary);
  opacity: 1;
}

[data-theme="dark"] .ph-section-nav__item.is-active .ph-section-nav__dot {
  background: var(--ph-accent);
}

@media (max-width: 1400px) {
  .ph-section-nav { display: none; }
}

/* ==========================================================================
   PORTFOLIO GATE — Modal de acceso privado
   ========================================================================== */

.ph-gate {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity .22s ease, visibility .22s ease;
}

.ph-gate.is-open {
  visibility: visible;
  opacity: 1;
}

.ph-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 8, .6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.ph-gate__box {
  position: relative;
  background: var(--ph-bg, #fff);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  padding: 48px 40px 40px;
  width: min(460px, 92vw);
  text-align: center;
  transform: translateY(14px) scale(.97);
  transition: transform .32s cubic-bezier(.34, 1.56, .64, 1);
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
}

.ph-gate.is-open .ph-gate__box {
  transform: none;
}

.ph-gate__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--ph-accent-bg, #f0fbf7);
  border-radius: 50%;
  margin-bottom: 20px;
  color: var(--ph-accent, #28d1a7);
}

.ph-gate__title {
  font-family: var(--ph-font-display);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--ph-text-primary, #1a1a18);
  margin: 0 0 10px;
  line-height: 1.3;
}

.ph-gate__desc {
  font-family: var(--ph-font-body);
  font-size: .875rem;
  color: var(--ph-text-secondary, #727171);
  margin: 0 0 28px;
  line-height: 1.5;
}

.ph-gate-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.ph-gate-form__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ph-gate-form__field label {
  font-family: var(--ph-font-body);
  font-size: .6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ph-text-secondary, #727171);
}

.ph-gate-form__field input {
  font-family: var(--ph-font-body);
  font-size: .9375rem;
  color: var(--ph-text-primary, #1a1a18);
  background: transparent;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 8px;
  padding: 10px 14px;
  outline: none;
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}

.ph-gate-form__field input:focus {
  border-color: var(--ph-accent, #28d1a7);
}

.ph-gate-form__error {
  font-family: var(--ph-font-body);
  font-size: .8125rem;
  color: oklch(52% 0.19 25);
  margin: 0;
  min-height: 1.2em;
  text-align: center;
}

.ph-gate-form__submit {
  margin-top: 4px;
  font-family: var(--ph-font-body);
  font-size: .875rem;
  font-weight: 500;
  color: var(--ph-home-bg);
  background: var(--ph-text-primary);
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  cursor: pointer;
  transition: opacity .15s, background .15s;
  width: 100%;
}

.ph-gate-form__submit:hover  { opacity: .85; }
.ph-gate-form__submit:active { opacity: .7; }
.ph-gate-form__submit:disabled { opacity: .5; cursor: not-allowed; }

.ph-gate__contact {
  font-family: var(--ph-font-body);
  font-size: .8125rem;
  color: var(--ph-text-muted, #9c9889);
  margin: 22px 0 0;
  line-height: 1.5;
}

.ph-gate__contact a {
  color: var(--ph-text-secondary, #727171);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ph-gate__contact a:hover { color: var(--ph-text-primary, #1a1a18); }

/* Dark mode */
[data-theme="dark"] .ph-gate__box {
  background: var(--ph-bg-surface);
  border-color: rgba(255,255,255,.1);
}

[data-theme="dark"] .ph-gate-form__field input {
  color: var(--ph-text-primary);
  border-color: rgba(255,255,255,.18);
}

[data-theme="dark"] .ph-gate-form__field input:focus {
  border-color: var(--ph-accent);
}

[data-theme="dark"] .ph-gate__title { color: var(--ph-text-primary); }

[data-theme="dark"] .ph-gate-form__submit {
  background: var(--ph-accent);
  color: var(--ph-bg-warm);
}

/* ── Callout inline ─────────────────────────────────────────────────────── */
.ph-destacado {
  background: rgba(40, 209, 167, 0.12);
  padding: 1px 6px;
  border-radius: 3px;
}

[data-theme="dark"] .ph-destacado {
  background: rgba(40, 209, 167, 0.18);
}

/* ── Toggle / Acordeón ──────────────────────────────────────────────────── */
.ph-toggle {
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  margin: .75em 0;
}

.ph-toggle__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75em;
  padding: .75em 1em;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: var(--ph-home-bg);
  border-radius: calc(var(--ph-radius) - 1px);
  transition: background .15s;
  width: 100%;
  box-sizing: border-box;
}

.ph-toggle__trigger::-webkit-details-marker,
.ph-toggle__trigger::marker { display: none; }

.ph-toggle__trigger::after {
  content: '';
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a18' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform .2s var(--ease-out-strong);
}

.ph-toggle[open] > .ph-toggle__trigger {
  border-radius: calc(var(--ph-radius) - 1px) calc(var(--ph-radius) - 1px) 0 0;
}

.ph-toggle[open] > .ph-toggle__trigger::after {
  transform: rotate(180deg);
}

.ph-toggle__trigger:hover {
  background: var(--ph-home-bg-alt);
  color: var(--ph-text-primary);
}

.ph-toggle__body {
  padding: .75em 1em 1em;
  border-top: 1px solid var(--ph-border);
  background: var(--ph-home-bg);
}

.ph-toggle__body > * { margin-top: 0; margin-bottom: .5em; }
.ph-toggle__body > *:last-child { margin-bottom: 0; }

.ph-toggle__body p + ul,
.ph-toggle__body p + ol { margin-top: 1.25em; }

.ph-toggle__body ul,
.ph-toggle__body ol {
  margin: .25em 0 .5em;
  padding-left: 1em;
}

.ph-toggle__body li { margin-bottom: .2em; }

.ph-card__body .ph-toggle { margin-top: 40px; }

[data-theme="dark"] .ph-toggle {
  background: var(--ph-bg);
  border-color: rgba(255,255,255,.1);
}

[data-theme="dark"] .ph-toggle__trigger {
  color: var(--ph-text-primary);
}

[data-theme="dark"] .ph-toggle__trigger:hover {
  background: rgba(255,255,255,.05);
}

[data-theme="dark"] .ph-toggle__trigger::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0ede8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

[data-theme="dark"] .ph-toggle__trigger {
  background: var(--ph-bg-surface);
}

[data-theme="dark"] .ph-toggle__body {
  background: var(--ph-bg-surface);
  border-top-color: rgba(255,255,255,.08);
}

/* ==========================================================================
   ARCHIVO — Página de todos los proyectos
   ========================================================================== */

.ph-archivo-header {
  padding: 7rem 120px 3rem;
  background: var(--ph-home-bg);
}

.ph-archivo-header__back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8125rem;
  font-family: var(--ph-font-sans);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ph-text-muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color .2s;
}

.ph-archivo-header__back-link:hover {
  color: var(--ph-accent);
}

.ph-archivo-header__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-family: var(--ph-font-serif);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
}

.ph-home-cases--archivo {
  padding-top: 2rem;
}

.ph-home-cases__grid--two-col {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
  .ph-home-cases__grid--two-col {
    grid-template-columns: 1fr;
  }
}

/* CTA "Ver todos los proyectos" al final de homepage */
.ph-home-cases__more {
  display: flex;
  justify-content: flex-end;
  padding: 2rem 120px 0;
}

.ph-home-cases__more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ph-font-sans);
  font-size: .875rem;
  letter-spacing: .04em;
  color: var(--ph-text-muted);
  text-decoration: none;
  transition: color .2s, gap .2s;
}

.ph-home-cases__more-link:hover {
  color: var(--ph-accent);
  gap: 12px;
}

.ph-archivo-empty {
  padding: 4rem 120px;
  color: var(--ph-text-muted);
  font-family: var(--ph-font-sans);
}
