/* ========================================
   ExecMatchAI Landing Page — Custom Styles
   ======================================== */

/* --- CSS Variables --- */
:root {
  --color-primary: #20C997;
  --color-primary-hover: #2DDC91;
  --color-accent: #D4A853;
  --color-bg: #0A0A0F;
  --color-success: #10B981;
  --color-error: #EF4444;
  --color-warning: #F59E0B;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Background Grid Overlay --- */
.hero-grid {
  background-image:
    linear-gradient(white 1px, transparent 1px),
    linear-gradient(90deg, white 1px, transparent 1px);
  background-size: 60px 60px;
}

/* --- Gradient Text --- */
.gradient-text {
  background: linear-gradient(to right, #20C997, #5FE0B5, #D4A853);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Glow Effects --- */
.glow-purple {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: rgba(32, 201, 151, 0.1);
  border-radius: 9999px;
  filter: blur(120px);
}

.glow-gold {
  position: absolute;
  top: 33%;
  left: 25%;
  width: 400px;
  height: 400px;
  background: rgba(212, 168, 83, 0.05);
  border-radius: 9999px;
  filter: blur(100px);
}

.glow-cta {
  position: absolute;
  inset: -1.5rem;
  background: rgba(32, 201, 151, 0.08);
  border-radius: 1.5rem;
  filter: blur(16px);
  pointer-events: none;
}

@media (min-width: 640px) {
  .glow-cta {
    inset: -3rem;
  }
}

/* --- Divider --- */
.divider-gradient {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
}

/* --- Feature Icon Backgrounds --- */
.icon-bg-purple {
  background-color: rgba(32, 201, 151, 0.094);
  color: #20C997;
}

.icon-bg-gold {
  background-color: rgba(212, 168, 83, 0.094);
  color: #D4A853;
}

.icon-bg-green {
  background-color: rgba(16, 185, 129, 0.094);
  color: #10B981;
}

/* --- Button Shadows --- */
.shadow-primary {
  box-shadow: 0 10px 15px -3px rgba(32, 201, 151, 0.25);
}

.shadow-primary:hover {
  box-shadow: 0 10px 15px -3px rgba(32, 201, 151, 0.4);
}

.shadow-cta {
  box-shadow: 0 10px 15px -3px rgba(32, 201, 151, 0.2);
}

/* --- Pulse Animation for Badge Dot --- */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* --- Waitlist Modal --- */
.waitlist-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  /* Allow vertical scrolling so the panel is never clipped on short viewports */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.25rem 1rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Support both .active (styles.css usage) and .open (JS-applied class) */
.waitlist-overlay.active,
.waitlist-overlay.open {
  opacity: 1;
  visibility: visible;
}

.waitlist-panel {
  position: relative;
  width: 100%;
  max-width: 460px;
  /* margin: auto vertically centers when content is shorter than viewport */
  margin: auto;
  background: #12121A;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 2.5rem 2rem 2rem;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}

.waitlist-overlay.active .waitlist-panel,
.waitlist-overlay.open .waitlist-panel {
  transform: translateY(0) scale(1);
}

.waitlist-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  /* Minimum 44×44px touch target */
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.waitlist-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.waitlist-close:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.waitlist-panel h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.25rem;
  /* Prevent heading from running under the close button */
  padding-right: 2.5rem;
}

.waitlist-panel .waitlist-subtitle {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 1.5rem;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.waitlist-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}

.waitlist-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.waitlist-field label {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
}

.waitlist-field input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.625rem;
  color: #fff;
  /* 16px prevents iOS Safari auto-zoom on focus */
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.waitlist-field input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.waitlist-field input:focus {
  border-color: var(--color-primary);
  background: rgba(32, 201, 151, 0.06);
}

.waitlist-field input:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
}

.waitlist-field input.field-error {
  border-color: var(--color-error);
  background: rgba(239, 68, 68, 0.06);
}

.waitlist-field .error-msg {
  font-size: 0.6875rem;
  color: var(--color-error);
  min-height: 1rem;
}

.waitlist-submit {
  margin-top: 0.5rem;
  width: 100%;
  /* Minimum 44px tall touch target */
  padding: 0.875rem;
  background: var(--color-primary);
  border: none;
  border-radius: 0.75rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.waitlist-submit:hover {
  background: var(--color-primary-hover);
}

.waitlist-submit:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.waitlist-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.waitlist-success {
  text-align: center;
  padding: 2rem 0;
}

.waitlist-success .success-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  background: rgba(16, 185, 129, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-success);
}

.waitlist-success h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
}

.waitlist-success p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

/* Stack name fields to single column below 600px.
   Use 600px (not 480px) so the 2-col grid only
   appears on comfortably wide panels. */
@media (max-width: 600px) {
  .waitlist-row {
    grid-template-columns: 1fr;
  }

  .waitlist-panel {
    /* Tighter padding on small phones */
    padding: 1.75rem 1.25rem 1.5rem;
    border-radius: 1.25rem;
  }

  .waitlist-panel h2 {
    font-size: 1.25rem;
  }
}

/* --- Cookie Banner (GDPR) --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #16161e;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner p {
  margin: 0;
  line-height: 1.5;
  flex: 1;
}

.cookie-banner a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner a:hover {
  color: var(--color-primary-hover);
}

.cookie-banner-buttons {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-btn {
  /* Minimum 44px touch target */
  min-height: 2.75rem;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.2s, color 0.2s;
}

.cookie-btn-accept {
  background: var(--color-primary);
  color: #fff;
}

.cookie-btn-accept:hover {
  background: var(--color-primary-hover);
}

.cookie-btn-decline {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.cookie-btn-decline:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }
  .cookie-banner-buttons {
    width: 100%;
    justify-content: center;
  }
}

/* --- Editorial footer (shared with index, ported for terms pages) --- */
.site-footer {
  --foot-bg: #0A0A0F;
  --foot-line: rgba(236, 234, 227, 0.08);
  --foot-line-strong: rgba(236, 234, 227, 0.16);
  --foot-text: #ECEAE3;
  --foot-text-2: #B6B4AC;
  --foot-muted: #76746D;
  --foot-accent: #20C997;
  --foot-accent-line: rgba(32, 201, 151, 0.32);
  --foot-sans: 'DM Sans', 'Inter', system-ui, sans-serif;
  --foot-mono: ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, monospace;

  padding: 56px 0 32px;
  background: var(--foot-bg);
  color: var(--foot-text);
  font-family: var(--foot-sans);
}

.site-footer .wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.site-footer a { color: inherit; text-decoration: none; }
.site-footer img { max-width: 100%; display: block; }

.site-footer .foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--foot-line);
}

.site-footer .brand {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1;
}
.site-footer .brand .name {
  font-family: var(--foot-sans);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--foot-text);
}
.site-footer .brand .name b {
  font-weight: 700;
  color: var(--foot-accent);
  font-style: normal;
}
.site-footer .brand .descriptor {
  font-family: var(--foot-sans);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--foot-muted);
}

.site-footer .foot-grid h6 {
  font-family: var(--foot-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--foot-muted);
  margin: 0 0 16px;
  font-weight: 500;
}
.site-footer .foot-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer .foot-grid ul li {
  list-style: none;
  margin-bottom: 10px;
}
.site-footer .foot-grid ul li a {
  font-size: 13px;
  color: var(--foot-text-2);
  transition: color .18s;
}
.site-footer .foot-grid ul li a:hover { color: var(--foot-accent); }

.site-footer .foot-grid .about p {
  font-size: 13px;
  color: var(--foot-text-2);
  line-height: 1.6;
  margin: 16px 0 0;
  max-width: 360px;
}

.site-footer .foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-family: var(--foot-mono);
  font-size: 11px;
  color: var(--foot-muted);
  letter-spacing: 0.06em;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer .foot-bottom .partner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--foot-muted);
}
.site-footer .foot-bottom .partner img {
  height: 22px;
  width: auto;
  opacity: .55;
}

@media (max-width: 880px) {
  .site-footer .foot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .site-footer .foot-grid .about { grid-column: span 2; }
  .site-footer .foot-bottom {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}
