/* ===== CECURA — Design System ===== */
:root {
  /* Brand colors */
  --lavanda: #AFA0C8;
  --lavanda-soft: #C9BFDC;
  --lavanda-pale: #EDE8F4;
  --mezclilla: #3563A9;
  --mezclilla-deep: #2A4F88;
  --bizancio: #72195A;
  --leonada: #E28413;
  --mirto: #426B69;
  --nyanza: #E1F0C4;

  /* Surfaces */
  --bg: #F7F5F9;
  --bg-warm: #FAF8F4;
  --paper: #FFFFFF;
  --ink: #1A1B2E;
  --ink-soft: #4B4C68;
  --ink-muted: #8A8BA0;
  --line: rgba(26, 27, 46, 0.08);
  --line-strong: rgba(26, 27, 46, 0.16);

  /* Type */
  --display: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --sans: "Plus Jakarta Sans", -apple-system, system-ui, sans-serif;

  /* Spacing */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

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

/* ===== Type ===== */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mezclilla);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--mezclilla);
  display: inline-block;
}
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 { font-size: clamp(48px, 8vw, 132px); letter-spacing: -0.03em; }
h2 { font-size: clamp(36px, 5vw, 72px); letter-spacing: -0.02em; }
h3 { font-size: clamp(24px, 2.5vw, 36px); }
.italic { font-style: italic; color: var(--bizancio); }
.lede { font-size: clamp(18px, 1.4vw, 22px); line-height: 1.6; color: var(--ink-soft); max-width: 60ch; }
.serif { font-family: var(--display); }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 249, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.nav-logo { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-size: 22px; }
.nav-logo img { height: 38px; width: auto; }
.nav-logo small { font-family: var(--sans); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); display: block; }
.nav-logo .lockup { line-height: 1; }
.nav-logo .lockup span { display: block; font-size: 20px; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 14px; color: var(--ink-soft); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--mezclilla); }
.nav-cta {
  background: var(--ink);
  color: var(--bg);
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: var(--mezclilla); transform: translateY(-1px); }
@media (max-width: 880px) {
  .nav-links { display: none; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: clamp(80px, 14vw, 180px) 0 clamp(80px, 12vw, 140px);
  overflow: hidden;
}
.hero-pattern {
  position: absolute; inset: 0;
  background-image: url('assets/pattern.png');
  background-size: 700px;
  background-position: center;
  opacity: 0.18;
  mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25%, black 75%, transparent 100%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; text-align: center; }
.hero h1 {
  max-width: 14ch;
  margin: 24px auto 32px;
}
.hero h1 .italic { font-style: italic; color: var(--bizancio); }
.hero-sub {
  font-size: clamp(16px, 1.2vw, 19px);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 auto 40px;
  line-height: 1.65;
}
.hero-cta { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn {
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 8px 28px -10px rgba(26, 27, 46, 0.4);
}
.btn-primary:hover { background: var(--mezclilla); transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: var(--paper); border-color: var(--ink); }

/* Floating butterflies in hero */
.float {
  position: absolute;
  opacity: 0.6;
  filter: blur(0.4px);
  pointer-events: none;
}
.float-1 { top: 12%; left: 6%; width: 110px; animation: drift 14s ease-in-out infinite; }
.float-2 { top: 22%; right: 8%; width: 80px; animation: drift 18s ease-in-out infinite -3s; }
.float-3 { bottom: 18%; left: 12%; width: 70px; animation: drift 16s ease-in-out infinite -7s; opacity: 0.4; }
.float-4 { bottom: 14%; right: 14%; width: 90px; animation: drift 20s ease-in-out infinite -10s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(20px, -18px) rotate(6deg); }
  66% { transform: translate(-12px, 14px) rotate(-4deg); }
}

/* Quote strip */
.strip {
  background: var(--ink);
  color: var(--bg);
  padding: 22px 0;
  overflow: hidden;
}
.strip-track {
  display: flex; gap: 56px;
  font-family: var(--display);
  font-size: 22px;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
}
.strip-track span { display: inline-flex; align-items: center; gap: 56px; }
.strip-track .dot { width: 6px; height: 6px; background: var(--lavanda); border-radius: 50%; display: inline-block; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== Sections ===== */
section { padding: clamp(80px, 10vw, 140px) 0; position: relative; }
.section-head { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(40px, 6vw, 80px); margin-bottom: 64px; align-items: end; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; gap: 24px; } }

/* About */
.about { background: var(--bg-warm); }
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; } }
.about-image {
  aspect-ratio: 4/5;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background: var(--lavanda-pale);
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
.about-image::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(26,27,46,0.25));
  pointer-events: none;
}
.about-badge {
  position: absolute;
  bottom: 20px; left: 20px;
  background: var(--paper);
  padding: 10px 14px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px;
  z-index: 2;
}
.about-badge::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--mirto);
  box-shadow: 0 0 0 4px rgba(66,107,105,0.2);
}

/* ===== Galería de grupos ===== */
.gallery { background: var(--bg-warm); padding-top: clamp(60px, 8vw, 100px); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 140px;
  gap: 14px;
  margin-top: 56px;
}
.g-cell {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--lavanda-pale);
}
.g-cell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.g-cell:hover img { transform: scale(1.04); }
.g-cell.placeholder::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, var(--lavanda) 0, var(--lavanda) 1px, transparent 1px, transparent 12px);
  opacity: 0.5;
}
.g-cell.placeholder::after {
  content: attr(data-label);
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--ink-soft);
  background: var(--paper);
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
}
.g-cell .caption {
  position: absolute; bottom: 12px; left: 12px;
  background: rgba(26,27,46,0.65);
  color: var(--bg);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.g-cell-1 { grid-column: span 7; grid-row: span 3; }
.g-cell-2 { grid-column: span 5; grid-row: span 2; }
.g-cell-3 { grid-column: span 5; grid-row: span 1; }
.g-cell-4 { grid-column: span 4; grid-row: span 2; }
.g-cell-5 { grid-column: span 4; grid-row: span 2; }
.g-cell-6 { grid-column: span 4; grid-row: span 2; }

@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .g-cell-1 { grid-column: span 2; grid-row: span 2; }
  .g-cell-2, .g-cell-3, .g-cell-4, .g-cell-5, .g-cell-6 { grid-column: span 1; grid-row: span 1; }
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 48px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { background: var(--bg-warm); padding: 24px 16px 24px 0; }
.stat-num { font-family: var(--display); font-size: clamp(40px, 4vw, 56px); color: var(--bizancio); line-height: 1; }
.stat-label { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }

/* Philosophy */
.philosophy {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.philosophy::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url('assets/pattern.png');
  background-size: 700px;
  background-position: center;
  opacity: 0.12;
  mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 78%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.philosophy > .container { position: relative; z-index: 1; }
.philo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
@media (max-width: 880px) { .philo-grid { grid-template-columns: 1fr; } }
.philo-card {
  padding: 32px;
  background: var(--paper);
  border-radius: 12px;
  border: 1px solid var(--line);
  transition: transform 0.3s, box-shadow 0.3s;
}
.philo-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgba(26, 27, 46, 0.15); }
.philo-card .num {
  font-family: var(--display);
  font-size: 48px;
  color: var(--lavanda);
  line-height: 1;
  margin-bottom: 16px;
}
.philo-card h4 { font-family: var(--display); font-size: 24px; margin-bottom: 12px; }
.philo-card p { color: var(--ink-soft); font-size: 15px; }

/* Services */
.services { background: var(--paper); }
.svc-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.svc {
  display: grid;
  grid-template-columns: 80px 1.2fr 2fr auto;
  gap: 32px;
  align-items: center;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s;
}
.svc:hover { padding-left: 12px; }
.svc:hover .svc-arrow { transform: translateX(6px); background: var(--mezclilla); color: white; }
.svc-num { font-family: var(--display); font-size: 28px; color: var(--lavanda); }
.svc-title { font-family: var(--display); font-size: clamp(24px, 2.4vw, 34px); }
.svc-desc { color: var(--ink-soft); font-size: 15px; max-width: 50ch; }
.svc-arrow {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--bg);
  display: grid; place-items: center;
  transition: transform 0.3s, background 0.3s, color 0.3s;
  color: var(--ink);
}
.svc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--lavanda-pale);
  color: var(--bizancio);
  border-radius: 999px;
}
@media (max-width: 760px) {
  .svc { grid-template-columns: auto 1fr auto; }
  .svc-desc { grid-column: 1 / -1; }
}

/* Principles */
.principles { background: var(--bg-warm); }
.princ-stage {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
  min-height: 380px;
  margin-top: 24px;
}
@media (max-width: 880px) { .princ-stage { grid-template-columns: 1fr; min-height: auto; } }
.princ-counter { font-family: var(--display); font-size: clamp(120px, 18vw, 220px); line-height: 0.9; color: var(--lavanda); }
.princ-counter .of { font-size: 0.3em; color: var(--ink-muted); vertical-align: super; margin-left: 12px; }
.princ-text {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.2;
  color: var(--ink);
  min-height: 4em;
  transition: opacity 0.3s;
}
.princ-controls { display: flex; align-items: center; gap: 14px; margin-top: 40px; }
.princ-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.princ-btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.princ-dots { display: flex; gap: 6px; margin-left: 16px; flex-wrap: wrap; max-width: 200px; }
.princ-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background 0.2s, transform 0.2s;
}
.princ-dot.active { background: var(--bizancio); transform: scale(1.4); }

/* Mission grid */
.mvo { background: var(--ink); color: var(--bg); }
.mvo h2 { color: var(--bg); }
.mvo .eyebrow { color: var(--lavanda); }
.mvo .eyebrow::before { background: var(--lavanda); }
.mvo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,0.1); margin-top: 56px; border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1);}
@media (max-width: 880px) { .mvo-grid { grid-template-columns: 1fr; } }
.mvo-cell { background: var(--ink); padding: 40px 32px; }
.mvo-cell h4 { color: var(--bg); font-family: var(--display); font-size: 28px; margin-bottom: 14px; font-style: italic; }
.mvo-cell p { color: rgba(255,255,255,0.7); font-size: 15px; line-height: 1.6; }
.mvo-cell ul { list-style: none; }
.mvo-cell li { color: rgba(255,255,255,0.7); font-size: 14px; padding: 8px 0 8px 18px; position: relative; border-bottom: 1px dashed rgba(255,255,255,0.1); }
.mvo-cell li:last-child { border-bottom: 0; }
.mvo-cell li::before { content: ""; position: absolute; left: 0; top: 18px; width: 6px; height: 6px; background: var(--lavanda); border-radius: 50%; }

/* Testimonials */
.testimonials { background: var(--bg); }
.testim-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
@media (max-width: 880px) { .testim-grid { grid-template-columns: 1fr; } }
.testim {
  background: var(--paper);
  border-radius: 12px;
  padding: 32px;
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.testim::before {
  content: "“";
  position: absolute;
  top: 8px; left: 24px;
  font-family: var(--display);
  font-size: 100px;
  color: var(--lavanda);
  opacity: 0.4;
  line-height: 1;
}
.testim p {
  font-family: var(--display);
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink);
  position: relative;
  flex: 1;
  margin-top: 24px;
}
.testim footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.testim-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--lavanda-pale);
  color: var(--bizancio);
  display: grid; place-items: center;
  font-family: var(--display);
  font-size: 18px;
}
.testim-name { font-size: 14px; font-weight: 600; }
.testim-role { font-size: 12px; color: var(--ink-muted); }

/* Contact */
.contact {
  background: linear-gradient(180deg, var(--lavanda-pale), var(--bg));
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url('assets/pattern.png');
  background-size: 700px;
  background-position: center;
  opacity: 0.12;
  mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 78%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: start; position: relative; z-index: 2;}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.contact h2 { margin-bottom: 24px; }
.contact-info { display: grid; gap: 20px; margin-top: 36px; }
.contact-row { display: grid; grid-template-columns: 130px 1fr; padding: 18px 0; border-top: 1px solid var(--line-strong); }
.contact-row:last-child { border-bottom: 1px solid var(--line-strong); }
.contact-row dt { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted); padding-top: 2px; }
.contact-row dd { font-size: 16px; color: var(--ink); }
.contact-row dd a { color: var(--mezclilla); }
.contact-card {
  background: var(--paper);
  padding: 36px;
  border-radius: 16px;
  box-shadow: 0 30px 60px -30px rgba(26, 27, 46, 0.2);
  border: 1px solid var(--line);
}
.contact-card h3 { font-family: var(--display); margin-bottom: 8px; }
.contact-card p { color: var(--ink-soft); font-size: 15px; margin-bottom: 24px; }
.form-field { display: block; margin-bottom: 16px; }
.form-field label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-muted); display: block; margin-bottom: 6px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: 0; border-color: var(--mezclilla); background: var(--paper);
}
.form-field textarea { resize: vertical; min-height: 90px; }
.btn-block { width: 100%; justify-content: center; }

/* Footer */
.footer { background: var(--ink); color: var(--bg); padding: 80px 0 32px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.1); }
@media (max-width: 880px) { .footer-top { grid-template-columns: 1fr 1fr; } }
.footer h5 { font-family: var(--sans); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lavanda); margin-bottom: 16px; font-weight: 600; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer a, .footer li { color: rgba(255,255,255,0.65); font-size: 14px; transition: color 0.2s; }
.footer a:hover { color: var(--bg); }
.footer .brand { font-family: var(--display); font-size: 32px; color: var(--bg); display: flex; align-items: center; gap: 14px; }
.footer .brand img { height: 48px; filter: brightness(0) invert(1); }
.footer .tagline { font-family: var(--display); font-style: italic; color: var(--lavanda); font-size: 22px; margin-top: 16px; max-width: 24ch; line-height: 1.3; }
.footer-bottom { padding-top: 28px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 13px; color: rgba(255,255,255,0.4); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Utility */
.divider { height: 1px; background: var(--line); margin: 0; }
.text-center { text-align: center; }
.split { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
