/* ============================================
   CLAUDIO ARAYA — "Espacio Interior"
   Unique editorial design for mindfulness
   ============================================ */

:root {
  /* Paleta psicológica: calma, confianza, calidez */
  --parchment: #F6F4F1;
  --cream: #EDE9E3;
  --ink: #1B2E38;
  --ink-soft: #2C3E50;
  --ink-muted: #607D8B;
  --ink-faint: #90A4AE;
  --bronze: #B08968;
  --bronze-light: #D4A574;
  --bronze-glow: rgba(176,137,104,0.12);
  --teal: #3B7A8C;
  --teal-deep: #1E3D4A;
  --teal-light: #5BA0B0;
  --teal-subtle: #E8F1F3;
  --sage: #7BA68E;
  --sage-light: #A8CCAF;
  --lavender: #9B8EC4;
  --surface: #FFFFFF;
  --border: #D8E0E3;

  --f-display: 'Playfair Display', 'Georgia', serif;
  --f-body: 'DM Sans', 'Inter', system-ui, sans-serif;
  --f-mono: 'Space Mono', 'Courier New', monospace;

  --nav-h: 0px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-smooth: cubic-bezier(.4, 0, .2, 1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }

body {
  font-family: var(--f-body);
  color: var(--ink-soft);
  background: var(--parchment);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul, ol { list-style: none; }

::selection { background: var(--teal-subtle); color: var(--ink); }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

/* --- Header Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: all .5s var(--ease);
}

.header--transparent {
  background: transparent;
  padding: 1.75rem 0;
}

.header--solid {
  background: rgba(246,244,241,.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: .75rem 0;
  box-shadow: 0 0 40px rgba(30,61,74,.06);
}

.header__inner {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand — enso draws itself on load */
.header__brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  z-index: 101;
  text-decoration: none;
}

.header__enso {
  width: 34px;
  height: 34px;
  transition: transform .5s var(--ease);
}

.header--solid .header__enso { transform: scale(.85); }

.header__enso path {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawEnso 2s var(--ease) .3s forwards;
  transition: stroke .3s var(--ease);
}

.header--transparent .header__enso path { stroke: rgba(91,160,176,.8); }

@keyframes drawEnso {
  to { stroke-dashoffset: 0; }
}

.header__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header__brand-name {
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
  transition: color .3s var(--ease), font-size .4s var(--ease);
}

.header--transparent .header__brand-name { color: var(--parchment); }
.header--solid .header__brand-name { font-size: 1.05rem; }

.brand-cl {
  color: var(--teal);
  font-weight: 400;
}

.header--transparent .brand-cl { color: var(--teal-light); }

.header__brand-role {
  font-family: var(--f-mono);
  font-size: .5rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal);
  opacity: 1;
  transition: opacity .3s var(--ease), color .3s var(--ease);
  margin-top: 2px;
}

.header--transparent .header__brand-role { color: var(--teal-light); opacity: .7; }
.header--solid .header__brand-role { opacity: 0; height: 0; margin: 0; overflow: hidden; }

/* Nav links — monospace, small, intentional */
.header__nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.header__link {
  font-family: var(--f-mono);
  font-size: .6875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: .5rem .85rem;
  border-radius: 6px;
  transition: all .3s var(--ease);
  position: relative;
}

.header__link:hover {
  color: var(--teal-deep);
  background: var(--teal-subtle);
}

.header__link--active {
  color: var(--teal-deep);
  background: var(--teal-subtle);
  font-weight: 700;
}

/* Transparent state — links on dark bg */
.header--transparent .header__link {
  color: rgba(246,244,241,.5);
}

.header--transparent .header__link:hover {
  color: var(--parchment);
  background: rgba(246,244,241,.08);
}

.header--transparent .header__link--active {
  color: var(--parchment);
  background: rgba(246,244,241,.1);
}

/* Small active dot before active link */
.header__link--active::before {
  content: '';
  position: absolute;
  left: .4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
}

.header--transparent .header__link--active::before {
  background: var(--teal-light);
}

/* Shift text to make room for dot */
.header__link--active {
  padding-left: 1.25rem;
}

/* Side dots — decorative scroll indicator (desktop only) */
.nav-dots {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  transition: all .4s var(--ease);
}

.nav-dot--active {
  background: var(--teal);
  transform: scale(1.5);
}

/* Hamburger for mobile */
.nav-hamburger {
  display: none;
  position: relative;
  z-index: 201;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: all .3s var(--ease);
  transform-origin: center;
}

.header--transparent .nav-hamburger span { background: var(--parchment); }
.header--solid .nav-hamburger span { background: var(--ink); }

.nav-hamburger--open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-hamburger--open span:nth-child(2) { opacity: 0; }
.nav-hamburger--open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.nav-hamburger--open span { background: var(--parchment) !important; }

.nav-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: linear-gradient(160deg, var(--teal-deep) 0%, #1A3340 60%, #0F2530 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 2rem 3rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s var(--ease);
  overflow-y: auto;
}

.nav-mobile-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(91,160,176,.08) 0%, transparent 40%),
                    radial-gradient(circle at 80% 70%, rgba(123,166,142,.06) 0%, transparent 50%);
  pointer-events: none;
}

.nav-mobile-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile-overlay a {
  font-family: var(--f-display);
  font-size: clamp(1.1rem, 3.5vw, 1.45rem);
  font-weight: 400;
  color: var(--parchment);
  padding: .6em 0;
  border-bottom: 1px solid rgba(245,240,232,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all .3s var(--ease);
  letter-spacing: -.01em;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
}

/* Close button (X) */
.nav-mobile-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(245,240,232,.06);
  border: 1px solid rgba(245,240,232,.12);
  color: var(--parchment);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  transform: scale(.85);
  transition: all .35s var(--ease) .15s;
  padding: 0;
}
.nav-mobile-close svg { width: 18px; height: 18px; display: block; }
.nav-mobile-close:hover {
  background: rgba(245,240,232,.12);
  border-color: rgba(245,240,232,.25);
  transform: scale(1) rotate(90deg);
}
.nav-mobile-overlay--open .nav-mobile-close {
  opacity: 1;
  transform: scale(1);
}

.nav-mobile-overlay--open a {
  opacity: 1;
  transform: translateY(0);
}

.nav-mobile-overlay--open a:nth-child(1) { transition-delay: .1s; }
.nav-mobile-overlay--open a:nth-child(2) { transition-delay: .15s; }
.nav-mobile-overlay--open a:nth-child(3) { transition-delay: .2s; }
.nav-mobile-overlay--open a:nth-child(4) { transition-delay: .25s; }
.nav-mobile-overlay--open a:nth-child(5) { transition-delay: .3s; }
.nav-mobile-overlay--open a:nth-child(6) { transition-delay: .35s; }
.nav-mobile-overlay--open a:nth-child(7) { transition-delay: .4s; }

.nav-mobile-overlay a::after {
  content: '→';
  font-family: var(--f-body);
  font-size: .5em;
  color: var(--teal-light);
  opacity: 0;
  transform: translateX(-10px);
  transition: all .3s var(--ease);
}

.nav-mobile-overlay a:hover {
  color: var(--teal-light);
  padding-left: .5rem;
}

.nav-mobile-overlay a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* Mobile menu brand at top */
.nav-mobile-overlay__brand {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--parchment);
  z-index: 2;
  opacity: 0;
  transition: opacity .4s var(--ease) .1s;
}

.nav-mobile-overlay--open .nav-mobile-overlay__brand {
  opacity: 1;
}

.nav-mobile-overlay__brand .brand-cl {
  color: var(--teal-light);
}

/* Mobile menu footer */
.nav-mobile-overlay__footer {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--f-mono);
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(245,240,232,.4);
  opacity: 0;
  transition: opacity .5s var(--ease) .4s;
}

.nav-mobile-overlay--open .nav-mobile-overlay__footer {
  opacity: 1;
}

.nav-mobile-overlay__footer a {
  font-size: inherit;
  padding: 0;
  border: 0;
  color: inherit;
  display: inline-flex;
  width: auto;
}

.nav-mobile-overlay__footer a:hover {
  color: var(--teal-light);
  padding-left: 0;
}

.nav-mobile-overlay__footer a::after {
  display: none;
}

/* ============================
   HERO — Full screen, dramatic
   ============================ */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
  background: var(--teal-deep);
}

/* Video background */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 1;
}

/* Overlay — gradient tint over video */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(160deg,
      rgba(30,61,74,.82) 0%,
      rgba(26,51,64,.72) 35%,
      rgba(36,59,72,.78) 100%),
    linear-gradient(to top,
      rgba(30,61,74,.95) 0%,
      transparent 35%);
  pointer-events: none;
}

.hero__left {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4rem 3rem 4rem 5vw;
  position: relative;
  z-index: 3;
}

.hero__name {
  font-family: var(--f-display);
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  font-weight: 700;
  color: var(--parchment);
  line-height: .92;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

.hero__name em {
  font-style: italic;
  font-weight: 400;
  display: block;
  font-size: .55em;
  color: var(--teal-light);
  letter-spacing: 0;
}

.hero__name em.brand-cl {
  display: inline;
  font-style: normal;
  font-size: inherit;
  font-weight: 300;
  color: var(--teal-light);
  margin-top: .3em;
}

.hero__tagline {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 2.5rem;
}

.hero__quote {
  font-family: var(--f-display);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-style: italic;
  color: rgba(246,244,241,.55);
  max-width: 380px;
  line-height: 1.6;
  border-left: 2px solid var(--teal-light);
  padding-left: 1.25rem;
}

.hero__right {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Breathing circle */
.breath {
  width: min(380px, 50vw);
  height: min(380px, 50vw);
  border-radius: 50%;
  position: relative;
}

.breath__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(91,160,176,.3);
  animation: breathe 10s ease-in-out infinite;
}

.breath__ring:nth-child(2) {
  inset: 15%;
  animation-delay: -2.5s;
  border-color: rgba(91,160,176,.2);
}

.breath__ring:nth-child(3) {
  inset: 30%;
  animation-delay: -5s;
  border-color: rgba(123,166,142,.18);
}

.breath__core {
  position: absolute;
  inset: 42%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--teal-light) 0%, rgba(123,166,142,.3) 50%, transparent 70%);
  opacity: .35;
  animation: breatheCore 10s ease-in-out infinite;
}

.breath__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(180,215,225,.75);
  animation: breatheText 10s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: .6; }
}
@keyframes breatheCore {
  0%, 100% { transform: scale(1); opacity: .4; }
  50% { transform: scale(1.3); opacity: .15; }
}
@keyframes breatheText {
  0%, 100% { opacity: .5; }
  25% { opacity: 0; }
  50% { opacity: .5; }
  75% { opacity: 0; }
}

.hero__scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  z-index: 4;
}

.hero__scroll-cue span {
  font-family: var(--f-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--teal-light), transparent);
  animation: scrollDown 2.5s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { clip-path: inset(0 0 100% 0); }
  50% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(100% 0 0 0); }
}

/* ============================
   SECTIONS — Asymmetric editorial
   ============================ */

/* Section number watermark */
.sec-num {
  font-family: var(--f-display);
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1px var(--border);
  line-height: 1;
  position: absolute;
  user-select: none;
  pointer-events: none;
}

/* --- About --- */
.about {
  padding: 10rem 0 8rem;
  position: relative;
  overflow: hidden;
}

.about .sec-num {
  top: 2rem;
  right: 5vw;
}

.about__inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 5vw;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 6rem;
  align-items: start;
}

.about__visual {
  position: relative;
}

.about__photo-frame {
  aspect-ratio: 3/4;
  background: linear-gradient(145deg, var(--teal-subtle) 0%, var(--cream) 100%);
  border-radius: 0 60px 0 0;
  overflow: hidden;
  position: relative;
}

.about__photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(59,122,140,.08), transparent 60%),
    radial-gradient(circle at 70% 80%, rgba(123,166,142,.08), transparent 50%);
}

.about__photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about__enso-large {
  width: 40%;
  opacity: .08;
}

.about__float-tag {
  position: absolute;
  bottom: -1.5rem;
  left: -1.5rem;
  background: var(--teal-deep);
  color: var(--parchment);
  padding: .8rem 1.6rem;
  border-radius: 6px;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about__text {
  padding-top: 3rem;
}

.about__label {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.about__label::before {
  display: none;
}

.about__title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.about__body p {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
}

.about__stats {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.about__stat {
  text-align: left;
}

.about__stat strong {
  font-family: var(--f-display);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--ink);
  display: block;
  line-height: 1;
}

.about__stat span {
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  margin-top: .35rem;
  display: block;
}

/* --- Books — Horizontal scroll --- */
.books {
  padding: 8rem 0;
  background: linear-gradient(170deg, var(--teal-deep) 0%, #1A3340 100%);
  color: var(--parchment);
  position: relative;
  overflow: hidden;
}

.books .sec-num {
  top: 1rem;
  left: 5vw;
  -webkit-text-stroke-color: rgba(245,240,232,.06);
}

.books__header {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 5vw;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
}

.books__header-left .about__label {
  color: var(--teal-light);
}

.books__header-left .about__label::before {
  display: none;
}

.books__header h2 {
  color: var(--parchment);
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.02em;
}

.books__scroll-hint {
  font-family: var(--f-mono);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.books__scroll-hint svg {
  width: 20px;
  animation: slideRight 1.5s ease-in-out infinite;
}

@keyframes slideRight {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}

.books__track {
  display: flex;
  gap: 2rem;
  padding: 0 5vw 2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}

.books__track::-webkit-scrollbar { display: none; }
.books__track:active { cursor: grabbing; }

.book-card {
  min-width: 300px;
  max-width: 300px;
  scroll-snap-align: start;
  flex-shrink: 0;
  background: rgba(245,240,232,.06);
  border: 1px solid rgba(245,240,232,.08);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .4s var(--ease), border-color .4s var(--ease);
}

.book-card:hover {
  transform: translateY(-6px);
  border-color: var(--teal-light);
}

.book-card__cover {
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  font-family: var(--f-display);
  font-size: 1.125rem;
  font-style: italic;
  color: rgba(245,240,232,.85);
  text-align: center;
  line-height: 1.4;
}

.book-card__cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 1;
  padding: 1rem;
}

.book-card__cover span.book-card__year {
  z-index: 2;
}

.book-card__year {
  position: absolute;
  top: .75rem;
  right: .75rem;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: rgba(30,61,74,.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: 6px;
}

.book-card__body {
  padding: 1.5rem;
  border-top: 1px solid rgba(245,240,232,.06);
}

.book-card__title {
  font-family: var(--f-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--parchment);
  margin-bottom: .35rem;
  line-height: 1.3;
}

.book-card__publisher {
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-bottom: .75rem;
}

.book-card__desc {
  font-size: 0.8125rem;
  color: rgba(245,240,232,.45);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Book cover gradients — calming therapeutic tones */
.book-card:nth-child(1) .book-card__cover { background: linear-gradient(160deg, #2B5D6B, #4A8A98); }
.book-card:nth-child(2) .book-card__cover { background: linear-gradient(160deg, #5A7A6A, #7BA68E); }
.book-card:nth-child(3) .book-card__cover { background: linear-gradient(160deg, #4A6878, #6B9AAA); }
.book-card:nth-child(4) .book-card__cover { background: linear-gradient(160deg, #6B5A7A, #9B8EC4); }
.book-card:nth-child(5) .book-card__cover { background: linear-gradient(160deg, #5A7068, #7A9E8A); }
.book-card:nth-child(6) .book-card__cover { background: linear-gradient(160deg, #3D6070, #5D8898); }
.book-card:nth-child(7) .book-card__cover { background: linear-gradient(160deg, #7A6B58, #A89680); }
.book-card:nth-child(8) .book-card__cover { background: linear-gradient(160deg, #4A7A6E, #6AACA0); }

.books__cta {
  max-width: 1300px;
  margin: 3rem auto 0;
  padding: 0 5vw;
}

/* --- Blog — numbered list, not cards --- */
.blog-sec {
  padding: 8rem 0;
  position: relative;
}

.blog-sec .sec-num {
  top: 1rem;
  right: 5vw;
}

.blog-sec__header {
  max-width: 1300px;
  margin: 0 auto 4rem;
  padding: 0 5vw;
}

.blog-sec__header h2 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.02em;
}

.blog-sec__list {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 5vw;
}

.blog-entry {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.75rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: all .3s var(--ease);
  position: relative;
  text-decoration: none;
  color: inherit;
}

.blog-entry:first-child { border-top: 1px solid var(--border); }

.blog-entry:hover {
  background: var(--teal-subtle);
  padding-left: 1rem;
  padding-right: 1rem;
  margin-left: -1rem;
  margin-right: -1rem;
  border-radius: 12px;
}

.blog-entry__img {
  width: 160px;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.blog-entry__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}

.blog-entry:hover .blog-entry__img img {
  transform: scale(1.06);
}

.blog-entry__content {}

.blog-entry__date {
  font-family: var(--f-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .5rem;
}

.blog-entry__title {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .5rem;
  line-height: 1.25;
  transition: color .3s var(--ease);
}

.blog-entry:hover .blog-entry__title { color: var(--teal); }

.blog-entry__excerpt {
  font-size: .9375rem;
  color: var(--ink-muted);
  line-height: 1.7;
  max-width: 640px;
}

.blog-sec__cta {
  max-width: 1300px;
  margin: 3rem auto 0;
  padding: 0 5vw;
}

/* --- Foundation --- */
.foundation {
  padding: 5rem 0;
  background: var(--cream);
}

.foundation__card {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 5vw;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: center;
}

.foundation__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--parchment);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.foundation__icon svg { width: 32px; height: 32px; color: var(--teal); }

.foundation__text h3 {
  font-size: 1.5rem;
  margin-bottom: .5rem;
}

.foundation__text p {
  font-size: .9375rem;
  color: var(--ink-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.foundation__links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Newsletter — full bleed dark strip --- */
.newsletter {
  padding: 5rem 0;
  background: linear-gradient(160deg, var(--teal-deep) 0%, #1A3340 100%);
  color: var(--parchment);
  text-align: center;
}

.newsletter__inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 2rem;
}

.newsletter h2 {
  color: var(--parchment);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.newsletter p {
  color: var(--ink-faint);
  font-size: .9375rem;
  margin-bottom: 2rem;
}

.newsletter__form {
  display: flex;
  gap: .5rem;
}

.newsletter__input {
  flex: 1;
  padding: .9rem 1.2rem;
  border: 1px solid rgba(245,240,232,.12);
  border-radius: 8px;
  background: rgba(245,240,232,.06);
  color: var(--parchment);
  font-family: var(--f-body);
  font-size: .9rem;
  outline: none;
  transition: border-color .3s var(--ease);
}

.newsletter__input::placeholder { color: var(--ink-faint); }
.newsletter__input:focus { border-color: var(--teal-light); }

.newsletter__privacy {
  font-size: .75rem;
  color: rgba(245,240,232,.3);
  margin-top: 1rem;
}

/* --- Contact — split layout --- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80vh;
}

.contact__left {
  background: linear-gradient(170deg, var(--teal-deep) 0%, #1A3340 100%);
  color: var(--parchment);
  padding: 6rem 5vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact__left h2 {
  color: var(--parchment);
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.contact__left > p {
  color: var(--ink-faint);
  font-size: .9375rem;
  line-height: 1.8;
  max-width: 420px;
  margin-bottom: 2.5rem;
}

.contact__details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact__detail {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact__detail-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  border: 1px solid rgba(245,240,232,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-light);
}

.contact__detail-icon svg { width: 16px; height: 16px; }

.contact__detail-text {
  font-size: .875rem;
}

.contact__detail-text small {
  display: block;
  font-size: .6875rem;
  color: var(--ink-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.contact__detail-text a {
  color: var(--teal-light);
  transition: color .2s;
}

.contact__detail-text a:hover { color: var(--parchment); }

.contact__right {
  background: var(--parchment);
  padding: 6rem 5vw;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact__form {
  width: 100%;
  max-width: 440px;
}

.form__group {
  margin-bottom: 1.25rem;
}

.form__label {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: .5rem;
}

.form__input,
.form__textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: none;
  border-bottom: 1.5px solid var(--border);
  background: transparent;
  font-family: var(--f-body);
  font-size: .9375rem;
  color: var(--ink);
  outline: none;
  transition: border-color .3s var(--ease);
  border-radius: 0;
}

.form__input:focus,
.form__textarea:focus {
  border-color: var(--teal);
}

.form__textarea {
  min-height: 100px;
  resize: vertical;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  font-family: var(--f-body);
  font-size: .875rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all .3s var(--ease);
}

.btn--primary {
  background: var(--teal);
  color: #fff;
}

.btn--primary:hover {
  background: #2F6878;
  transform: translateY(-1px);
}

.btn--outline {
  border: 1.5px solid var(--border);
  color: var(--ink-soft);
}

.btn--outline:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* --- Recursos Grid --- */
.recursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

.recurso-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 1.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  transition: all .3s var(--ease);
  text-align: center;
}

.recurso-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,.08);
  border-color: var(--teal);
}

.recurso-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recurso-icon svg {
  width: 24px;
  height: 24px;
}

.recurso-title {
  font-family: var(--f-body);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.recurso-desc {
  font-family: var(--f-body);
  font-size: .75rem;
  color: var(--ink-muted);
  line-height: 1.5;
  text-align: center;
  margin-top: -.25rem;
}

.recurso-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .5rem;
  padding: .4rem 1rem;
  background: var(--teal);
  color: #fff;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 500;
  transition: all .2s ease;
}

.recurso-card:hover .recurso-btn {
  background: var(--teal-deep);
  transform: scale(1.05);
}

@media (max-width: 480px) {
  .recursos-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .recurso-card { padding: 1.25rem .75rem; }
}

/* Recursos Modal */
.recursos-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(12,12,12,.5);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.recursos-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.recursos-modal {
  background: var(--parchment);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  transform: translateY(16px);
  transition: transform .3s var(--ease);
}
.recursos-modal-overlay.active .recursos-modal {
  transform: translateY(0);
}
.recursos-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,.05);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.recursos-modal-close:hover { background: rgba(0,0,0,.1); }
.recursos-modal-close svg { width: 18px; height: 18px; color: var(--ink-muted); }
.recursos-modal-title {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1.25rem;
  padding-right: 2rem;
}
.recursos-modal-links {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.recurso-link-item {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  transition: all .2s var(--ease);
}
.recurso-link-item:hover {
  border-color: var(--teal);
  transform: translateX(4px);
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.recurso-link-title {
  font-weight: 500;
  color: var(--ink);
  font-size: .9375rem;
  margin-bottom: .2rem;
}
.recurso-link-desc {
  font-size: .8125rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.btn--outline-light {
  border: 1.5px solid rgba(245,240,232,.2);
  color: var(--parchment);
}

.btn--outline-light:hover {
  border-color: var(--teal-light);
  color: var(--teal-light);
}

.btn--block { width: 100%; justify-content: center; }
.btn svg { width: 14px; height: 14px; }

/* --- Footer --- */
.footer {
  background: #0D1E24;
  color: rgba(245,240,232,.4);
  padding: 4rem 0 2rem;
}

.footer__inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 5vw;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand {
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--parchment);
  margin-bottom: .75rem;
}

.footer__desc {
  font-size: .8125rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer__col-title {
  font-family: var(--f-mono);
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245,240,232,.25);
  margin-bottom: 1rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.footer__link {
  font-size: .8125rem;
  transition: color .2s;
}

.footer__link:hover { color: var(--teal-light); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245,240,232,.06);
  font-size: .75rem;
}

.footer__social {
  display: flex;
  gap: .75rem;
}

.footer__social a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(245,240,232,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.footer__social a:hover {
  border-color: var(--teal-light);
  color: var(--teal-light);
}

.footer__social svg { width: 14px; height: 14px; }

/* --- Page Header (inner pages) --- */
.page-header {
  min-height: 40vh;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(160deg, var(--teal-deep) 0%, #1A3340 100%);
  color: var(--parchment);
  padding: calc(72px + 3rem) 5vw 3rem;
  position: relative;
}

.page-header h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  color: var(--parchment);
  letter-spacing: -0.03em;
  font-weight: 700;
}

.page-header p {
  color: var(--ink-faint);
  font-size: 1rem;
  margin-top: .75rem;
  max-width: 520px;
}

/* --- Inner page sections --- */
.page-section {
  padding: 5rem 5vw;
  max-width: 1300px;
  margin: 0 auto;
}

/* Research list (inner page) */
.research__list {}

.research__item {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.research__year {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--teal);
  padding-top: .3em;
}

.research__title {
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: .25rem;
}

.research__journal {
  font-size: .8125rem;
  font-style: italic;
  color: var(--ink-faint);
}

.research__authors {
  font-size: .8125rem;
  color: var(--ink-muted);
  margin-top: .15rem;
}

/* Blog page articles */
.blog-page__grid {
  display: flex;
  flex-direction: column;
}

.blog-page__article {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.blog-page__article:first-child { border-top: 1px solid var(--border); }

/* Contact page */
.contact-page__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
}

/* Foundation info card (inner pages) */
.info-card {
  background: var(--cream);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  margin-top: 4rem;
}

.info-card h3 {
  font-size: 1.5rem;
  margin-bottom: .75rem;
}

.info-card p {
  font-size: .9375rem;
  color: var(--ink-muted);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

.info-card__links {
  display: flex;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
}

/* --- Scroll animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

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

.reveal--delay-1 { transition-delay: .1s; }
.reveal--delay-2 { transition-delay: .2s; }
.reveal--delay-3 { transition-delay: .3s; }

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ink);
  color: var(--parchment);
  padding: .85rem 1.75rem;
  border-radius: 10px;
  font-size: .875rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  z-index: 9999;
  opacity: 0;
  transition: all .35s var(--ease);
  pointer-events: none;
}

.toast--success { background: #2D5A3D; }
.toast--error { background: #6B2D2D; }

.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* --- Loader --- */
.loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================
   SEMANTIC GRIDS (replace inline styles for proper responsive)
   ============================ */
.mindful-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.research-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: center;
}
@media (max-width: 1024px) {
  .mindful-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .research-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
  .mindful-grid { gap: 1rem; }
  .research-grid { gap: 1.5rem; }
}

/* ============================
   RESPONSIVE — 3 breakpoints: desktop(>1024), tablet(768-1024), mobile(<768), small(<480)
   ============================ */

/* --- LARGE TABLET / SMALL DESKTOP (1024px) --- */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .hero__left { padding: 8rem 2rem 3rem; min-height: 60vh; justify-content: center; }
  .hero__right { display: none; }
  .about__inner { grid-template-columns: 1fr; gap: 3rem; }
  .about__visual { max-width: 400px; }

  /* Override inline grid-template-columns on sections with inline styles */
  #investigacion [style] { grid-template-columns: 1fr !important; gap: 2rem !important; }
  #mindfulness-info [style] { grid-template-columns: 1fr !important; }

  .contact-page__grid { grid-template-columns: 1fr; }

  .foundation__card { grid-template-columns: 1fr; text-align: center; }
  .foundation__icon { margin: 0 auto; }
}

/* --- TABLET / MOBILE (768px) — Hamburger activates here, not at 1024 --- */
@media (max-width: 768px) {
  /* Hide nav, show hamburger — 7 links overflow below 768px */
  .header__nav { display: none; }
  .nav-hamburger { display: flex; }
  .nav-dots { display: none; }

  .hero__name { font-size: clamp(2.5rem, 12vw, 4rem); }
  .hero__left { padding: 6rem 1.5rem 3rem; }
  .hero__scroll-cue { display: none; }

  .about { padding: 5rem 0 4rem; }
  .about__inner { padding: 0 1.5rem; }
  .about__stats { flex-direction: column; gap: 1.5rem; }

  /* Reinforce inline grid overrides for smaller screens */
  #mindfulness-info [style] { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  #investigacion [style] { grid-template-columns: 1fr !important; gap: 2rem !important; }

  .books { padding: 5rem 0; }
  .books__header { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 0 1.5rem; }
  .books__track { padding: 0 1.5rem 1.5rem; gap: 1rem; }
  .book-card { min-width: 260px; max-width: 260px; }

  .blog-sec { padding: 5rem 0; }
  .blog-sec__header { padding: 0 1.5rem; }
  .blog-sec__list { padding: 0 1.5rem; }
  .blog-entry { grid-template-columns: 120px 1fr; gap: 1rem; }
  .blog-entry__img { width: 120px; height: 90px; }

  .newsletter__form { flex-direction: column; }

  /* Contact collapses to single column at tablet, not 1024 */
  .contact { grid-template-columns: 1fr; min-height: auto; }
  .contact__left, .contact__right { padding: 3rem 1.5rem; }

  .page-header { padding: 6rem 1.5rem 2rem; min-height: 30vh; }
  .page-section { padding: 3rem 1.5rem; }

  .research__item { grid-template-columns: 60px 1fr; gap: 1rem; }

  .footer__inner { padding: 0 1.5rem; }
  /* Footer: 2-column at tablet */
  .footer__grid, .footer__grid[style] { grid-template-columns: 1fr 1fr !important; gap: 2rem; }
  .footer__bottom { flex-direction: column; gap: 1rem; text-align: center; }

  /* Recursos modal: reduce padding on tablet */
  .recursos-modal-overlay { padding: 1.25rem !important; }
  .recursos-modal { max-height: 90vh; }
}

/* --- SMALL MOBILE (480px) — narrow phones --- */
@media (max-width: 480px) {
  .about__float-tag { position: relative; bottom: auto; left: auto; display: inline-block; margin-top: 1rem; }
  .blog-entry { grid-template-columns: 1fr; gap: .75rem; }
  .blog-entry__img { width: 100%; height: 160px; }

  /* Smaller book cards for narrow viewports */
  .book-card { min-width: 240px; max-width: 240px; }

  /* Footer: single column at mobile */
  .footer__grid, .footer__grid[style] { grid-template-columns: 1fr !important; gap: 1.5rem; }

  /* Recursos modal: minimal padding on small phones */
  .recursos-modal-overlay { padding: .5rem !important; }
  .recursos-modal { max-width: 100% !important; border-radius: 12px !important; }

  /* Hero padding tighter */
  .hero__left { padding: 5rem 1rem 2rem; }

  /* Newsletter form tighter */
  .newsletter__form { gap: .5rem; }
  .newsletter__form input, .newsletter__form button { padding: .75rem 1rem; font-size: .85rem; }

  /* Research items tighter */
  .research__item { grid-template-columns: 50px 1fr; gap: .75rem; }

  /* Section padding tighter */
  .page-section { padding: 2rem 1rem; }
  .contact__left, .contact__right { padding: 2rem 1rem; }
}

/* Print */
@media print {
  .nav-brand, .nav-dots, .nav-hamburger, .hero__right, .newsletter, .footer { display: none; }
  body { background: #fff; color: #000; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

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