/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:          #F7F5F0;
  --bg-2:        #EDE7DB;
  --bg-dark:     #1C1814;
  --paper:       #FFFFFF;
  --ink:         #1C1814;
  --ink-soft:    #2C2820;
  --ink-mute:    #6B5F52;
  --accent:      #1652A8;
  --accent-light:#2A6DD9;
  --accent-2:    #C4622D;
  --accent-3:    #D4A853;
  --line:        rgba(28,24,20,0.12);
  --line-accent: rgba(22,82,168,0.18);

  --serif:  "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:   "Inter", system-ui, -apple-system, sans-serif;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --gutter:      clamp(1.25rem, 5vw, 4rem);
  --max-w:       1280px;
  --nav-h:       72px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -0.01em; }
::selection { background: var(--accent); color: var(--paper); }

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

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 500;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.reveal[data-split] { opacity: 1; transform: none; }

[data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .9s var(--ease-soft), transform .9s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

[data-reveal-mask] {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease-soft);
}
[data-reveal-mask].is-revealed { clip-path: inset(0); }

/* =============================================================
   4. Typography
   ============================================================= */
.kicker {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.kicker-accent {
  color: var(--accent);
}

/* =============================================================
   5. Cursor
   ============================================================= */
.cursor {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  display: none; opacity: 0;
  mix-blend-mode: multiply;
  transition: opacity .25s var(--ease-out);
}
.cursor.is-ready { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px; margin: -3px;
  background: var(--accent); border-radius: 50%;
}
.cursor-ring {
  width: 30px; height: 30px; margin: -15px;
  border: 1.5px solid var(--accent); border-radius: 50%;
  transition: width .4s var(--ease-out), height .4s var(--ease-out), margin .4s var(--ease-out), border-color .3s;
}
.cursor.is-interactive .cursor-ring { width: 50px; height: 50px; margin: -25px; border-color: var(--accent-2); }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }

/* =============================================================
   6. Navigation
   ============================================================= */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .45s var(--ease-out), box-shadow .45s var(--ease-out), backdrop-filter .45s;
}
.nav.is-scrolled {
  background: rgba(247,245,240,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
}
.nav-logo {
  font-family: var(--serif); font-size: 1.25rem; letter-spacing: .02em;
  display: flex; flex-direction: column; line-height: 1.1;
}
.nav-logo span:first-child { font-style: italic; color: var(--accent); }
.nav-logo span:last-child { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }

.nav-links {
  display: none; list-style: none; gap: 2.2rem; padding: 0;
}
@media (min-width: 960px) { .nav-links { display: flex; } }

.nav-link {
  font-size: .8rem; font-weight: 450; letter-spacing: .04em;
  text-transform: uppercase; position: relative; padding: .3rem 0;
}
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1.5px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-cta {
  display: none; align-items: center; gap: .5rem;
}
@media (min-width: 720px) { .nav-cta { display: flex; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.5rem;
  font-size: .78rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 3px;
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background .3s, color .3s;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); transition-duration: .1s; }

.btn-primary {
  background: var(--accent); color: var(--paper);
  box-shadow: 0 4px 14px rgba(22,82,168,0.22);
}
.btn-primary:hover { box-shadow: 0 14px 36px rgba(22,82,168,0.32); background: var(--accent-light); }

.btn-ghost {
  border: 1.5px solid var(--line); color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }

.btn-earth {
  background: var(--accent-2); color: var(--paper);
  box-shadow: 0 4px 14px rgba(196,98,45,0.22);
}
.btn-earth:hover { box-shadow: 0 14px 36px rgba(196,98,45,0.32); }

.nav-hamburger {
  display: flex; flex-direction: column; gap: 5px; padding: .5rem;
}
@media (min-width: 960px) { .nav-hamburger { display: none; } }
.nav-hamburger span {
  display: block; width: 22px; height: 1.5px; background: var(--ink);
  transition: transform .35s var(--ease-out), opacity .35s;
}

/* Mobile menu */
.nav-mobile {
  position: fixed; inset: 0; z-index: 90;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-soft);
}
.nav-mobile.is-open { clip-path: inset(0); }
.nav-mobile a { font-family: var(--serif); font-size: clamp(2rem, 6vw, 3.5rem); font-style: italic; }

/* =============================================================
   7. Hero
   ============================================================= */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 40%;
  will-change: transform;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(28,24,20,0.75) 0%, rgba(28,24,20,0.3) 40%, rgba(28,24,20,0.1) 70%, transparent 100%),
    linear-gradient(to right, rgba(28,24,20,0.4) 0%, transparent 60%);
}

.hero-grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

.hero-arc {
  position: absolute; bottom: -1px; left: 0; right: 0; z-index: 2;
  height: clamp(60px, 8vw, 120px);
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-content {
  position: relative; z-index: 3;
  padding-bottom: clamp(5rem, 12vw, 9rem);
  padding-top: calc(var(--nav-h) + 2rem);
  width: 100%;
}

.hero-meta {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: 1.2rem;
}
.hero-meta-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-3);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.5); }
}
.hero-meta-text {
  font-size: .68rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(247,245,240,0.75);
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(3rem, 9vw, 7.5rem);
  font-weight: 300;
  line-height: .98;
  color: var(--paper);
  letter-spacing: -.015em;
  text-wrap: balance;
  max-width: 16ch;
  margin-bottom: 1.4rem;
}
.hero-title em { font-style: italic; color: var(--accent-3); }

.hero-sub {
  font-size: clamp(.95rem, 1.8vw, 1.15rem);
  color: rgba(247,245,240,0.8);
  max-width: 44ch;
  line-height: 1.65;
  margin-bottom: 2.2rem;
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: .85rem; align-items: center;
}

.hero-scroll {
  position: absolute; bottom: clamp(5.5rem, 10vw, 8.5rem); right: var(--gutter); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  font-size: .6rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(247,245,240,0.55); writing-mode: vertical-rl;
}
.hero-scroll::before {
  content: ""; width: 1px; height: 40px; background: rgba(247,245,240,0.35);
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* =============================================================
   8. Marquee
   ============================================================= */
.marquee-section {
  background: var(--accent); color: var(--paper);
  padding: .85rem 0; overflow: hidden;
}
.marquee-inner {
  display: flex; gap: 0;
}
.marquee-track {
  display: inline-flex; gap: 2.5rem; white-space: nowrap; will-change: transform;
  padding-right: 2.5rem;
}
.marquee-track span {
  font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
}
.marquee-track .sep { opacity: .45; }

/* =============================================================
   9. Filosofía / About
   ============================================================= */
.section-filosofia {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--bg);
}

.filosofia-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 960px) {
  .filosofia-grid { grid-template-columns: 1fr 1fr; gap: clamp(3rem, 6vw, 6rem); }
}

.filosofia-text {}

.filosofia-eyebrow {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.6rem;
}
.filosofia-eyebrow::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.filosofia-headline {
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  margin-bottom: 1.5rem;
}
.filosofia-headline em { color: var(--accent-2); font-style: italic; }

.filosofia-body {
  font-size: clamp(.95rem, 1.4vw, 1.05rem);
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.filosofia-quote {
  border-left: 3px solid var(--accent);
  padding-left: 1.4rem;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  color: var(--ink-soft);
  line-height: 1.5;
}

.filosofia-img-wrap {
  position: relative;
  border-radius: 4px; overflow: hidden;
  aspect-ratio: 3/4;
}
@media (min-width: 960px) { .filosofia-img-wrap { aspect-ratio: auto; height: min(550px, 55vw); } }

.filosofia-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease-soft), filter .6s;
}
.filosofia-img-wrap:hover img { transform: scale(1.05); filter: saturate(1.12) brightness(1.04); }

.filosofia-badge {
  position: absolute; bottom: 1.5rem; left: 1.5rem;
  background: var(--paper); padding: .8rem 1.1rem; border-radius: 3px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.18);
}
.filosofia-badge-num {
  font-family: var(--serif); font-size: 2rem; font-weight: 300; line-height: 1; color: var(--accent);
}
.filosofia-badge-text {
  font-size: .68rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute);
}

/* =============================================================
   10. Servicios
   ============================================================= */
.section-servicios {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: var(--bg-2);
}

.section-header {
  display: grid; grid-template-columns: 1fr auto; align-items: end;
  margin-bottom: 3rem; gap: 1rem;
}
@media (max-width: 720px) { .section-header { grid-template-columns: 1fr; } }

.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
}
.section-title em { font-style: italic; color: var(--accent); }

.servicios-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}
@media (min-width: 720px) { .servicios-grid { grid-template-columns: repeat(3, 1fr); } }

.servicio-card {
  background: var(--paper);
  padding: 2.2rem 2rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
  transition: transform .5s var(--ease-soft), box-shadow .5s var(--ease-soft);
  --rx: 0deg; --ry: 0deg;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
}
.servicio-card:hover {
  box-shadow: 0 40px 80px -20px rgba(22,82,168,0.14), 0 20px 40px -10px rgba(0,0,0,0.1);
  transition-duration: .2s;
}
.servicio-card::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(220px circle at var(--hx, 50%) var(--hy, 50%),
    rgba(22,82,168,.08), transparent 60%);
  opacity: 0; transition: opacity .35s;
}
.servicio-card:hover::before { opacity: 1; }

.servicio-icon {
  font-size: 1.8rem; margin-bottom: 1.2rem; color: var(--accent);
  display: block; transform: translateZ(20px);
}
.servicio-title {
  font-family: var(--serif); font-size: 1.5rem; margin-bottom: .7rem; transform: translateZ(15px);
}
.servicio-desc {
  font-size: .9rem; color: var(--ink-mute); line-height: 1.7; margin-bottom: 1.5rem; transform: translateZ(10px);
}
.servicio-link {
  font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); display: flex; align-items: center; gap: .4rem; transform: translateZ(20px);
  transition: gap .35s var(--ease-out);
}
.servicio-link:hover { gap: .7rem; }

/* =============================================================
   11. Stats
   ============================================================= */
.section-stats {
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: var(--bg-dark);
  position: relative; overflow: hidden;
}
.section-stats::before {
  content: ""; position: absolute; inset: -10%;
  background:
    radial-gradient(ellipse 60% 60% at 20% 50%, rgba(22,82,168,.22), transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 50%, rgba(196,98,45,.12), transparent 60%);
  filter: blur(60px); pointer-events: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  position: relative;
}
@media (min-width: 720px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-item { text-align: center; }
.stat-num {
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 300; line-height: 1; color: var(--paper);
  margin-bottom: .4rem;
}
.stat-num span { color: var(--accent-3); }
.stat-label {
  font-size: .7rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(247,245,240,0.5);
}

/* =============================================================
   12. Cursos
   ============================================================= */
.section-cursos {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--bg);
}

.cursos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 540px) { .cursos-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .cursos-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.curso-card {
  border-radius: 4px; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .5s var(--ease-soft), box-shadow .5s var(--ease-soft);
}
.curso-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.15);
}

.curso-img {
  aspect-ratio: 4/3; overflow: hidden;
}
.curso-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease-soft), filter .6s;
}
.curso-card:hover .curso-img img { transform: scale(1.08); filter: saturate(1.1); }

.curso-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.curso-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .8rem;
}
.curso-level {
  font-size: .62rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); background: rgba(22,82,168,.08);
  padding: .2rem .6rem; border-radius: 2px;
}
.curso-duration {
  font-size: .7rem; color: var(--ink-mute); font-weight: 500;
}
.curso-title {
  font-family: var(--serif); font-size: 1.3rem; margin-bottom: .5rem;
}
.curso-desc {
  font-size: .85rem; color: var(--ink-mute); line-height: 1.65; flex: 1;
}

/* =============================================================
   13. Fundadora
   ============================================================= */
.section-fundadora {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--bg-2);
}

.fundadora-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem; align-items: center;
}
@media (min-width: 960px) {
  .fundadora-grid { grid-template-columns: 5fr 7fr; gap: clamp(3rem, 6vw, 7rem); }
}

.fundadora-img-wrap {
  position: relative;
}
.fundadora-dome {
  position: absolute; top: -2rem; right: -2rem;
  width: clamp(100px, 18vw, 160px); height: clamp(100px, 18vw, 160px);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--accent); opacity: 0.12;
}
.fundadora-img-frame {
  border-radius: 4px; overflow: hidden;
  aspect-ratio: 3/4;
}
.fundadora-img-frame img { width: 100%; height: 100%; object-fit: cover; }

.fundadora-accent-bar {
  position: absolute; bottom: 1.5rem; right: -1.5rem;
  width: 3px; height: 40%; background: var(--accent-2);
  border-radius: 2px;
}
@media (max-width: 959px) { .fundadora-accent-bar { display: none; } }

.fundadora-eyebrow { margin-bottom: 1.4rem; }

.fundadora-name {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: .4rem;
}
.fundadora-name em { font-style: italic; color: var(--accent-2); }
.fundadora-role {
  font-size: .72rem; font-weight: 500; letter-spacing: .15em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 1.6rem;
}

.fundadora-bio {
  font-size: clamp(.9rem, 1.3vw, 1rem);
  color: var(--ink-soft); line-height: 1.78; margin-bottom: 1.5rem;
}

.fundadora-credentials {
  list-style: none; padding: 0; margin-bottom: 2rem;
  display: flex; flex-direction: column; gap: .65rem;
}
.fundadora-credentials li {
  display: flex; align-items: flex-start; gap: .7rem;
  font-size: .85rem; color: var(--ink-mute);
}
.fundadora-credentials li::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); opacity: .25; flex-shrink: 0; margin-top: .15rem;
}

/* =============================================================
   14. Testimonios
   ============================================================= */
.section-testimonios {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--bg);
}

.testimonios-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: 3rem;
}
@media (min-width: 720px) { .testimonios-grid { grid-template-columns: repeat(3, 1fr); } }

.testimonial-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2.2rem 2rem;
  position: relative;
  transition: transform .5s var(--ease-soft), box-shadow .5s;
}
.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.09);
}
.testimonial-card::before {
  content: "\201C";
  position: absolute; top: 1.2rem; right: 1.5rem;
  font-family: var(--serif); font-size: 4rem; line-height: 1;
  color: var(--accent); opacity: .18;
}

.testimonial-quote {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.6; color: var(--ink-soft);
  margin-bottom: 1.5rem;
}
.testimonial-author { font-weight: 600; font-size: .85rem; color: var(--ink); }
.testimonial-origin { font-size: .72rem; color: var(--ink-mute); margin-top: .15rem; }

/* =============================================================
   15. Contacto
   ============================================================= */
.section-contacto {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--bg-dark);
  position: relative; overflow: hidden;
}
.section-contacto::before {
  content: ""; position: absolute;
  top: -30%; right: -10%; width: 60vmin; height: 60vmin;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--accent); opacity: .07;
  filter: blur(40px); pointer-events: none;
}

.contacto-grid {
  display: grid; grid-template-columns: 1fr; gap: 4rem;
}
@media (min-width: 960px) { .contacto-grid { grid-template-columns: 5fr 7fr; gap: 6rem; } }

.contacto-info-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--paper); margin-bottom: 1rem;
}
.contacto-info-title em { font-style: italic; color: var(--accent-3); }

.contacto-info-desc {
  font-size: clamp(.9rem, 1.2vw, 1rem);
  color: rgba(247,245,240,.65); line-height: 1.75; margin-bottom: 2.5rem;
}

.contacto-links {
  display: flex; flex-direction: column; gap: 1rem;
}
.contacto-link {
  display: flex; align-items: center; gap: .9rem;
  font-size: .85rem; color: rgba(247,245,240,.75);
  transition: color .3s;
}
.contacto-link:hover { color: var(--accent-3); }
.contacto-link-icon {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(247,245,240,.15);
  display: grid; place-items: center; font-size: .85rem;
  flex-shrink: 0;
}

/* Form */
.form-wrap { position: relative; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }

.field { position: relative; }
.field input,
.field textarea,
.field select {
  width: 100%;
  background: rgba(247,245,240,.06);
  border: 1px solid rgba(247,245,240,.15);
  border-radius: 3px;
  color: var(--paper);
  font-family: var(--sans); font-size: .9rem;
  padding: 1.1rem 1rem .65rem;
  transition: border-color .3s, background .3s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: transparent; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: rgba(22,82,168,.08); }

.field label {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  pointer-events: none;
  font-size: .85rem; color: rgba(247,245,240,.45);
  transition: all .25s var(--ease-out);
}
.field textarea ~ label { top: 1.1rem; transform: none; }
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  top: .4rem; transform: none; font-size: .65rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent-3);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 540px) { .form-row { grid-template-columns: 1fr; } }

.form-submit {
  background: var(--accent); color: var(--paper);
  padding: 1rem 2rem; border-radius: 3px;
  font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  transition: background .3s, transform .4s var(--ease-soft), box-shadow .4s var(--ease-soft);
  position: relative; overflow: hidden;
}
.form-submit:hover { background: var(--accent-light); transform: translateY(-3px); box-shadow: 0 16px 40px rgba(22,82,168,.35); }

.form-spinner, .form-check {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.form-label { transition: opacity .3s; }
.contact-form.is-sending .form-label { opacity: 0; }
.contact-form.is-sending .form-spinner { opacity: 1; }
.form-spinner::after {
  content: ""; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: white;
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-success {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .8rem;
  background: var(--bg-dark); border-radius: 4px;
  opacity: 0; pointer-events: none;
  transition: opacity .7s var(--ease-out) .2s;
  text-align: center;
}
.form-success.is-visible { opacity: 1; pointer-events: auto; }
.form-success-title {
  font-family: var(--serif); font-size: 1.8rem; color: var(--paper); font-style: italic;
}
.form-success-msg { font-size: .85rem; color: rgba(247,245,240,.6); }

/* =============================================================
   16. Footer
   ============================================================= */
.footer {
  background: var(--bg-2);
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}
.footer-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 2.5rem; margin-bottom: 3rem;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; } }

.footer-brand-name {
  font-family: var(--serif); font-size: 1.4rem; font-style: italic;
  margin-bottom: .5rem;
}
.footer-brand-desc {
  font-size: .82rem; color: var(--ink-mute); line-height: 1.7; max-width: 28ch;
}

.footer-col-title {
  font-size: .65rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 1rem;
}
.footer-links { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { font-size: .82rem; color: var(--ink-soft); transition: color .3s; }
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: 1rem;
  padding-top: 1.5rem; border-top: 1px solid var(--line);
  font-size: .72rem; color: var(--ink-mute);
}

.footer-credits a { font-size: .65rem; color: var(--ink-mute); opacity: .5; }
.footer-credits a:hover { opacity: 1; }

/* =============================================================
   17. Scroll progress
   ============================================================= */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: 200; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transform-origin: 0 0; transform: scaleX(0); transition: transform .08s linear;
}

/* =============================================================
   18. Galería
   ============================================================= */
.section-galeria {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--bg-2);
}

.galeria-masonry {
  columns: 1;
  gap: 10px;
  margin-top: 3rem;
}
@media (min-width: 540px)  { .galeria-masonry { columns: 2; } }
@media (min-width: 960px)  { .galeria-masonry { columns: 3; } }
@media (min-width: 1280px) { .galeria-masonry { columns: 4; } }

.galeria-item {
  break-inside: avoid;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  cursor: pointer;
  display: block;
}
.galeria-item img {
  width: 100%;
  display: block;
  transition: transform .7s var(--ease-soft), filter .5s;
}
.galeria-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.12) brightness(1.04);
}
.galeria-item::after {
  content: "⊕";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 2rem; color: var(--paper);
  background: rgba(22,82,168,.0);
  opacity: 0;
  transition: opacity .4s, background .4s;
}
.galeria-item:hover::after {
  opacity: 1;
  background: rgba(22,82,168,.28);
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(18,14,10,.95);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease-out);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }

.lightbox-img-wrap {
  position: relative;
  max-width: min(92vw, 1100px);
  max-height: 90svh;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-img {
  max-width: 100%; max-height: 90svh;
  object-fit: contain;
  border-radius: 3px;
  opacity: 0;
  transform: scale(.96);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
  display: block;
}
.lightbox-img.is-loaded { opacity: 1; transform: scale(1); }

.lightbox-close {
  position: fixed; top: 1.2rem; right: 1.5rem;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(247,245,240,.12); color: var(--paper);
  font-size: 1.3rem; line-height: 1;
  display: grid; place-items: center;
  transition: background .3s;
  cursor: pointer;
  border: 0;
}
.lightbox-close:hover { background: rgba(247,245,240,.25); }

.lightbox-arrow {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(247,245,240,.12); color: var(--paper);
  font-size: 1.2rem;
  display: grid; place-items: center;
  cursor: pointer; border: 0;
  transition: background .3s, transform .3s var(--ease-bounce);
  z-index: 2;
}
.lightbox-arrow:hover {
  background: rgba(247,245,240,.25);
  transform: translateY(-50%) scale(1.08);
}
.lightbox-arrow.prev { left: 1rem; }
.lightbox-arrow.next { right: 1rem; }

.lightbox-counter {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  font-size: .7rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(247,245,240,.45);
}

/* =============================================================
   19. Dome decorative element
   ============================================================= */
.dome-deco {
  width: clamp(80px, 14vw, 120px);
  height: clamp(80px, 14vw, 120px);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--accent);
  opacity: .08;
}

/* =============================================================
   19. Responsive tweaks
   ============================================================= */
@media (min-width: 540px) {}
@media (min-width: 720px) {}
@media (min-width: 960px) {}
@media (min-width: 1280px) {
  .filosofia-img-wrap { height: min(620px, 48vw); }
}

/* =============================================================
   20. Reduced-motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-meta-dot { animation: none; }
  .hero-scroll::before { animation: none; }
  @keyframes spin { to { transform: rotate(0deg); } }
}
