/* Fonts are served from our own address, so a slow connection makes one trip.
   The Urdu font is only fetched on Urdu pages, and phones that already have it skip the download. */
@font-face {
  font-family: "Barlow";
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Barlow";
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Noto Nastaliq Urdu";
  font-weight: 400;
  font-display: swap;
  src: local("Noto Nastaliq Urdu"),
       url("../fonts/noto-nastaliq-urdu-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFC, U+200C-200E;
}

/* colours and fonts */
:root {
  --concrete: #e6e7e3;
  --paper: #fbfbf8;
  --ink: #1e2629;
  --steel: #52616a;
  --line: #c4c8c2;
  --mark: #f5c518;
  --green: #12804a;
  --error: #8a2c14;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Segoe UI", Arial, sans-serif;
  --urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", "Barlow", serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  /* room for the bar fixed to the bottom of a phone screen */
  padding-bottom: 76px;
  background: var(--concrete);
  color: var(--ink);
  font: 18px/1.55 var(--body);
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

h1, h2 { font-family: var(--head); font-weight: 700; line-height: 1.05; margin: 0 0 16px; }
h1 { font-size: clamp(32px, 9.6vw, 78px); margin-bottom: 28px; }
h2 { font-size: clamp(30px, 4vw, 40px); text-wrap: balance; }
h3 { font-size: 19px; font-weight: 600; margin: 0 0 4px; }
/* the second half of a slogan starts on its own line */
h1 span, h2 span { display: block; }
p { margin: 0 0 14px; max-width: 62ch; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 2px; }

/* Urdu: Nastaliq needs taller lines, and it has no bold or condensed cut */
html[lang="ur"] body { font-family: var(--urdu); font-size: 19px; line-height: 2.3; }
html[lang="ur"] h1,
html[lang="ur"] h2,
html[lang="ur"] h3,
html[lang="ur"] .logo { font-family: var(--urdu); font-weight: 400; line-height: 1.9; }
html[lang="ur"] h1 { font-size: clamp(30px, 8.4vw, 60px); }
html[lang="ur"] h2 { font-size: clamp(26px, 3.6vw, 36px); }
html[lang="ur"] h3 { font-size: 21px; }
html[lang="ur"] strong, html[lang="ur"] .prices dd, html[lang="ur"] legend { font-weight: 400; }

/* buttons: big enough for a thumb */
.btn {
  display: inline-block;
  min-height: 48px;
  padding: 11px 20px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font: 600 17px/1.4 var(--body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--steel); border-color: var(--steel); }
.btn.wa { background: var(--green); border-color: var(--green); }
.btn.wa:hover { background: var(--ink); border-color: var(--ink); }
.btn.plain { background: transparent; color: var(--ink); }
.btn.plain:hover { background: var(--paper); border-color: var(--ink); }
html[lang="ur"] .btn { font: 400 18px/1.9 var(--urdu); padding-block: 4px 9px; }

/* header */
.top { border-bottom: 1px solid var(--line); }
.top-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  padding-bottom: 12px;
}
.top-tools { display: flex; gap: 12px; align-items: center; }
.logo { font: 700 28px var(--head); text-decoration: none; }
html[lang="ur"] .logo { font-size: 26px; }
.wide-only { display: none; }

/* language switch: each language written in its own script */
.lang { display: flex; border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; }
.lang a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  font: 600 16px/1 system-ui, "Segoe UI", Tahoma, sans-serif;
  text-decoration: none;
}
.lang a[aria-current="true"] { background: var(--ink); color: #fff; }

/* sections */
section { padding: 52px 0; }
section + section { border-top: 1px solid var(--line); }
.note, .hint { font-size: 16px; color: var(--steel); }
.icon { width: 44px; height: 44px; flex: none; }

/* hero */
.hero-grid { display: grid; gap: 40px; align-items: start; }
.lead { font-size: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }

/* weigh slip */
.slip-box { margin: 0; width: 100%; max-width: 380px; justify-self: center; }
.slip-box figcaption { font-size: 16px; color: var(--steel); margin-bottom: 14px; }
.slip {
  padding: 16px 24px;
  background: var(--paper);
  border-top: 2px dashed var(--steel);
  border-bottom: 2px dashed var(--steel);
  font: 15px/1.5 var(--mono);
  transform: rotate(1.5deg);
}
.slip dl { margin: 0; }
.slip dl div { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.slip dl div:last-child { border-bottom: 0; }
.slip dt { color: var(--steel); }
.slip dd { margin: 0; font-weight: 600; }
.slip .net dd { background: var(--mark); padding: 0 6px; }

/* proof */
.proof-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 22px; }
.proof-list li { border-top: 3px solid var(--ink); padding-top: 12px; }
.proof-list p { font-size: 16px; color: var(--steel); }

/* steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 24px 0; max-width: 62ch; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.steps li::before { content: counter(step); font: 700 28px/1.2 var(--head); color: var(--steel); }

/* material cards */
.cards { display: grid; gap: 16px; margin: 24px 0 12px; }
.card { padding: 18px; background: var(--paper); border: 1px solid var(--line); }
.card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.card-head h3 { font-size: 22px; }
.spec { font-size: 16px; color: var(--steel); margin: 0; }
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.prices dt { font-size: 16px; color: var(--steel); }
.prices dd { margin: 0; font-size: 22px; font-weight: 600; }
.per { font-size: 16px; color: var(--steel); margin: 6px 0 14px; }

/* plus and minus around the quantity box */
.stepper { display: flex; gap: 6px; margin-top: 6px; }
.stepper button {
  display: none;
  width: 48px;
  height: 48px;
  flex: none;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font: 600 24px/1 var(--body);
  cursor: pointer;
}
.js .stepper button { display: block; }
.stepper input { text-align: center; margin: 0; }

/* forms */
label { display: block; margin-bottom: 14px; }
label span { color: var(--steel); }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
input[type=text], input[type=tel], input[type=number], select, textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid var(--steel);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: 17px var(--body);
}
html[lang="ur"] select, html[lang="ur"] textarea, html[lang="ur"] input[type=text] {
  font: 17px/1.9 var(--urdu);
  padding-inline: 16px;
}
.fields, .city-form { max-width: 620px; margin-top: 28px; }
.fields .btn, .city-form .btn { width: 100%; }
.choice { display: flex; gap: 10px; align-items: center; }
.choice input { width: 22px; height: 22px; margin: 0; flex: none; }
.form-msg { color: var(--error); font-weight: 600; }
.ok { font-weight: 600; color: var(--green); }
/* the box people never see (see orders/forms.py) */
.hp { position: absolute; inset-inline-start: -9999px; }

/* payment terms */
.terms-grid { display: grid; gap: 40px; }
.terms { padding-inline-start: 22px; margin: 0; max-width: 62ch; }
.terms li { margin-bottom: 10px; }
.abroad { align-self: start; padding: 28px; background: var(--ink); color: #fff; }
.abroad .btn { background: var(--mark); border-color: var(--mark); color: var(--ink); }
.abroad .btn:hover { background: #fff; border-color: #fff; }

/* where we deliver */
.areas { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.areas li { padding: 4px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
#cities h3 { margin-top: 32px; }

/* the order page */
.thanks h2 { margin-top: 36px; }
.track { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.track li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--steel); font-size: 16px; }
.track li.done { border-color: var(--ink); color: var(--ink); }
.track li[aria-current] { background: var(--mark); font-weight: 600; }
.lines { list-style: none; padding: 0; margin: 0; max-width: 620px; }
.lines li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.lines small { color: var(--steel); font-size: 16px; }
.totals { max-width: 620px; margin: 16px 0; }
.totals div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.totals dd { margin: 0; }
.totals .sum { border-top: 2px solid var(--ink); font-weight: 600; }
.pay-details { max-width: 620px; padding: 16px; background: var(--paper); border: 1px solid var(--line); font: 16px/1.7 var(--mono); }
.proofs { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; max-width: 620px; }
.proofs li { border-top: 3px solid var(--ink); padding-top: 12px; }
.proofs img { display: block; max-width: 100%; height: auto; margin-top: 10px; border: 1px solid var(--line); }
.staff { margin: 36px 0; padding: 20px; background: var(--paper); border: 2px dashed var(--steel); font: 17px/1.5 var(--body); }
.staff h2 { margin-top: 0; }
/* Nastaliq has one weight, so Urdu words are not made bold */
html[lang="ur"] .track li[aria-current], html[lang="ur"] .totals .sum dt,
html[lang="ur"] .lines strong, html[lang="ur"] .proofs strong { font-weight: 400; }

/* footer */
.foot { padding: 28px 0 40px; border-top: 1px solid var(--line); font-size: 16px; color: var(--steel); }
.foot p { margin-bottom: 4px; }

/* the bar fixed to the bottom of a phone screen */
.bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.bar .btn { flex: 1; padding-inline: 8px; }
/* the WhatsApp button gets more room, so its Urdu label stays on one line */
.bar .btn.wa { flex: 2; }

/* wider screens */
@media (min-width: 640px) {
  .fields .btn, .city-form .btn { width: auto; }
  .cards { grid-template-columns: 1fr 1fr; }
  .proof-list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 880px) {
  body { padding-bottom: 0; }
  .bar { display: none; }
  .wide-only { display: inline-block; }
  .hero-grid { grid-template-columns: 1.3fr 1fr; }
  .terms-grid { grid-template-columns: 1.4fr 1fr; }
  .proof-list { grid-template-columns: repeat(4, 1fr); }
  .cards { grid-template-columns: repeat(3, 1fr); }
}
