/* ==========================================================================
   WATPAK · Coming Soon
   Minimalist · Neo-brutalist · Light earth brown + black + yellow
   ========================================================================== */

:root {
  /* Palette — light earth brown / black / yellow */
  --paper: #ead8b3;
  /* light earth brown background */
  --paper-2: #f1e3c4;
  /* lighter earth — cards / fields */
  --earth: #b89968;
  /* mid earth */
  --earth-deep: #6b4f2a;
  /* deep earth (text on light) */
  --ink: #0a0a0a;
  /* black */
  --yellow: #f5c518;
  /* watpak yellow */
  --yellow-2: #ffd84d;
  /* hover yellow */

  --line: rgba(10, 10, 10, 0.14);

  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --nb-border: 3px;
  --nb-shadow: 6px 6px 0 0 var(--ink);
  --nb-shadow-sm: 4px 4px 0 0 var(--ink);

  /* Drop your hero image into /public/bg.jpg or override here */
  --bg-image: url("public/bg.jpg");
}

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  background: var(--paper);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Background stack ---------- */
.bg-image,
.bg-overlay,
.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.bg-image {
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--paper);
  /* Mute photo so palette stays earth-brown / yellow / black */
  filter: saturate(0.55) contrast(0.95) brightness(1.02);
  opacity: 0.55;
}

.bg-overlay {
  /* Earth-brown wash to keep palette tight */
  background:
    radial-gradient(90% 60% at 0% 0%,
      rgba(245, 197, 24, 0.10) 0%,
      rgba(245, 197, 24, 0) 55%),
    linear-gradient(180deg,
      rgba(234, 216, 179, 0.85) 0%,
      rgba(234, 216, 179, 0.65) 50%,
      rgba(184, 153, 104, 0.55) 100%);
}

.bg-noise {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.10;
  mix-blend-mode: multiply;
}

/* ---------- Shell ---------- */
.shell {
  position: relative;
  z-index: 10;
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 32px) clamp(20px, 4vw, 44px) clamp(28px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.5vw, 44px);
  min-height: 100dvh;
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand — neo-brutalist plate, in normal flow so it never overlaps the hero. */
.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: var(--yellow);
  border: var(--nb-border) solid var(--ink);
  box-shadow: var(--nb-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.brand:hover {
  transform: translate(-2px, -2px);
  box-shadow: 9px 9px 0 0 var(--ink);
}

.brand img {
  height: clamp(56px, 8vw, 96px);
  width: auto;
  display: block;
  /* Logo is dark/green-tinted PNG; force-tint to solid black so it sits on palette */
  filter: brightness(0) saturate(100%);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.status-pill__dot {
  width: 7px;
  height: 7px;
  background: var(--yellow);
  display: inline-block;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.6vw, 32px);
  flex: 1;
}

.eyebrow {
  display: inline-block;
  width: max-content;
  background: var(--ink);
  color: var(--yellow);
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* Title */
.title {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(3.2rem, 11vw, 8rem);
  line-height: 0.86;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}

.title__line {
  display: block;
}

.title__line--accent {
  color: var(--ink);
  font-style: italic;
  background: var(--yellow);
  padding: 0 0.18em;
  width: max-content;
  border: var(--nb-border) solid var(--ink);
  box-shadow: var(--nb-shadow-sm);
}

/* Lede */
.lede {
  max-width: 50ch;
  font-size: clamp(0.98rem, 1.15vw, 1.05rem);
  line-height: 1.55;
  color: var(--earth-deep);
  margin: 0;
  font-weight: 500;
}

/* ---------- Countdown ---------- */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
}

.countdown__cell {
  background: var(--paper-2);
  color: var(--ink);
  border: var(--nb-border) solid var(--ink);
  box-shadow: var(--nb-shadow-sm);
  padding: 14px 6px 10px;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.countdown__cell--seconds {
  background: var(--yellow);
}

.countdown__cell:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 0 var(--ink);
}

.countdown__value {
  font-weight: 900;
  font-size: clamp(1.8rem, 4.2vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.countdown__label {
  margin-top: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.65;
}

.countdown__value.tick {
  animation: tick 0.4s ease;
}

@keyframes tick {
  0% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-4px);
    opacity: 0.6;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ---------- Notify form ---------- */
.notify {
  margin-top: 4px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 0;
  border: var(--nb-border) solid var(--ink);
  background: var(--paper-2);
  box-shadow: var(--nb-shadow);
  max-width: 660px;
}

.field {
  width: 100%;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-right: var(--nb-border) solid var(--ink);
  padding: 14px 16px;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 500;
  outline: none;
  border-radius: 0;
}

.field::placeholder {
  color: rgba(10, 10, 10, 0.4);
  font-weight: 400;
}

.field:focus {
  background: #fff8e3;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  background: var(--yellow);
  color: var(--ink);
  border: 0;
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
  white-space: nowrap;
}

.btn:hover {
  background: var(--ink);
  color: var(--yellow);
}

.btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: -6px;
}

.btn__icon {
  display: inline-flex;
}

.btn__spinner {
  display: none;
  width: 13px;
  height: 13px;
  border: 2.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn[data-loading="true"] .btn__icon {
  display: none;
}

.btn[data-loading="true"] .btn__spinner {
  display: inline-block;
}

.btn[data-loading="true"] {
  pointer-events: none;
  background: var(--ink);
  color: var(--yellow);
}

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

.form__fineprint {
  margin: 12px 0 0;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--earth-deep);
  opacity: 0.75;
}

.form__error {
  margin: 12px 0 0;
  background: var(--ink);
  color: var(--yellow);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  width: max-content;
  max-width: 100%;
}

/* ---------- Modal (success popup) ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modal-fade 0.18s ease both;
}

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal__card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: var(--paper-2);
  color: var(--ink);
  border: var(--nb-border) solid var(--ink);
  box-shadow: 12px 12px 0 0 var(--yellow), 12px 12px 0 var(--nb-border) var(--ink);
  padding: 36px clamp(24px, 4vw, 40px) 28px;
  animation: modal-pop 0.28s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  border: 2px solid var(--ink);
  background: var(--paper);
  transition: background 0.15s ease, color 0.15s ease;
}

.modal__close:hover {
  background: var(--ink);
  color: var(--yellow);
}

.modal__check {
  display: inline-flex;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  color: var(--ink);
  border: var(--nb-border) solid var(--ink);
  box-shadow: var(--nb-shadow-sm);
  margin-bottom: 18px;
}

.modal__kicker {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--earth-deep);
  margin-bottom: 8px;
}

.modal__title {
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-weight: 900;
  margin: 0 0 14px;
  color: var(--ink);
}

.modal__text {
  margin: 0 0 24px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--earth-deep);
  max-width: 42ch;
}

.modal__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.modal__actions .btn {
  padding: 12px 20px;
  border: var(--nb-border) solid var(--ink);
  box-shadow: var(--nb-shadow-sm);
}

.modal__actions .btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 var(--ink);
}

.modal__ghost {
  background: transparent;
  color: var(--ink);
  border: 0;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.65;
  transition: opacity 0.15s ease;
}

.modal__ghost:hover {
  opacity: 1;
}

@keyframes modal-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modal-pop {
  from {
    transform: translateY(14px) scale(0.96);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ---------- Footer ---------- */
.footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--earth-deep);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .form__row {
    grid-template-columns: 1fr;
  }

  .field {
    border-right: 0;
    border-bottom: var(--nb-border) solid var(--ink);
  }

  .btn {
    padding: 14px 22px;
    justify-content: center;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {

  .status-pill__dot,
  .countdown__value.tick {
    animation: none !important;
  }

  .btn,
  .field,
  .countdown__cell {
    transition: none !important;
  }
}