/*
 * Agua Solo — coming-soon page.
 * System fonts only. No inline styles or scripts anywhere (CSP: style-src 'self'; script-src 'self').
 * Mobile-first; light/dark via prefers-color-scheme; motion off under prefers-reduced-motion.
 * Decorative motion stops on its own within 5 s (WCAG 2.2.2 Pause, Stop, Hide).
 */

:root {
  color-scheme: light dark;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #f3fafc;
  --bg-deep: #dcf0f6;
  --glow-1: rgba(84, 204, 232, 0.28);
  --glow-2: rgba(21, 146, 184, 0.14);
  --ink: #0a2533;
  --muted: #34515f;
  --accent: #0a6c89;
  --surface: rgba(255, 255, 255, 0.64);
  --surface-solid: #ffffff;
  --line: rgba(10, 37, 51, 0.14);
  --rule: #0a2533;
  --shadow: 0 1px 2px rgba(10, 37, 51, 0.06), 0 18px 48px -18px rgba(10, 60, 84, 0.28);
  --pulse: rgba(10, 108, 137, 0.45);
  --wave-back: rgba(21, 146, 184, 0.16);
  --wave: #cfe9f1;
  --footer-ink: #0a2533;
  --button-bg: #0a2533;
  --button-ink: #f3fafc;
  --button-bg-hover: #0a6c89;

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --radius: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #04131b;
    --bg-deep: #082331;
    --glow-1: rgba(60, 198, 228, 0.16);
    --glow-2: rgba(21, 146, 184, 0.12);
    --ink: #e6f5f9;
    --muted: #a6c3ce;
    --accent: #6ad3ea;
    --surface: rgba(12, 42, 56, 0.58);
    --surface-solid: #0c2a38;
    --line: rgba(230, 245, 249, 0.14);
    --rule: #e6f5f9;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 48px -18px rgba(0, 0, 0, 0.65);
    --pulse: rgba(106, 211, 234, 0.5);
    --wave-back: rgba(60, 198, 228, 0.1);
    --wave: #0b2b3a;
    --footer-ink: #cfe6ee;
    --button-bg: #e6f5f9;
    --button-ink: #04131b;
    --button-bg-hover: #6ad3ea;
  }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 55% at 88% 0%, var(--glow-1), transparent 70%),
    radial-gradient(ellipse 60% 50% at 0% 88%, var(--glow-2), transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

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

::selection {
  background: var(--accent);
  color: var(--bg);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.site-header {
  padding-block: clamp(1.25rem, 3vw, 2rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: 0.005em;
  line-height: 1;
  text-decoration: none;
}

a.brand {
  border-radius: 0.5rem;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
}

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

.hero {
  display: grid;
  align-content: center;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  padding-block: clamp(1.5rem, 6vw, 4.5rem) clamp(3.5rem, 9vw, 6.5rem);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0.375rem 0.875rem 0.375rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

.status--muted {
  color: var(--muted);
}

.status-dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2.4s ease-out 2;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.375rem, 6.5vw + 1rem, 5.75rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h1-line {
  display: block;
}

.h1-accent {
  color: var(--accent);
}

.lede {
  max-width: 36rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.125rem, 0.9vw + 0.9rem, 1.3125rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.note {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.actions {
  margin: 2rem 0 0;
}

/* ---------- Commitments card ("label") ---------- */

.facts {
  margin: 0;
  padding: clamp(1.5rem, 3.5vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow);
}

.facts-title {
  margin: 0;
  padding-bottom: 0.75rem;
  border-bottom: 0.375rem solid var(--rule);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.facts-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fact {
  padding-block: 1.125rem;
  border-bottom: 1px solid var(--line);
}

.fact:last-child {
  padding-bottom: 0.25rem;
  border-bottom: 0;
}

.fact-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
}

/* Small water-drop bullet (decorative). */
.fact-title::before {
  content: "";
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 0 50% 50% 50%;
  background: var(--accent);
  transform: rotate(45deg);
}

.fact-text {
  margin: 0.3rem 0 0;
  padding-left: 1.175rem;
  color: var(--muted);
}

/* ---------- Button (404) ---------- */

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.375rem;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-ink);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  background: var(--button-bg-hover);
  transform: translateY(-1px);
}

/* ---------- Footer with waterline ---------- */

.site-footer {
  position: relative;
  overflow: hidden;
  padding-top: 4.5rem;
  padding-bottom: 2rem;
  color: var(--footer-ink);
  background: linear-gradient(to bottom, transparent 3.5rem, var(--wave) 3.5rem);
  font-size: 0.875rem;
}

.site-footer::before,
.site-footer::after {
  content: "";
  position: absolute;
  left: 0;
  width: calc(100% + 720px);
  pointer-events: none;
  -webkit-mask: url("/static/wave.svg") 0 100% / 720px 100% repeat-x;
  mask: url("/static/wave.svg") 0 100% / 720px 100% repeat-x;
}

.site-footer::before {
  top: 0;
  height: 3.75rem;
  background: var(--wave-back);
  animation: settle-left 5s ease-out both;
}

.site-footer::after {
  top: 0.5rem;
  height: 3.5rem;
  background: var(--wave);
  animation: settle-right 5s ease-out both;
}

.site-footer .wrap {
  position: relative;
  z-index: 1;
}

.site-footer p {
  margin: 0;
}

/* ---------- Wider screens ---------- */

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
  }

  .hero--single {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Keep "cuentas claras." on one line inside the narrower two-column layout. */
  .hero h1 {
    font-size: clamp(3.25rem, 4.8vw + 0.5rem, 5rem);
  }
}

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

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--pulse);
  }
  70%,
  100% {
    box-shadow: 0 0 0 0.5rem rgba(0, 0, 0, 0);
  }
}

/* The waves drift a short way and settle (one 5 s run each, opposite directions). */
@keyframes settle-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-180px);
  }
}

@keyframes settle-right {
  from {
    transform: translateX(-180px);
  }
  to {
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .button:hover {
    transform: none;
  }
}

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

@media (prefers-reduced-transparency: reduce) {
  .status,
  .facts {
    background: var(--surface-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (forced-colors: active) {
  .status-dot,
  .fact-title::before {
    background: CanvasText;
  }

  .site-footer::before,
  .site-footer::after {
    display: none;
  }
}
