:root {
  --ink: #15202b;
  --ink-soft: #2a3644;
  --paper: #f3f5f7;
  --paper-2: #e8ecf0;
  --white: #ffffff;
  --muted: #5d6874;
  --line: #cfd6de;
  --accent: #1f4b6e;
  --accent-hover: #163a56;
  --wa: #1f6b4a;
  --shadow: 0 18px 40px rgba(21, 32, 43, 0.12);
  --radius: 2px;
  --header-h: 72px;
  --font-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Segoe UI", sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(1.75rem, 3.4vw, 2.65rem);
  font-weight: 400;
}

h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  font-weight: 400;
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1.25rem;
  padding-left: 1.15rem;
}

li {
  margin-bottom: 0.35rem;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.container.narrow {
  width: min(100% - 2.5rem, 780px);
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.section {
  padding: 5rem 0;
}

.section-intro {
  max-width: 42rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.btn-outline.dark {
  color: var(--ink);
  border-color: var(--line);
}

.btn-outline.dark:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.text-link {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(243, 245, 247, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px rgba(21, 32, 43, 0.06);
}

.header-inner {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
  flex: 1 1 auto;
}

.logo-mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  min-width: 0;
  color: var(--ink);
}

.logo-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--ink);
}

.logo-sub {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 22rem;
  line-height: 1.35;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  flex: 0 0 auto;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a:hover,
.nav a.active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 4px auto;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background: #0f1822;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: scale(0.9);
  transform-origin: center top;
  animation: heroZoom 18s ease-out forwards;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 24, 34, 0.88) 0%, rgba(15, 24, 34, 0.62) 48%, rgba(15, 24, 34, 0.28) 100%),
    linear-gradient(0deg, rgba(15, 24, 34, 0.72) 0%, rgba(15, 24, 34, 0.15) 55%, rgba(15, 24, 34, 0.35) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: 5rem 0 4.5rem;
  max-width: 40rem;
  margin-left: max(1.25rem, calc((100% - var(--max)) / 2));
  animation: fadeUp 0.9s ease-out both;
}

.hero-brand {
  margin: 0 0 1.15rem;
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 4vw, 2.85rem);
  font-weight: 400;
  line-height: 1.2;
  color: #ffffff;
}

.hero-tagline {
  color: #ffffff;
  margin-bottom: 1rem;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  max-width: 34rem;
}

.hero-lead {
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 1.75rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Splits */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.split.reverse {
  grid-template-columns: 0.95fr 1.05fr;
}

.split.reverse .split-text {
  order: 2;
}

.split-media img {
  width: 100%;
  height: min(520px, 70vw);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.split-media.portrait img {
  height: min(620px, 85vw);
  object-position: center top;
}

.prensa-media img {
  height: min(560px, 90vw);
  object-fit: contain;
  background: var(--white);
  box-shadow: var(--shadow);
}

/* Estudio */
.section-estudio {
  background: var(--white);
}

.trabajo {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}

.trabajo h3 {
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.trabajo-lead {
  max-width: 46rem;
  color: var(--muted);
}

.pillars {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem 1.5rem;
}

.pillars li {
  margin: 0;
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
  color: var(--ink-soft);
  font-weight: 500;
}

/* Areas */
.section-areas {
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
}

.areas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.area {
  padding: 1.75rem 1.5rem 1.6rem;
  background: var(--white);
  border-top: 3px solid var(--accent);
}

.area-featured {
  grid-column: 1 / -1;
  padding: 2.4rem 2.2rem 2.15rem;
  background: var(--ink);
  border-top-color: #8eb4d3;
}

.area-badge {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.area-featured h3 {
  color: #fff;
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
}

.area-featured ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2rem;
}

.area-featured .text-link {
  color: #fff;
}

.area-featured .text-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

.area h3 {
  font-weight: 400;
  margin-bottom: 0.85rem;
}

.area h4 {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1rem 0 0.5rem;
}

.area p {
  color: var(--ink-soft);
}

.area ul {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.area-featured p,
.area-featured ul {
  color: rgba(255, 255, 255, 0.82);
}

.area-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Perfil */
.section-perfil {
  background: var(--white);
}

.matriculas {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.matriculas p {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* Formacion */
.section-formacion {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.88);
}

.section-formacion .eyebrow {
  color: rgba(255, 255, 255, 0.55);
}

.section-formacion h2,
.section-formacion h3 {
  color: #fff;
}

.formacion-block {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.formacion-block:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.tags {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tags li {
  margin: 0;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.88rem;
}

/* Prensa */
.section-prensa {
  background: var(--paper);
}

.nota-prensa {
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
  font-family: var(--font-serif);
}

/* Contacto */
.section-contacto {
  background: var(--white);
}

.aviso-turno {
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 2.5rem;
}

.contacto-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2.5rem;
  align-items: start;
}

.oficina {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.oficina:first-child {
  border-top: 0;
  padding-top: 0;
}

.oficina h3 {
  font-weight: 400;
  margin-bottom: 0.45rem;
}

.oficina a {
  text-decoration: none;
}

.contacto-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.contacto-form {
  background: var(--paper);
  padding: 1.75rem;
  border: 1px solid var(--line);
}

.contacto-form h3 {
  font-weight: 400;
  margin-bottom: 1.25rem;
}

.contacto-form label {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.contacto-form input,
.contacto-form select,
.contacto-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font: inherit;
  color: var(--ink);
}

.contacto-form input:focus,
.contacto-form select:focus,
.contacto-form textarea:focus {
  outline: 2px solid rgba(31, 75, 110, 0.25);
  border-color: var(--accent);
}

.contacto-form textarea {
  resize: vertical;
  min-height: 120px;
}

.form-note {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  color: var(--accent);
}

.form-note.is-error {
  color: #8a2f2f;
}

.form-note.is-success {
  color: #1f6b4a;
}

.form-note.is-loading {
  color: var(--muted);
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.contacto-form.is-sending .btn[type="submit"] {
  opacity: 0.7;
  pointer-events: none;
}

/* Footer */
.site-footer {
  background: #101820;
  color: rgba(255, 255, 255, 0.78);
  padding: 3rem 0 2rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom {
  padding-top: 1.5rem;
}

.aviso-legal {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  max-width: 52rem;
}

/* WhatsApp float */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 120;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 24px rgba(16, 24, 32, 0.28);
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.whatsapp-float:hover {
  transform: translateY(-2px) scale(1.03);
  background: #18573c;
  color: #fff;
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
}

/* Motion */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroZoom {
  from {
    transform: scale(0.92);
  }
  to {
    transform: scale(0.9);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 960px) {
  .split,
  .split.reverse,
  .areas,
  .contacto-grid,
  .footer-grid,
  .area-cols,
  .area-featured ul {
    grid-template-columns: 1fr;
  }

  .split.reverse .split-text {
    order: 0;
  }

  .hero-content {
    max-width: 34rem;
    margin-left: 1.25rem;
    margin-right: 1.25rem;
    width: auto;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 0;
    box-shadow: 0 12px 28px rgba(21, 32, 43, 0.08);
    z-index: 50;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 0.9rem 1.25rem;
    border-top: 1px solid var(--paper-2);
  }

  .logo-text {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .logo-name {
    font-size: 0.92rem;
    white-space: nowrap;
  }

  .logo-sub {
    font-size: 0.6rem;
    letter-spacing: 0.04em;
    max-width: 16.5rem;
  }

  .hero {
    min-height: calc(100svh - var(--header-h));
  }

  .hero-content {
    padding: 4rem 0 3.25rem;
  }

  .section {
    padding: 3.75rem 0;
  }
}

@media (max-width: 560px) {
  .container,
  .container.narrow {
    width: min(100% - 1.75rem, var(--max));
  }

  .header-inner {
    width: 100%;
    padding-inline: 0.9rem;
    gap: 0.65rem;
  }

  .logo {
    gap: 0.5rem;
    overflow: visible;
  }

  .logo-mark {
    width: 38px;
    height: 38px;
    font-size: 0.78rem;
  }

  .logo-name {
    font-size: 0.84rem;
  }

  .logo-sub {
    font-size: 0.56rem;
    max-width: 13.5rem;
    letter-spacing: 0.035em;
  }

  .hero-actions,
  .contacto-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .contacto-form {
    padding: 1.25rem;
  }

  .area-featured {
    padding: 1.75rem 1.25rem 1.6rem;
  }

  .whatsapp-float {
    right: 0.9rem;
    bottom: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-media img,
  .hero-content,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
