/* =========================================================================
   yapis · landing próximamente
   Brand tokens mirror src/app/globals.css + DESIGN.md (Cielo palette).
   Creative North Star: "Cielo abierto sobre el mercado".
   ========================================================================= */

:root {
  /* --- Cielo palette (primary, friendly, open) --- */
  --cielo: #3A9BD5;
  --cielo-deep: #1B5E8A;
  --cielo-light: #60B2E0;

  /* --- Warm accents --- */
  --amber: #F5A90A;        /* warm companion — ALWAYS dark text */
  --amber-deep: #D4920A;
  --naranja: #E8621C;      /* energy / primary CTA — white text OK (4.6:1) */
  --naranja-deep: #C5511A;

  /* --- Surfaces (sky-tinted whites) --- */
  --surface: #FDFCFA;
  --sky-cream: #EDF5FC;
  --sky-cream-warm: #E0EEF8;
  --noche: #0A1929;
  --noche-raised: #0F2535;

  /* --- Borders --- */
  --border: #C0D8EE;
  --border-dark: #1A3550;

  /* --- Text --- */
  --texto: #0F2535;
  --texto-secondary: #3D5E78;
  --texto-on-dark: #E8F3FB;
  --texto-on-dark-secondary: #7A9AB8;

  /* --- Shadows (cool, blue-tinted — never warm) --- */
  --shadow-rest: 0 2px 8px oklch(35% 0.07 225 / 0.07);
  --shadow-hover: 0 4px 20px oklch(35% 0.07 225 / 0.10);
  --shadow-elevated: 0 8px 32px oklch(35% 0.07 225 / 0.16);

  /* --- Radii --- */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;

  /* --- Type --- */
  --font-display: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* --- Layout --- */
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--texto);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100svh;
}

img,
svg,
video,
picture {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

/* Accessible focus — naranja ring on light, amber on dark */
:focus-visible {
  outline: 3px solid var(--naranja);
  outline-offset: 3px;
  border-radius: 6px;
}

.hero :focus-visible {
  outline-color: var(--amber);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Nav ---------- */
.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform 200ms ease;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand img {
  height: 40px;
  width: auto;
  /* Wordmark is already white + amber on transparent — works directly on the dark veil. */
}

.contact-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  color: var(--texto-on-dark);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(232, 243, 251, 0.08);
  border: 1px solid rgba(232, 243, 251, 0.22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 200ms ease, transform 200ms ease;
}

.contact-link:hover {
  background: rgba(232, 243, 251, 0.18);
  transform: translateY(-1px);
}

@media (max-width: 520px) {
  .contact-link {
    font-size: 0.78rem;
    padding: 8px 12px;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: clamp(110px, 18vh, 180px) var(--gutter) clamp(70px, 12vh, 120px);
  color: var(--texto-on-dark);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.08);
  filter: saturate(1.05);
}

/* Veil — blue-tinted, gradient that keeps the upper-right brighter for the
   photograph to breathe, then deepens to navy at the bottom. */
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      130% 90% at 75% 18%,
      rgba(10, 25, 41, 0.10) 0%,
      rgba(10, 25, 41, 0.55) 55%,
      rgba(10, 25, 41, 0.85) 100%
    ),
    linear-gradient(180deg, rgba(27, 94, 138, 0.30) 0%, rgba(10, 25, 41, 0.65) 100%);
}

.hero-content {
  max-width: 720px;
  margin-inline: auto;
  width: 100%;
  display: grid;
  gap: 22px;
}

@media (min-width: 900px) {
  .hero-content {
    margin-inline: 0;
    margin-left: clamp(0px, 4vw, 60px);
  }
}

/* Eyebrow — warm amber tag on dark, with pulsing dot */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--amber);
  background: rgba(245, 169, 10, 0.13);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(245, 169, 10, 0.32);
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 169, 10, 0.22);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(245, 169, 10, 0.22);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(245, 169, 10, 0);
  }
}

.eyebrow-dark {
  color: var(--cielo-deep);
  background: rgba(58, 155, 213, 0.10);
  border: 1px solid rgba(58, 155, 213, 0.22);
}

.eyebrow-dark .dot {
  background: var(--naranja);
  box-shadow: 0 0 0 4px rgba(232, 98, 28, 0.18);
}

/* Hero title — sky-tinted cream, with "yapis" picked out in amber */
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--texto-on-dark);
  text-wrap: balance;
}

.hero-title em {
  font-style: normal;
  color: var(--amber);
}

.hero-sub {
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  color: var(--texto-on-dark-secondary);
  max-width: 56ch;
}

/* Waitlist form */
.waitlist {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 520px;
}

@media (min-width: 560px) {
  .waitlist {
    grid-template-columns: 1fr auto;
    align-items: stretch;
  }
}

.waitlist input[type="email"] {
  background: rgba(253, 252, 250, 0.96);
  border: 1px solid rgba(253, 252, 250, 0.4);
  color: var(--texto);
  padding: 16px 18px;
  border-radius: 999px;
  font-size: 1rem;
  font-family: var(--font-body);
  min-height: 54px;
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.waitlist input[type="email"]::placeholder {
  color: var(--texto-secondary);
  opacity: 0.72;
}

.waitlist input[type="email"]:focus {
  outline: none;
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(96, 178, 224, 0.45);
}

/* Primary CTA — Naranja (#E8621C) + white. The one warm color that takes
   white text legitimately (4.6:1, AA). */
.cta-primary {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: var(--naranja);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.01em;
  padding: 16px 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  min-height: 54px;
  box-shadow: var(--shadow-hover);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  white-space: nowrap;
}

.cta-primary:hover {
  transform: translateY(-1px);
  background: var(--naranja-deep);
  box-shadow: var(--shadow-elevated);
}

.cta-primary:active {
  transform: translateY(0);
}

.cta-primary .cta-arrow {
  display: inline-flex;
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.3, 1.2);
}

.cta-primary:hover .cta-arrow {
  transform: translateX(4px);
}

.cta-primary[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.waitlist-feedback {
  grid-column: 1 / -1;
  margin: 4px 4px 0;
  font-size: 0.92rem;
  color: var(--texto-on-dark-secondary);
  min-height: 1.2em;
}

.waitlist-feedback[data-state="success"] {
  color: var(--amber);
  font-weight: 700;
}

.waitlist-feedback[data-state="error"] {
  color: #FFB199;
  font-weight: 700;
}

.hero-foot {
  margin: 4px 0 0;
  font-size: 0.92rem;
  color: var(--texto-on-dark-secondary);
}

/* ---------- Why section — sky-cream surface, warm cards as accents ---------- */
.why {
  background: var(--sky-cream);
  padding: clamp(80px, 12vh, 130px) var(--gutter);
  position: relative;
}

.why::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border) 50%, transparent 100%);
}

.why-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  gap: 36px;
}

.why-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--texto);
  max-width: 18ch;
  text-wrap: balance;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 760px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards .card-feature {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1040px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .cards .card-feature {
    grid-column: auto;
  }
}

.card {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-rest);
  display: flex;
  flex-direction: column;
  transition: transform 320ms cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 320ms ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card-clean {
  background: var(--surface);
  border: 1px solid var(--border);
}

.card-warm {
  background: rgba(245, 169, 10, 0.07);
  border: 1px solid rgba(245, 169, 10, 0.22);
}

.card-feature {
  background: linear-gradient(135deg, var(--cielo-deep) 0%, var(--cielo) 100%);
  color: var(--texto-on-dark);
  border: 1px solid var(--cielo-deep);
}

.card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--sky-cream-warm);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.3, 1);
}

.card:hover .card-media img {
  transform: scale(1.04);
}

.card-body {
  padding: 26px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.card-body--full {
  padding: 36px 32px;
  gap: 14px;
}

.card-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.card-feature .card-body h3 {
  font-size: 1.6rem;
}

.card-body p {
  margin: 0;
  color: var(--texto-secondary);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 50ch;
}

.card-feature .card-body p {
  color: var(--texto-on-dark-secondary);
}

/* Tags — amber for "Preventas" (cool→warm accent), naranja-tint for "Tandas"
   (energy), sky-cream pill for "Sin comisiones" on the dark feature card. */
.tag {
  display: inline-flex;
  align-items: center;
  width: max-content;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 11px;
  border-radius: 999px;
}

.tag-cielo {
  background: rgba(58, 155, 213, 0.12);
  color: var(--cielo-deep);
}

.tag-amber {
  background: var(--amber);
  color: var(--texto);
}

.tag-naranja {
  background: rgba(232, 98, 28, 0.14);
  color: var(--naranja-deep);
}

.tag-sky {
  background: var(--sky-cream);
  color: var(--cielo-deep);
}

/* ---------- Closer ---------- */
.closer {
  background: var(--sky-cream-warm);
  padding: clamp(70px, 10vh, 110px) var(--gutter);
  text-align: center;
}

.closer-inner {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.closer-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--texto);
  text-wrap: balance;
}

.closer-sub {
  margin: 0;
  color: var(--texto-secondary);
  font-size: 1.05rem;
  max-width: 48ch;
  margin-inline: auto;
  line-height: 1.55;
}

.cta-ghost {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--cielo-deep);
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--cielo);
  transition: background 200ms ease, transform 200ms ease, color 200ms ease, border-color 200ms ease;
}

.cta-ghost:hover {
  background: var(--cielo);
  border-color: var(--cielo);
  color: var(--surface);
  transform: translateY(-1px);
}

/* ---------- Footer ---------- */
.foot {
  background: var(--noche);
  color: var(--texto-on-dark);
  padding: 40px var(--gutter);
}

.foot-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* App-icon SVG has its own cielo-blue tile; just round + size, no wrapper bg. */
.foot-mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
}

.foot-text {
  display: grid;
  gap: 4px;
}

.foot-line {
  margin: 0;
  font-size: 0.92rem;
}

.foot-line strong {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--amber);
}

.foot-line--muted {
  color: var(--texto-on-dark-secondary);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.foot-line a {
  color: var(--cielo-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 180ms ease;
}

.foot-line a:hover {
  color: var(--texto-on-dark);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease-out, transform 600ms cubic-bezier(0.2, 0.7, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero-media img {
    transform: none;
  }
}
