:root {
  --paper: #F5F2EC;
  --paper-alt: #EBE7DF;
  --paper-soft: #FAF8F3;
  --ink: #1A1A1A;
  --ink-soft: #2E2B27;
  --ink-muted: #6B6862;
  --line: #D9D4CA;
  --line-soft: #E4DFD5;
  --nav-height: 3.5rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: var(--paper-alt);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 300;
  color: var(--ink);
  background-color: var(--paper-alt);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--ink-muted);
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  padding: 0 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 242, 236, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  z-index: 100;
  border-bottom: 1px solid var(--line-soft);
}

.nav-brand {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 400;
  color: var(--ink);
  font-size: 1.1rem;
}

.nav nav {
  display: flex;
  gap: 2rem;
}

.nav nav a {
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nav nav a:hover {
  color: var(--ink);
}

/* Archive — parallax de carpetas apiladas */
.archive {
  position: relative;
}

.folder {
  position: sticky;
  top: 0;
  min-height: 100vh;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  padding-top: var(--nav-height);
  box-shadow: 0 -18px 40px -14px rgba(26, 24, 20, 0.12), 0 -1px 0 0 var(--line);
}

.folder:first-of-type {
  box-shadow: none;
}

/* Cada carpeta tiene un tono ligeramente distinto para reforzar la sensación de documentos separados */
.folder:nth-of-type(odd) { background: var(--paper-soft); }
.folder:nth-of-type(even) { background: var(--paper); }

/* Encabezado de carpeta — referencia de archivo */
.folder-ref {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.75rem 1.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line-soft);
}

.folder-ref span:first-child {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 0.82rem;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

/* Cuerpo de cada carpeta */
.folder-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.25rem;
  position: relative;
}

/* Partículas de polvo (Archivo 00) */
.dust-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Hero */
.hero-inner {
  text-align: center;
  max-width: 820px;
  position: relative;
  z-index: 1;
}

.scroll-hint {
  z-index: 1;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.hero-inner h1 {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  margin-bottom: 0;
  font-weight: 400;
  line-height: 1.08;
}

.hero-sub {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-muted);
}

.divider {
  width: 48px;
  height: 1px;
  background: var(--line);
  margin: 1.25rem auto;
}

.contact-pill {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  align-items: center;
  font-size: 0.92rem;
  color: var(--ink-muted);
  max-width: 720px;
  letter-spacing: 0.01em;
}

.contact-pill a {
  color: var(--ink-muted);
}

.contact-pill a:hover {
  color: var(--ink);
}

.contact-pill span {
  color: var(--line);
  user-select: none;
}

/* Indicador de scroll en la primera carpeta */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-muted);
  animation: scroll-hint-fade 2.4s ease-in-out infinite;
}

.scroll-hint-line {
  width: 1px;
  height: 32px;
  background: var(--ink-muted);
  transform-origin: top;
  animation: scroll-hint-line 2.4s ease-in-out infinite;
}

@keyframes scroll-hint-fade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes scroll-hint-line {
  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; }
}

/* Folder 01 — Nosotros */
.about-inner {
  max-width: 620px;
  width: 100%;
  text-align: center;
}

.about-inner h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.about-body {
  text-align: left;
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-size: 1.08rem;
  line-height: 1.78;
  color: var(--ink);
}

.about-body p + p {
  margin-top: 1.4rem;
}

/* Services */
.services-inner {
  max-width: 520px;
  width: 100%;
  text-align: center;
}

.services-inner h2,
.contact-inner h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.section-intro {
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
  font-size: 0.98rem;
}

.services-inner ul {
  list-style: none;
  counter-reset: svc;
  text-align: left;
  border-top: 1px solid var(--line);
}

.services-inner li {
  counter-increment: svc;
  display: flex;
  align-items: baseline;
  gap: 2rem;
  padding: 0.85rem 0.25rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.08rem;
  font-weight: 400;
  color: var(--ink);
}

.services-inner li::before {
  content: counter(svc, decimal-leading-zero);
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-muted);
  min-width: 1.75rem;
}

/* Contact form */
.contact-inner {
  max-width: 560px;
  width: 100%;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.optional {
  color: var(--ink-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.form-row input,
.form-row textarea {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 300;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 2px;
  transition: border-color 0.2s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--ink);
}

.form-row textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.55;
}

.contact-form button {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 1.1rem 2rem;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 0.75rem;
}

.contact-form button:hover {
  background: var(--ink-soft);
}

/* Folder 03 — Ubicación (mapa + meta + colofón) */
.folder-body--split {
  flex-direction: row;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  gap: 0;
}

.location-map {
  flex: 1.3;
  min-height: 420px;
  background: var(--paper-alt);
  overflow: hidden;
  position: relative;
}

.location-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: grayscale(0.75) contrast(0.92) brightness(1.04);
}

.location-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 1.75rem;
  max-width: 460px;
  background: var(--paper);
  border-left: 1px solid var(--line);
}

.location-kicker {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

.location-address {
  font-style: normal;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 2.25rem;
}

.location-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 1.5rem;
  align-items: baseline;
  margin-bottom: 2.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.location-meta dt {
  font-family: 'Inter', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}

.location-meta dd a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.location-meta dd a:hover {
  border-bottom-color: var(--ink);
}

.location-copy {
  font-size: 0.78rem;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

/* Back link (gracias page) */
.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
  letter-spacing: 0.03em;
}

.back-link:hover {
  color: var(--ink);
}

/* Scroll-driven refinement (navegadores modernos) — la carpeta debajo se oscurece ligeramente cuando es cubierta */
@supports (animation-timeline: view()) {
  .folder {
    animation: folder-recede linear both;
    animation-timeline: view();
    animation-range: exit 0% exit 80%;
  }

  @keyframes folder-recede {
    to {
      filter: brightness(0.96);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .scroll-hint,
  .scroll-hint-line {
    animation: none;
  }
  .folder {
    animation: none;
  }
}

/* Responsive */
@media (max-width: 720px) {
  :root {
    --nav-height: 3.25rem;
  }

  .nav {
    padding: 0 1.25rem;
  }

  .nav nav {
    gap: 1.25rem;
  }

  .nav nav a {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }

  .folder-ref {
    padding: 0.65rem 1.25rem;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
  }

  .folder-ref span:first-child {
    font-size: 0.75rem;
  }

  .folder-body {
    padding: 1.1rem 1.25rem;
  }

  .folder-body--split {
    flex-direction: column;
  }

  .location-map {
    flex: 0 0 auto;
    min-height: 260px;
  }

  .location-info {
    max-width: 100%;
    padding: 1.35rem 1.5rem;
    border-left: none;
    border-top: 1px solid var(--line);
  }

  .contact-pill {
    flex-direction: column;
    gap: 0.5rem;
  }

  .contact-pill span {
    display: none;
  }

  .scroll-hint {
    bottom: 1.5rem;
  }
}

@media (max-width: 420px) {
  .nav-brand {
    font-size: 1rem;
  }
}
