/* ============================================================
   UMARY Official Waitlist — Design System & Page Styles
   ============================================================
   Color: Warm off-white + charcoal + teal accent
   Font:  Inter (Google Fonts) + system fallback
   Grid:  Mobile-first, responsive at 768px / 1024px
   ============================================================ */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  /* Colors */
  --color-bg:            #FAF9F7;
  --color-bg-warm:       #F3F0EB;
  --color-surface:       #FFFFFF;
  --color-surface-hover: #FDFCFB;
  --color-text:          #1A1A1A;
  --color-text-secondary:#5A5A5A;
  --color-text-muted:    #8A8780;
  --color-accent:        #0F8B8D;
  --color-accent-hover:  #0AA6A8;
  --color-accent-light:  #E8F6F6;
  --color-accent-glow:   rgba(15, 139, 141, 0.15);
  --color-success:       #2D8F4E;
  --color-success-bg:    #EDF7F0;
  --color-error:         #C73E3E;
  --color-error-bg:      #FDF0F0;
  --color-duplicate:     #B8860B;
  --color-duplicate-bg:  #FFF8E7;
  --color-border:        #E5E2DD;
  --color-border-focus:  #0F8B8D;
  --color-shadow:        rgba(26, 26, 26, 0.06);
  --color-shadow-md:     rgba(26, 26, 26, 0.10);
  --color-overlay:       rgba(243, 240, 235, 0.85);

  /* Typography */
  --font-family:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-size-xs:   clamp(0.7rem, 0.65rem + 0.25vw, 0.75rem);
  --font-size-sm:   clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
  --font-size-base: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --font-size-md:   clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --font-size-lg:   clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --font-size-xl:   clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --font-size-2xl:  clamp(1.8rem, 1.4rem + 2vw, 2.5rem);
  --font-size-3xl:  clamp(2rem, 1.5rem + 2.5vw, 3rem);
  --line-height-tight: 1.2;
  --line-height-normal: 1.6;

  /* Spacing (4px base) */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --max-width: 1200px;
  --header-height: 72px;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 3px var(--color-shadow);
  --shadow-md:   0 4px 12px var(--color-shadow-md);
  --shadow-lg:   0 8px 30px var(--color-shadow-md);
  --shadow-card: 0 2px 16px rgba(15, 139, 141, 0.08);
  --shadow-glow: 0 0 40px rgba(15, 139, 141, 0.12);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-smooth: 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}


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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button, input {
  font-family: inherit;
  font-size: inherit;
}


/* --- Utility: Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}


/* --- Utility: Screen Reader Only --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-logo img {
  height: 32px;
  width: auto;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.header-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header-support-link {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
}

.header-support-link:hover {
  color: var(--color-accent);
  text-decoration: none;
}


/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  padding-block: var(--space-16) var(--space-20);
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-warm) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

/* Hero Content (Left Column on Desktop) */
.hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-light);
  border: 1px solid rgba(15, 139, 141, 0.15);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  width: fit-content;
  letter-spacing: 0.01em;
}

.hero-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.hero-headline {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.hero-subheadline {
  font-size: var(--font-size-md);
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
  max-width: 520px;
}

/* Hero Visual (Right Column on Desktop) */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  order: 1;
}

.product-card {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  max-width: 420px;
  width: 100%;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(15, 139, 141, 0.15),
    rgba(15, 139, 141, 0.02),
    rgba(15, 139, 141, 0.08)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.product-card img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  object-fit: contain;
}


/* ============================================================
   EMAIL FORM
   ============================================================ */
.waitlist-form-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.form-input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.form-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
}

.form-input-row {
  display: flex;
  gap: var(--space-3);
}

.form-input {
  flex: 1;
  height: 52px;
  padding: 0 var(--space-5);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
  outline: none;
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-input:focus {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px var(--color-accent-glow);
}

.form-input.is-error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(199, 62, 62, 0.1);
}

.form-submit {
  height: 52px;
  padding: 0 var(--space-8);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: #FFFFFF;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  position: relative;
  overflow: hidden;
}

.form-submit:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(15, 139, 141, 0.25);
}

.form-submit:active {
  transform: translateY(0);
}

.form-submit:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.form-submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

/* Button loading spinner */
.btn-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.form-submit.is-loading .btn-text {
  opacity: 0;
}

.form-submit.is-loading .btn-spinner {
  display: block;
  position: absolute;
}

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

/* Privacy note */
.form-privacy {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.form-privacy svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-text-muted);
}


/* --- Form Status Messages --- */
.form-status {
  display: none;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 500;
  line-height: 1.5;
}

.form-status.is-visible {
  display: flex;
}

.form-status-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
}

.form-status.is-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(45, 143, 78, 0.15);
}

.form-status.is-duplicate {
  background: var(--color-duplicate-bg);
  color: var(--color-duplicate);
  border: 1px solid rgba(184, 134, 11, 0.15);
}

.form-status.is-error {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid rgba(199, 62, 62, 0.15);
}


/* --- Inline Validation Error --- */
.form-error-text {
  font-size: var(--font-size-xs);
  color: var(--color-error);
  margin-top: calc(-1 * var(--space-1));
  display: none;
}

.form-error-text.is-visible {
  display: block;
}


/* ============================================================
   TRUST MICROCOPY (below form in hero)
   ============================================================ */
.trust-points {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  list-style: none;
}

.trust-points li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: 500;
}

.trust-points li svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
  flex-shrink: 0;
}


/* ============================================================
   HOW IT WORKS SECTION
   ============================================================ */
.how-section {
  padding-block: var(--space-20);
  background: var(--color-bg);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}

.section-subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  max-width: 560px;
  margin-inline: auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

.step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.step-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-size: var(--font-size-md);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.step-title {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.step-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
}


/* ============================================================
   TRUST BAR
   ============================================================ */
.trust-bar {
  padding-block: var(--space-10);
  background: var(--color-bg-warm);
  border-block: 1px solid var(--color-border);
}

.trust-bar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

.trust-bar-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
}

.trust-bar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.trust-bar-icon svg {
  width: 18px;
  height: 18px;
  color: var(--color-accent);
}


/* ============================================================
   SUPPORT SECTION
   ============================================================ */
.support-section {
  padding-block: var(--space-16);
  background: var(--color-bg);
}

.support-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-10);
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
}

.support-card h2 {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.support-card p {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-4);
}

.support-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: var(--font-size-base);
  color: var(--color-accent);
  transition: gap var(--transition-fast);
}

.support-link:hover {
  gap: var(--space-3);
  text-decoration: none;
}

.support-link svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.support-link:hover svg {
  transform: translateX(2px);
}


/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding-block: var(--space-10);
  background: var(--color-bg-warm);
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}

.footer-brand {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.footer-disclaimer {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  max-width: 500px;
  line-height: 1.5;
}

.footer-copyright {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}


/* ============================================================
   ANIMATIONS
   ============================================================ */

/* Fade-up on load */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for hero children */
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }
.fade-up-delay-5 { transition-delay: 0.5s; }

/* Product image float */
@keyframes gentle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.product-float {
  animation: gentle-float 4s ease-in-out infinite;
}

/* Success checkmark */
@keyframes check-draw {
  0% { stroke-dashoffset: 24; }
  100% { stroke-dashoffset: 0; }
}

.check-icon path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}

.is-success .check-icon path {
  animation: check-draw 0.4s ease-out 0.2s forwards;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-up {
    opacity: 1;
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .product-float {
    animation: none;
  }
}


/* ============================================================
   RESPONSIVE: TABLET (768px+)
   ============================================================ */
@media (min-width: 768px) {
  .form-input-row {
    flex-direction: row;
  }

  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .trust-bar-grid {
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
  }

  .trust-bar-item {
    flex-direction: column;
    text-align: center;
    gap: var(--space-2);
  }
}


/* ============================================================
   RESPONSIVE: DESKTOP (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
  .hero {
    padding-block: var(--space-20) var(--space-24);
  }

  .hero-grid {
    grid-template-columns: 55fr 45fr;
    gap: var(--space-16);
  }

  .hero-visual {
    order: 0;
  }

  .header-logo img {
    height: 36px;
  }

  .support-card {
    padding: var(--space-10) var(--space-12);
  }
}


/* ============================================================
   HONEYPOT (hidden from real users)
   ============================================================ */
.form-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
  pointer-events: none;
  tab-index: -1;
}
