/* ============================================
   Evig Labs — Coming Soon Page
   Colors: Sumi Ink (#1A1A1A) / Cream (#F5F0E8)
   Fonts: Quantico Bold Italic (logo/headline) / Cousine (body)
   ============================================ */

:root {
  --ink: #1A1A1A;
  --cream: #F5F0E8;
  --cream-dim: rgba(245, 240, 232, 0.5);
  --cream-faint: rgba(245, 240, 232, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--ink);
  font-family: 'Cousine', monospace;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ============================================
   Silhouette Stage — large background outline
   (drawn after all content has loaded; sits behind the text)
   ============================================ */

.silhouette-stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;            /* behind content (z-index: 5) */
  pointer-events: none;
}

.device-silhouette {
  position: relative;
  width: min(82vw, 640px);
  height: auto;
  z-index: 2;
  filter: blur(7px);   /* diffuse the glow beyond the shape edges */
}

/* Whole shape fades in at once, then a slow breath */
.silhouette-glow {
  opacity: 0;
}

.silhouette-stage.background-reveal .silhouette-glow {
  animation: silhouetteReveal 3s ease-in forwards,
             glowBreath 14s ease-in-out 3.5s infinite;
}

@keyframes silhouetteReveal {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes glowBreath {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}

/* ============================================
   Main Content
   ============================================ */

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 5;
  position: relative;
  padding: 20px;
}

.content .logo-block,
.content .headline,
.content .subhead,
.content .email-form {
  opacity: 0;
}

/* Logo */
.logo-block {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  margin-bottom: 50px;
}

.logo-icon {
  flex-shrink: 0;
}

.dhamma-wheel {
  width: 44px;
  height: 44px;
  display: block;
  animation: spin 25s linear infinite;
}

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

.logo-wordmark {
  font-family: 'Quantico', sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 40px;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2.5px;
  color: var(--cream);
  display: inline-block;
}

/* Headline */
.headline {
  font-family: 'Quantico', sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 38px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--cream);
  max-width: 640px;
  margin-bottom: 28px;
}

/* Subhead */
.subhead {
  font-family: 'Cousine', monospace;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--cream-dim);
  max-width: 480px;
  margin-bottom: 50px;
}

/* ============================================
   Email Form
   ============================================ */

.email-form {
  position: relative;
  width: 300px;
}

.email-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--cream-faint);
  color: var(--cream);
  font-family: 'Cousine', monospace;
  font-size: 14px;
  text-align: center;
  padding: 8px 28px 8px 0;
  outline: none;
  transition: border-color 0.4s ease;
}

.email-input::placeholder {
  color: var(--cream-dim);
  font-style: italic;
}

.email-input:focus {
  border-bottom-color: var(--cream);
}

/* Submit arrow — appears only once the user has typed */
.email-submit {
  position: absolute;
  right: 0;
  bottom: 4px;
  background: transparent;
  border: none;
  color: var(--cream);
  padding: 4px;
  cursor: pointer;
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.email-submit svg {
  width: 18px;
  height: 18px;
  display: block;
}

.email-submit.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.email-submit:disabled {
  cursor: default;
}

.email-success {
  position: absolute;
  top: 8px;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: 'Cousine', monospace;
  font-size: 14px;
  color: var(--cream);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.email-success.show {
  opacity: 1;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  position: fixed;
  bottom: 20px;
  left: 0;
  width: 100%;
  text-align: center;
  font-family: 'Cousine', monospace;
  font-size: 11px;
  color: var(--cream-dim);
  z-index: 5;
  opacity: 0;
}

.footer a {
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--cream);
}

/* ============================================
   Entrance Animations (triggered by JS)
   Timing is controlled entirely by JS class adds.
   ============================================ */

.content .logo-block.show {
  animation: fadeIn 1.5s ease forwards;
}

.content .headline.show {
  animation: fadeIn 1.2s ease forwards;
}

.content .subhead.show {
  animation: fadeIn 1.2s ease forwards;
}

.content .email-form.show {
  animation: fadeUp 1.2s ease forwards;
}

.footer.show {
  animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 600px) {
  .logo-wordmark {
    font-size: 30px;
  }
  .dhamma-wheel {
    width: 33px;
    height: 33px;
  }
  .headline {
    font-size: 26px;
    padding: 0 10px;
  }
  .subhead {
    font-size: 13px;
    padding: 0 20px;
  }
  .logo-block {
    margin-bottom: 35px;
  }
}
