/* laheeq.com. Laheeq's own tokens (D37): limestone, Qur'an teal, ink, the
   Instrument faces. Flat colours only; every edge is a filled shape. */

@font-face { font-family: "Instrument Serif"; src: url(/fonts/InstrumentSerif-400.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url(/fonts/InstrumentSerif-400-ext.woff2) format("woff2"); font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/InstrumentSans-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/InstrumentSans-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/InstrumentSans-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/InstrumentSans-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/InstrumentSans-400-ext.woff2) format("woff2"); font-weight: 400; font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "Plex Arabic"; src: url(/fonts/IBMPlexSansArabic-400-arabic.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url(/fonts/IBMPlexSansArabic-600-arabic.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Amiri"; src: url(/fonts/Amiri-400-arabic.woff2) format("woff2"); font-display: swap; }

:root {
  --field: #ddede8;   /* the soft teal the paper lies on */
  --paper: #fbfaf6;
  --ground: #f3f2ed;  /* limestone */
  --ink: #1f201d;
  --muted: #55554f;
  --teal: #1b6e66;
  --on-dark: #fbfaf6;
  --serif: "Instrument Serif", "Amiri", Georgia, serif;
  --sans: "Instrument Sans", "Plex Arabic", system-ui, sans-serif;
  /* The five sizes the page uses. */
  --t-display: clamp(48px, 5.6vw, 84px);
  --t-head: clamp(38px, 4.4vw, 68px);
  --t-lead: clamp(22px, 1.8vw, 26px);
  --t-body: 18px;
  --t-small: 15px;
  --margin: clamp(16px, 2.2vw, 32px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--field); color: var(--ink); font: 400 var(--t-body)/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; line-height: 1; }
h2 { font-size: var(--t-head); }
[lang="ar"], .ar { font-family: "Amiri", var(--serif); }
.rehal { width: 1em; height: 1em; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
::selection { background: var(--teal); color: var(--on-dark); }

/* The page lies over the footer and slides off it at the end (the curtain). */
main { background: var(--ground); }

.button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; background: var(--ink); color: var(--on-dark);
  font-weight: 600; font-size: var(--t-small); text-decoration: none; transition: transform 160ms var(--ease), background 160ms;
}
.button:hover { background: var(--teal); }
.button:active { transform: scale(0.97); }

/* ---------- The bar, on the field ---------- */
.bar {
  position: absolute; inset: 0 0 auto; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 28px var(--margin);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font: 400 var(--t-lead)/1 var(--serif); text-decoration: none; color: var(--ink); }
.brand .rehal { color: var(--teal); width: 30px; height: 30px; }
.links { display: flex; gap: 28px; font-size: var(--t-small); font-weight: 500; }
.links a { text-decoration: none; padding: 8px 0; position: relative; }
.links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: currentColor; transform: scaleX(0);
  transform-origin: left; transition: transform 200ms var(--ease); }
.links a:hover::after, .links a:focus-visible::after { transform: scaleX(1); }

/* ---------- The hero: the day's note as a card ---------- */
.hero { background: var(--field); padding: 190px var(--margin) 120px; display: grid; justify-items: center; }
.card {
  position: relative; width: min(640px, 100%); min-height: calc(min(640px, 100vw) * 1.4); background: var(--paper);
  padding: 56px 56px 64px; text-align: center; display: flex; flex-direction: column; align-items: center;
}
.corner { position: absolute; width: 40px; height: 40px; border-radius: 50%; background: var(--field); top: -20px; }
.corner.tl { left: -20px; } .corner.tr { right: -20px; }
.card-mark { color: var(--teal); width: 44px; height: 44px; }
.card h1 { font-size: var(--t-display); margin-top: 28px; width: 100%; }
.card h1 .a { display: block; text-align: left; padding-left: 4%; }
.card h1 .b { display: block; text-align: right; padding-right: 2%; }
.sub { font-size: var(--t-lead); line-height: 1.35; max-width: 26ch; margin-top: 36px; }

.day { width: 100%; margin-top: 56px; padding-top: 44px; position: relative; }
.day::before { /* a row of round dots, the perforation of a tear-off note */
  content: ""; position: absolute; top: 0; left: -56px; right: -56px; border-top: 7px dotted var(--field);
}
.chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.chips-label { width: 100%; font-size: var(--t-small); color: var(--muted); margin-bottom: 4px; }
.chip {
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--ground); color: var(--ink);
  font: 600 var(--t-small) var(--sans); cursor: pointer; transition: background 160ms, color 160ms, transform 160ms var(--ease);
}
.chip[lang="ar"] { font-family: "Plex Arabic", var(--sans); }
.chip:hover { background: var(--field); }
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] { background: var(--teal); color: var(--on-dark); }
.note { margin-top: 36px; display: grid; gap: 10px; animation: note-in 420ms var(--ease); }
.note-title { font: 400 var(--t-lead)/1.1 var(--serif); color: var(--teal); }
.note[lang="ar"] .note-title { font-family: "Amiri", serif; }
.note-child { font: 400 var(--t-head)/1.05 var(--serif); }
.note-date { font-size: var(--t-small); color: var(--muted); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 12px; }
.diamond { width: 8px; height: 8px; background: var(--teal); transform: rotate(45deg); }
.note-status { justify-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--field); color: #134d47; font-weight: 600; font-size: var(--t-small); margin: 6px 0; }
.tick { width: 12px; height: 7px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg) translateY(-2px); }
.note-line { font-size: var(--t-body); }
.note-line .ar { font-size: var(--t-lead); margin-inline-start: 6px; color: var(--teal); }
.note[lang="ar"] .note-line, .note[lang="ar"] .note-date { font-family: "Plex Arabic", var(--sans); }
.macalin { margin-top: 32px; padding: 20px 24px; background: var(--ground); text-align: start; }
.macalin blockquote { font: 400 var(--t-lead)/1.3 var(--serif); }
.macalin figcaption { margin-top: 8px; font-size: var(--t-small); color: var(--muted); }
@keyframes note-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Showcase: a square plate and three views ---------- */
.show { display: grid; grid-template-columns: 1fr 1fr; min-height: 88svh; background: var(--ground); }
/* A real app screen at phone size: whole, never cropped, in a dark phone edge. */
.phone { width: auto; border-radius: 36px; padding: 9px; background: var(--ink); }
.plate { margin: 40px 24px 40px var(--margin); aspect-ratio: 1; background: var(--field); align-self: center; display: grid; place-items: center; }
.plate img { height: 86%; width: auto; animation: note-in 420ms var(--ease); }
.show-text { display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: 64px var(--margin) 64px 24px; }
.tabs { display: flex; gap: 28px; }
.tabs button { border: 0; background: none; font: 500 18px var(--sans); color: var(--muted); padding: 10px 0; cursor: pointer; position: relative; }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 700; }
.tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--teal); transform: scaleX(0);
  transform-origin: left; transition: transform 220ms var(--ease); }
.tabs button[aria-selected="true"]::after { transform: scaleX(1); }
.show-text h2 { margin-bottom: 40px; max-width: 12ch; }
.tab-copy { max-width: 36ch; }
.tab-copy .lead { font-size: var(--t-lead); line-height: 1.3; margin-bottom: 12px; }
.cells { display: grid; grid-template-columns: 1fr 1fr; }
.cell { display: flex; align-items: center; justify-content: center; min-height: 72px; padding: 0 16px; background: var(--field); color: var(--ink);
  font-weight: 600; text-decoration: none; text-align: center; transition: background 160ms; }
.cell.ink { background: var(--ink); color: var(--on-dark); }
.cell:hover { background: var(--teal); color: var(--on-dark); }

/* ---------- How it works: an afternoon on a slip ---------- */
.how { background: var(--teal); color: var(--on-dark); display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px;
  padding: 160px var(--margin) 160px; }
.how-text { grid-column: 1 / 6; }
.how-text h2 { max-width: 11ch; }
.how-text p { margin-top: 28px; max-width: 30ch; font-size: var(--t-lead); line-height: 1.35; }
.slip { grid-column: 7 / 13; background: var(--paper); color: var(--ink); padding: 40px 36px 72px; font-variant-numeric: tabular-nums;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 95% calc(100% - 18px), 90% 100%, 85% calc(100% - 18px), 80% 100%, 75% calc(100% - 18px), 70% 100%, 65% calc(100% - 18px), 60% 100%, 55% calc(100% - 18px), 50% 100%, 45% calc(100% - 18px), 40% 100%, 35% calc(100% - 18px), 30% 100%, 25% calc(100% - 18px), 20% 100%, 15% calc(100% - 18px), 10% 100%, 5% calc(100% - 18px), 0 100%); }
.slip h3 { font: 700 var(--t-body) var(--sans); letter-spacing: 0; margin-top: 28px; }
.slip h3:first-child { margin-top: 0; }
.slip .row { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.slip dd { flex: none; margin-inline-start: auto; font-weight: 600; }
.slip dt { display: flex; align-items: baseline; gap: 8px; flex: 1 1 auto; min-width: 0; }
.slip dt::after { content: ""; flex: 1 1 24px; min-width: 24px; border-bottom: 4px dotted #a9a8a0; transform: translateY(-4px); }
.total { display: flex; justify-content: space-between; gap: 12px; margin: 32px -36px 0; padding: 12px 36px; background: var(--ink); color: var(--on-dark); font-weight: 600; }

/* ---------- Features: sheets that stack like tabbed folders ---------- */
.features { padding: 160px 0 0; background: var(--ground); }
.features > h2 { padding: 0 var(--margin) 48px; }
.sheet { min-height: 86svh; border-radius: 0; display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: 72px 1fr;
  column-gap: 24px; padding: 0 var(--margin); overflow: hidden; }
.sheet.s0 { background: var(--teal); color: var(--on-dark); }
.sheet.s1 { background: var(--field); }
.sheet.s2 { background: var(--paper); }
.sheet.s3 { background: var(--ink); color: var(--on-dark); }
.sheet h3 { grid-column: 1 / 7; align-self: center; font-size: var(--t-head); }
.sheet p { grid-column: 1 / 6; grid-row: 2; align-self: end; margin-bottom: 72px; font-size: var(--t-lead); line-height: 1.35; max-width: 32ch; }
.sheet-pic { grid-column: 7 / 13; grid-row: 1 / 3; display: grid; place-items: center; padding: 80px 0 64px; }
.sheet-pic img { height: min(70svh, 640px); width: auto; }

/* ---------- Proof: the 114 surahs printed on a card ---------- */
.proof { background: var(--field); display: grid; justify-items: center; padding: 160px var(--margin) 200px; }
.list-card { width: min(56vw, 860px); background: var(--paper); padding: 56px; transform: rotate(-1.5deg); text-align: center; }
.list-sub { margin: 20px auto 36px; max-width: 34ch; }
.names { font: 400 var(--t-lead)/1.6 var(--serif); }
.names span { white-space: nowrap; }

/* ---------- FAQ beside the film ---------- */
.faq { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: 0 var(--margin) 80px; background: var(--ground); }
.faq-text { grid-column: 1 / 6; padding-top: 160px; }
.facts { margin: 32px 0 40px; display: grid; gap: 6px; }
.facts div { display: flex; gap: 12px; font-size: var(--t-body); }
.facts dt { font-weight: 700; min-width: 7.5em; }
details { margin-top: 28px; }
summary { font-size: var(--t-body); font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; min-height: 44px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px); transition: transform 200ms var(--ease); }
details[open] summary::after { transform: rotate(-135deg); }
details p { margin-top: 10px; max-width: 46ch; }
.faq-actions { display: flex; align-items: center; gap: 28px; margin-top: 48px; }
.text-link { font-weight: 600; text-underline-offset: 4px; }
.faq-media { grid-column: 7 / 13; position: relative; margin-bottom: 80px; }
.tall { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--field); }
.square { position: absolute; left: -48px; bottom: -48px; width: 30%; height: auto; outline: 8px solid var(--ground); }

/* ---------- The reply card ---------- */
.cta { background: var(--ink); color: var(--on-dark); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
  padding: 120px var(--margin) 0; overflow: hidden; }
.cta-lead { grid-column: 1 / 5; align-self: end; margin-bottom: 64px; font-size: var(--t-lead); line-height: 1.35; }
.reply { grid-column: 6 / 13; align-self: end; margin-bottom: -60px; background: var(--paper); color: var(--ink); padding: 56px 48px 120px;
  text-align: center; transform: rotate(2deg); }
.reply h2 { margin-bottom: 20px; }
.bar-button { display: flex; align-items: center; justify-content: center; min-height: 56px; margin-top: 32px; background: var(--ink); color: var(--on-dark);
  font-weight: 600; text-decoration: none; transition: background 160ms, transform 160ms var(--ease); }
.bar-button:hover { background: var(--teal); }
.bar-button:active { transform: scale(0.98); }

/* ---------- The back of the card (the footer under the curtain) ---------- */
.foot { background: var(--field); padding: 96px var(--margin) 40px; }
.back { position: relative; margin: 0 auto; width: min(100%, 1200px); background: var(--paper); padding: 64px 56px 32px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.scallops { position: absolute; left: 0; right: 0; top: -24px; height: 24px; display: flex; overflow: hidden; }
.scallops span { flex: 1 0 100px; height: 48px; border-radius: 50%; background: var(--paper); }
.sign h2 { margin-bottom: 20px; }
.sign p { font-size: var(--t-body); }
.address { position: relative; display: grid; align-content: start; gap: 12px; padding-top: 8px; }
.address a { font-size: var(--t-body); text-decoration: none; width: fit-content; }
.address a:hover { text-decoration: underline; text-underline-offset: 4px; }
.stamp { position: absolute; top: -12px; right: 0; width: 88px; aspect-ratio: 3 / 4; background: var(--teal); color: var(--on-dark);
  display: grid; place-items: center; outline: 6px solid var(--paper); outline-offset: -12px; }
.stamp .rehal { width: 44px; height: 44px; }
.imprint { grid-column: 1 / -1; text-align: center; font-size: var(--t-small); color: var(--muted); margin-top: 24px; }

/* ---------- Entrances ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .card > * { animation: rise 800ms var(--ease) both; }
.js .card > :nth-child(3) { animation-delay: 60ms; } .js .card > :nth-child(4) { animation-delay: 140ms; } .js .card > :nth-child(5) { animation-delay: 220ms; }
.js .card > :nth-child(6) { animation-delay: 300ms; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Phone ---------- */
@media (max-width: 820px) {
  :root { --margin: 16px; --t-body: 17px; }
  .links { display: none; }
  .bar { padding: 20px var(--margin); }
  .hero { padding: 96px 12px 72px; }
  .card { padding: 40px 22px 44px; min-height: 0; }
  .card h1 { font-size: 12vw; }
  .card h1 .a, .card h1 .b { text-align: center; padding: 0; }
  .day::before { left: -22px; right: -22px; }
  .show { grid-template-columns: 1fr; }
  .plate { margin: 16px; }
  .plate img { height: 90%; }
  .show-text { padding: 8px var(--margin) 56px; gap: 28px; }
  .tabs { gap: 22px; }
  .cells { grid-template-columns: 1fr; gap: 0; }
  .cell { min-height: 60px; }
  .how { grid-template-columns: 1fr; padding: 96px var(--margin) 120px; }
  .how-text, .slip { grid-column: 1; }
  .slip { padding: 28px 20px 64px; }
  .total { margin: 28px -20px 0; padding: 12px 20px; }
  .features { padding-top: 96px; }
  .sheet { grid-template-columns: 1fr; grid-template-rows: 64px auto auto; min-height: 0; }
  .sheet h3 { grid-column: 1; }
  .sheet-pic { grid-column: 1; grid-row: 2; padding: 8px 0 0; }
  .sheet-pic img { height: auto; width: min(72%, 300px); }
  .sheet p { grid-column: 1; grid-row: 3; margin: 20px 0 40px; font-size: var(--t-body); }
  .proof { padding: 96px var(--margin) 120px; }
  .list-card { width: 100%; padding: 32px 20px; transform: none; }
  .names { font-size: var(--t-body); }
  .faq { grid-template-columns: 1fr; padding-bottom: 72px; }
  .faq-media { grid-column: 1; grid-row: 1; margin: 0 0 40px; }
  .tall { aspect-ratio: 4 / 5; }
  .square { left: auto; right: 0; bottom: -32px; width: 34%; }
  .faq-text { grid-column: 1; padding-top: 24px; }
  .faq-actions { flex-direction: column; align-items: stretch; }
  .faq-actions .button { justify-content: center; }
  .cta { grid-template-columns: 1fr; padding-top: 96px; }
  .cta-lead { grid-column: 1; margin-bottom: 40px; }
  .reply { grid-column: 1; width: 90%; justify-self: center; transform: rotate(1deg); padding: 36px 24px 100px; }
  .bar-button { min-height: 52px; }
  .foot { padding: 72px 12px 24px; }
  .back { grid-template-columns: 1fr; padding: 48px 24px 24px; }
  .stamp { width: 64px; }
}
