/* =========================================================
   Los Cedros · Página temporal
   Estilo: glassmorphism (transparencia + desenfoque)
   ========================================================= */

:root {
  /* Paleta tomada de los logotipos */
  --teal-900: #1f4b4d;
  --teal-700: #3f8486;
  --teal-500: #6dacad;
  --teal-200: #b9dcdb;
  --teal-050: #eef7f8;
  --sand:     #9f998f;
  --ink:      #1d1d1b;
  --ink-soft: rgba(29, 29, 27, .68);
  --ink-mute: rgba(29, 29, 27, .48);

  /* Cristal */
  --glass-bg:     rgba(255, 255, 255, .42);
  --glass-bg-2:   rgba(255, 255, 255, .28);
  --glass-brd:    rgba(255, 255, 255, .55);
  --glass-blur:   22px;
  --glass-shadow: 0 24px 60px rgba(24, 61, 62, .18), 0 2px 8px rgba(24, 61, 62, .08);

  --radius:    28px;
  --radius-sm: 18px;
  --radius-xs: 14px;

  --ease: cubic-bezier(.22, .9, .3, 1);
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: linear-gradient(145deg, #dff0ef 0%, #bfdedd 38%, #8dc0c0 70%, #5f9fa1 100%);
  background-attachment: fixed;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  overflow-x: hidden;
}

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

/* ---------- Fondo animado ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .75;
  will-change: transform;
}

.blob--1 {
  width: 46vmax; height: 46vmax;
  top: -14vmax; left: -10vmax;
  background: radial-gradient(circle at 30% 30%, #ffffff, var(--teal-200) 60%, transparent 72%);
  animation: float-1 22s ease-in-out infinite;
}

.blob--2 {
  width: 40vmax; height: 40vmax;
  right: -12vmax; top: 18%;
  background: radial-gradient(circle at 60% 40%, var(--teal-500), var(--teal-700) 55%, transparent 72%);
  opacity: .55;
  animation: float-2 26s ease-in-out infinite;
}

.blob--3 {
  width: 38vmax; height: 38vmax;
  left: 18%; bottom: -16vmax;
  background: radial-gradient(circle at 50% 50%, #e9e4dc, var(--sand) 58%, transparent 74%);
  opacity: .42;
  animation: float-3 30s ease-in-out infinite;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: .25;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

@keyframes float-1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); }
}
@keyframes float-2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-7vmax, 6vmax, 0) scale(1.12); }
}
@keyframes float-3 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(5vmax, -5vmax, 0) scale(.92); }
}

/* ---------- Cristal ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow);
}

.glass--inner {
  background: var(--glass-bg-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 6px 18px rgba(24, 61, 62, .08);
}

/* ---------- Layout ---------- */
.page {
  width: min(100%, 860px);
  animation: rise .9s var(--ease) both;
}

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

.card {
  position: relative;
  border-radius: var(--radius);
  padding: clamp(26px, 5vw, 56px);
  text-align: center;
  overflow: hidden;
}

/* Brillo superior del cristal */
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .38), transparent);
  pointer-events: none;
}

.card > * { position: relative; }

/* ---------- Encabezado ---------- */
.card__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-bottom: clamp(20px, 3vw, 30px);
}

.logo {
  width: clamp(150px, 26vw, 210px);
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(24, 61, 62, .18));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .45);
  border: 1px solid rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-900);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-700);
  box-shadow: 0 0 0 0 rgba(63, 132, 134, .6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(63, 132, 134, 0); }
  100% { box-shadow: 0 0 0 0 rgba(63, 132, 134, 0); }
}

/* ---------- Texto ---------- */
.title {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 6vw, 3.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
}

.title__accent {
  background: linear-gradient(100deg, var(--teal-700), var(--teal-500) 45%, var(--sand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 48ch;
  margin: 0 auto clamp(28px, 4vw, 40px);
  font-size: clamp(.95rem, 2.4vw, 1.08rem);
  line-height: 1.65;
  color: var(--ink-soft);
}

/* ---------- Cuenta regresiva ---------- */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 2vw, 18px);
  margin-bottom: clamp(26px, 4vw, 36px);
}

.unit {
  border-radius: var(--radius-sm);
  padding: clamp(14px, 2.6vw, 24px) 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform .35s var(--ease);
}

.unit:hover { transform: translateY(-4px); }

.unit__value {
  font-size: clamp(1.75rem, 7vw, 3.1rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  color: var(--teal-900);
}

.unit__value.tick { animation: tick .5s var(--ease); }

@keyframes tick {
  0%   { transform: translateY(-38%); opacity: 0; filter: blur(4px); }
  100% { transform: none; opacity: 1; filter: blur(0); }
}

.unit__label {
  font-size: clamp(.6rem, 1.8vw, .72rem);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ---------- Progreso ---------- */
.progress { margin-bottom: clamp(24px, 4vw, 34px); }

.progress__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .45);
  border: 1px solid rgba(255, 255, 255, .5);
  overflow: hidden;
}

.progress__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal-700), var(--teal-500));
  box-shadow: 0 0 14px rgba(109, 172, 173, .8);
  transition: width 1.2s var(--ease);
}

.progress__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.progress__date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--teal-900);
  font-weight: 600;
}

/* ---------- Formulario ---------- */
.notify { margin-bottom: clamp(26px, 4vw, 36px); }

.notify__field {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 480px;
  margin: 0 auto;
  padding: 7px 7px 7px 16px;
  border-radius: 999px;
  color: var(--ink-mute);
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}

.notify__field:focus-within {
  border-color: rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 4px rgba(109, 172, 173, .28), 0 8px 22px rgba(24, 61, 62, .12);
}

.notify__field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  padding: 10px 0;
}

.notify__field input::placeholder { color: var(--ink-mute); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  border: 0;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: 999px;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-900));
  box-shadow: 0 8px 20px rgba(31, 75, 77, .3);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 26px rgba(31, 75, 77, .36);
}

.btn:active { transform: translateY(0); }

.notify__msg {
  min-height: 1.2em;
  margin: 12px 0 0;
  font-size: .84rem;
  font-weight: 600;
  color: var(--teal-900);
}

.notify__msg.is-error { color: #b4443c; }

/* ---------- Pie ---------- */
.card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: clamp(18px, 3vw, 26px);
  border-top: 1px solid rgba(255, 255, 255, .55);
}

.developer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  transition: color .25s var(--ease);
}

.developer:hover { color: var(--ink); }
.developer img { height: 30px; width: auto; }

.social { display: flex; gap: 10px; }

.social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--teal-900);
  background: rgba(255, 255, 255, .4);
  border: 1px solid rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}

.social a:hover {
  transform: translateY(-3px);
  background: var(--teal-900);
  color: #fff;
}

.copy {
  margin: 22px 0 0;
  text-align: center;
  font-size: .78rem;
  color: rgba(29, 29, 27, .55);
}

/* Foco visible accesible */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--teal-900);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .countdown { grid-template-columns: repeat(2, 1fr); }
  .card__foot { justify-content: center; }
  .progress__meta { justify-content: center; text-align: center; }
}

@media (max-width: 400px) {
  .notify__field {
    flex-wrap: wrap;
    border-radius: var(--radius-sm);
    padding: 12px;
    justify-content: center;
  }
  .notify__field input { flex: 1 1 100%; text-align: center; }
  .btn { width: 100%; justify-content: center; }
}

/* Navegadores sin backdrop-filter */
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .glass       { background: rgba(255, 255, 255, .82); }
  .glass--inner{ background: rgba(255, 255, 255, .7); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
