/*
 * Sepas Market coming-soon page.
 * Colours are the temporary "Bazaar" direction (design/02-tokens/tokens.bazaar.css).
 * When the final brand arrives, only the custom properties below change.
 */

@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/vazirmatn-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #faf9f7;
  --surface: #ffffff;
  --text: #24211f;
  --muted: #534e47;
  --subtle: #6d675e;
  --border: #e8e5df;
  --border-strong: #8e887d;
  --primary: #1f6f42;
  --primary-hover: #1a5936;
  --primary-fg: #ffffff;
  --primary-subtle: #eff8f1;
  --primary-subtle-fg: #17472d;
  --accent: #b04e27;
  --danger: #c62a31;
  --success: #14813f;
  --shadow: color-mix(in oklab, #0c0b0a 18%, transparent);
  --shadow-weak: color-mix(in oklab, #0c0b0a 8%, transparent);
  --radius-lg: 0.875rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.75rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0b0a;
    --surface: #171514;
    --text: #faf9f7;
    --muted: #c1bcb2;
    --subtle: #8e887d;
    --border: #393531;
    --border-strong: #6d675e;
    --primary: #4fa66e;
    --primary-hover: #84c598;
    --primary-fg: #171514;
    --primary-subtle: #071f14;
    --primary-subtle-fg: #b3ddc0;
    --accent: #df8554;
    --danger: #f28b8e;
    --success: #6cc38b;
    --shadow: color-mix(in oklab, #000000 60%, transparent);
    --shadow-weak: color-mix(in oklab, #000000 35%, transparent);
  }
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Vazirmatn", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  background:
    radial-gradient(60rem 36rem at 50% -12rem, color-mix(in oklab, var(--primary) 16%, transparent), transparent 70%),
    radial-gradient(40rem 30rem at 0% 110%, color-mix(in oklab, var(--accent) 9%, transparent), transparent 70%),
    var(--bg);
  overflow-x: hidden;
}

/* Dot texture behind the hero, faded out with a mask. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image: radial-gradient(color-mix(in oklab, var(--primary) 22%, transparent) 1px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 0%, #000 0%, transparent 75%);
}

.top,
.wrap,
.foot {
  position: relative;
  z-index: 1;
}

/* ---- header ---------------------------------------------------------- */

.top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: 2rem 1.25rem 0;
}

.brand {
  font-weight: 900;
  font-size: 1.375rem;
  line-height: 1.4;
  color: var(--primary);
}

.chain {
  font-size: 0.8125rem;
  color: var(--subtle);
}

/* ---- layout ---------------------------------------------------------- */

.wrap {
  flex: 1;
  width: 100%;
  max-width: 38rem;
  margin-inline: auto;
  padding: 2.5rem 1.25rem 1rem;
  display: grid;
  align-content: start;
  gap: 2.25rem;
  text-align: center;
}

/* ---- hero ------------------------------------------------------------ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid color-mix(in oklab, var(--primary) 18%, transparent);
  border-radius: 999px;
  background: var(--primary-subtle);
  color: var(--primary-subtle-fg);
  font-weight: 700;
  font-size: 0.875rem;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in oklab, var(--primary) 45%, transparent);
  }
  70% {
    box-shadow: 0 0 0 0.6rem transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 9vw, 4.25rem);
  font-weight: 900;
  line-height: 1.25;
}

h1 .hl {
  color: var(--primary);
}

.lead {
  max-width: 30rem;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.95;
}

/* ---- countdown ------------------------------------------------------- */

.timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.625rem;
}

.unit {
  padding: 1rem 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: 0 2px 8px -2px var(--shadow-weak), 0 1px 2px -1px var(--shadow-weak);
}

.num {
  display: block;
  font-size: clamp(1.75rem, 8vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--subtle);
}

.over {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.25rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--primary);
}

.date {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  color: var(--subtle);
}

.date time {
  font-weight: 700;
  color: var(--text);
}

/* ---- signup card ----------------------------------------------------- */

.notify {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  background: var(--surface);
  box-shadow: 0 12px 24px -6px var(--shadow), 0 4px 8px -4px var(--shadow-weak);
  text-align: start;
}

.notify h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.5;
}

.intro {
  margin: 0.375rem 0 1.25rem;
  color: var(--muted);
}

.field {
  display: flex;
  gap: 0.5rem;
}

input[type="tel"] {
  flex: 1;
  min-width: 0;
  height: 3.25rem;
  padding-inline: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1.0625rem;
  text-align: start;
}

input[type="tel"]::placeholder {
  color: var(--subtle);
  opacity: 1;
}

input[aria-invalid="true"] {
  border-color: var(--danger);
}

button {
  flex: none;
  height: 3.25rem;
  padding-inline: 1.375rem;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: var(--primary-fg);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

button:hover {
  background: var(--primary-hover);
}

button:disabled {
  opacity: 0.7;
  cursor: progress;
}

input:focus-visible,
button:focus-visible,
.ok:focus-visible,
.back:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.hint {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--subtle);
}

.status {
  min-height: 1.6em;
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.status.is-error {
  color: var(--danger);
}

/* Honeypot: invisible to people and screen readers, filled in by bots. */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.ok {
  padding: 0.5rem 0;
  text-align: center;
}

.ok svg {
  width: 3rem;
  height: 3rem;
  color: var(--success);
}

.ok-title {
  margin: 0.5rem 0 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.ok p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.back {
  color: var(--primary);
  font-weight: 700;
}

/* ---- footer & utilities ---------------------------------------------- */

.foot {
  padding: 2rem 1.25rem 2.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--subtle);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 22.5rem) {
  .field {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .timer {
    gap: 0.375rem;
  }
}

@media (min-width: 48rem) {
  .wrap {
    padding-top: 3.5rem;
    gap: 2.75rem;
  }

  .notify {
    padding: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot {
    animation: none;
  }

  button {
    transition: none;
  }
}
