/*
 * Halal Trace website — one shared stylesheet for every page.
 *
 * The palette is lifted directly from the app (apps/mobile/src/constants/theme.ts)
 * so the site and the product read as the same thing. Brand surfaces (`--deep`,
 * `--mint`) are theme-independent there and stay theme-independent here.
 *
 * No webfonts, no CDN, no analytics: the site makes zero third-party requests,
 * which is what lets the privacy policy say so plainly.
 */

:root {
  --bg: #f2f3ee;
  --surface: #ffffff;
  --selected: #e7efe4;
  --text: #16211b;
  --text-secondary: #6b7268;
  --border: rgba(22, 33, 27, 0.1);
  --shadow: 0 1px 2px rgba(22, 33, 27, 0.05), 0 8px 24px rgba(22, 33, 27, 0.06);

  /* Theme-independent brand surfaces. */
  --deep: #3d605e;
  --deep-ink: #f1f6ef;
  --deep-muted: #c2d6c5;
  --mint: #d9efd6;
  --mint-ink: #13291f;
  --tint: #13291f;
  --tint-text: #f1f6ef;

  /* Verdict status accents — the one deliberate exception to the muted palette. */
  --halal: #2e7d4f;
  --haram: #c0392b;
  --doubtful: #b4841f;
  --halal-tint: #deefde;
  --haram-tint: #f8e2de;
  --doubtful-tint: #faf1da;

  --radius: 18px;
  --radius-sm: 12px;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101e17;
    --surface: #1b2f24;
    --selected: #24402f;
    --text: #e9efe7;
    --text-secondary: #96a499;
    --border: rgba(233, 239, 231, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --tint: #d9efd6;
    --tint-text: #13291f;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

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

.wrap {
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.site-header {
  padding: 22px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.site-nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
}

.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--text);
}

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

.hero {
  padding: 40px 0 24px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 780px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.hero p.lede {
  font-size: 1.12rem;
  color: var(--text-secondary);
  margin: 0 0 28px;
  max-width: 46ch;
}

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

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--tint);
  color: var(--tint-text);
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 0;
}

.button:hover {
  opacity: 0.9;
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.badge {
  display: inline-block;
  background: var(--selected);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- the verdict-card mock ---------- */

.mock {
  background: var(--deep);
  border-radius: 26px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.mock-label {
  color: var(--deep-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.mock-card {
  background: #ffffff;
  color: #16211b;
  border-radius: 16px;
  padding: 16px;
}

.mock-verdict {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.mock-dot {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: none;
}

.mock-verdict strong {
  display: block;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.mock-verdict span {
  font-size: 13px;
  color: #6b7268;
}

.mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(22, 33, 27, 0.08);
  font-size: 14px;
}

.pill {
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pill.halal {
  background: var(--halal-tint);
  color: #1d5334;
}

.pill.haram {
  background: var(--haram-tint);
  color: #8e2b20;
}

.pill.doubtful {
  background: var(--doubtful-tint);
  color: #6d5011;
}

/* ---------- sections ---------- */

section {
  padding: 44px 0;
}

section > .wrap > h2 {
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.section-lede {
  color: var(--text-secondary);
  margin: 0 0 28px;
  max-width: var(--measure);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.steps li {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--selected);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.steps h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.steps p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.notice {
  background: var(--selected);
  border-radius: var(--radius);
  padding: 22px 24px;
}

.notice h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.notice p {
  margin: 0 0 10px;
  color: var(--text);
  max-width: var(--measure);
}

.notice p:last-child {
  margin-bottom: 0;
}

/* ---------- long-form document pages ---------- */

.doc {
  padding: 24px 0 8px;
}

.doc .wrap {
  max-width: 760px;
}

.doc h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}

.doc .updated {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 32px;
}

.doc h2 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 36px 0 10px;
  padding-top: 4px;
}

.doc h3 {
  font-size: 1rem;
  margin: 24px 0 8px;
}

.doc p,
.doc li {
  color: var(--text);
}

.doc p {
  margin: 0 0 14px;
}

.doc ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.doc li {
  margin-bottom: 8px;
}

.doc .callout {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  margin: 0 0 20px;
}

.doc .callout p:last-child {
  margin-bottom: 0;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 20px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  font-size: 15px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 40px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-footer p {
  margin: 0;
  max-width: 44ch;
}
