/* Ali Merchant: warm paper, warm black and beef red, taken from the owner's logo.
   Serif headings (Source Serif 4) echo the logo's serif name; Archivo for text and UI.
   The hero is a full-width photograph, not a graphic. Full notes: WEBSITE_CONTEXT.md */
:root {
  --paper: #f6f3ee;
  --white: #ffffff;
  --sand: #ece5da;
  --line: #d8cfc2;
  --ink: #1e1a17;
  --ink-2: #27211d;
  --muted: #625950;
  --on-ink: #d9d0c5;
  --on-ink-line: rgba(217, 208, 197, .26);
  --red: #8e1b1e;
  --red-dk: #701519;
  --kraft: #cfb38b;
  --kraft-dk: #8a6d45;
  --kraft-ink: #2e2113;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Archivo", system-ui, sans-serif;

  /* full width up to 2000px; only the gutter keeps text off the screen edge */
  --wrap: 2000px;
  --gutter: clamp(20px, 5vw, 104px);
  --header-h: 72px;
  --facts-h: 112px;
  --sec: clamp(64px, 8vw, 112px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
dl, dd { margin: 0; }
figure { margin: 0; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 2px; }
.hero :focus-visible, .section-ink :focus-visible, .facts-bar :focus-visible, .site-footer :focus-visible { outline-color: var(--kraft); }

.skip { position: absolute; inset-inline-start: 8px; top: 8px; transform: translateY(-200%); background: var(--ink); color: var(--white); padding: 8px 14px; z-index: 20; }
.skip:focus { transform: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ── buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font: inherit; font-weight: 650; font-size: 1rem; text-decoration: none;
  border: 2px solid transparent; border-radius: 3px; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-small { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dk); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .75); color: var(--white); background: transparent; }
.btn-ghost-light:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

/* ── header ──────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(246, 243, 238, .96);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 32px; min-height: 72px; }
/* brand: the owner's logo (bull mark + serif name), cut out of images/logo-source.jpg */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; line-height: 1.1; flex: none; }
.brand-mark { height: 44px; width: auto; }
.brand-text { display: flex; flex-direction: column; gap: 5px; }
.brand-name-img { height: 17px; width: auto; }
.brand-sub { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.nav { display: flex; gap: 28px; margin-inline-start: auto; }
.nav a { text-decoration: none; font-weight: 550; font-size: .98rem; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover { border-bottom-color: var(--red); }
.lang { text-decoration: none; font-weight: 600; font-size: 1rem; padding: 6px 2px; border-bottom: 2px solid transparent; }
.lang:hover { border-bottom-color: var(--red); }
.lang[lang="ar"] { font-family: "IBM Plex Sans Arabic", var(--sans); }

/* ── hero: full-width photograph, text on the darker side, aligned to the page gutter ── */
.hero { position: relative; isolation: isolate; background: var(--ink); color: var(--white); overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
/* photo: herd on an open plain, nothing cut at the edges (see WEBSITE_CONTEXT.md section 6) */
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.hero::before {
  /* keeps the text readable; only the text side is darkened */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(22, 17, 13, .86) 0%, rgba(22, 17, 13, .66) 34%, rgba(22, 17, 13, .16) 62%, rgba(22, 17, 13, 0) 100%);
}
.hero-inner {
  /* hero + facts bar fill the first screen under the header (4px: header + facts borders) */
  min-height: clamp(520px, calc(100svh - var(--header-h) - var(--facts-h) - 4px), 820px);
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(40px, 8svh, 104px);
}
/* min() with svh keeps the heading smaller on short laptop screens (1366x768) */
.hero h1 { font-size: clamp(2.4rem, min(4.4vw, 7svh), 4.8rem); line-height: 1.04; max-width: 15ch; text-wrap: balance; }
.lead { margin-top: clamp(16px, 2.6svh, 24px); font-size: clamp(1.08rem, 1.3vw, 1.22rem); color: rgba(255, 255, 255, .86); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(20px, 3.4svh, 32px); }

/* the four facts a buyer asks first, right under the photo */
.facts-bar { background: var(--ink); color: var(--on-ink); }
.facts-bar { border-top: 1px solid var(--on-ink-line); }
.facts-bar dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: var(--facts-h); align-items: center; }
.facts-bar dl > div { padding: 20px 28px; border-inline-start: 1px solid var(--on-ink-line); }
.facts-bar dl > div:first-child { border-inline-start: 0; padding-inline-start: 0; }
.facts-bar dt { font-size: .85rem; color: var(--kraft); margin-bottom: 4px; }
.facts-bar dd { color: var(--white); font-weight: 600; line-height: 1.4; }

/* ── sections ────────────────────────────────────────── */
.section { padding: var(--sec) 0; }
.section h2 { font-size: clamp(1.9rem, 3.2vw, 2.75rem); max-width: 22ch; }
.section-intro { margin-top: 16px; font-size: 1.1rem; max-width: 60ch; color: var(--muted); }
.section-ink { background: var(--ink-2); color: var(--white); }
.section-ink .section-intro { color: var(--on-ink); }
.section-soft { background: var(--sand); }

/* products */
.products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); margin-top: 48px; }
.product { background: var(--white); border-radius: 3px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); }
.product-img { width: 100%; aspect-ratio: 45 / 32; object-fit: cover; background: var(--sand); }
.product-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.product h3 { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; margin-bottom: 12px; }
.product p { color: var(--muted); margin-bottom: 20px; }
.spec { margin-top: auto; border-top: 1px solid var(--line); }
.spec > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.spec dt { color: var(--muted); }
.spec dd { font-weight: 600; text-align: end; }
.product-note { background: var(--ink); color: var(--white); border-color: var(--ink); padding: 28px 26px; }
.product-note p { color: var(--on-ink); }
.product-note .btn { margin-top: auto; align-self: flex-start; }

/* process: photos, then the numbered steps (a real sequence) */
.process-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); margin-top: 44px; }
.process-photos img { width: 100%; aspect-ratio: 10 / 7; object-fit: cover; border-radius: 2px; background: var(--ink); }
.process-photos figcaption { margin-top: 10px; font-size: .95rem; color: var(--on-ink); }
.steps {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 3vw, 48px); row-gap: 44px;
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 1px solid var(--on-ink-line); padding-top: 18px; }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 10px;
  font-family: var(--serif); font-size: 2.6rem; font-weight: 600; line-height: 1;
  color: var(--kraft);
}
.steps h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.steps p { color: var(--on-ink); margin: 0; max-width: 36ch; }

/* shipping: sea first (most orders), air second */
.ship-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px); margin-top: 44px; }
.ship-mode { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--ink); border-radius: 3px; padding: 22px 26px 12px; }
.ship-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.ship-head h3 { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; }
.ship-mode .spec > div:last-child { border-bottom: 0; }

/* quality: the carton label next to what ships with it */
.quality { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.quality h2 { margin-bottom: 36px; }
.label {
  background: var(--kraft); color: var(--kraft-ink);
  border: 3px solid var(--kraft-ink); border-radius: 3px;
  padding: 18px 20px 16px; max-width: 440px;
  box-shadow: 0 1px 0 var(--kraft-dk), 0 18px 40px -24px rgba(46, 33, 19, .55);
}
.label-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-bottom: 3px solid var(--kraft-ink); padding-bottom: 10px; margin-bottom: 4px;
}
.label-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 700; font-size: 1.4rem; text-transform: uppercase; letter-spacing: .02em; }
.label-brand img { height: 26px; width: auto; flex: none; }
.label-origin { font-size: .85rem; font-weight: 650; font-variation-settings: "wdth" 80; }
.label-fields > div {
  display: grid; grid-template-columns: 7.5em 1fr; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid rgba(46, 33, 19, .35);
}
.label-fields dt { font-size: .85rem; font-variation-settings: "wdth" 75; font-weight: 500; }
.label-fields dd { font-weight: 700; font-variation-settings: "wdth" 85; font-size: 1.05rem; line-height: 1.3; }
.label-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 14px; }
.keep-chilled { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; font-variation-settings: "wdth" 80; }
.keep-chilled svg { width: 26px; height: 26px; flex: none; }
.bars {
  width: 120px; height: 38px; flex: none;
  background: repeating-linear-gradient(90deg,
    var(--kraft-ink) 0 2px, transparent 2px 4px, var(--kraft-ink) 4px 5px, transparent 5px 8px,
    var(--kraft-ink) 8px 11px, transparent 11px 12px, var(--kraft-ink) 12px 13px, transparent 13px 16px);
}
.promises > div { display: grid; grid-template-columns: 12em 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.promises > div:first-child { border-top: 4px solid var(--ink); }
.promises dt { font-weight: 700; font-size: 1.12rem; }
.promises dd { color: var(--muted); }

/* tags */
.tag {
  display: inline-block; white-space: nowrap;
  padding: 4px 12px; border-radius: 999px;
  font-size: .9rem; font-weight: 650;
  border: 1.5px solid var(--muted); color: var(--muted);
}
.tag-now { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* markets */
.markets { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.market-list { border-top: 4px solid var(--ink); }
.market-list > div { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.market-list dt { font-weight: 700; font-size: 1.15rem; }
.market-list dt span { display: block; margin-top: 4px; font-weight: 400; font-size: .98rem; color: var(--muted); }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.about h2 { margin-bottom: 24px; }
.about p { max-width: 62ch; }
.facts { border-top: 4px solid var(--ink); }
.facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 650; text-align: end; }

/* buyer questions */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.faq-list { border-top: 4px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  padding: 18px 0; font-weight: 650; font-size: 1.1rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  /* plus sign; the vertical bar drops when the answer is open */
  content: ""; width: 14px; height: 14px; flex: none; margin-top: 6px;
  background:
    linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat;
}
.faq-list details[open] summary::after { background: linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat; }
.faq-list summary:hover { color: var(--red); }
.faq-list details p { margin: -4px 0 20px; color: var(--muted); max-width: 62ch; }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact-list { margin-top: 32px; border-top: 1px solid var(--on-ink-line); }
.contact-list > div { display: grid; grid-template-columns: 7.5em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--on-ink-line); }
.contact-list dt { color: var(--on-ink); }
.contact-list dd { font-weight: 650; }
.contact-list a { text-underline-offset: 4px; }

.enquiry { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; background: var(--ink); padding: clamp(20px, 3vw, 32px); border-radius: 3px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: .95rem; color: var(--on-ink); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 3px;
  padding: 11px 12px; min-height: 46px; width: 100%;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: #e07b7d; box-shadow: 0 0 0 2px #e07b7d; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.form-msg { margin: 0; min-height: 1.6em; color: #f2c6c7; }
.form-msg.ok { color: var(--kraft); }

/* footer; bottom padding keeps the floating WhatsApp button clear of the footer text */
.site-footer { background: var(--ink); color: var(--on-ink); padding: 28px 0 88px; font-size: .95rem; }
.footer-row { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand img { height: 30px; width: auto; }
.footer-brand .footer-name { height: 13px; }
.site-footer a { color: var(--white); text-underline-offset: 4px; }
.footer-row span:last-child { margin-inline-start: auto; }

/* WhatsApp shortcut, shown only when a number is set in main.js */
.wa-float {
  position: fixed; inset-inline-end: 18px; bottom: 18px; z-index: 15;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 18px 0 14px; border-radius: 24px;
  background: #1f7a4d; color: var(--white); text-decoration: none; font-weight: 650;
  box-shadow: 0 8px 24px -10px rgba(30, 26, 23, .6);
}
.wa-float:hover { background: #18653f; }
/* hidden while the hero (which has its own WhatsApp button) is on screen; main.js toggles it */
.wa-float { transition: opacity .2s, transform .2s, visibility 0s; }
.wa-float.is-away { opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .2s, transform .2s, visibility 0s .2s; }
@media (prefers-reduced-motion: reduce) { .wa-float, .wa-float.is-away { transition: none; transform: none; } }
.wa-float svg { width: 22px; height: 22px; }

/* 404 page */
.notfound-title { font-size: clamp(2rem, 4vw, 3.2rem); max-width: 20ch; }
.notfound-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--white); }

/* draft-only: contact details still to be filled in main.js */
.todo { background: rgba(207, 179, 139, .25); outline: 1px dashed var(--kraft); padding: 0 6px; border-radius: 2px; }

/* ── responsive ──────────────────────────────────────── */
@media (max-width: 1060px) {
  .nav { gap: 18px; }
  .header-row { gap: 22px; }
}
@media (max-width: 960px) {
  .facts-bar dl { grid-template-columns: 1fr 1fr; min-height: 0; }
  .facts-bar dl > div:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  .facts-bar dl > div:nth-child(n + 3) { border-top: 1px solid var(--on-ink-line); }
  .products { grid-template-columns: 1fr 1fr; }
  .product-note { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr 1fr; }
  .quality, .markets, .about, .faq, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .header-row { flex-wrap: wrap; gap: 4px 16px; padding-top: 10px; }
  .nav { order: 3; width: 100%; margin-inline-start: 0; gap: 2px 18px; flex-wrap: wrap; padding-bottom: 6px; }
  .header-row .lang { margin-inline-start: auto; }
  .header-row .btn { display: none; }
}
@media (max-width: 720px) {
  .hero::before { background: linear-gradient(180deg, rgba(22, 17, 13, .55) 0%, rgba(22, 17, 13, .82) 100%); }
  .hero-media img { object-position: 62% 55%; }
  .hero-inner { min-height: 0; }
  .products, .steps, .ship-modes { grid-template-columns: 1fr; }
  .process-photos { grid-template-columns: 1fr 1fr; }
  .process-photos figure:first-child { grid-column: 1 / -1; }
  .promises > div { grid-template-columns: 1fr; gap: 4px; }
  .market-list > div { flex-direction: column; align-items: flex-start; gap: 10px; }
  .enquiry { grid-template-columns: 1fr; }
  .footer-row span:last-child { margin-inline-start: 0; }
}
@media (max-width: 520px) {
  .facts-bar dl { grid-template-columns: 1fr; }
  .facts-bar dl > div { border-inline-start: 0; padding: 16px 0; }
  .facts-bar dl > div + div { border-top: 1px solid var(--on-ink-line); }
}
@media (max-width: 420px) {
  :root { --gutter: 16px; }
  .brand-mark { height: 38px; }
  .brand-name-img { height: 15px; }
  .brand-sub { font-size: .72rem; }
  .nav { column-gap: 14px; }
  .nav a { font-size: .92rem; }
  .label-fields > div { grid-template-columns: 6.5em 1fr; }
  .bars { width: 84px; }
  .hero-actions .btn { width: 100%; }
}

/* ── Arabic page ─────────────────────────────────────── */
html[lang="ar"] body { font-family: "IBM Plex Sans Arabic", var(--sans); line-height: 1.75; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3,
html[lang="ar"] .product h3, html[lang="ar"] .ship-head h3 {
  font-family: "IBM Plex Sans Arabic", var(--sans); font-weight: 700; letter-spacing: 0;
}
html[lang="ar"] .hero h1 { line-height: 1.3; max-width: 17ch; }
html[lang="ar"] .section h2 { line-height: 1.3; }
html[lang="ar"] .label-fields dt, html[lang="ar"] .label-fields dd, html[lang="ar"] .label-origin, html[lang="ar"] .keep-chilled { font-variation-settings: normal; }
html[lang="ar"] .label-brand { font-family: var(--serif); }
html[lang="ar"] .steps li::before { font-family: var(--serif); }
/* Arabic: text sits on the right, so mirror the photo and the shading */
html[dir="rtl"] .hero-media img { transform: scaleX(-1); }
html[dir="rtl"] .hero::before { background: linear-gradient(270deg, rgba(22, 17, 13, .86) 0%, rgba(22, 17, 13, .66) 34%, rgba(22, 17, 13, .16) 62%, rgba(22, 17, 13, 0) 100%); }
@media (max-width: 720px) {
  html[dir="rtl"] .hero::before { background: linear-gradient(180deg, rgba(22, 17, 13, .55) 0%, rgba(22, 17, 13, .82) 100%); }
}
