/* =========================================================
   DIWERA — Coming Soon
   Table of contents:
   1. Variables & Resets
   2. Base / Typography
   3. Background (glows, grain, particles)
   4. Cursor glow
   5. Hero layout
   6. Logo
   7. Headline / Subheadline / Keywords / Status
   8. Buttons & Form
   9. Micro copy & Footer
   10. Reveal animations
   11. Responsive
   12. Reduced motion / accessibility
   ========================================================= */

/* ---------- 1. Variables & Resets ---------- */
:root {
  --bg: #0A0A0A;
  --bg-elevated: #111113;
  --fg: #FFFFFF;
  --fg-muted: rgba(255, 255, 255, 0.62);
  --fg-faint: rgba(255, 255, 255, 0.38);

  --blue: #3B82F6;
  --blue-light: #38BDF8;
  --violet: #8B5CF6;
  --violet-light: #A78BFA;

  --gradient-brand: linear-gradient(90deg, var(--blue-light) 0%, var(--blue) 45%, var(--violet) 75%, var(--violet-light) 100%);

  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;

  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.3s;
  --dur-mid: 0.6s;
  --dur-slow: 1.2s;

  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.1);

  color-scheme: dark;
}

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

html {
  height: 100%;
}

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  opacity: 0;
  animation: page-fade-in 1s var(--ease-premium) forwards;
}

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

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- 2. Base / Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* ---------- 3. Background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  will-change: transform;
}

.bg__glow--a {
  width: 60vw;
  height: 60vw;
  max-width: 800px;
  max-height: 800px;
  top: 8%;
  left: 50%;
  background: radial-gradient(circle at center, var(--blue) 0%, transparent 70%);
  transform: translateX(-50%);
  animation: drift-a 22s ease-in-out infinite;
}

.bg__glow--b {
  width: 50vw;
  height: 50vw;
  max-width: 640px;
  max-height: 640px;
  bottom: 5%;
  left: 50%;
  background: radial-gradient(circle at center, var(--violet) 0%, transparent 70%);
  transform: translateX(-50%);
  animation: drift-b 26s ease-in-out infinite;
}

@keyframes drift-a {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  50% { transform: translate(-46%, 3%) scale(1.08); }
}

@keyframes drift-b {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  50% { transform: translate(-54%, -4%) scale(1.05); }
}

.bg__grain {
  position: absolute;
  inset: -10%;
  background-image: radial-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.5;
  mix-blend-mode: overlay;
}

#particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---------- 4. Cursor glow ---------- */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(90, 130, 255, 0.14) 0%, rgba(139, 92, 246, 0.06) 45%, transparent 72%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform;
}

.cursor-glow.is-active {
  opacity: 1;
}

/* ---------- 5. Hero layout ---------- */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 720px;
  width: 100%;
}

/* ---------- 6. Logo ---------- */
.hero__logo-wrap {
  position: relative;
  margin-bottom: 2.75rem;
}

.hero__logo-wrap::before {
  content: "";
  position: absolute;
  inset: -18% -10%;
  background: radial-gradient(ellipse at center, rgba(96, 132, 255, 0.32) 0%, rgba(139, 92, 246, 0.16) 45%, transparent 72%);
  filter: blur(48px);
  animation: logo-glow 6s ease-in-out infinite;
}

.hero__logo {
  position: relative;
  width: min(92vw, 460px);
  height: auto;
  mix-blend-mode: screen;
  display: block;
}

@keyframes logo-glow {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ---------- 7. Headline / Subheadline / Keywords / Status ---------- */
.hero__headline {
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 1.1rem;
}

.hero__subheadline {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--fg-muted);
  font-weight: 400;
  max-width: 34ch;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero__keywords {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 2.5rem;
}

.hero__keywords li:nth-child(odd) {
  background: linear-gradient(90deg, var(--blue-light), var(--violet-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 3rem;
}

.hero__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-light);
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.6);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

/* ---------- 8. Buttons & Form ---------- */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.notify-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 999px;
  padding: 0.35rem 0.35rem 0.35rem 1.25rem;
  transition: border-color var(--dur-fast) var(--ease-premium);
}

.notify-form:focus-within {
  border-color: rgba(139, 165, 255, 0.5);
}

.notify-form input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 0.55rem 0;
  width: 200px;
  max-width: 40vw;
}

.notify-form input::placeholder {
  color: var(--fg-faint);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-premium),
              box-shadow var(--dur-fast) var(--ease-premium),
              background var(--dur-fast) var(--ease-premium);
}

.btn--primary {
  padding: 0.7rem 1.5rem;
  color: #0A0A0A;
  background: var(--gradient-brand);
  background-size: 200% 100%;
  background-position: 0% 0%;
  box-shadow: 0 8px 24px -8px rgba(88, 120, 255, 0.5);
}

.btn--primary:hover {
  background-position: 100% 0%;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px rgba(139, 92, 246, 0.6);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  padding: 0.85rem 1.75rem;
  color: var(--fg);
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--glass-border);
}

.btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.notify-form__message {
  min-height: 1.4rem;
  font-size: 0.82rem;
  color: var(--blue-light);
  margin-top: 0.4rem;
}

/* ---------- 9. Micro copy & Footer ---------- */
.microcopy {
  margin-top: 4rem;
  font-size: 0.78rem;
  color: var(--fg-faint);
  font-style: italic;
  letter-spacing: 0.01em;
}

.site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem 2.5rem;
  font-size: 0.75rem;
  color: var(--fg-faint);
}

/* ---------- 10. Reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal-up var(--dur-mid) var(--ease-premium) forwards;
}

[data-reveal="0"], .hero__logo-wrap { animation-delay: 0.15s; }
.hero__headline { animation-delay: 0.32s; }
.hero__subheadline { animation-delay: 0.46s; }
.hero__keywords { animation-delay: 0.58s; }
.hero__status { animation-delay: 0.68s; }
.hero__actions { animation-delay: 0.8s; }
.microcopy { animation-delay: 1.05s; }

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 11. Responsive ---------- */
@media (max-width: 640px) {
  .hero {
    padding: 5rem 1.25rem 3rem;
  }

  .hero__logo-wrap {
    margin-bottom: 2rem;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .notify-form,
  .btn--ghost {
    width: 100%;
  }

  .notify-form input {
    width: 100%;
    max-width: none;
  }

  .microcopy {
    margin-top: 3rem;
    padding: 0 1rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .hero__inner {
    max-width: 640px;
  }
}

/* ---------- 12. Reduced motion / accessibility ---------- */
@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;
  }

  body {
    opacity: 1;
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .bg__glow,
  .hero__logo-wrap,
  .hero__status-dot {
    animation: none !important;
  }
}

:focus-visible {
  outline: 2px solid var(--blue-light);
  outline-offset: 3px;
}
