/* ==========================================================================
   HELQ | Coming Soon
   Light, minimalist "clear glass" theme
   Brand colours sampled from assets/helq-logo.png
   ========================================================================== */

:root {
  /* Brand */
  --purple: #AA92F0;
  --cyan: #4CD7FE;
  --blue: #33B6FA;            /* where the two strands overlap */
  /* Slightly deeper brand tints so the wordmark reads well on white */
  --wordmark-gradient: linear-gradient(90deg, #9A80EC 0%, #2FA8F6 55%, #2BBEEF 100%);

  /* Neutrals (Apple-style greys) */
  --bg: #FFFFFF;
  --text: #1D1D1F;
  --secondary: #6E6E73;
  --placeholder: #76767B;
  --hairline: rgba(0, 0, 0, 0.08);
  --focus: #0A7CD1;
  --error: #D70015;

  /* Glass */
  --glass-fill: linear-gradient(145deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.14) 100%);
  --glass-pill: rgba(255, 255, 255, 0.55);
  --glass-blur: blur(16px) saturate(180%);

  /* Helix strength on white */
  --dna-opacity: 0.55;

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* SF Pro on Apple devices, Inter everywhere else */
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Rounded, to echo the logo's strokes: SF Pro Rounded on Apple, Nunito elsewhere */
  --font-rounded: ui-rounded, "SF Pro Rounded", "Nunito", var(--font-display);
}

/* ---------- 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: flex;
  flex-direction: column;
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
}

h1,
h2,
p,
ul {
  margin: 0;
}

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

/* ---------- Background: white + faint brand light + DNA canvas ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(900px 620px at 0% 0%, rgba(170, 146, 240, 0.12), transparent 62%),
    radial-gradient(900px 620px at 100% 100%, rgba(76, 215, 254, 0.12), transparent 62%),
    var(--bg);
}

.bg__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: var(--dna-opacity);
}

/* ---------- Layout ---------- */

.page {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: clamp(20px, 4vh, 48px) 16px 20px;
}

/* ---------- Clear-glass card ---------- */

.card {
  position: relative;
  isolation: isolate;
  width: min(100%, 600px);
  padding: clamp(32px, 5vw, 48px) clamp(22px, 6vw, 60px) clamp(28px, 4vw, 40px);
  text-align: center;
  border-radius: 36px;
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(17, 24, 39, 0.04),
    0 30px 80px -30px rgba(17, 24, 39, 0.22);
}

/* Specular rim: bright where light hits, faint where it doesn't */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(150deg,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0.35) 28%,
      rgba(0, 0, 0, 0.07) 62%,
      rgba(255, 255, 255, 0.9) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

/* Soft light sheen across the top of the glass */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(120% 50% at 25% 0%, rgba(255, 255, 255, 0.45), transparent 62%);
  pointer-events: none;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card {
    background: rgba(255, 255, 255, 0.9);
  }
}

/* ---------- Logo + heartbeat ---------- */

.logo-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

/* Pastel halo that breathes with the heartbeat */
.logo-wrap::before {
  content: "";
  position: absolute;
  inset: -16%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(51, 182, 250, 0.2) 0%, rgba(170, 146, 240, 0.12) 45%, transparent 70%);
  filter: blur(8px);
  animation: halo 2.4s ease-in-out 1.2s infinite;
}

.logo {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(51, 182, 250, 0.22));
  animation: heartbeat 2.4s ease-in-out 1.2s infinite;
  transform-origin: 50% 55%;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  12%      { transform: scale(1.07); }
  24%      { transform: scale(0.99); }
  36%      { transform: scale(1.04); }
  54%      { transform: scale(1); }
}

@keyframes halo {
  0%, 100% { opacity: 0.5; transform: scale(0.94); }
  12%      { opacity: 1;   transform: scale(1.06); }
  36%      { opacity: 0.8; transform: scale(1.02); }
  60%      { opacity: 0.5; transform: scale(0.94); }
}

/* ---------- Wordmark + headline ---------- */

.title {
  margin-top: 14px;
  font-weight: inherit;
}

.wordmark {
  display: block;
  width: fit-content;
  margin: 0 auto;
  /* letter-spacing adds space after the last letter; pad the start to keep it centred */
  padding-left: 0.08em;
  font-family: var(--font-rounded);
  font-weight: 800;
  font-size: clamp(1.9rem, 5.5vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: 0.08em;
  background: var(--wordmark-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.headline {
  display: block;
  margin-top: 0.12em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 8.5vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--text);
}

/* ---------- Shared glass pill (badge + chips) ---------- */

.badge,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text);
  border-radius: 999px;
  background: var(--glass-pill);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(17, 24, 39, 0.04);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* ---------- Badge ---------- */

.badge {
  margin-top: 20px;
  padding: 6px 14px 6px 12px;
}

.badge__dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.badge__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--blue);
  animation: ping 2s var(--ease-out) infinite;
}

@keyframes ping {
  0%   { transform: scale(1);   opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* ---------- Message ---------- */

.message {
  max-width: 34ch;
  margin: 18px auto 0;
  font-size: clamp(1.0625rem, 2.5vw, 1.1875rem);
  line-height: 1.5;
  letter-spacing: -0.011em;
  color: var(--secondary);
}

/* ---------- Chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding: 0;
  list-style: none;
}

.chip {
  padding: 7px 14px 7px 11px;
  transition: translate 0.25s ease, box-shadow 0.25s ease;
}

.chip:hover {
  translate: 0 -1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 16px -8px rgba(17, 24, 39, 0.18);
}

.chip__icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chip__icon circle {
  fill: currentColor;
  stroke: none;
}

.chip:nth-child(1) .chip__icon { color: #8F74E8; }
.chip:nth-child(2) .chip__icon { color: #2FA8F6; }
.chip:nth-child(3) .chip__icon { color: #22B5E6; }

/* ---------- Remind Me ---------- */

.notify {
  margin-top: 32px;
}

.notify__title {
  margin-bottom: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.notify__form {
  max-width: 440px;
  margin: 0 auto;
}

/* Email field + button live together in one glass pill */
.field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 3px rgba(17, 24, 39, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field:hover {
  border-color: rgba(0, 0, 0, 0.14);
}

.field:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(10, 124, 209, 0.18);
}

.field.is-invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(215, 0, 21, 0.12);
}

.field__input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 8px 0 18px;
  font: inherit;
  font-size: 1.0625rem;          /* over 16px, so iOS doesn't zoom on focus */
  letter-spacing: -0.01em;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 999px;
  outline: none;                 /* focus ring is drawn on the whole pill (.field:focus-within) */
}

.field__input::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

.field__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.notify__hint,
.notify__error {
  margin-top: 10px;
  font-size: 0.8125rem;
}

.notify__hint {
  color: var(--secondary);
}

.notify__error {
  color: var(--error);
  font-weight: 500;
}

/* ---------- Button ---------- */

.btn {
  position: relative;
  flex: none;
  height: 46px;
  padding: 0 22px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #FFFFFF;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  transition: background-color 0.2s ease, box-shadow 0.3s ease, translate 0.2s ease;
}

/* soft brand glow on hover */
.btn:hover {
  background: #000000;
  translate: 0 -1px;
  box-shadow:
    0 8px 22px -8px rgba(51, 182, 250, 0.7),
    0 4px 18px -6px rgba(170, 146, 240, 0.6);
}

.btn:active {
  translate: 0 0;
  background: #333336;
}

.btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.btn:disabled {
  cursor: progress;
}

.btn__spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  opacity: 0;
}

.btn.is-loading .btn__label {
  opacity: 0;
}

.btn.is-loading .btn__spinner {
  opacity: 1;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Success state ---------- */

.notify__success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
  padding: 14px 22px 14px 16px;
  font-weight: 500;
  text-align: left;
  color: var(--text);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 24px -12px rgba(17, 24, 39, 0.2);
  animation: pop-in 0.5s var(--ease-out) both;
}

.notify__success[hidden] {
  display: none;
}

.notify__success:focus {
  outline: none;
}

.notify__check {
  flex: none;
  width: 28px;
  height: 28px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notify__check circle {
  fill: var(--blue);
  stroke: none;
}

.notify__check path {
  fill: none;
  stroke: #FFFFFF;
  stroke-width: 2.2;
  stroke-dasharray: 16;
  stroke-dashoffset: 16;
  animation: draw 0.45s var(--ease-out) 0.2s forwards;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

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

.footer {
  position: relative;
  z-index: 1;
  padding: 4px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 0;
  list-style: none;
}

.social {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--secondary);
  border-radius: 50%;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.social svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.05);
}

.social:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  color: var(--text);
}

.footer__copy {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--secondary);
}

/* ---------- WhatsApp chat button (floating glass pill) ---------- */

.whatsapp {
  --wa-green: #25D366;
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px 6px 6px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.08),
    0 10px 30px -10px rgba(17, 24, 39, 0.28);
  transition: translate 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #FFFFFF;
  background: var(--wa-green);
}

.whatsapp__icon svg,
.whatsapp__icon img {
  width: 22px;
  height: 22px;
}

.whatsapp__icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.whatsapp__icon circle {
  fill: currentColor;
  stroke: none;
}

.whatsapp:hover {
  translate: 0 -2px;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.08),
    0 14px 34px -10px rgba(17, 24, 39, 0.32),
    0 0 24px rgba(37, 211, 102, 0.22);
}

.whatsapp:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* ---------- Staggered page-load reveal ---------- */

.reveal {
  opacity: 0;
  animation: reveal 0.9s var(--ease-out) forwards;
  animation-delay: calc(100ms + var(--i, 0) * 100ms);
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(12px); filter: blur(3px); }
  to   { opacity: 1; transform: none; filter: none; }
}

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

@media (max-width: 520px) {
  .card {
    border-radius: 28px;
  }

  .chip {
    padding: 6px 12px 6px 10px;
    font-size: 0.78rem;
  }

  /* WhatsApp button becomes a round icon; footer gets room so it never covers the text */
  .whatsapp {
    right: calc(16px + env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    padding: 5px;
  }

  .whatsapp__icon {
    width: 46px;
    height: 46px;
  }

  .whatsapp__label {
    display: none;
  }

  .footer {
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}

/* Very narrow phones: stack the email field and button */
@media (max-width: 359px) {
  .field {
    flex-direction: column;
    align-items: stretch;
    border-radius: 24px;
  }

  .field__input {
    padding: 0 14px;
    text-align: center;
  }

  .btn {
    width: 100%;
  }

  .logo-wrap {
    width: 100px;
    height: 100px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .btn.is-loading .btn__spinner {
    animation: spin 1.6s linear infinite !important;
  }
}

/* ---------- Windows high-contrast / forced colours ---------- */

@media (forced-colors: active) {
  .wordmark {
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
    background: none;
  }

  .field__input:focus-visible {
    outline: 2px solid Highlight;
  }

  .btn {
    border: 2px solid ButtonText;
  }
}
