/* ------------------------------------------------------------
   BrainTech R&D — Coming Soon
   Tokens
------------------------------------------------------------- */
:root {
  --bg: #0a0d14;
  --panel: #12161f;
  --line: #232838;
  --text: #f3f5f8;
  --text-muted: #7c8599;
  --accent: #ffb238;
  --accent-dim: rgba(255, 178, 56, 0.14);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html {
  color-scheme: dark;
  height: 100%;
}

body {
  height: 100dvh;
  height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  position: relative;
}

/* ------------------------------------------------------------
   Background circuit grid — faint, slowly drifting
------------------------------------------------------------- */
.grid-field {
  position: fixed;
  inset: -64px;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--panel) 1px, transparent 1px),
    linear-gradient(90deg, var(--panel) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 75%);
  opacity: 0.6;
  animation: drift 40s linear infinite;
}

.glow-sweep {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle 45vmax at var(--gx, 50%) var(--gy, 40%), var(--accent-dim) 0%, transparent 60%);
  animation: sweep 16s ease-in-out infinite;
}

@keyframes drift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 64px 64px, 64px 64px; }
}

@keyframes sweep {
  0%, 100% { --gx: 32%; --gy: 30%; }
  50% { --gx: 68%; --gy: 55%; }
}

/* ------------------------------------------------------------
   Layout — fits one viewport, no scroll, any screen size
------------------------------------------------------------- */
.page {
  position: relative;
  z-index: 1;
  height: 100dvh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  padding: clamp(1rem, 4dvh, 3rem) 1.25rem;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.rule {
  width: 100%;
  max-width: 420px;
  height: 1px;
  background: var(--line);
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   Brand
------------------------------------------------------------- */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  object-fit: contain;
  border-radius: 6px;
}

.brand-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  font-family: var(--font-display);
}

.brand-name span:first-child {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   Hero
------------------------------------------------------------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 3.6vw + 1rem, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 15ch;
  margin: 0 auto;
}

.subtitle {
  margin-top: clamp(0.5rem, 1.5dvh, 1rem);
  color: var(--text-muted);
  font-size: clamp(0.85rem, 1.4vw + 0.6rem, 1.02rem);
  line-height: 1.55;
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}

/* ------------------------------------------------------------
   Countdown — the hero element
------------------------------------------------------------- */
.countdown {
  margin-top: clamp(1.25rem, 4.5dvh, 3rem);
  display: flex;
  justify-content: center;
  gap: clamp(0.6rem, 3.2vw, 2.75rem);
}

.unit {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.value {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4.4vw + 1rem, 4.4rem);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  animation: reveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.unit:nth-child(1) .value { animation-delay: 0.05s; }
.unit:nth-child(2) .value { animation-delay: 0.15s; }
.unit:nth-child(3) .value { animation-delay: 0.25s; }
.unit:nth-child(4) .value { animation-delay: 0.35s; }

.value::after {
  content: '';
  position: absolute;
  inset: -30% -45%;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
  z-index: -1;
  animation: pulse 3.5s ease-in-out infinite;
}

.label {
  font-size: clamp(0.62rem, 0.9vw + 0.4rem, 0.78rem);
  color: var(--text-muted);
  font-weight: 500;
}

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

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ------------------------------------------------------------
   Footer
------------------------------------------------------------- */
.site-footer {
  font-size: clamp(0.72rem, 0.6vw + 0.55rem, 0.85rem);
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   Accessibility
------------------------------------------------------------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .value,
  .value::after,
  .grid-field,
  .glow-sweep {
    animation: none;
  }
}

/* ------------------------------------------------------------
   Brand block — shrinks on short viewports
------------------------------------------------------------- */
.brand-mark {
  width: clamp(24px, 3vw, 34px);
  height: clamp(24px, 3vw, 34px);
}
