/* WhatsFlow — public marketing + auth pages */

:root {
  --green: #25d366;
  --green-deep: #1da851;
  --teal: #0b5c4e;
  --teal-mid: #128c7e;
  --ink: #0a1612;
  --muted: #5c6f68;
  --line: #d5e3dc;
  --paper: #f4fbf7;
  --danger: #e11d48;
  --font: 'Sora', sans-serif;
  --display: 'Space Grotesk', sans-serif;
}

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

body.wf-mkt {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal-mid); text-decoration: none; }
a:hover { color: var(--teal); text-decoration: underline; }

.wf-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.wf-brand:hover { text-decoration: none; color: inherit; }

.wf-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #2fe074, #1ebe57);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.35);
  flex-shrink: 0;
}
.wf-brand-mark svg { width: 22px; height: 22px; fill: #fff; }
.wf-brand-word { font-size: 1.15rem; }

.wf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 48px;
  padding: 0 1.35rem;
  border: 0;
  border-radius: 12px;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.wf-btn:hover { text-decoration: none; transform: translateY(-2px); }
.wf-btn:active { transform: translateY(0); }

.wf-btn-primary {
  background: linear-gradient(135deg, #2fe074 0%, #25d366 40%, #1da851 100%);
  color: #042016;
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.3);
}
.wf-btn-primary:hover {
  color: #042016;
  box-shadow: 0 18px 34px rgba(37, 211, 102, 0.4);
}

.wf-btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.wf-btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.55);
}

.wf-btn-outline {
  background: #fff;
  color: var(--teal);
  border: 1.5px solid var(--line);
}
.wf-btn-outline:hover {
  color: var(--teal);
  border-color: var(--teal-mid);
  background: #fff;
}

/* ========== AUTH SHELL ========== */
html.wf-auth,
html.wf-auth body {
  height: 100%;
  overflow: hidden;
}
body.wf-auth {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #06281f;
  -webkit-font-smoothing: antialiased;
}

.wf-shell {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  overflow: hidden;
}

.wf-stage {
  position: relative;
  overflow: hidden;
  min-height: 0;
  background:
    radial-gradient(ellipse 90% 70% at 15% 10%, rgba(37, 211, 102, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 60% at 90% 90%, rgba(18, 140, 126, 0.4), transparent 50%),
    linear-gradient(160deg, #04352a 0%, #0a4f3f 40%, #06281f 100%);
  color: #fff;
  padding: clamp(1.1rem, 2.2vh, 1.75rem) clamp(1.25rem, 3.5vw, 2.75rem) clamp(1.25rem, 2.5vh, 1.85rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(0.5rem, 1.5vh, 1rem);
  isolation: isolate;
}

.wf-stage-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.45), transparent 70%);
  filter: blur(8px);
  top: 35%;
  left: 40%;
  transform: translate(-50%, -50%);
  animation: wf-glow-breathe 5s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

.wf-stage-orb {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 0;
  pointer-events: none;
}
.wf-stage-orb.a { width: 280px; height: 280px; top: 12%; right: 8%; animation: wf-spin-slow 28s linear infinite; }
.wf-stage-orb.b { width: 180px; height: 180px; bottom: 18%; left: 10%; animation: wf-spin-slow 22s linear infinite reverse; }

.wf-stage-top { position: relative; z-index: 2; animation: wf-fade-up 0.7s ease both; }
.wf-stage-top .wf-brand { margin-bottom: clamp(0.65rem, 1.8vh, 1.1rem); color: #fff; }

.wf-stage-headline {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.55rem, 2.8vh + 1vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  max-width: 14ch;
}
.wf-stage-headline span {
  background: linear-gradient(90deg, #fff 20%, #7dffb0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wf-stage-copy {
  margin: clamp(0.45rem, 1.2vh, 0.75rem) 0 0;
  max-width: 28rem;
  font-size: clamp(0.82rem, 1.4vh + 0.2vw, 0.98rem);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.78);
}

.wf-stage-visual {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0 1rem;
}

.wf-phone {
  height: 100%;
  max-height: 100%;
  width: auto;
  aspect-ratio: 9 / 17;
  border-radius: 26px;
  background: #111b21;
  border: 3px solid #1f2c34;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 0 6px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  position: relative;
  transform: perspective(900px) rotateY(-6deg);
  transform-origin: center center;
  animation: wf-phone-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
  flex: 0 1 auto;
}
.wf-phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 14px;
  background: #000;
  border-radius: 10px;
  z-index: 5;
}
.wf-phone-header {
  background: #1f2c34;
  padding: 1.65rem 0.7rem 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.wf-phone-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
}
.wf-phone-meta strong { display: block; font-size: 0.78rem; font-weight: 600; }
.wf-phone-meta small { font-size: 0.62rem; color: #8696a0; }
.wf-phone-chat {
  height: calc(100% - 58px);
  padding: 0.65rem 0.55rem;
  background:
    linear-gradient(rgba(11, 20, 26, 0.88), rgba(11, 20, 26, 0.88)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='8' cy='8' r='2'/%3E%3Ccircle cx='40' cy='28' r='1.5'/%3E%3Ccircle cx='22' cy='44' r='1.8'/%3E%3C/g%3E%3C/svg%3E");
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow: hidden;
}
.wf-bubble {
  max-width: 84%;
  padding: 0.35rem 0.5rem;
  border-radius: 9px;
  font-size: 0.62rem;
  line-height: 1.3;
  opacity: 0;
  animation: wf-bubble-in 0.55s ease forwards;
}
.wf-bubble.in { align-self: flex-start; background: #202c33; color: #e9edef; border-top-left-radius: 2px; }
.wf-bubble.out { align-self: flex-end; background: #005c4b; color: #e9edef; border-top-right-radius: 2px; }
.wf-bubble .time {
  display: block;
  text-align: right;
  font-size: 0.52rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.2rem;
}
.wf-b1 { animation-delay: 0.55s; }
.wf-b2 { animation-delay: 0.95s; }
.wf-b3 { animation-delay: 1.35s; }
.wf-b4 { animation-delay: 1.75s; }

.wf-auth-panel {
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 2.5vh, 1.75rem) 1.5rem;
  position: relative;
  overflow: auto;
  min-height: 0;
}
.wf-auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 211, 102, 0.12), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(18, 140, 126, 0.1), transparent 45%);
  pointer-events: none;
}

.wf-auth-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
}

.wf-auth-brand {
  display: none;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.35rem;
  color: var(--ink);
}
.wf-auth-brand .wf-brand-mark { width: 40px; height: 40px; }
.wf-auth-brand span {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.wf-auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-mid);
  margin-bottom: clamp(0.4rem, 1vh, 0.7rem);
}
.wf-auth-kicker::before {
  content: '';
  width: 18px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
}

.wf-auth-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.45rem, 2.4vh + 0.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
}
.wf-auth-sub {
  margin: 0.4rem 0 clamp(0.9rem, 2vh, 1.35rem);
  color: var(--muted);
  font-size: clamp(0.82rem, 1.3vh + 0.2vw, 0.92rem);
  line-height: 1.45;
}

.wf-field { margin-bottom: clamp(0.7rem, 1.5vh, 0.95rem); }
.wf-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.wf-control { position: relative; }
.wf-input {
  width: 100%;
  height: clamp(42px, 5.5vh, 48px);
  padding: 0 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wf-input:focus {
  border-color: var(--teal-mid);
  box-shadow: 0 0 0 4px rgba(18, 140, 126, 0.15);
}
.wf-control.has-toggle .wf-input { padding-right: 2.75rem; }

.wf-toggle {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0.35rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
}
.wf-toggle:hover { color: var(--teal); }
.wf-toggle svg { width: 18px; height: 18px; }

.wf-error {
  display: none;
  margin-top: 0.45rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  align-items: flex-start;
  gap: 0.45rem;
  animation: wf-shake 0.4s ease;
}
.wf-error.is-visible { display: flex; }
.wf-error svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.wf-field.has-error .wf-input { border-color: var(--danger); background: #fff8f8; }
.wf-field.has-error .wf-input:focus { box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.12); }

.wf-alert {
  display: none;
  margin-bottom: 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
  font-size: 0.85rem;
  font-weight: 500;
  animation: wf-shake 0.4s ease;
}
.wf-alert.is-visible { display: block; }

.wf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.1rem 0 clamp(0.85rem, 1.8vh, 1.15rem);
}
.wf-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.wf-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--teal-mid);
  cursor: pointer;
}
.wf-link-muted {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--teal-mid);
  text-decoration: none;
}
.wf-link-muted:hover { color: var(--teal); text-decoration: underline; }

.wf-submit {
  width: 100%;
  height: clamp(42px, 5.5vh, 48px);
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #2fe074 0%, #25d366 40%, #1da851 100%);
  color: #042016;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.3);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.2s;
}
.wf-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: wf-shine 3.5s ease-in-out infinite;
}
.wf-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(37, 211, 102, 0.4);
}
.wf-submit.wf-btn-loading { color: transparent !important; }
.wf-submit.wf-btn-loading::after { animation: none !important; opacity: 0 !important; background: none !important; }
.wf-submit.wf-btn-loading .wf-spinner {
  --wf-spinner-track: rgba(4, 32, 22, 0.22);
  --wf-spinner-color: #042016;
  border-width: 3px;
}

.wf-secure {
  margin-top: clamp(0.85rem, 1.8vh, 1.15rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.75rem;
}
.wf-secure svg { width: 13px; height: 13px; color: var(--teal-mid); }

.wf-auth-switch {
  margin-top: 1.1rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}
.wf-auth-switch a {
  font-weight: 700;
  color: var(--teal-mid);
  text-decoration: none;
}
.wf-auth-switch a:hover { color: var(--teal); text-decoration: underline; }

@keyframes wf-fade-up {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes wf-phone-in {
  from { opacity: 0; transform: perspective(900px) rotateY(-16deg) translateY(24px); }
  to { opacity: 1; transform: perspective(900px) rotateY(-6deg) translateY(0); }
}
@keyframes wf-bubble-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes wf-glow-breathe {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}
@keyframes wf-spin-slow { to { transform: rotate(360deg); } }
@keyframes wf-shine {
  0%, 60%, 100% { transform: translateX(-120%); }
  75% { transform: translateX(120%); }
}
@keyframes wf-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

@media (max-width: 960px) {
  html.wf-auth, html.wf-auth body { overflow: auto; }
  .wf-shell {
    position: relative;
    inset: auto;
    height: auto;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .wf-stage { display: none; }
  .wf-auth-panel {
    min-height: 100dvh;
    padding: 1.75rem 1.25rem 2rem;
  }
  .wf-auth-brand { display: flex; }
}

@media (max-height: 720px) and (min-width: 961px) {
  .wf-stage-copy {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .wf-stage-visual { padding-bottom: 0.75rem; }
}

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