/* ==========================================================================
   halal.bot — landing page
   Calm, editorial, Claude.ai-inspired. Warm cream + charcoal + terracotta.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg:           #F7F5F2;   /* warm cream background        */
  --surface:      #FCFBF9;   /* card background              */
  --text:         #242321;   /* primary text / deep charcoal */
  --text-soft:    #706E69;   /* secondary text               */
  --accent:       #C9694A;   /* muted terracotta             */
  --accent-press: #B1573A;   /* hover/active accent          */
  --border:       #E5E0DA;   /* subtle border                */
  --border-strong:#D8D2CA;

  --max-w:     1140px;       /* page max width               */
  --reading-w: 720px;        /* narrow reading column        */

  --serif: "Lora", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-underline-offset: 3px; }

/* Visible, accessible focus states */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.container.narrow {
  max-width: var(--reading-w);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.25rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.nav-link:hover { border-color: var(--border-strong); color: var(--accent); }
.nav-link .arrow { font-size: 0.8rem; opacity: 0.7; }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(4.5rem, 11vh, 8.5rem) clamp(3rem, 7vh, 5.5rem);
}

.eyebrow {
  margin: 0 0 1.5rem;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.75rem, 11vw, 6.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
}

.hero-lede {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.5rem, 3.4vw, 2.15rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 2.25rem;
  max-width: 36ch;
}

.hero-copy { margin-bottom: 2.5rem; }
.hero-copy p {
  margin: 0 0 1.1rem;
  color: var(--text);
  max-width: 54ch;
}
.hero-copy p:last-child { color: var(--text-soft); margin-bottom: 0; }

.hero-cta { margin-top: 2.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.btn-primary {
  background: var(--accent);
  color: #FFFaf6;
}
.btn-primary:hover { background: var(--accent-press); }
.btn-primary:active { transform: translateY(1px); }

.microcopy {
  margin: 1.1rem 0 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vh, 5rem); }
.section + .section { border-top: 1px solid var(--border); }

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.85rem, 4.2vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
  max-width: 22ch;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--text-soft);
  margin: 0 0 2.25rem;
  max-width: 58ch;
}

/* ---------- Visitor intent ---------- */
/* Shares the .section / .container.narrow / .section-title / .section-intro
   treatment so it matches the rest of the page. Only the (shorter) one-question
   form height differs from the acquisition form. */
.intent-embed {
  height: 420px;
  min-height: 340px;
}

/* ---------- Possibilities / pills ---------- */
.pills {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 450;
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.pill:hover {
  border-color: var(--accent);
  background: var(--bg);
}

.aside {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text);
  margin: 0 0 0.35rem;
}
.note {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin: 0;
}

/* ---------- Values ---------- */
.values .prose p {
  margin: 0 0 1.1rem;
  max-width: 56ch;
}
.values .prose p:last-child { margin-bottom: 0; color: var(--text-soft); }

/* ---------- Enquiry / form ---------- */
.enquiry .section-intro { margin-bottom: 2rem; }

.form-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  /* intentionally almost no shadow */
}

.youform-embed {
  display: block;
  width: 100%;
  height: 760px;
  min-height: 640px;
  border: 0;
  background: var(--surface);
}

.form-hint {
  margin: 1.1rem 0 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}
.footer-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.footer-brand {
  font-family: var(--serif);
  font-size: 1.1rem;
}
.footer-meta {
  font-size: 0.85rem;
  color: var(--text-soft);
}
.footer-copy {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* ---------- Entrance: subtle page-load fade ---------- */
html.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.7s cubic-bezier(0.2, 0.65, 0.3, 1) forwards;
}
html.reveal-ready .reveal:nth-child(2) { animation-delay: 0.06s; }
html.reveal-ready .reveal:nth-child(3) { animation-delay: 0.12s; }
html.reveal-ready .reveal:nth-child(4) { animation-delay: 0.18s; }
html.reveal-ready .reveal:nth-child(5) { animation-delay: 0.24s; }
html.reveal-ready .reveal:nth-child(6) { animation-delay: 0.30s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .nav { min-height: 3.75rem; }
  .nav-link { padding: 0.45rem 0.8rem; font-size: 0.85rem; }
  .youform-embed { height: 820px; }
  .intent-embed { height: 480px; }
  .footer-row { flex-direction: row; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.reveal-ready .reveal { opacity: 1; transform: none; }
}
