/* Khalisha landing page. Owner: Claude (content and design lead). */
:root {
  --paper: #F5F6F8;
  --ink: #17213A;
  --stamp: #5B2A86;
  --slip: #F7EDB5;
  --slate: #5A6478;
  --rule: #D8DDE5;
  --white: #FFFFFF;

  --display: "Reem Kufi", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 36rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.75;
}

html[lang="en"] body { line-height: 1.6; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--stamp);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
}

.wordmark {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.wordmark img {
  height: 2em;
  margin-block: -0.25em;
  width: auto;
  display: block;
}

.lang-switch {
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border: 1.5px solid var(--rule);
  border-radius: 999px;
}
.lang-switch:hover { border-color: var(--ink); }

/* Hero */
.hero {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-block: 2rem 4rem;
}

@media (min-width: 52rem) {
  .hero { grid-template-columns: 1.1fr 0.9fr; gap: 4rem; padding-block: 3rem 5.5rem; }
}

.hero h1 {
  font-family: var(--display);
  font-size: var(--step-3);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}
html[lang="en"] .hero h1 { max-width: 16ch; line-height: 1.12; }

.lede {
  margin: 0 0 2rem;
  max-width: var(--measure);
  color: var(--ink);
}

.cta {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  padding: 0.95rem 1.6rem;
  border-radius: 0.6rem;
  transition: background-color 150ms ease;
}
.cta:hover { background: var(--stamp); }

.cta-note {
  margin: 0.85rem 0 0;
  font-size: var(--step--1);
  color: var(--slate);
}

/* The slip */
.slip-frame { display: flex; justify-content: center; }

.slip {
  position: relative;
  width: min(100%, 23rem);
  background: var(--slip);
  padding: 2.25rem 1.6rem 6rem;
  transform: rotate(-1.5deg);
  box-shadow: 0 1px 0 rgba(23, 33, 58, 0.08), 0 14px 28px -18px rgba(23, 33, 58, 0.45);
  /* perforated top edge */
  -webkit-mask: radial-gradient(circle 5px at 50% 0, transparent 98%, #000) 0 0 / 18px 100% repeat-x;
          mask: radial-gradient(circle 5px at 50% 0, transparent 98%, #000) 0 0 / 18px 100% repeat-x;
}

.slip-title {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 700;
  margin: 0 0 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1.5px dashed rgba(23, 33, 58, 0.35);
}

.slip dl { margin: 0; display: grid; gap: 0.85rem; }
.slip dt { font-size: var(--step--1); color: #6B5E2A; }
.slip dd { margin: 0; font-weight: 600; line-height: 1.5; }

.stamp {
  position: absolute;
  inset-block-end: 1.4rem;
  inset-inline-end: 1.4rem;
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--stamp);
  border: 4px double var(--stamp);
  border-radius: 0.6rem;
  padding: 0.05rem 0.85rem 0.25rem;
  transform: rotate(-14deg);
  opacity: 0.88;
  mix-blend-mode: multiply;
  animation: stamp-in 420ms cubic-bezier(.2, .9, .3, 1.25) 700ms both;
}
html[lang="en"] .stamp { font-size: 1.5rem; padding: 0.2rem 0.8rem; }

@keyframes stamp-in {
  from { transform: rotate(-14deg) scale(1.9); opacity: 0; }
  to   { transform: rotate(-14deg) scale(1);   opacity: 0.88; }
}

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

/* Sections */
.section { padding-block: 3.5rem; border-top: 1px solid var(--rule); }

.section h2 {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.75rem;
}

.section-intro { margin: 0 0 2rem; max-width: var(--measure); color: var(--slate); }

/* Example exchange */
.exchange { display: grid; gap: 0.9rem; max-width: 40rem; }

.bubble {
  padding: 0.9rem 1.15rem;
  border-radius: 1rem;
  max-width: 34rem;
  line-height: 1.7;
}
.bubble p { margin: 0; }
.bubble.ask {
  justify-self: start;
  background: var(--white);
  border: 1px solid var(--rule);
  border-start-start-radius: 0.25rem;
}
.bubble.reply {
  justify-self: end;
  background: var(--ink);
  color: var(--white);
  border-start-end-radius: 0.25rem;
}
.bubble .source {
  margin-top: 0.6rem;
  font-size: var(--step--1);
  color: #C9CFDB;
}

/* Topic index */
.topic-groups { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) { .topic-groups { grid-template-columns: 2fr 1fr; gap: 3.5rem; } }

.topic-groups h3 {
  font-size: var(--step-0);
  font-weight: 600;
  color: var(--slate);
  margin: 0 0 0.5rem;
}

.topics { list-style: none; margin: 0; padding: 0; }
.topics li { border-bottom: 1px solid var(--rule); }
.topics a {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 0.95rem;
  text-decoration: none;
}
.topics a:hover .topic-name { color: var(--stamp); }
.topic-name { font-weight: 600; }
.topic-platforms { font-size: var(--step--1); color: var(--slate); }

/* Steps (a real sequence) */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem;
  counter-reset: step;
}
@media (min-width: 52rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; } }

.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  font-family: var(--display);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--stamp);
  margin-bottom: 0.6rem;
}
html[lang="ar"] .steps li::before { content: counter(step, arabic-indic); }
.steps h3 { font-size: var(--step-1); margin: 0 0 0.35rem; line-height: 1.45; }
.steps p { margin: 0; color: var(--slate); }

/* Promises */
.promises { margin: 0; padding: 0; list-style: none; display: grid; gap: 1rem; max-width: 44rem; }
.promises li {
  padding-inline-start: 1.1rem;
  border-inline-start: 3px solid var(--stamp);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 3rem 2.5rem;
}
.footer-cta { margin: 0 0 2rem; }
.footer-cta p {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 700;
  margin: 0 0 1rem;
}
.fine-print { font-size: var(--step--1); color: var(--slate); margin: 0; max-width: 44rem; }
