/* Denim Colourchem website concept, v3.
   Direction: the colour is the page. Everything is printed in indigo ink, as a dye house would print in its own dye.
   One family (Archivo) used at two widths: extra-condensed for specimen codes, normal for reading. */

:root {
  --ink: #1F2A78;          /* indigo ink: all text and rules */
  --deep: #10164A;         /* deep indigo: dark grounds */
  --turmeric: #E5671B;     /* actions and focus only */
  --paper: #FFFFFF;
  --wash: #ECEEF7;         /* indigo diluted in water */
  --ink-soft: #4A5390;     /* secondary text on white, AA on paper */
  --rule: #C9CDE4;
  --dye: #F6D40C;          /* current hero dye, set by script */
  --on-dye: #1F2A78;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  --cond: "Archivo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif; font-size: 17px; line-height: 1.55;
  font-variation-settings: "wdth" 100; font-feature-settings: "tnum" 1;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--turmeric); }
:focus-visible { outline: 3px solid var(--turmeric); outline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* type */
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; line-height: 1.05; }
h2 { font-size: clamp(32px, 4.4vw, 58px); font-variation-settings: "wdth" 80; max-width: 18ch; }
h3 { font-size: 21px; line-height: 1.25; }
p { margin: 0; max-width: 62ch; }
.lead { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.45; }
.quiet { color: var(--ink-soft); }
.small { font-size: 14px; line-height: 1.5; }
.code { font-variation-settings: "wdth" 62; font-weight: 700; letter-spacing: 0; }
.tbc { text-decoration: underline dotted var(--turmeric) 2px; text-underline-offset: 4px; cursor: help; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px;
  font: 600 16px/1 "Archivo", sans-serif; text-decoration: none; border-radius: 999px;
  background: var(--ink); color: #fff; border: 2px solid var(--ink); cursor: pointer;
}
.btn:hover { background: var(--deep); border-color: var(--deep); }
.btn.line { background: transparent; color: inherit; border-color: currentColor; }
.btn.line:hover { background: rgba(255,255,255,.15); }
.btn.hot { background: var(--turmeric); border-color: var(--turmeric); color: #fff; }

/* concept bar */
.concept { background: var(--deep); color: #DADDF0; font-size: 13px; }
.concept .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.concept a { color: #fff; }

/* header: sits on the dye, turns to paper when scrolled */
.top {
  position: sticky; top: 0; z-index: 30; color: var(--on-dye); background: var(--dye);
  transition: background-color .5s ease, color .5s ease;
}
.top.scrolled { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--rule); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 84px; }
.top .logo img { height: 46px; width: auto; display: none; }
.top .logo .stacked.k { display: block; }
.top.dark:not(.scrolled) .logo .stacked.k { display: none; }
.top.dark:not(.scrolled) .logo .stacked.w { display: block; }
.top nav { margin-left: auto; display: flex; gap: 26px; font-size: 16px; }
.top nav a { text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
.top .lang { font-family: "Noto Kufi Arabic", sans-serif; font-size: 15px; background: none; border: 0; color: inherit; cursor: pointer; padding: 6px; }
.top .btn { min-height: 44px; }
.top:not(.scrolled) .btn { background: var(--on-dye); border-color: var(--on-dye); color: var(--dye); }

/* hero: one dye fills the screen */
.hero { position: relative; background: var(--dye); color: var(--on-dye); overflow: hidden; transition: color .5s ease; }
.hero .flood { position: absolute; inset: 0; pointer-events: none; clip-path: circle(0 at 50% 50%); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px 48px; min-height: min(86vh, 860px); padding-top: 40px; padding-bottom: 32px; }
.hero h1 { font-size: clamp(40px, 5.6vw, 84px); font-variation-settings: "wdth" 78; max-width: 11ch; grid-column: 1; align-self: start; }
.hero .intro { grid-column: 1; max-width: 40ch; align-self: start; margin-top: -8px; }
.specimen {
  grid-column: 1 / -1; grid-row: 3; font-variation-settings: "wdth" 62; font-weight: 700;
  font-size: clamp(120px, 31vw, 480px); line-height: .74; letter-spacing: -0.02em; margin: 0 0 -0.08em -0.04em;
  align-self: end; white-space: nowrap;
}
.label {
  grid-column: 2; grid-row: 1; align-self: start; justify-self: end; width: min(100%, 400px);
  border-top: 3px solid currentColor; padding-top: 14px;
}
.label .name { font-size: clamp(28px, 2.6vw, 38px); font-weight: 700; font-variation-settings: "wdth" 80; line-height: 1.05; }
.label .range { margin-top: 4px; font-size: 16px; }
.label dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 18px 0 20px; font-size: 16px; }
.label dt { opacity: .78; }
.label dd { margin: 0; font-weight: 600; }
.label .more { font-weight: 600; }
.drops { grid-column: 2; grid-row: 2; justify-self: end; width: min(100%, 400px); display: flex; flex-wrap: wrap; align-content: start; gap: 10px 12px; padding-top: 14px; border-top: 1px solid currentColor; }
.drops .hint { flex-basis: 100%; }
.drops .hint { font-size: 14px; margin-right: 8px; }
.drop {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid currentColor; padding: 0; cursor: pointer;
  background: var(--c); box-shadow: inset 0 0 0 3px var(--dye); transition: transform .15s ease;
}
.drop:hover { transform: scale(1.12); }
.drop[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--dye), 0 0 0 3px currentColor; }

/* sections */
section { padding: clamp(72px, 9vw, 128px) 0; }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 40px 64px; align-items: start; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--ink); }
.facts div { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.facts div:nth-child(odd) { padding-right: 24px; }
.facts dt { font-size: 15px; color: var(--ink-soft); }
.facts dd { margin: 2px 0 0; font-size: 26px; font-weight: 700; font-variation-settings: "wdth" 80; line-height: 1.15; }

/* the range as one shade card */
.range-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; }
.finder { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.finder input {
  font: inherit; font-size: 16px; height: 44px; width: 260px; padding: 0 14px; color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper);
}
.chip { font: 500 15px "Archivo", sans-serif; height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.card {
  display: flex; height: 340px; gap: 2px; padding: 0; margin: 0; list-style: none; overflow-x: auto;
  scrollbar-width: thin;
}
.card li { flex: 1 0 28px; min-width: 28px; transition: flex-grow .35s ease, opacity .3s ease; position: relative; }
.card li button {
  all: unset; box-sizing: border-box; display: block; width: 100%; height: 100%; background: var(--c); cursor: pointer;
}
.card li button:focus-visible { outline: 3px solid var(--turmeric); outline-offset: 2px; }
.card li .tag {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 10px; color: var(--t); opacity: 0;
  font-size: 13px; line-height: 1.25; pointer-events: none; transition: opacity .2s ease;
}
.card li .tag b { display: block; font-size: 30px; font-variation-settings: "wdth" 62; line-height: 1; margin-bottom: 4px; }
.card li:hover, .card li.on, .card li:focus-within { flex-grow: 7; }
.card li:hover .tag, .card li.on .tag, .card li:focus-within .tag { opacity: 1; }
.card li.dim { opacity: .14; }
.ranges { display: flex; gap: 2px; margin-top: 10px; }
.ranges div { border-top: 2px solid var(--ink); padding-top: 10px; font-size: 15px; line-height: 1.35; min-width: 0; }
.ranges b { display: block; font-size: 17px; }
.more-ranges { margin-top: 28px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.more-ranges p { padding: 14px 0; border-top: 1px solid var(--rule); max-width: none; }
.card-note { margin-top: 18px; }

/* specification sheet */
.sheet-band { background: var(--wash); }
.sheet-band .split { grid-template-columns: 4fr 8fr; }
.sheet { background: var(--paper); border: 1px solid var(--rule); box-shadow: 0 24px 60px -30px rgba(16,22,74,.45); }
.sheet header { display: grid; grid-template-columns: 120px 1fr auto; align-items: stretch; border-bottom: 2px solid var(--ink); }
.sheet .chipc { background: #F6D40C; }
.sheet header div { padding: 18px 22px; }
.sheet header .t { font-size: 30px; font-weight: 700; font-variation-settings: "wdth" 80; line-height: 1.05; }
.sheet header .doc { text-align: right; font-size: 14px; color: var(--ink-soft); }
.sheet table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.sheet th, .sheet td { text-align: left; padding: 11px 22px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.sheet th { width: 34%; font-weight: 500; color: var(--ink-soft); }
.sheet td { font-weight: 600; }
.sheet .grp th { color: var(--ink); font-weight: 700; padding-top: 20px; border-bottom: 1px solid var(--ink); }
.sheet footer { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 16px 22px; font-size: 14px; }
.sheet-copy p + p { margin-top: 16px; }
.sheet-copy .btn { margin-top: 28px; }

/* market matrix */
.matrix { width: 100%; border-collapse: collapse; margin-top: 40px; font-size: 15.5px; }
.matrix th, .matrix td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
.matrix thead th { border-bottom: 2px solid var(--ink); font-weight: 700; }
.matrix thead th.gcc { background: var(--wash); }
.matrix td.gcc { background: var(--wash); }
.matrix tbody th { font-weight: 600; white-space: nowrap; }
.matrix tbody th span { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 10px; vertical-align: -1px; background: var(--c); }
.mark { display: inline-block; width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--ink); margin-right: 8px; vertical-align: -2px; }
.mark.ok { background: var(--ink); }
.mark.warn { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.mark.bad { border-color: var(--turmeric); background: transparent; }
.mark.tbv { border-style: dotted; border-color: var(--ink-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-top: 18px; font-size: 14px; }
.scroll-x { overflow-x: auto; }

/* batch label */
.batch .split { grid-template-columns: 5fr 7fr; }
.drum {
  background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; padding: 0; font-size: 15px;
  max-width: 620px; justify-self: end; width: 100%;
}
.drum .row { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--ink); }
.drum .row > div { padding: 12px 18px; }
.drum .row > div + div { border-left: 1px solid var(--ink); }
.drum .k { font-size: 13px; color: var(--ink-soft); display: block; }
.drum .v { font-weight: 700; font-size: 18px; }
.drum .big { font-size: 44px; font-variation-settings: "wdth" 62; line-height: 1; }
.drum .tests div { padding: 12px 18px; }
.drum .tests table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.drum .tests td { padding: 6px 0; border-bottom: 1px dotted var(--rule); }
.drum .tests td:last-child { text-align: right; font-weight: 600; }
.drum .stamp { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--ink); font-size: 13px; }
.instruments { margin-top: 28px; display: grid; gap: 18px; }
.instruments div { border-left: 3px solid var(--turmeric); padding-left: 16px; }

/* who */
.who { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 44px; }
.who div { border-top: 2px solid var(--ink); padding-top: 16px; }
.who ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; font-size: 16px; }

/* plant */
.plant { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: stretch; margin-top: 44px; }
.ph {
  min-height: 360px; display: flex; align-items: end; padding: 18px; font-size: 14px; color: var(--ink);
  background: repeating-linear-gradient(135deg, var(--wash) 0 14px, #fff 14px 28px); border: 1px solid var(--rule);
}
.packs { width: 100%; border-collapse: collapse; }
.packs th, .packs td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.packs th { font-weight: 500; color: var(--ink-soft); }
.packs td { font-weight: 600; text-align: right; }

/* gulfood */
.gulf { background: var(--deep); color: #fff; }
.gulf .split { grid-template-columns: 7fr 5fr; align-items: end; }
.gulf .stand { font-variation-settings: "wdth" 62; font-weight: 700; font-size: clamp(110px, 19vw, 280px); line-height: .8; letter-spacing: -0.02em; }
.gulf .stand small { display: block; font-size: 22px; font-variation-settings: "wdth" 100; letter-spacing: 0; font-weight: 600; margin-bottom: 18px; color: #C9CDE4; }
.gulf dl { margin: 0 0 28px; display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; }
.gulf dt { color: #C9CDE4; }
.gulf dd { margin: 0; font-weight: 600; }
.gulf .ar { margin-top: 28px; font-family: "Noto Kufi Arabic", sans-serif; font-size: 16px; line-height: 1.8; color: #DADDF0; }

/* form: a requisition slip */
.slip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
.slip .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; padding: 14px 0 8px; border-bottom: 1.5px solid var(--ink); }
.field label, .field legend { font-size: 14px; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: 600 18px "Archivo", sans-serif; color: var(--ink); background: transparent; border: 0; padding: 6px 0 2px; outline-offset: 6px;
}
.field textarea { min-height: 70px; resize: vertical; }
fieldset.field { border: 0; border-bottom: 1.5px solid var(--ink); margin: 0; padding: 14px 0 12px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.opts label { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink); border: 1.5px solid var(--rule); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.opts input { accent-color: var(--ink); }
.send { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.done { display: none; margin-top: 20px; padding: 18px; border: 2px solid var(--ink); }
.done.show { display: block; }

/* footer */
.foot { background: var(--deep); color: #DADDF0; padding: 56px 0 40px; font-size: 15px; }
.foot .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot img { height: 44px; width: auto; margin-bottom: 18px; }
.foot a { color: #fff; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; align-content: start; }

/* product page */
.p-hero { background: var(--dye); color: var(--on-dye); }
.p-hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; padding-top: 28px; padding-bottom: 0; }
.crumbs { grid-column: 1 / -1; font-size: 15px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.p-hero h1 { font-size: clamp(44px, 6vw, 88px); font-variation-settings: "wdth" 78; }
.p-hero .sub { font-size: 19px; margin-top: 8px; }
.p-hero .specimen { grid-row: auto; font-size: clamp(120px, 22vw, 320px); margin-top: 20px; }
.strengths { display: flex; gap: 8px; align-self: end; justify-self: end; width: min(100%, 440px); background: var(--paper); padding: 10px; grid-row: span 2; }
.strengths div { flex: 1; height: 230px; display: flex; align-items: end; padding: 10px; font-size: 13px; color: var(--ink); border-radius: 0 0 40px 40px; }
.p-hero .wrap > div:first-of-type { align-self: start; }
.ptabs { position: sticky; top: 84px; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); }
.ptabs .wrap { display: flex; gap: 24px; overflow-x: auto; height: 56px; align-items: center; font-size: 15px; white-space: nowrap; }
.ptabs a { text-decoration: none; }
.ptabs .btn { margin-left: auto; min-height: 40px; }
.pgrid { display: grid; grid-template-columns: 8fr 4fr; gap: 64px; }
.pgrid section { padding: 56px 0 0; }
.pgrid h2 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 20px; }
.kv { width: 100%; border-collapse: collapse; font-size: 16px; }
.kv th, .kv td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.kv th { width: 38%; font-weight: 500; color: var(--ink-soft); padding-right: 16px; }
.kv td { font-weight: 600; }
.kv .codev { font-size: 22px; font-variation-settings: "wdth" 62; font-weight: 700; }
.rating { display: inline-flex; gap: 3px; margin-right: 10px; vertical-align: -1px; }
.rating i { width: 18px; height: 8px; border: 1.5px solid var(--ink); }
.rating i.f { background: var(--ink); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.two div { border-top: 2px solid var(--ink); padding-top: 14px; }
.aside { position: sticky; top: 160px; align-self: start; margin-top: 56px; border: 2px solid var(--ink); padding: 22px; }
.aside .btn { width: 100%; justify-content: center; margin-top: 12px; }
.docs { list-style: none; padding: 0; margin: 0; }
.docs li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
details { border-bottom: 1px solid var(--rule); padding: 16px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 18px; }
details p { margin-top: 10px; }
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 8px; }
.related a { display: block; height: 150px; padding: 14px; text-decoration: none; background: var(--c); color: var(--t); }
.related b { display: block; font-size: 34px; font-variation-settings: "wdth" 62; line-height: 1; }
.mbar { display: none; }

[dir="rtl"] { font-family: "Noto Kufi Arabic", "Archivo", sans-serif; }

@media (max-width: 960px) {
  .top nav { display: none; }
  .top .logo .stacked.k, .top.dark:not(.scrolled) .logo .stacked.w { display: none; }
  .top .logo .compact { height: 34px; }
  .top .logo .compact.k { display: block; }
  .top.dark:not(.scrolled) .logo .compact.k { display: none; }
  .top.dark:not(.scrolled) .logo .compact.w { display: block; }
  .top .btn .long { display: none; }
  .top .wrap { height: 68px; gap: 12px; }
  .top .btn { margin-left: auto; padding: 0 16px; min-height: 40px; font-size: 15px; }
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; }
  .label { grid-column: 1; grid-row: auto; justify-self: start; width: 100%; }
  .specimen { grid-row: auto; font-size: 34vw; }
  .drops { grid-column: 1; grid-row: auto; justify-self: stretch; width: 100%; }
  .split, .sheet-band .split, .batch .split, .gulf .split, .plant, .pgrid { grid-template-columns: 1fr; }
  .who { grid-template-columns: 1fr 1fr; }
  .more-ranges { grid-template-columns: 1fr; }
  .card { height: 260px; }
  .ranges { display: none; }
  .drum { justify-self: stretch; }
  .slip { grid-template-columns: 1fr; }
  .foot .wrap { grid-template-columns: 1fr; }
  .p-hero .wrap { grid-template-columns: 1fr; }
  .strengths { justify-self: stretch; width: 100%; grid-row: auto; }
  .strengths div { height: 120px; }
  .ptabs { top: 68px; }
  .ptabs .btn { display: none; }
  .aside { position: static; }
  .two, .related { grid-template-columns: 1fr; }
  .sheet header { grid-template-columns: 70px 1fr; }
  .sheet header .doc { display: none; }
  .mbar { display: flex; position: sticky; bottom: 0; gap: 8px; padding: 10px 16px; background: var(--paper); border-top: 1px solid var(--rule); z-index: 20; }
  .mbar .btn { flex: 1; justify-content: center; min-height: 46px; }
}
@media (max-width: 560px) {
  .who { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts div:nth-child(odd) { padding-right: 0; }
  .concept .wrap { flex-direction: column; gap: 2px; }
  .finder input { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.top .btn .short { display: none; }
@media (max-width: 960px) { .top .btn .short { display: inline; } }

/* social links in the footer */
.foot .social { list-style: none; padding: 0; margin: 22px 0 0; display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); color: #fff; }
.social a:hover { border-color: var(--turmeric); background: rgba(255,255,255,.06); }
.social svg { width: 20px; height: 20px; fill: currentColor; }

/* phones: put the colour buttons before the specimen details so the colour change is found on the first screen */
@media (max-width: 960px) {
  .hero h1 { order: 1; } .hero .intro { order: 2; } .hero .drops { order: 3; border-top: 0; padding-top: 4px; }
  .hero .label { order: 4; } .hero .specimen { order: 5; }
  .hero .wrap { padding-top: 28px; gap: 20px; }
}
