/* ════════════════════════════════════════════════════════════
   EVERYDAY ADVOCATES — WAITLIST PAGE
═══════════════════════════════════════════════════════════════ */

:root {
  --teal:        #3A7D76;
  --teal-soft:   #5BA09A;
  --teal-mist:   #EAF4F3;
  --teal-deep:   #2C6259;
  --amber:       #C47E3A;
  --amber-light: #D9974F;
  --amber-deep:  #A1622C;
  --amber-pale:  #FBF2E8;
  --slate:       #2D3A3A;
  --slate-mid:   #4A5858;
  --slate-light: #8A9898;
  --ink:         #1E2A29;

  --bg:            #FBF9F5;
  --bg-surface:    #FFFFFF;
  --bg-subtle:     #EAF4F3;
  --text-primary:  #1E2A29;
  --text-body:     #4A5858;
  --text-muted:    #8A9898;
  --border:        #DDE8E7;
  --border-strong: #B8CCCA;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 9999px;

  --shadow-md: 0 10px 30px -8px rgba(30,42,41,0.14);
  --shadow-lg: 0 24px 60px -16px rgba(30,42,41,0.18);
}

[data-theme="dark"] {
  --bg:            #131C1B;
  --bg-surface:    #1B2626;
  --bg-subtle:     #202E2D;
  --text-primary:  #F2F6F5;
  --text-body:     #C3D0CE;
  --text-muted:    #8FA19E;
  --border:        #2C3A39;
  --border-strong: #3B4B49;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100%;
}

.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;
}

.wl-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  overflow: hidden;
}

.wl-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 400px at 15% 10%, rgba(58,125,118,0.12), transparent 60%),
    radial-gradient(500px 380px at 85% 90%, rgba(196,126,58,0.12), transparent 60%);
  pointer-events: none;
}

.theme-toggle {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-body);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease;
}
.theme-toggle:hover { transform: translateY(-1px); }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.wl-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 620px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 56px 48px 44px;
  text-align: center;
}

.wl-logo img {
  width: 148px;
  height: 148px;
  object-fit: contain;
  margin-bottom: 20px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-deep);
  background: var(--amber-pale);
  padding: 6px 14px;
  border-radius: var(--r-full);
  margin-bottom: 18px;
}
[data-theme="dark"] .eyebrow {
  background: rgba(196,126,58,0.16);
  color: var(--amber-light);
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4.2vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--text-primary);
}
h1 br { display: block; }

.wl-sub {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 460px;
  margin: 0 auto 34px;
}

.wl-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}

.wl-count-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  min-width: 72px;
  padding: 14px 6px 12px;
}

.wl-count-num {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 700;
  color: var(--teal-deep);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
[data-theme="dark"] .wl-count-num { color: var(--teal-soft); }

.wl-count-label {
  margin-top: 6px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.wl-count-sep {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--border-strong);
  margin-bottom: 18px;
}

.wl-launch-date {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0 0 34px;
}

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

.wl-field-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wl-field-row input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 14px 18px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.96rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wl-field-row input[type="email"]:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(58,125,118,0.14);
}
.wl-field-row input[type="email"]::placeholder { color: var(--text-muted); }

.btn-primary {
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: #fff;
  border: none;
  padding: 14px 26px;
  border-radius: var(--r-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(44,98,89,0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(44,98,89,0.55); }
.btn-primary:disabled { opacity: 0.7; cursor: default; transform: none; }

.wl-form-note {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.wl-message {
  margin-top: 14px;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 0;
  display: none;
  padding: 10px 16px;
  border-radius: var(--r-lg);
}
.wl-message.visible { display: block; }
.wl-message.success {
  background: var(--teal-mist);
  color: var(--teal-deep);
}
[data-theme="dark"] .wl-message.success {
  background: rgba(58,125,118,0.16);
  color: var(--teal-soft);
}
.wl-message.error {
  background: #FBEAEA;
  color: #A13A2C;
}
[data-theme="dark"] .wl-message.error {
  background: rgba(161,58,44,0.16);
  color: #E08B7C;
}

.wl-foot {
  margin: 34px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 560px) {
  .wl-page { padding: 32px 16px; }

  .wl-card {
    padding: 36px 20px 30px;
    border: none;
    box-shadow: none;
    border-radius: 0;
    max-width: 100%;
  }

  .wl-logo img { width: 114px; height: 114px; }

  h1 { font-size: 1.55rem; }
  .wl-sub { font-size: 0.96rem; margin-bottom: 28px; }

  .wl-countdown { gap: 6px; }
  .wl-count-unit { min-width: 0; flex: 1 1 0; padding: 10px 2px 9px; }
  .wl-count-sep { font-size: 1.1rem; margin-bottom: 12px; }

  .wl-field-row {
    gap: 12px;
  }
  .wl-field-row input[type="email"] {
    width: 100%;
    padding: 8px 16px;
    line-height: 1.3;
    font-size: 16px; /* prevents iOS auto-zoom on focus */
  }
  .wl-field-row .btn-primary {
    width: 100%;
    padding: 9px 20px;
    line-height: 1.3;
  }
}

/* ════════════════════════════════════════════════════════════
   BLOG TEASER — sits below the waitlist card
═══════════════════════════════════════════════════════════════ */

.wl-blog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 980px;
  margin: 56px auto 0;
  opacity: 0;
  animation: wlBlogIn 0.5s ease forwards;
}
.wl-blog[hidden] { display: none; }

@keyframes wlBlogIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wl-blog-head {
  text-align: center;
  margin-bottom: 28px;
}
.wl-blog-head .eyebrow { margin-bottom: 14px; }
.wl-blog-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  margin: 0 0 8px;
  color: var(--text-primary);
}
.wl-blog-head p {
  font-size: 0.94rem;
  color: var(--text-muted);
  margin: 0;
}

.wl-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.wl-blog-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.wl-blog-card:hover,
.wl-blog-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.wl-blog-card:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.wl-blog-card-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-subtle);
}
.wl-blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.wl-blog-card:hover .wl-blog-card-media img { transform: scale(1.05); }

.wl-blog-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.wl-blog-card-date {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
[data-theme="dark"] .wl-blog-card-date { color: var(--teal-soft); }

.wl-blog-card-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.35;
  margin: 8px 0 6px;
  color: var(--text-primary);
}

.wl-blog-card-body p {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-body);
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wl-blog-read-more {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal);
}
[data-theme="dark"] .wl-blog-read-more { color: var(--teal-soft); }

/* ── Blog post modal ── */

.wl-blog-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.wl-blog-modal[hidden] { display: none; }

.wl-blog-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19,28,27,0.55);
  backdrop-filter: blur(3px);
  animation: wlFade 0.18s ease;
}

.wl-blog-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 680px;
  max-height: min(82vh, 720px);
  background: var(--bg-surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  animation: wlModalIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@keyframes wlFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wlModalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.wl-blog-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-body);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease;
}
.wl-blog-modal-close:hover { transform: translateY(-1px); }

.wl-blog-modal-scroll {
  overflow-y: auto;
  padding: 40px 40px 44px;
}

.wl-blog-modal-content img {
  width: 100%;
  border-radius: var(--r-lg);
  margin-bottom: 24px;
  display: block;
}
.wl-blog-modal-content .eyebrow {
  background: none;
  padding: 0;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-weight: 600;
}
.wl-blog-modal-content h1 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 0 0 20px;
}
.wl-blog-modal-content .wl-blog-post-body p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-body);
  margin: 0 0 16px;
}

@media (max-width: 560px) {
  .wl-blog { margin-top: 40px; }
  .wl-blog-modal { padding: 0; }
  .wl-blog-modal-panel {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }
  .wl-blog-modal-scroll { padding: 56px 22px 40px; }
}
