/* ============================================================
   Design 6 — "QUADRANT"
   The countdown IS the layout. 4 brand-coloured quadrants,
   each holding one massive number. Logo floats dead centre.
   Nothing above the fold except the time remaining.
   ============================================================ */

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

:root {
  --teal:    #6FA7A3;
  --charcoal:#1E1E1E;
  --coral:   #DD6F56;
  --ash:     #EEECE7;
  --sage:    #8DA48F;
  --bar-h:   72px;
  --font-head: 'Poppins', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--charcoal);
}

/* ── Grain ──────────────────────────────────────────────── */

.grain-filter { position: fixed; width: 0; height: 0; }

.grain {
  position: fixed;
  inset: 0;
  filter: url(#grain);
  opacity: 0.055;
  pointer-events: none;
  z-index: 200;
  background: var(--ash);
}

/* ── Custom cursor ──────────────────────────────────────── */

.cursor {
  position: fixed;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease;
}

/* ── Grid ────────────────────────────────────────────────── */

.grid {
  position: fixed;
  inset: 0 0 var(--bar-h) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

/* ── Quadrants ───────────────────────────────────────────── */

.quad {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Slide-in from each corner */
.quad--days  { animation: slide-tl 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
.quad--hours { animation: slide-tr 0.9s 0.07s cubic-bezier(0.16, 1, 0.3, 1) both; }
.quad--mins  { animation: slide-bl 0.9s 0.14s cubic-bezier(0.16, 1, 0.3, 1) both; }
.quad--secs  { animation: slide-br 0.9s 0.21s cubic-bezier(0.16, 1, 0.3, 1) both; }

.quad--days  { background: var(--charcoal); }
.quad--hours { background: var(--coral); }
.quad--mins  { background: var(--teal); }
.quad--secs  { background: var(--sage); }

/* Hairline grid lines between quads */
.quad--days  { border-right: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08); }
.quad--hours { border-bottom: 1px solid rgba(255,255,255,0.08); }
.quad--mins  { border-right: 1px solid rgba(255,255,255,0.08); }

/* Unit label — top-left corner of each quad */
.quad__unit-label {
  position: absolute;
  top: 1.25rem;
  left: 1.5rem;
  font-family: var(--font-head);
  font-size: clamp(0.6rem, 1vw, 0.75rem);
  font-weight: 900;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.quad--days  .quad__unit-label { color: rgba(238,236,231,0.35); }
.quad--hours .quad__unit-label { color: rgba(238,236,231,0.55); }
.quad--mins  .quad__unit-label { color: rgba(30,30,30,0.4); }
.quad--secs  .quad__unit-label { color: rgba(30,30,30,0.4); }

/* The giant number */
.quad__number {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(6rem, 22vw, 20rem);
  line-height: 1;
  letter-spacing: -0.04em;
  user-select: none;
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quad--days  .quad__number { color: var(--ash); }
.quad--hours .quad__number { color: var(--ash); }
.quad--mins  .quad__number { color: var(--charcoal); }
.quad--secs  .quad__number { color: var(--charcoal); }

/* Tick animation on the secs number */
.quad__number.tick {
  transform: scale(1.04);
}

/* Subtle hover effect on each quad */
.quad:hover {
  filter: brightness(1.05);
}

/* ── Centre logo ─────────────────────────────────────────── */

.center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: center-pop 0.8s 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* White circle backdrop */
.center__ring {
  position: absolute;
  width: 140px;
  height: 140px;
  background: var(--ash);
  border-radius: 50%;
  box-shadow:
    0 0 0 8px rgba(238,236,231,0.15),
    0 20px 60px rgba(0,0,0,0.3);
}

.center__logo {
  position: relative;
  z-index: 1;
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 10px;
}

/* ── Bottom bar ──────────────────────────────────────────── */

.bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bar-h);
  background: var(--charcoal);
  border-top: 1px solid rgba(238,236,231,0.1);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  z-index: 50;
  animation: bar-up 0.6s 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bar__left {
  flex-shrink: 0;
}

.bar__name {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--ash);
  white-space: nowrap;
}

.bar__sub {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(238,236,231,0.3);
  margin-top: 0.1rem;
}

/* Form — takes up the middle stretch */
.bar__form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  max-width: 500px;
}

.bar__input {
  flex: 1;
  height: 42px;
  padding: 0 1.1rem;
  background: rgba(238,236,231,0.07);
  border: 1px solid rgba(238,236,231,0.15);
  border-right: none;
  border-radius: 3px 0 0 3px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ash);
  outline: none;
  transition: background 0.2s, border-color 0.2s;
}

.bar__input::placeholder { color: rgba(238,236,231,0.25); }
.bar__input:focus { background: rgba(238,236,231,0.1); border-color: var(--teal); }

.bar__btn {
  height: 42px;
  padding: 0 1.3rem;
  background: var(--coral);
  color: #fff;
  border: 1px solid var(--coral);
  border-radius: 0 3px 3px 0;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: none;
  white-space: nowrap;
  transition: background 0.2s;
}

.bar__btn:hover { background: #c95d45; border-color: #c95d45; }

.bar__confirm {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  font-size: 0.8rem;
  color: var(--teal);
  font-weight: 600;
  background: var(--charcoal);
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  white-space: nowrap;
}
.bar__confirm[hidden] { display: none; }

/* Coming Soon label */
.bar__coming {
  font-family: var(--font-head);
  font-size: clamp(0.9rem, 1.4vw, 1.15rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--ash);
  white-space: nowrap;
  flex-shrink: 0;
}

.bar__coming em {
  font-style: italic;
  color: var(--coral);
}

/* Social icons */
.bar__social {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.bar__social a {
  color: rgba(238,236,231,0.25);
  text-decoration: none;
  display: inline-flex;
  transition: color 0.2s;
}

.bar__social a svg { width: 18px; height: 18px; }
.bar__social a:hover { color: var(--ash); }

/* ── Keyframes ───────────────────────────────────────────── */

@keyframes slide-tl {
  from { opacity: 0; transform: translate(-30px, -30px); }
  to   { opacity: 1; transform: translate(0, 0); }
}
@keyframes slide-tr {
  from { opacity: 0; transform: translate(30px, -30px); }
  to   { opacity: 1; transform: translate(0, 0); }
}
@keyframes slide-bl {
  from { opacity: 0; transform: translate(-30px, 30px); }
  to   { opacity: 1; transform: translate(0, 0); }
}
@keyframes slide-br {
  from { opacity: 0; transform: translate(30px, 30px); }
  to   { opacity: 1; transform: translate(0, 0); }
}
@keyframes center-pop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes bar-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 600px) {
  :root { --bar-h: 120px; }

  .bar {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .bar__form { max-width: 100%; width: 100%; order: -1; }
  .bar__social { margin-left: auto; }

  .center__ring { width: 100px; height: 100px; }
  .center__logo { width: 60px; height: 60px; }

  .quad__number { font-size: clamp(3.5rem, 18vw, 8rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
