/* شط مصراتة للصناعات الحديدية: a fabricator's shop drawing.
   Blueprint sheet for the hero, drafting paper for the rest, the title block as footer. */

:root {
  --print: #053C86;        /* blueprint ground, brand blue taken one step deeper */
  --brand: #00479F;        /* sampled from the letterhead */
  --line: #EEF4FF;         /* members on the blueprint */
  --dim: #9CC7FF;          /* dimension lines and labels */
  --arc: #FF9A3C;          /* weld spark; used only by the drawing */
  --paper: #EEF1F5;
  --sheet: #FFFFFF;
  --ink: #1D232C;
  --steel: #545E6A;
  --rule: #C9D1DB;
  --mill: #1E242C;         /* dark band */

  --display: "Changa", "Readex Pro", "Segoe UI", Tahoma, sans-serif;
  --body: "Readex Pro", "Segoe UI", Tahoma, sans-serif;
  --mono: "JetBrains Mono", "Readex Pro", ui-monospace, monospace;

  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 40px);
  --r: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.85 var(--body);
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); line-height: 1.25; margin: 0; }
p { margin: 0; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.hero :focus-visible, .works :focus-visible { outline-color: #FFFFFF; }

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: #fff; padding: 8px 16px; border-radius: var(--r);
}
.skip:focus { top: 12px; }

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

/* weld seam: the divider between parts */
.seam, .head::after {
  display: block; height: 7px; content: "";
  background: radial-gradient(circle at 50% 100%, #9AA4B0 2.6px, transparent 3.1px) repeat-x;
  background-size: 7px 7px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border: 0; border-radius: var(--r); cursor: pointer;
  font: 600 1rem/1.3 var(--body); text-decoration: none; text-align: center;
  transition: background-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn .ico { width: 20px; height: 20px; flex: none; }
.btn--wa { background: var(--brand); color: #fff; }
.btn--wa:hover { background: var(--print); }
.btn--sheet { background: #fff; color: var(--print); width: 100%; font-weight: 700; }
.btn--sheet:hover { background: var(--dim); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.top__in {
  max-width: var(--wrap); margin: 0 auto; padding: 10px var(--gut);
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand__tile img { width: 64px; height: auto; }
.brand__name { display: grid; line-height: 1.1; }
.brand__name b { font: 800 1.55rem/1.1 var(--display); }
.brand__name small { font: 600 .92rem/1.3 var(--display); color: var(--brand); }
.nav { display: flex; gap: 22px; margin-inline-start: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--brand); color: var(--brand); }
.top__wa { min-height: 42px; padding: 8px 16px; }

@media (max-width: 900px) {
  .nav { display: none; }
  .top__wa { margin-inline-start: auto; }
}
@media (max-width: 420px) {
  .brand__tile img { width: 50px; }
  .brand__name b { font-size: 1.3rem; }
  .top__wa-label { display: none; }
  .top__wa { padding: 8px 12px; }
}

/* ---------- hero: the blueprint sheet ---------- */
.hero {
  background-color: var(--print);
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: center top;
  color: #fff;
  padding: clamp(14px, 2.4vw, 28px) var(--gut) clamp(20px, 3vw, 36px);
}
.sheet {
  max-width: calc(var(--wrap) + 40px); margin: 0 auto; position: relative;
  border: 1px solid rgba(255,255,255,.45);
  outline: 1px solid rgba(255,255,255,.18); outline-offset: 6px;
  padding: clamp(20px, 3.4vw, 44px) clamp(16px, 3.4vw, 44px) 0;
}
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 5.4fr) minmax(0, 6.6fr);
  gap: clamp(16px, 3vw, 40px); align-items: center;
}
.eyebrow { color: var(--dim); font-weight: 500; font-size: .98rem; margin-bottom: 14px; }
.hero h1 {
  font-weight: 800; font-size: clamp(2.4rem, 4.6vw, 4rem); line-height: 1.15;
}
.hero h1 span { color: var(--dim); }
.lead { margin-top: 18px; font-size: 1.05rem; font-weight: 300; color: #DCE8FA; max-width: 34em; }

.frame { margin: 0; position: relative; }
.frame canvas {
  display: block; width: 100%; aspect-ratio: 16 / 10; cursor: grab; touch-action: pan-y;
}
.frame canvas:active { cursor: grabbing; }
.frame__hint {
  position: absolute; inset-inline-end: 4px; bottom: 2px;
  font-size: .82rem; color: var(--dim); opacity: .85; pointer-events: none;
}

/* title block = the configurator */
.tblock {
  margin: clamp(18px, 2.4vw, 28px) calc(-1 * clamp(16px, 3.4vw, 44px)) 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr) minmax(0, .9fr);
  border-top: 1px solid rgba(255,255,255,.45);
}
.tblock__cell {
  margin: 0; min-width: 0; padding: 14px 18px 16px;
  border: 0; border-inline-start: 1px solid rgba(255,255,255,.3);
}
.tblock__cell:first-child { border-inline-start: 0; }
.tblock label, .tblock legend, .tblock dt { font-size: .84rem; color: var(--dim); padding: 0; }
/* a floated legend stops the fieldset from drawing its rule around the legend's middle */
.tblock legend { float: right; width: 100%; }
.tblock .chips { clear: both; }
.tblock__cell--range { display: grid; grid-template-columns: 1fr auto; align-items: baseline; row-gap: 6px; }
.tblock__cell--range output { font: 600 1.45rem/1 var(--mono); }
.tblock__cell--range input { grid-column: 1 / -1; }
.tblock__cell--read, .tblock__cell--send { grid-row: 2; }
.tblock__cell--use { grid-column: 4; grid-row: 1; }
.tblock__cell--clad { grid-column: 5; grid-row: 1; }
.tblock__cell--read {
  grid-column: 1 / 4; display: flex; gap: clamp(18px, 4vw, 48px); align-items: baseline;
  border-top: 1px solid rgba(255,255,255,.3); border-inline-start: 0;
}
.tblock__cell--read div { display: flex; gap: 10px; align-items: baseline; }
.tblock__cell--read dd { margin: 0; font: 600 1.15rem/1.2 var(--mono); }
.tblock__cell--send {
  grid-column: 4 / 6; border-top: 1px solid rgba(255,255,255,.3);
  display: flex; gap: 14px; align-items: center;
}
.tblock__cell--send .btn { width: auto; flex: none; }
.tblock__cell--send p { font-size: .84rem; color: var(--dim); line-height: 1.5; }

/* steel-plate slider */
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0;
  background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 2px; background: rgba(255,255,255,.55);
}
input[type="range"]::-moz-range-track { height: 2px; background: rgba(255,255,255,.55); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 24px; margin-top: -11px;
  background: #fff; border: 2px solid var(--print); border-radius: 2px;
  box-shadow: 0 0 0 1px #fff;
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 20px; background: #fff; border: 2px solid var(--print); border-radius: 2px;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span {
  display: inline-block; padding: 5px 12px; border: 1px solid rgba(255,255,255,.55); border-radius: 2px;
  font-size: .9rem; color: #fff; white-space: nowrap; transition: background-color .15s, color .15s;
}
.chips input:checked + span { background: #fff; color: var(--print); border-color: #fff; font-weight: 600; }
.chips input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }
.chips label:hover span { border-color: #fff; }

@media (max-width: 1080px) {
  .tblock { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tblock__cell--use { grid-column: 1 / 3; grid-row: 2; border-top: 1px solid rgba(255,255,255,.3); border-inline-start: 0; }
  .tblock__cell--clad { grid-column: 3; grid-row: 2; border-top: 1px solid rgba(255,255,255,.3); }
  .tblock__cell--read { grid-column: 1 / -1; grid-row: 3; }
  .tblock__cell--send { grid-column: 1 / -1; grid-row: 4; }
}
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .frame canvas { aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
  .tblock { grid-template-columns: 1fr; }
  .tblock__cell { border-inline-start: 0; border-top: 1px solid rgba(255,255,255,.3); }
  .tblock__cell:first-child { border-top: 0; }
  .tblock__cell--use, .tblock__cell--clad, .tblock__cell--read, .tblock__cell--send { grid-column: 1; grid-row: auto; }
  .tblock__cell--read { flex-wrap: wrap; row-gap: 4px; }
  .tblock__cell--send { flex-direction: column; align-items: stretch; }
  .tblock__cell--send .btn { width: 100%; }
}

/* ---------- section heads ---------- */
.head { max-width: 46rem; margin-bottom: clamp(26px, 4vw, 44px); }
.head h2 { font-weight: 800; font-size: clamp(2rem, 4vw, 3.1rem); }
.head p { margin-top: 10px; color: var(--steel); font-size: 1.05rem; }
.head::after { width: 140px; margin-top: 18px; }

/* ---------- catalog ---------- */
.make { padding-block: clamp(56px, 8vw, 104px); }
.cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: clamp(14px, 2vw, 22px);
}
.card {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 0 0 22px; overflow: hidden;
}
.draw { display: block; width: 100%; aspect-ratio: 4 / 3; }
.card .draw {
  background-color: #F7F9FB;
  background-image:
    linear-gradient(rgba(0,71,159,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,71,159,.06) 1px, transparent 1px);
  background-size: 20px 20px; background-position: center;
  border-bottom: 1px solid var(--rule);
}
.card h3 { font-weight: 700; font-size: 1.32rem; padding: 18px 22px 4px; }
.card p { padding: 0 22px; color: var(--steel); font-size: .98rem; line-height: 1.75; }

/* ---------- workshop band ---------- */
.works { background: var(--mill); color: #fff; padding-block: clamp(56px, 8vw, 96px); }
.works__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.works h2 { font-weight: 800; font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.works__copy > p { margin-top: 14px; color: #C3CBD5; font-weight: 300; font-size: 1.05rem; }
.skills {
  list-style: none; margin: 26px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px;
}
.skills li {
  font: 600 1.18rem/1.4 var(--display); padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
.draw--dark { aspect-ratio: 5 / 4; }
@media (max-width: 860px) {
  .works__grid { grid-template-columns: 1fr; }
  .draw--dark { max-width: 520px; margin-inline: auto; }
}

/* ---------- steps ---------- */
.steps { padding-block: clamp(56px, 8vw, 96px); border-top: 1px solid var(--rule); }
.steps__list {
  list-style: none; margin: 0; padding: 0; counter-reset: s;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 2.6vw, 34px);
}
.steps__list li { counter-increment: s; position: relative; padding-top: 70px; }
.steps__list li::before {
  content: counter(s); position: absolute; top: 0; inset-inline-start: 0;
  font: 800 3.4rem/1 var(--display); color: transparent; -webkit-text-stroke: 1.5px var(--brand);
}
.steps__list li::after {
  content: ""; position: absolute; top: 28px; inset-inline-start: 52px; inset-inline-end: -18px;
  border-top: 1px dashed var(--rule);
}
.steps__list li:last-child::after { display: none; }
.steps h3 { font-weight: 700; font-size: 1.3rem; }
.steps p { margin-top: 6px; color: var(--steel); font-size: .98rem; line-height: 1.75; }
@media (max-width: 900px) {
  .steps__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps__list li::after { display: none; }
}
@media (max-width: 480px) { .steps__list { grid-template-columns: 1fr; } }

/* ---------- order ---------- */
.order { padding-block: clamp(56px, 8vw, 96px); background: var(--sheet); border-top: 1px solid var(--rule); }
.order__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.req h2 { font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); }
.req__intro { color: var(--steel); margin: 8px 0 26px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span { font-weight: 500; font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem/1.6 var(--body); color: var(--ink);
  background: var(--paper); border: 1px solid #7A8593; border-radius: var(--r); padding: 11px 14px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); background: #fff; outline: 2px solid var(--brand); outline-offset: 1px; }
.field ::placeholder { color: #5F6874; opacity: 1; }
.field [aria-invalid="true"] { border-color: #A3221B; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.attach {
  display: flex; gap: 10px; align-items: center; margin: -4px 0 18px;
  padding: 10px 14px; border: 1px dashed var(--brand); border-radius: var(--r); background: #F2F6FC;
  font-size: .95rem; cursor: pointer;
}
.attach input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.attach bdi { font-weight: 600; font-variant-numeric: tabular-nums; }
.req__err { color: #A3221B; font-weight: 500; margin-bottom: 12px; }
.req__actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 6px; }
.req__mail { font-weight: 500; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; gap: 0; } .req__actions .btn { width: 100%; } }

.reach { border: 1px solid var(--rule); border-radius: var(--r); background: var(--paper); padding: 24px 26px; }
.reach h3 { font-weight: 700; font-size: 1.35rem; }
.reach dl { margin: 12px 0 0; }
.reach dl div { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.reach dl div:last-child { border-bottom: 0; }
.reach dt { font-size: .86rem; color: var(--steel); }
.reach dd { margin: 0; font-weight: 600; font-size: 1.08rem; }
.reach a { text-decoration: none; }
.reach a[dir="ltr"] { unicode-bidi: isolate; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
@media (max-width: 860px) { .order__grid { grid-template-columns: 1fr; } }

/* ---------- footer: the drawing's title block ---------- */
.foot { background: var(--paper); padding-top: clamp(36px, 5vw, 56px); border-top: 1px solid var(--rule); }
.tb {
  display: grid; grid-template-columns: 170px repeat(4, minmax(0, 1fr));
  border: 2px solid var(--ink); background: var(--sheet); overflow: hidden;
}
/* every cell rules its end and bottom edge; the -1px margins push the outer ones under the frame */
.tb > * { border-inline-end: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-inline-end: -1px; margin-bottom: -1px; }
.tb__mark { grid-row: span 2; display: grid; place-items: center; padding: 14px; border-inline-end-color: var(--ink); }
.tb__mark img { width: 130px; }
.tb__cell { padding: 10px 14px; display: grid; align-content: start; gap: 2px; min-width: 0; }
.tb__cell span { font-size: .78rem; color: var(--steel); }
.tb__cell b { font-weight: 600; font-size: .98rem; line-height: 1.5; }
.tb__cell b a { color: var(--ink); text-decoration: none; }
.tb__cell b a[dir="ltr"] { unicode-bidi: isolate; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tb__cell--name, .tb__cell--wide { grid-column: span 2; }
.tb__cell--name b { font: 700 1.2rem/1.35 var(--display); }
.tb__cell--name em { font-style: normal; font-size: .9rem; color: var(--brand); font-weight: 500; }
.foot__bar { background: var(--mill); color: #C3CBD5; margin-top: clamp(28px, 4vw, 44px); }
.foot__bar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 14px; }
.foot__copy { font-size: .85rem; }
.nivo-credit { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.nivo-credit__label { font-size: 11px; font-weight: 500; }
.nivo-credit__label bdi { font: inherit; }
.nivo-credit a { display: inline-flex; }
.nivo-credit img { width: 27px; height: 27px; object-fit: contain; }
.nivo-credit a:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
@media (max-width: 960px) {
  .tb { grid-template-columns: 130px repeat(2, minmax(0, 1fr)); }
  .tb__mark { grid-row: span 4; }
  .tb__cell--wide { grid-column: span 2; }
  .tb__mark img { width: 100px; }
}
@media (max-width: 560px) {
  .tb { grid-template-columns: 1fr 1fr; }
  .tb__mark { grid-column: 1 / -1; grid-row: auto; border-inline-end-color: var(--rule); border-bottom-color: var(--ink); }
  .tb__cell--name, .tb__cell--wide { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
