/* Proyecto Ariadna: página transitoria (un solo archivo).
   Layout: portada en dos columnas (texto + laberinto con hilo), franja de
   "qué ofrecemos / a quiénes", aviso de sitio en construcción y contacto.
   Paleta: azul egeo profundo y un único acento, el hilo (rojo ocre).
   Tipografía: Bricolage Grotesque (títulos) y Public Sans (texto). */

:root {
  --bg: #EEF2F4;
  --bg-alt: #E1E9ED;
  --fg: #0F2433;
  --muted: #455A69;
  --line: #C3D1D9;
  --wall: #6F8797;
  --thread: #B8432F;
  --on-thread: #FFFFFF;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.1rem, 2.2vw, 1.3rem);
  --fs-h1: clamp(2.6rem, 8.5vw, 5.25rem);
  --fs-h2: clamp(1.5rem, 3.4vw, 2rem);
  --fs-label: 0.8125rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1F2D;
    --bg-alt: #112A3A;
    --fg: #E6EEF2;
    --muted: #9DB2BF;
    --line: #23404F;
    --wall: #4F6B7D;
    --thread: #E8836A;
    --on-thread: #0B1F2D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1F2D;
  --bg-alt: #112A3A;
  --fg: #E6EEF2;
  --muted: #9DB2BF;
  --line: #23404F;
  --wall: #4F6B7D;
  --thread: #E8836A;
  --on-thread: #0B1F2D;
  color-scheme: dark;
}

[hidden] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

h1, h2 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--thread); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.label {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--thread);
}

/* Encabezado */
.site-header .wrap { padding-block: 1.25rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand svg { flex: none; overflow: visible; }
.g-wall { fill: none; stroke: var(--wall); stroke-width: 2.5; stroke-linecap: round; }
.g-thread { fill: none; stroke: var(--thread); stroke-width: 3; stroke-linecap: round; }
.g-core { fill: var(--thread); }

/* Portada */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  padding-block: clamp(1.5rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem);
}
.hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.hero h1 { font-size: var(--fs-h1); font-weight: 750; }
.lead { font-size: var(--fs-lead); color: var(--muted); max-width: 34rem; }

.maze {
  display: block;
  width: 100%;
  max-width: 25rem;
  height: auto;
  justify-self: center;
  overflow: visible;
}
.maze .wall path { fill: none; stroke: var(--wall); stroke-width: 2; stroke-linecap: round; }
.maze .thread {
  fill: none;
  stroke: var(--thread);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-thread 2.8s cubic-bezier(0.45, 0.05, 0.3, 1) 0.3s both;
}
.maze .core { fill: var(--thread); }
@keyframes draw-thread { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* Qué ofrecemos / a quiénes */
.info { border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 6vw, 4rem); }
.info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}
.info h2 { font-size: var(--fs-h2); font-weight: 700; margin-top: 0.6rem; }
.info-body { margin-top: 1rem; color: var(--muted); max-width: 30rem; }
.audience { list-style: none; margin: 1rem 0 0; padding: 0; max-width: 30rem; }
.audience li { padding-block: 0.7rem; border-top: 1px solid var(--line); }
.audience li:last-child { border-bottom: 1px solid var(--line); }
.audience strong { font-weight: 600; }
.audience span { color: var(--muted); }

/* Aviso de sitio en construcción */
.status { background: var(--bg-alt); padding-block: clamp(2rem, 5vw, 3rem); }
.status .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem 3rem; align-items: baseline; }
.status-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.status p:last-child { color: var(--muted); max-width: 32rem; }

/* Contacto */
.contact { padding-block: 0 clamp(2.5rem, 6vw, 4rem); }
.contact-lead { margin-top: 0.6rem; color: var(--muted); }

/* Pie */
.site-footer { border-top: 1px solid var(--line); }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}

@media (min-width: 48rem) {
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem; }
  .status .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}
@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .maze .thread { animation: none; }
}
/* ---------- Páginas interiores y formulario ---------- */
.contact .btn { margin-top: 1.25rem; }

.page-head { padding-block: clamp(1.5rem, 5vw, 3rem) 1.5rem; }
.page-head h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); font-weight: 750; margin-top: 0.75rem; }
.page-head .lead { margin-top: 1rem; }

.form-wrap { padding-bottom: clamp(3rem, 8vw, 5rem); }
.form { display: grid; gap: 1.25rem; max-width: 40rem; }
.field { display: grid; gap: 0.4rem; min-width: 0; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  border: 1.5px solid var(--wall);
  border-radius: 4px;
  padding: 0.75rem 0.9rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field-row { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }

.consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  font-size: 0.9rem;
  color: var(--muted);
}
.consent input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; accent-color: var(--thread); }
.consent a { color: var(--fg); }

.hp { display: none !important; }

button.btn { font: inherit; font-weight: 600; cursor: pointer; justify-self: start; }
button.btn[disabled] { opacity: 0.6; cursor: progress; }

.form-msg { min-height: 1.5em; font-weight: 600; }
.form-msg.error { color: var(--thread); }

.sent { max-width: 40rem; padding-block: 0.5rem; }
.sent h2 { font-size: var(--fs-h2); font-weight: 700; }
.sent p { margin-top: 0.75rem; color: var(--muted); }
.sent .btn { margin-top: 1.5rem; }

.privacy {
  max-width: 40rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
.privacy h2 { font-size: 1rem; font-weight: 700; color: var(--fg); letter-spacing: 0; }
.privacy p { margin-top: 0.6rem; }

@media (min-width: 40rem) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--thread);
  color: var(--on-thread);
  border: 2px solid var(--thread);
  border-radius: 4px;
  transition: filter 0.15s ease;
}
.btn:hover { filter: brightness(1.08); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
