/* ============================================================
   Luna de Abril — Sierras de Carapé, Uruguay
   Minimal, warm, quiet. Type-first design.
   ============================================================ */

:root {
  --paper: #faf7f1;
  --paper-deep: #f1ebdf;
  --ink: #26231e;
  --muted: #6e675c;
  --sage: #4a7a5a;
  --sage-deep: #26543a;
  --sand: #e7dfd0;
  --line: #e2dacb;
  --card: #fffdf8;
  --prose: #3c382f;
  --moonphase: #a8945a;
  --scene-moon: #f5edde;
  --scene-moon-stroke: #e4d9c2;
  --scene-star: #c9c2ae;
  --hill-0: #eae4d3;
  --hill-1: #ddd6c2;
  --hill-2: #b9c1a4;
  --hill-3: #8ea180;
  --max: 68rem;
  --header-h: 3.8rem;
}

/* Noche: se activa según la preferencia del sistema del visitante */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #24241d;
    --paper-deep: #1e1e17;
    --ink: #ece5d3;
    --muted: #a49f8d;
    --sage: #d2c188;
    --sage-deep: #d2c188;
    --sand: #3a392c;
    --line: #383728;
    --card: #2a2a21;
    --prose: #cdc7b4;
    --moonphase: #d2c188;
    --scene-moon: #d2c188;
    --scene-moon-stroke: #bfae74;
    --scene-star: #8d876e;
    --hill-0: #38382e;
    --hill-1: #32322a;
    --hill-2: #2b2b22;
    --hill-3: #22221a;
  }

  .cta { color: #24241d; }
  .cta:hover { background: var(--ink); color: #24241d; }
  ::selection { background: #4a4836; }
}

/* Fuente del logo (self-hosted) */
@font-face {
  font-family: "Akaya Kanadaka";
  src: url("fonts/AkayaKanadaka-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  font-feature-settings: "liga", "kern";
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: "Quicksand", ui-rounded, "Inter", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  margin: 0;
}

p { margin: 0 0 1.25rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--sage-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--ink); }

::selection { background: var(--sand); }

/* --- Accessibility ------------------------------------------ */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

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

/* --- Header -------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: "Akaya Kanadaka", "Quicksand", system-ui, sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.site-nav a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }

.lang-switch {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  color: var(--muted) !important;
}
.lang-switch:hover {
  border-color: var(--sage);
  color: var(--sage-deep) !important;
}

/* --- Hero ----------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(var(--paper) 0%, var(--paper-deep) 100%);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
}

/* Bloque luna → CTA centrado entre el header y las sierras */
.hero-inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.hero-mark {
  width: clamp(92px, 11vw, 124px);
  height: auto;
  margin-bottom: 0.6rem;
}

.hero h1 {
  font-family: "Akaya Kanadaka", "Quicksand", system-ui, sans-serif;
  font-size: clamp(2.8rem, 7.5vw, 5rem);
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.hero .tagline {
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  color: var(--muted);
  max-width: 34ch;
  margin: 1rem auto 2rem;
  font-weight: 400;
}

.hero-scene {
  display: block;
  width: 100%;
  height: clamp(160px, 30vh, 380px);
  flex: 0 0 auto;
}

.cta {
  display: inline-block;
  background: var(--sage-deep);
  color: var(--paper);
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  transition: background 160ms ease;
}
.cta:hover { background: var(--ink); color: var(--paper); }

/* --- Sections -------------------------------------------------- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 6.5rem) 1.5rem;
}

/* Que el header pegajoso no tape los títulos al navegar por anclas */
.section, .contact {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

h2 { text-wrap: balance; }

.section + .section { border-top: 1px solid var(--line); }

.kicker {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1rem;
}

.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 1.6rem;
  max-width: 22ch;
}

.prose {
  max-width: 62ch;
  font-size: 1.0925rem;
  color: var(--prose);
}

/* Escena del hero (sierras) — colores por tema */
.hero-scene .star { fill: var(--scene-star); }
.hero-scene .hill-0 { fill: var(--hill-0); }
.hero-scene .hill-1 { fill: var(--hill-1); }
.hero-scene .hill-2 { fill: var(--hill-2); }
.hero-scene .hill-3 { fill: var(--hill-3); }

.prose em { font-style: italic; }

.signature {
  margin-top: 1.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}


/* --- Trio (Lo que se vive aquí) -------------------------------- */

/* 3 tarjetas en ancho, 2+1 en tamaños medios, 1 por línea en móvil */
.trio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin-top: 2.6rem;
  padding: 0;
  list-style: none;
}

.trio li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.8rem 1.6rem;
  transition: border-color 180ms ease, transform 180ms ease;
}

.trio li:hover {
  border-color: var(--moonphase);
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .trio li:hover { transform: none; }
}

.trio h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
}

.trio p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

.trio .mark {
  display: inline-block;
  width: 2.1rem;
  height: 2.1rem;
  margin-bottom: 1rem;
  color: var(--moonphase);
}

/* --- Contact ---------------------------------------------------- */

.contact {
  text-align: center;
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
}

.contact-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 6.5rem) 1.5rem;
}

.contact h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 auto 1rem;
}

.contact p {
  color: var(--muted);
  max-width: 42ch;
  margin: 0 auto 2rem;
}

.email-link {
  font-family: "Quicksand", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  color: var(--sage-deep);
  overflow-wrap: anywhere;
}

/* --- Footer ------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.site-footer .bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer a { color: var(--muted); }

/* --- Motion ------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 700ms ease-out both;
  }
  .rise-2 { animation-delay: 120ms; }
  .rise-3 { animation-delay: 240ms; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
}

/* --- Responsive ---------------------------------------------------- */

@media (max-width: 46rem) {
  .site-nav a:not(.lang-switch) { display: none; }
}

/* Pantallas bajas (ej. teléfono apaisado): no forzar alto completo */
@media (max-height: 30rem) {
  .hero { min-height: auto; }
  .hero-inner { padding: 3.5rem 1.5rem; }
}
