/* ==========================================================================
   CUSTOMIZE: main colors and spacing live here
   ========================================================================== */
:root {
  --primary-color: #111827;
  --accent-color: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.12);
  --text-color: #1f2937;
  --muted-color: #5b6472;        /* 5.9:1 contrast on white */
  --background-color: #ffffff;
  --surface-color: #f8fafc;
  --border-color: #e5e7eb;

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  --radius: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--background-color);
  overflow-x: hidden;
}

h1, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent-color);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}

.bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  animation: float 16s ease-in-out infinite;
}
.bg__orb--one {
  width: min(48vw, 420px);
  aspect-ratio: 1;
  top: -8%;
  right: -6%;
  background: var(--accent-soft);
}
.bg__orb--two {
  width: min(40vw, 340px);
  aspect-ratio: 1;
  bottom: -6%;
  left: -6%;
  background: rgba(17, 24, 39, 0.06);
  animation-delay: -8s;
}

/* Layout ---------------------------------------------------------------- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-md);
}

/* Header ---------------------------------------------------------------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.01em;
}
.logo__mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: var(--primary-color);
  color: #fff;
  font-size: 1.05rem;
}

.header__status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--background-color);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-color);
  white-space: nowrap;
}
.header__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent-color);
  animation: pulse 2.4s ease-in-out infinite;
}

/* Hero ------------------------------------------------------------------ */
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) 0;
}

.hero {
  width: 100%;
  max-width: 720px;
  text-align: center;
}

.hero__label {
  display: inline-block;
  margin-bottom: var(--space-md);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.hero__title {
  font-size: clamp(2.5rem, 9vw, 5rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--primary-color);
  text-wrap: balance;
}

.hero__text {
  max-width: 34rem;
  margin: var(--space-md) auto 0;
  font-size: clamp(1rem, 2.6vw, 1.1875rem);
  color: var(--muted-color);
}

/* Countdown ------------------------------------------------------------- */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-xs);
  max-width: 30rem;
  margin: var(--space-lg) auto 0;
}
.countdown[hidden], .countdown__done[hidden] { display: none; }

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.9rem 0.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--surface-color);
}
.countdown__value {
  font-size: clamp(1.5rem, 7vw, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--primary-color);
  font-variant-numeric: tabular-nums;
}
.countdown__value.is-tick { animation: tick 0.35s var(--ease); }
.countdown__unit {
  margin-top: 0.25rem;
  font-size: clamp(0.625rem, 2.4vw, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-color);
}

.countdown__done {
  margin: var(--space-lg) auto 0;
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 700;
  color: var(--accent-color);
}

/* Progress -------------------------------------------------------------- */
.progress {
  max-width: 30rem;
  margin: var(--space-lg) auto 0;
  text-align: left;
}
.progress__head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
}
.progress__percent { font-variant-numeric: tabular-nums; }
.progress__track {
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border-color);
}
.progress__bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-color);
  transition: width 1.4s var(--ease) 0.4s;
}

/* Button ---------------------------------------------------------------- */
.hero__actions { margin-top: var(--space-lg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;              /* touch-friendly */
  padding: 0.75rem 2rem;
  border-radius: var(--radius);
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background-color 0.2s, box-shadow 0.2s;
}
.btn:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(37, 99, 235, 0.55);
}
.btn:active { transform: translateY(0); }

/* Footer ---------------------------------------------------------------- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  text-align: center;
}
.social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
}
.social a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;           /* touch-friendly */
  padding: 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.2s, background-color 0.2s;
}
.social a:hover { color: var(--accent-color); background: var(--accent-soft); }
.footer__copy { font-size: 0.875rem; color: var(--muted-color); }

/* Animations ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: slide-up 0.8s var(--ease) forwards;
}
.hero__label   { animation-delay: 0.05s; }
.hero__title   { animation-delay: 0.15s; }
.hero__text    { animation-delay: 0.25s; }
.countdown     { animation-delay: 0.35s; }
.progress      { animation-delay: 0.45s; }
.hero__actions { animation-delay: 0.55s; }

@keyframes slide-up { to { opacity: 1; transform: none; } }
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(-24px, 28px, 0); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); }
}
@keyframes tick {
  from { opacity: 0.35; transform: translateY(-4px); }
  to   { opacity: 1;    transform: none; }
}

/* Larger screens -------------------------------------------------------- */
@media (min-width: 640px) {
  .page { padding: var(--space-lg); }
  .countdown { gap: var(--space-sm); }
  .countdown__item { padding: 1.25rem 0.5rem; }
  .footer {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1440px) {
  .page { max-width: 1280px; }
  .hero { max-width: 800px; }
}

/* Very small phones */
@media (max-width: 360px) {
  .page { padding: var(--space-sm); }
  .logo__text { font-size: 0.9375rem; }
  .header__status { font-size: 0.75rem; padding: 0.3rem 0.65rem; }
  .btn { width: 100%; }
}

/* Reduced motion -------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}
