/* Know Halal website, 5 Oct 2026.
   Plan from the frontend-design skill (github.com/anthropics/skills): one type family, the app's own
   colours, and one bold element (the ingredient label in the home page hero). Everything else is quiet.
   Colours are the app's light theme (app/src/theme/tokens.ts) so the site and the app look like one product. */

@font-face {
  font-family: "Libre Franklin";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/libre-franklin-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Franklin";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/libre-franklin-latin-wght-italic.woff2") format("woff2");
}

:root {
  --aisle: #F4F6F5;      /* the page: the app's background */
  --stock: #FFFFFF;      /* label paper and raised surfaces */
  --ink: #0B0E13;        /* the brand's ink, from the icon */
  --ink-2: #5D6763;      /* secondary text */
  --rule: #D5DCD8;       /* hairlines */
  --jade: #34D399;       /* the brand fill: buttons and the tag */
  --green: #0B7A4E;      /* Halal, and links */
  --green-bg: #E1F5EA;
  --amber: #9A5800;      /* Doubtful */
  --amber-bg: #FFE9BF;
  --red: #C2261C;        /* Not halal */
  --red-bg: #FBE8E6;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--aisle);
  color: var(--ink);
  font-family: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--stock); padding: 8px 12px; }
.skip:focus { left: 8px; z-index: 10; }

/* ---------- header and footer (every page) ---------- */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand img { height: 32px; width: auto; }
.brand-name { font-size: 1.3125rem; letter-spacing: -0.015em; line-height: 1; }
.brand-name .know { font-weight: 500; color: var(--ink-2); }
.brand-name .halal { font-weight: 800; }
.site-nav { display: flex; gap: 28px; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 500; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.45em; }

.site-foot { border-top: 1px solid var(--rule); margin-top: 96px; padding: 40px 0 56px; color: var(--ink-2); font-size: 0.9375rem; }
.site-foot .foot-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: start; }
.site-foot .brand img { height: 26px; }
.site-foot .brand-name { font-size: 1.0625rem; }
.site-foot p { margin: 12px 0 0; max-width: 60ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0; padding: 0; list-style: none; }
.foot-links a { color: var(--ink); }

/* ---------- type ---------- */
h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: clamp(1.875rem, 3.4vw, 2.5rem); line-height: 1.1; letter-spacing: -0.025em; }
h3 { font-size: 1.3125rem; line-height: 1.3; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }

/* ---------- home: hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 72px; align-items: center; padding: 48px 0 104px; }
.hero h1 { font-size: clamp(2.75rem, 5.6vw, 4.625rem); line-height: 1.0; letter-spacing: -0.04em; margin-bottom: 28px; }
.hero .lede { font-size: 1.3125rem; line-height: 1.5; color: var(--ink-2); max-width: 31ch; margin-bottom: 36px; }
.hero .lede strong { color: var(--ink); font-weight: 600; }
.store-line { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.button { display: inline-block; background: var(--jade); color: var(--ink); font-weight: 700; font-size: 1.0625rem; padding: 15px 24px; border-radius: 12px; text-decoration: none; }
.button:hover { background: #2BC28A; text-decoration: none; }
.store-line .note { color: var(--ink-2); font-size: 1rem; }

/* the pack: an ingredient list as printed, with the words the app marks */
.pack { margin: 0; }
.label {
  background: var(--stock);
  border: 2px solid #000;
  color: #000;
  padding: 22px 24px 20px;
  font-size: 0.96875rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.label p { margin: 0; }
.label b { font-weight: 900; }
.label .contains { border-top: 8px solid #000; margin-top: 16px; padding-top: 10px; }
.mark { position: relative; background-repeat: no-repeat; background-position: 0 88%; background-size: 100% 46%; font-weight: 700; }
.js .label:not(.marks-on) .mark { background-size: 0% 46%; }
.mark.ok { background-image: linear-gradient(var(--green-bg), var(--green-bg)); box-shadow: inset 0 -2px 0 var(--green); }
.mark.ask { background-image: linear-gradient(var(--amber-bg), var(--amber-bg)); box-shadow: inset 0 -2px 0 var(--amber); }
@media (prefers-reduced-motion: no-preference) {
  .mark { transition: background-size 0.45s ease-out; }
  .marks-on .mark:nth-of-type(2) { transition-delay: 0.45s; }
  .marks-on .mark:nth-of-type(3) { transition-delay: 0.9s; }
}
.notes { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; font-size: 1rem; line-height: 1.5; }
.notes li { display: grid; grid-template-columns: 11.5em 1fr; gap: 16px; padding-top: 12px; border-top: 1px solid var(--rule); }
.notes .word { font-weight: 700; }
.notes .word.ok { color: var(--green); }
.notes .word.ask { color: var(--amber); }
.verdict-line { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding: 14px 16px; border-radius: 10px; background: var(--amber-bg); color: #3D2400; font-size: 1.0625rem; }
.verdict-line svg { flex: none; color: var(--amber); }
.verdict-line strong { font-weight: 800; color: var(--amber); }

/* ---------- home: sections ---------- */
.section { padding: 96px 0 0; }
.section > h2 { max-width: 22ch; margin-bottom: 20px; }
.section > .intro { max-width: 58ch; color: var(--ink-2); font-size: 1.1875rem; margin-bottom: 48px; }

.screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin: 0; padding: 0; list-style: none; }
.screens figure { margin: 0 auto; max-width: 300px; }
.screens img { width: 100%; max-width: 300px; border-radius: 34px; border: 8px solid var(--ink); background: var(--ink); }
.screens figcaption { margin-top: 20px; max-width: 30ch; font-size: 1.0625rem; line-height: 1.5; }
.screens .v { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.3125rem; margin-bottom: 4px; }
.v.halal { color: var(--green); }
.v.doubtful { color: var(--amber); }
.v.not-halal { color: var(--red); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; max-width: 860px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 72px 1fr; gap: 8px 24px; padding: 28px 0; border-top: 1px solid var(--rule); }
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(step); font-weight: 800; font-size: 2.5rem; line-height: 1; color: var(--green); letter-spacing: -0.03em; }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-2); max-width: 60ch; }

.profiles { display: grid; grid-template-columns: 12em 1fr; gap: 0 32px; margin: 0; max-width: 860px; }
.profiles dt { font-weight: 800; font-size: 1.1875rem; padding: 22px 0; border-top: 1px solid var(--rule); }
.profiles dd { margin: 0; padding: 22px 0; border-top: 1px solid var(--rule); color: var(--ink-2); }

.free { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; background: var(--stock); border-radius: 20px; padding: 48px; margin-top: 96px; }
.free img { width: 168px; border-radius: 37px; }
.free h2 { margin-bottom: 14px; }
.free p { color: var(--ink-2); max-width: 58ch; margin: 0 0 10px; }

/* ---------- documents: privacy and support ---------- */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 64px; row-gap: 48px; padding: 40px 0 0; }
.doc-title { grid-column: 2; }
.doc h1 { font-size: clamp(2.5rem, 4.6vw, 3.75rem); line-height: 1.04; letter-spacing: -0.035em; margin-bottom: 14px; }
.doc .meta { color: var(--ink-2); font-size: 1rem; margin-bottom: 20px; }
.doc .lede { font-size: 1.25rem; line-height: 1.5; max-width: 52ch; }
.toc { position: sticky; top: 24px; align-self: start; font-size: 0.9375rem; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--rule); display: grid; gap: 10px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.doc-body { min-width: 0; max-width: 46rem; }
.doc-body h2 { font-size: 1.75rem; line-height: 1.2; margin: 56px 0 14px; scroll-margin-top: 24px; }
.doc-body > h2:first-child { margin-top: 0; }
.doc-body.solo { grid-column: 2; }
.doc-body ul { padding-left: 1.2em; margin: 0 0 1em; }
.doc-body li { margin: 0 0 10px; }
.doc-body em { font-style: normal; font-weight: 600; }

.data { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 1rem; line-height: 1.55; }
.data th { text-align: left; font-weight: 700; padding: 10px 14px 10px 0; border-bottom: 2px solid var(--ink); }
.data td { vertical-align: top; padding: 16px 14px 16px 0; border-bottom: 1px solid var(--rule); }
.data td:first-child { font-weight: 700; width: 24%; }
.data td:last-child { color: var(--ink-2); width: 28%; }

.contact { background: var(--stock); border-radius: 16px; padding: 28px 32px; margin: 8px 0 8px; max-width: 46rem; }
.contact .big { font-size: clamp(1.375rem, 2.6vw, 1.75rem); font-weight: 800; letter-spacing: -0.02em; }
.contact p { margin: 6px 0 0; color: var(--ink-2); }

.faq { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 22px 0; font-weight: 700; font-size: 1.1875rem; line-height: 1.35; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.75rem; line-height: 0.8; color: var(--green); flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 0 24px; color: var(--ink-2); max-width: 62ch; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- smaller screens ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 24px; padding-bottom: 72px; }
  .hero .lede { max-width: 40ch; }
  .doc { grid-template-columns: 1fr; gap: 24px; }
  .doc-title, .doc-body.solo { grid-column: 1; }
  .toc { position: static; }
  .toc ol { grid-auto-flow: row; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .site-head { flex-wrap: wrap; gap: 14px; padding: 18px 0; }
  .site-nav { gap: 20px; }
  .label { padding: 18px 16px 16px; font-size: 0.875rem; }
  .notes li { grid-template-columns: 1fr; gap: 2px; }
  .section { padding-top: 72px; }
  .screens { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; gap: 20px; padding-bottom: 8px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
  .screens li { scroll-snap-align: start; }
  .steps li { grid-template-columns: 48px 1fr; padding: 22px 0; }
  .steps li::before { font-size: 2rem; }
  .profiles { grid-template-columns: 1fr; }
  .profiles dt { padding-bottom: 4px; }
  .profiles dd { border-top: 0; padding-top: 0; }
  .free { grid-template-columns: 1fr; padding: 32px 24px; gap: 24px; }
  .free img { width: 112px; border-radius: 25px; }
  .site-foot .foot-grid { grid-template-columns: 1fr; }
  .data, .data tbody, .data tr, .data td { display: block; width: 100%; }
  .data thead { position: absolute; left: -999px; }
  .data tr { border-bottom: 1px solid var(--rule); padding: 14px 0; }
  .data td { border: 0; padding: 4px 0; width: auto !important; }
  .data td::before { content: attr(data-label); display: block; font-size: 0.875rem; font-weight: 700; color: var(--ink-2); }
  .data td:first-child::before { display: none; }
  .contact { padding: 22px 20px; }
}
