/* Khorafatchi public site - single stylesheet, no external requests. */

/* ---------- Fonts (self-hosted Vazirmatn, OFL, see fonts/Vazirmatn-OFL.txt) ---------- */

@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/assets/fonts/Vazirmatn-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens (dark cosmic palette, mirrors the app theme) ---------- */

:root {
  --bg: #050217;
  --surface: #1b0f3a;
  --primary: #8b5cf6;
  --glow: #a78bfa;
  --gold: #f9d14b;
  --pink: #ec4899;
  --cyan: #22d3ee;
  --text: #f5f0ff;
  --muted: #9d8fcd;

  --line: rgba(167, 139, 250, 0.22);
  --radius: 18px;
  --wrap: 900px;
}

/* ---------- Reset ---------- */

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

body,
h1,
h2,
h3,
p,
ul,
ol,
li,
figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

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

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

a:hover,
a:focus-visible {
  color: var(--gold);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

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

html {
  background-color: var(--bg);
}

body {
  min-height: 100%;
  font-family: "Vazirmatn", "Tahoma", sans-serif;
  font-weight: 400;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.075rem);
  line-height: 1.95;
  color: var(--text);
  background-color: var(--bg);
  /* Cosmic glow, pure CSS so the page stays request-free. */
  background-image:
    radial-gradient(
      62rem 38rem at 78% -8%,
      rgba(139, 92, 246, 0.3),
      transparent 62%
    ),
    radial-gradient(
      46rem 30rem at 8% 6%,
      rgba(236, 72, 153, 0.16),
      transparent 60%
    ),
    radial-gradient(
      54rem 40rem at 50% 108%,
      rgba(34, 211, 238, 0.12),
      transparent 62%
    );
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* Visually hidden until focused. Clip instead of an off-screen offset, which
   would sit outside the page box and can add stray scroll area in RTL. */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  padding: 0.6rem 1rem;
  background: var(--surface);
  color: var(--text);
}

.skip-link:focus {
  position: static;
  display: inline-block;
  width: auto;
  height: auto;
  clip-path: none;
  z-index: 10;
}

/* ---------- Typography ---------- */

h1,
h2,
h3 {
  line-height: 1.55;
  letter-spacing: 0;
}

h1 {
  font-weight: 900;
  font-size: clamp(2.5rem, 1.9rem + 3.2vw, 4rem);
}

h2 {
  font-weight: 900;
  font-size: clamp(1.5rem, 1.3rem + 1.1vw, 2rem);
}

h3 {
  font-weight: 700;
  font-size: 1.15rem;
}

.lead {
  font-size: clamp(1.075rem, 1rem + 0.5vw, 1.3rem);
  color: var(--text);
}

.muted {
  color: var(--muted);
}

strong,
b {
  font-weight: 700;
  color: var(--gold);
}

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

.hero {
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.hero__logo {
  width: clamp(112px, 26vw, 152px);
  height: auto;
  margin-inline: auto;
  border-radius: 28%;
  box-shadow:
    0 0 0 1px rgba(167, 139, 250, 0.35),
    0 18px 48px rgba(139, 92, 246, 0.45);
}

.hero__title {
  margin-top: 1.4rem;
  background-image: linear-gradient(200deg, var(--gold), var(--glow) 65%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--text);
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .hero__title {
    color: transparent;
  }
}

.hero__tagline {
  margin-top: 0.6rem;
  margin-inline: auto;
  max-width: 40rem;
  font-weight: 700;
  font-size: clamp(1.1rem, 1rem + 0.7vw, 1.45rem);
  color: var(--text);
  text-wrap: balance;
}

.hero__sub {
  margin-top: 0.9rem;
  margin-inline: auto;
  max-width: 38rem;
  color: var(--muted);
  text-wrap: balance;
}

/* ---------- Store buttons (disabled until the apps are live) ---------- */

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 2rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 12.5rem;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  border: 1px dashed var(--line);
  border-radius: 999px;
  background: rgba(27, 15, 58, 0.75);
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: not-allowed;
}

.store-btn:hover,
.store-btn:focus-visible {
  color: var(--text);
  text-decoration: none;
  border-color: rgba(249, 209, 75, 0.5);
}

.store-btn__soon {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: rgba(249, 209, 75, 0.16);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
}

.stores__note {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(2rem, 5vw, 3.25rem);
}

.section__intro {
  margin-top: 0.75rem;
  color: var(--muted);
  max-width: 42rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.9rem;
  margin-top: 1.75rem;
}

.card {
  padding: 1.15rem 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(
    170deg,
    rgba(27, 15, 58, 0.92),
    rgba(27, 15, 58, 0.55)
  );
}

.card h3 {
  color: var(--glow);
}

.card p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.card--gold {
  border-color: rgba(249, 209, 75, 0.4);
}

.card--gold h3 {
  color: var(--gold);
}

.card--pink {
  border-color: rgba(236, 72, 153, 0.4);
}

.card--pink h3 {
  color: var(--pink);
}

/* The forbidden button closes the grid, so it takes the whole last row. */
.card--wide {
  grid-column: 1 / -1;
}

/* ---------- Honesty strip ---------- */

.honesty {
  margin-block: clamp(1.5rem, 4vw, 2.5rem);
  padding: 1.5rem clamp(1.15rem, 3vw, 2rem);
  border: 1px solid rgba(249, 209, 75, 0.35);
  border-inline-start: 5px solid var(--gold);
  border-radius: var(--radius);
  background: rgba(249, 209, 75, 0.06);
}

.honesty h2 {
  font-size: clamp(1.3rem, 1.2rem + 0.6vw, 1.6rem);
  color: var(--gold);
}

.honesty p {
  margin-top: 0.6rem;
}

/* ---------- Article pages (privacy, terms) ---------- */

.page-head {
  padding-block: clamp(2.25rem, 6vw, 3.5rem) 0.5rem;
}

.page-head h1 {
  font-size: clamp(1.9rem, 1.5rem + 2vw, 2.75rem);
  color: var(--text);
}

.back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.stamp {
  margin-top: 0.75rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.doc {
  padding-bottom: 1rem;
}

.doc section {
  margin-top: 2rem;
}

.doc h2 {
  font-size: clamp(1.25rem, 1.15rem + 0.6vw, 1.55rem);
  color: var(--glow);
}

.doc h3 {
  margin-top: 1.25rem;
  color: var(--gold);
}

.doc p {
  margin-top: 0.7rem;
}

.doc ul {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.45rem;
}

.doc li {
  position: relative;
  padding-inline-start: 1.35rem;
}

.doc li::before {
  content: "✦";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  color: var(--primary);
  font-size: 0.85rem;
}

.callout {
  margin-top: 1.25rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-inline-start: 5px solid var(--primary);
  border-radius: var(--radius);
  background: rgba(27, 15, 58, 0.75);
}

.callout p {
  margin-top: 0;
}

.mail {
  font-weight: 700;
  word-break: break-word;
}

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

.site-footer {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  padding-block: 2rem 2.75rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
}

.site-footer nav a {
  font-weight: 700;
}

.site-footer__mail {
  margin-top: 0.9rem;
}

.site-footer__legal {
  margin-top: 0.9rem;
  font-size: 0.88rem;
}

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

@media (prefers-reduced-motion: no-preference) {
  .hero__logo {
    animation: float 6s ease-in-out infinite;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* ---------- Narrow phones (down to 360px) ---------- */

@media (max-width: 420px) {
  body {
    line-height: 1.85;
  }

  .store-btn {
    width: 100%;
    min-width: 0;
  }
}
