/* Kadoos Online — coming-soon landing page.
   Mobile-first, RTL, no framework and no third-party request of any
   kind (SPEC.md §25): the font files sit next to this stylesheet.
   Palette matches the main product — amber #f59e0b on slate. */

/* ---------- Fonts (self-hosted Vazirmatn) ---------- */

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/vazirmatn-arabic-400-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/vazirmatn-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/vazirmatn-arabic-600-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/vazirmatn-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/vazirmatn-arabic-700-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/vazirmatn-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212;
}

/* ---------- Tokens ---------- */

:root {
  --primary-50: #fffbeb;
  --primary-100: #fef3c7;
  --primary-200: #fde68a;
  --primary-500: #f59e0b;
  --primary-600: #d97706;
  --primary-700: #b45309;
  --accent-500: #f97316;

  --page-bg: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --danger: #dc2626;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #047857;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;

  --radius: 0.75rem;
  --shadow-card: 0 1px 2px rgb(15 23 42 / 6%), 0 12px 32px -12px rgb(15 23 42 / 14%);
  --wrap: 60rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #0b1220;
    --surface: #131c2e;
    --surface-muted: #1b2740;
    --border: #26334d;
    --text: #e8edf6;
    --text-muted: #9aa8c0;
    --text-faint: #7b89a3;
    --success-bg: #052e23;
    --success-border: #10603f;
    --success-text: #6ee7b7;
    --danger: #f87171;
    --danger-bg: #2b1414;
    --danger-border: #7f2222;
    --shadow-card: 0 1px 2px rgb(0 0 0 / 40%), 0 16px 40px -16px rgb(0 0 0 / 60%);
  }
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.85;
  /* Persian text is dense; a touch of extra leading and no ligature
     tricks keeps long paragraphs legible on a phone. */
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.5;
  font-weight: 700;
}

p {
  margin: 0;
}

a {
  color: var(--primary-700);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  a {
    color: var(--primary-200);
  }
}

:focus-visible {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 10;
  background: var(--surface);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-card);
}

.skip-link:focus {
  inset-inline-start: 0;
}

/* A single soft warm wash behind the fold. Sized in vmax so it scales
   with the viewport instead of being a giant blob on a phone, and
   `fixed` rather than `absolute` because its negative offsets would
   otherwise widen the scrollable area — which in an RTL document shifts
   the entire page sideways rather than just adding a scrollbar. */
.glow {
  position: fixed;
  top: -30vmax;
  inset-inline-end: -20vmax;
  width: 70vmax;
  height: 70vmax;
  background: radial-gradient(
    circle,
    rgb(245 158 11 / 22%) 0%,
    rgb(249 115 22 / 8%) 45%,
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
}

/* ---------- Header ---------- */

.site-header {
  padding-block: 1.5rem;
}

.brand-row {
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.brand-mark {
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.brand-text strong {
  font-size: 1.0625rem;
  font-weight: 700;
}

.brand-text small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---------- Hero ---------- */

.hero {
  padding-block: 1.5rem 2.5rem;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  background: var(--primary-100);
  color: var(--primary-700);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.25rem 0.875rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

@media (prefers-color-scheme: dark) {
  .eyebrow {
    background: rgb(245 158 11 / 14%);
    color: var(--primary-200);
  }
}

.hero h1 {
  font-size: clamp(1.5rem, 5.5vw, 2.75rem);
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.lede {
  max-width: 44rem;
  margin-inline: auto;
  color: var(--text-muted);
  font-size: 1rem;
}

@media (min-width: 48rem) {
  .lede {
    font-size: 1.0625rem;
  }
}

.section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

/* ---------- Countdown ---------- */

.countdown {
  margin-top: 2.5rem;
}

.countdown-grid {
  list-style: none;
  margin: 0.875rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

@media (min-width: 30rem) {
  .countdown-grid {
    gap: 0.875rem;
    max-width: 34rem;
    margin-inline: auto;
  }
}

.unit {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 0.25rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.value {
  font-size: clamp(1.375rem, 7vw, 2.25rem);
  font-weight: 700;
  color: var(--primary-600);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

@media (prefers-color-scheme: dark) {
  .value {
    color: var(--primary-200);
  }
}

.label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.countdown-date {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Keeps "۱۱ بهمن ۱۴۰۵ ساعت ۰۹:۰۰" on one line — bidi reordering puts
   the clock time at the visual end, where it wraps away from the date
   it belongs to. */
.countdown-date time {
  white-space: nowrap;
}

/* ---------- Signup card ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 1.25rem;
  max-width: 34rem;
  margin-inline: auto;
  /* The card is the page's one job — a hairline of brand colour along
     the top edge marks it without another box of chrome. */
  border-top: 3px solid var(--primary-500);
}

@media (min-width: 30rem) {
  .card {
    padding: 2rem;
  }
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card-lede {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.field + .field {
  margin-top: 1rem;
}

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.field input {
  width: 100%;
  font-family: inherit;
  /* 1rem is the smallest size iOS Safari will not zoom into on focus. */
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input::placeholder {
  color: var(--text-faint);
}

.field input:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgb(245 158 11 / 22%);
}

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

.field-error {
  color: var(--danger);
  font-size: 0.8125rem;
  min-height: 1.25rem;
  margin-top: 0.25rem;
}

.field-error:empty {
  min-height: 0;
}

.trap {
  position: absolute;
  inset-inline-start: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn {
  width: 100%;
  margin-top: 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, var(--primary-500), var(--primary-600));
  border: none;
  border-radius: 0.5rem;
  padding: 0.8125rem 1rem;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.05);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-note {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-faint);
  text-align: center;
}

.alert {
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.alert-error {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
  margin-bottom: 1.25rem;
}

/* ---------- Features ---------- */

.features {
  padding-block: 3rem 2rem;
  text-align: center;
}

.feature-grid {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 44rem) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: start;
}

.feature h3 {
  font-size: 1rem;
  margin-bottom: 0.375rem;
}

.feature p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ---------- Footer ---------- */

/* Deliberately quiet: the brief wants the institute's current site,
   address and phone present but not competing with the signup card. */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
  margin-top: 1rem;
}

.footer-inner {
  padding-block: 1.75rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-line + .footer-line {
  margin-top: 0.375rem;
}

.footer-copy {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.75rem;
}

/* ---------- Motion ---------- */

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