/* Layout concept: a charcoal "drawing sheet" hero with an orange dimensioned frame
   section, then light sheet-metal bands; contact footer laid out as a drawing title block. */
:root {
  --paper: #eef1f3;        /* page background, cool steel grey */
  --sheet: #ffffff;        /* raised surfaces: form, cards */
  --ink: #323a41;          /* logo charcoal: text and band */
  --ink-2: #5a646c;        /* secondary text */
  --line: #c6cdd3;         /* rules and borders */
  --safety: #e8641b;       /* safety orange: buttons, dimension lines */
  --safety-ink: #b4480b;   /* orange used as text on light grounds */
  --on-safety: #14181b;    /* text on orange, like hazard signage */
  --band: #323a41;         /* hero and title-block band */
  --on-band: #f1f4f6;
  --on-band-2: #b9c2c9;
  --tbc-bg: #fff1e8;

  --font-display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.65rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4: clamp(2.3rem, 1.5rem + 3.6vw, 4rem);

  --max: 72rem;
  --radius: 4px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171b1f; --sheet: #20262b; --ink: #e3e8eb; --ink-2: #a5afb6;
    --line: #353d44; --safety: #f07a32; --safety-ink: #f39255; --on-safety: #14181b;
    --band: #232a30; --on-band: #f1f4f6; --on-band-2: #a9b3ba; --tbc-bg: #3a2618;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #171b1f; --sheet: #20262b; --ink: #e3e8eb; --ink-2: #a5afb6;
  --line: #353d44; --safety: #f07a32; --safety-ink: #f39255; --on-safety: #14181b;
  --band: #232a30; --on-band: #f1f4f6; --on-band-2: #a9b3ba; --tbc-bg: #3a2618;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(5.5rem + env(safe-area-inset-top, 0px)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--band);
}

img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--safety); color: var(--on-safety); }
input, textarea { caret-color: var(--safety); }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.01em;
  font-stretch: 112%;
}
h2 { font-size: var(--step-3); font-weight: 800; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; text-wrap: pretty; }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--safety); outline-offset: 3px; border-radius: 2px; }
[id] { scroll-margin-top: 5.5rem; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  background: var(--safety); color: var(--on-safety);
  padding: 0.6rem 1rem; font-weight: 600; border-radius: var(--radius);
}
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 0.75rem); }

/* Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.7rem 1.3rem;
  font: 600 var(--step-0)/1.2 var(--font-body);
  text-decoration: none; border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn svg { width: 1.25em; height: 1.25em; flex: none; }
.btn-primary { background: var(--safety); color: var(--on-safety); }
.btn-primary:hover { background: #ff7a2e; }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 12%, transparent); }

/* Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--band); color: var(--on-band);
  border-bottom: 1px solid color-mix(in srgb, var(--on-band) 14%, transparent);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 4.5rem;
}
.brand { display: block; flex: none; }
.brand img { width: 8.5rem; }
.nav { display: flex; gap: 1.5rem; margin-left: auto; }
.nav a {
  text-decoration: none; color: var(--on-band-2); font-weight: 500;
  padding-block: 0.4rem; border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav a:hover, .nav a[aria-current="true"] { color: var(--on-band); border-color: var(--safety); }
.header-cta { min-height: 2.6rem; padding: 0.5rem 1rem; }
@media (max-width: 860px) {
  .nav { display: none; }
  .header-cta { margin-left: auto; }
}
@media (max-width: 400px) {
  .brand img { width: 7rem; }
  .header-cta { font-size: var(--step--1); padding-inline: 0.8rem; }
}

/* Hero --------------------------------------------------------------- */
.hero { background: var(--band); color: var(--on-band); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero h1 { font-size: var(--step-4); font-weight: 800; }
.hero-lede { margin-top: 1.25rem; max-width: 34rem; color: var(--on-band-2); font-size: var(--step-1); line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-actions .btn-ghost { color: var(--on-band); }

.drawing { min-width: 0; }
.drawing svg { width: 100%; height: auto; display: block; }
.drawing figcaption { margin-top: 0.75rem; color: var(--on-band-2); font-size: var(--step--1); }
.dim-text { font: 600 15px var(--font-body); fill: var(--safety); font-variant-numeric: tabular-nums; }
.dim-line { stroke: var(--safety); stroke-width: 1.5; fill: none; }
.dim-ext { stroke: var(--safety); stroke-width: 1; stroke-dasharray: 3 3; fill: none; opacity: 0.8; }
.profile { stroke: var(--on-band); stroke-width: 6; fill: none; stroke-linejoin: miter; stroke-linecap: square; }
.grid-line { stroke: color-mix(in srgb, var(--on-band) 9%, transparent); stroke-width: 1; }

@media (prefers-reduced-motion: no-preference) {
  .profile { stroke-dasharray: 1200; stroke-dashoffset: 0; animation: draw 1.6s ease-out both; }
  @keyframes draw { from { stroke-dashoffset: 1200; } to { stroke-dashoffset: 0; } }
}

@media (max-width: 800px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .drawing { max-width: 30rem; }
}

/* Facts strip -------------------------------------------------------- */
.facts { border-bottom: 1px solid var(--line); background: var(--sheet); }
.facts ul {
  list-style: none; margin-block: 0; padding-block: 1.5rem;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem 2rem;
}
.facts li { display: grid; gap: 0.15rem; min-width: 0; }
.facts strong { font-family: var(--font-display); font-size: var(--step-2); font-weight: 800; font-stretch: 112%; font-variant-numeric: tabular-nums; line-height: 1.2; }
.facts span { color: var(--ink-2); font-size: var(--step--1); }
@media (max-width: 760px) { .facts ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .facts strong { font-size: var(--step-1); } }

/* Sections ----------------------------------------------------------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-head { display: grid; gap: 0.9rem; max-width: 42rem; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-2); font-size: var(--step-1); line-height: 1.5; }

.tbc {
  display: inline-block; padding: 0.05rem 0.45rem;
  background: var(--tbc-bg); color: var(--safety-ink);
  border: 1px dashed var(--safety); border-radius: 3px;
  font-size: 0.85em; font-weight: 600; white-space: nowrap;
}

/* Photos ------------------------------------------------------------- */
.photo {
  aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.supplier-photos img, .factory-grid img, .factory-front img {
  width: 100%; height: auto; object-fit: cover; display: block;
}
.step-dwg svg { width: 100%; height: 100%; display: block; }
.process .photo { margin-bottom: 0.25rem; }
figure { margin: 0; }
figcaption { font-size: var(--step--1); color: var(--ink-2); margin-top: 0.6rem; }

.supplier-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2.5rem; }
.supplier-photos img { aspect-ratio: 3 / 2; border-radius: var(--radius); }
.supplier-photos figcaption { color: var(--on-band-2); }
@media (max-width: 700px) { .supplier-photos { grid-template-columns: minmax(0, 1fr); } }

.factory { background: var(--sheet); border-top: 1px solid var(--line); }
.factory-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem); gap: 2rem 3rem; align-items: end; margin-bottom: 2.5rem; }
.factory-head .section-head { margin-bottom: 0; }
.factory-front img { aspect-ratio: 4 / 3; border-radius: var(--radius); }
.factory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.factory-grid img { aspect-ratio: 4 / 5; border-radius: var(--radius); }
@media (max-width: 900px) { .factory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .factory-head { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .factory-grid { grid-template-columns: minmax(0, 1fr); } .factory-grid img { aspect-ratio: 4 / 3; } }

/* Door types --------------------------------------------------------- */
.door-types { margin-top: 3rem; display: grid; gap: 1rem; }
.door-types ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.door-types li {
  padding: 0.85rem 1rem 0.85rem 0; min-width: 0;
  border-bottom: 1px solid var(--line); font-weight: 500;
}
@media (max-width: 860px) { .door-types ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .door-types ul { grid-template-columns: minmax(0, 1fr); } }

/* Process: cut, bend, weld, paint (a real sequence) ----------------- */
.process {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 3px solid var(--ink);
}
.process li {
  display: grid; align-content: start; gap: 0.75rem;
  padding: 1.5rem 1.5rem 1.75rem 0; min-width: 0;
  border-right: 1px solid var(--line);
}
.process li + li { padding-left: 1.5rem; }
.process li:last-child { border-right: 0; }
.step-no {
  font: 800 var(--step-2)/1 var(--font-display); color: var(--safety-ink);
  font-variant-numeric: tabular-nums;
}
.process p { color: var(--ink-2); }
.specs { margin: 0.25rem 0 0; display: grid; gap: 0.4rem; font-size: var(--step--1); }
.specs div { display: grid; gap: 0.1rem; }
.specs dt { color: var(--ink-2); }
.specs dd { margin: 0; font-weight: 600; }
@media (max-width: 1000px) {
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process li { padding: 1.5rem 1.25rem 1.75rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .process li + li { padding-left: 0; }
  .process li:nth-child(even) { padding-left: 1.25rem; border-left: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .process { grid-template-columns: minmax(0, 1fr); }
  .process li:nth-child(even) { padding-left: 0; border-left: 0; }
}

/* Products ----------------------------------------------------------- */
.products { background: var(--sheet); border-block: 1px solid var(--line); }
.product-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.product { display: grid; gap: 0.9rem; align-content: start; min-width: 0; }
.product p { color: var(--ink-2); }
.photo-slot {
  aspect-ratio: 4 / 3; max-width: 100%;
  display: grid; place-items: center; text-align: center; padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink-2); font-size: var(--step--1);
}
.photo-slot span { background: var(--paper); padding: 0.2rem 0.5rem; border-radius: 3px; }
.product-dwg {
  aspect-ratio: 4 / 3; max-width: 100%;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.product-dwg svg { width: 100%; height: 100%; display: block; }
.grid-light { stroke: var(--line); stroke-width: 0.75; opacity: 0.7; }
.pd-line { stroke: var(--ink); stroke-width: 3; fill: none; stroke-linejoin: miter; }
.pd-thin { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.pd-fill { fill: var(--ink); }
.product-dwg .dim-text { fill: var(--safety-ink); font-size: 12px; }
@media (max-width: 860px) { .product-list { grid-template-columns: minmax(0, 1fr); max-width: 32rem; } }

/* Customers ---------------------------------------------------------- */
.customers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.customer {
  display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 1rem;
  padding: 1.75rem 1.5rem 1.75rem 0; border-bottom: 1px solid var(--line); min-width: 0;
}
.customer + .customer { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.customer svg { width: 2.25rem; height: 2.25rem; color: var(--safety-ink); }
.customer h3 { margin-bottom: 0.4rem; }
.customer p { color: var(--ink-2); }
@media (max-width: 760px) {
  .customers { grid-template-columns: minmax(0, 1fr); }
  .customer + .customer { padding-left: 0; border-left: 0; }
}

/* Door suppliers --------------------------------------------------- */
.supplier { background: var(--band); color: var(--on-band); }
.supplier .section-head p { color: var(--on-band-2); }
.supplier-points {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 3px solid var(--safety);
}
.supplier-points li {
  display: grid; align-content: start; gap: 0.5rem; min-width: 0;
  padding: 1.5rem 1.5rem 0.5rem 0;
}
.supplier-points li + li { padding-left: 1.5rem; border-left: 1px solid color-mix(in srgb, var(--on-band) 22%, transparent); }
.supplier-points p { color: var(--on-band-2); }
@media (max-width: 900px) {
  .supplier-points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supplier-points li, .supplier-points li + li { padding: 1.25rem 1.25rem 1.25rem 0; border-left: 0; border-bottom: 1px solid color-mix(in srgb, var(--on-band) 22%, transparent); }
  .supplier-points li:nth-child(even) { padding-left: 1.25rem; border-left: 1px solid color-mix(in srgb, var(--on-band) 22%, transparent); }
}
@media (max-width: 520px) {
  .supplier-points { grid-template-columns: minmax(0, 1fr); }
  .supplier-points li:nth-child(even) { padding-left: 0; border-left: 0; }
}
.supplier .tbc { background: transparent; color: var(--safety); }

/* Projects ----------------------------------------------------------- */
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.projects-grid figure { margin: 0; display: grid; gap: 0.6rem; min-width: 0; }
.projects-grid figcaption { font-size: var(--step--1); color: var(--ink-2); }
@media (max-width: 760px) { .projects-grid { grid-template-columns: minmax(0, 1fr); max-width: 32rem; } }

/* Quote form --------------------------------------------------------- */
.quote { background: var(--sheet); border-top: 1px solid var(--line); }
.quote .wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); }
.quote-aside { display: grid; gap: 1.25rem; align-content: start; }
.quote-aside p { color: var(--ink-2); }
.direct { display: grid; gap: 1rem; margin: 0.5rem 0 0; }
.direct div { display: grid; gap: 0.1rem; }
.direct dt { font-size: var(--step--1); color: var(--ink-2); }
.direct dd { margin: 0; font-weight: 600; font-size: var(--step-1); font-variant-numeric: tabular-nums; }
.direct a { text-decoration-color: var(--safety); text-underline-offset: 0.2em; }
.direct a:hover { color: var(--safety-ink); }

form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.25rem; }
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
label, legend { font-weight: 600; font-size: var(--step--1); }
.optional { font-weight: 400; color: var(--ink-2); }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.7rem 0.8rem; min-height: 3rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 7.5rem; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--safety); box-shadow: 0 0 0 3px color-mix(in srgb, var(--safety) 35%, transparent);
}
input[type="file"] { padding: 0.55rem; cursor: pointer; }
.hint { font-size: var(--step--1); color: var(--ink-2); }
.hint a { color: var(--ink); text-decoration-color: var(--safety); text-underline-offset: 0.2em; font-weight: 600; }
.error { font-size: var(--step--1); color: var(--safety-ink); font-weight: 600; }
[aria-invalid="true"] { border-color: var(--safety); }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-status { grid-column: 1 / -1; padding: 0.9rem 1rem; border: 1px solid var(--safety); border-radius: var(--radius); background: var(--tbc-bg); }
.form-status:empty { display: none; }
@media (max-width: 860px) { .quote .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { form { grid-template-columns: minmax(0, 1fr); } }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacy { grid-column: 1 / -1; font-size: var(--step--1); color: var(--ink-2); }

/* Footer: drawing title block --------------------------------------- */
.site-footer { background: var(--band); color: var(--on-band); padding-block: 3rem calc(2.5rem + env(safe-area-inset-bottom, 0px)); }
.title-block {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr;
  border: 2px solid var(--on-band);
}
.title-block > div {
  padding: 0.75rem 1rem; min-width: 0; overflow-wrap: anywhere;
  border-right: 1px solid color-mix(in srgb, var(--on-band) 45%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--on-band) 45%, transparent);
}
.title-block .tb-logo { grid-row: span 2; display: grid; align-content: center; }
.title-block .tb-logo img { width: 10rem; }
.title-block .tb-wide { grid-column: span 3; }
.title-block .tb-last { border-right: 0; }
.title-block .tb-bottom { border-bottom: 0; }
.tb-label { display: block; font-size: 0.8125rem; color: var(--on-band-2); letter-spacing: 0.02em; }
.tb-value { font-weight: 500; font-variant-numeric: tabular-nums; }
.tb-value a { text-decoration-color: var(--safety); text-underline-offset: 0.2em; }
.footer-note { margin-top: 1.25rem; color: var(--on-band-2); font-size: var(--step--1); }
@media (max-width: 760px) {
  .title-block { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .title-block .tb-logo { grid-row: auto; grid-column: 1 / -1; }
  .title-block .tb-wide { grid-column: 1 / -1; }
  .title-block > div { border-right: 0; }
  .title-block > div:nth-child(odd):not(.tb-logo):not(.tb-wide) { border-right: 1px solid color-mix(in srgb, var(--on-band) 45%, transparent); }
}

/* Floating WhatsApp -------------------------------------------------- */
.wa-float {
  position: fixed; z-index: 25;
  right: calc(1rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; color: #0b2e17;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, opacity 0.2s ease;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float.is-away { opacity: 0; transform: translateY(1rem); pointer-events: none; visibility: hidden; transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s; }
.wa-float svg { width: 1.8rem; height: 1.8rem; }
@media (prefers-reduced-motion: reduce) { .wa-float { transition: none; } .wa-float:hover { transform: none; } }
