/* Apex Mold Engineering: machined alloy + ink, one hot accent. One family (Archivo); the width axis does the talking. */
:root {
  --alloy: #D3DCE4;
  --alloy-deep: #A9B7C4;
  --ink: #111B2B;
  --ink-soft: #46526A;
  --paper: #FFFFFF;
  --mist: #F2F5F8;
  --line: rgba(17, 27, 43, 0.16);
  --hot: #E8551F;         /* accents, large text, on dark */
  --bad: #B42318;
  --warn: #9A5300;
  --good: #11704F;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --narrow: 62%;
  --semi: 85%;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(2rem, 4vw, 2.75rem);
  --step-4: clamp(3rem, 7.6vw, 5.75rem);

  --space: clamp(4rem, 9vw, 7rem);
  --wrap: 72rem;
  --radius: 6px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; line-height: 1.02; font-weight: 800; font-stretch: var(--narrow); }
p { margin: 0; }
a { color: inherit; text-underline-offset: 0.18em; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow > * { max-width: 46rem; }

.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; border-radius: var(--radius);
}
.skip:focus { top: 1rem; }

/* Header + hero share the alloy field with a faint drafting grid */
.site-header, .hero, .simple {
  background-color: var(--alloy);
  background-image:
    linear-gradient(rgba(17, 27, 43, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 27, 43, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(17, 27, 43, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 27, 43, 0.035) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-attachment: scroll;
}
.site-header { background-position: 0 0; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.wordmark {
  font-weight: 600; font-stretch: var(--narrow); font-size: clamp(1.2rem, 4.2vw, 1.6rem); letter-spacing: 0.005em;
  text-decoration: none; line-height: 1; color: var(--ink-soft);
}
.wordmark span { font-weight: 900; color: var(--ink); }

/* Buttons */
.button {
  display: inline-block;
  font: inherit; font-weight: 700; font-stretch: var(--semi); font-size: var(--step-1);
  color: var(--paper); background: var(--ink);
  padding: 0.85rem 1.4rem; border: 0; border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
}
.button:hover { background: #000; }
.button-small { font-size: var(--step--1); padding: 0.55rem 0.95rem; white-space: nowrap; }
.button:disabled { opacity: 0.6; cursor: progress; }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) var(--space); background-position: 0 -1px; }
.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: 1.1fr 1fr; } }

.hero h1 { font-size: var(--step-4); font-weight: 900; font-stretch: var(--narrow); letter-spacing: -0.005em; max-width: 13ch; }
.hl { box-shadow: inset 0 -0.11em 0 var(--hot); }
.lede { margin-block: 1.5rem 2rem; font-size: var(--step-1); max-width: 34rem; }

/* Review cards: the one memorable thing */
.review { display: grid; gap: 1rem; }
.card {
  margin: 0; background: var(--paper); border-radius: var(--radius);
  padding: 1.15rem 1.25rem 1.2rem;
  box-shadow: 0 1px 0 var(--alloy-deep), 0 18px 40px -22px rgba(17, 27, 43, 0.5);
}
.card figcaption { font-weight: 700; font-stretch: var(--semi); font-size: var(--step--1); margin-bottom: 0.4rem; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li {
  display: grid; grid-template-columns: 6.25rem 1fr auto; align-items: center; gap: 0.75rem;
  padding-block: 0.55rem; border-top: 1px solid var(--line); font-size: 0.98rem;
}
.rows li:first-child { border-top: 0; }
.tag {
  justify-self: start; background: var(--mist); border-radius: 999px; padding: 0.15rem 0.6rem;
  font-weight: 700; font-stretch: var(--semi); font-size: var(--step--1); white-space: nowrap;
}
.bad, .warn { font-weight: 700; font-stretch: var(--semi); text-align: right; }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.muted { color: var(--ink-soft); font-style: italic; }
.fixed li { grid-template-columns: 6.25rem 1fr; }
.fixed li span:last-child::before { content: "\2713"; color: var(--good); font-weight: 900; margin-right: 0.5rem; }
.result { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 2px solid var(--ink); font-size: 1.05rem; }
.result strong { background: rgba(232, 85, 31, 0.16); padding-inline: 0.2rem; margin-inline: -0.2rem; }
@media (min-width: 60rem) { .review .card:first-child { transform: rotate(-1deg); } }
@media (max-width: 30rem) {
  .rows li { grid-template-columns: 1fr auto; }
  .rows li .tag { grid-column: 1 / -1; }
  .fixed li { grid-template-columns: 1fr; }
}

/* Sections */
.section { padding-block: var(--space); }
.section-rule { border-top: 1px solid var(--line); }
.section h2, .contact h2 { font-size: var(--step-3); margin-bottom: 2.25rem; }
.section h3 { font-size: var(--step-2); margin-bottom: 0.6rem; }
.section p { color: var(--ink-soft); max-width: 36rem; }

.pillars { display: grid; gap: 2rem 3rem; }
@media (min-width: 48rem) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillars article { border-top: 4px solid var(--hot); padding-top: 1.1rem; }

.services { display: grid; gap: 1rem; }
@media (min-width: 40rem) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .services { grid-template-columns: repeat(4, 1fr); } }
.services article { background: var(--mist); border-radius: var(--radius); padding: 1.4rem 1.3rem 1.5rem; }
.services h3 { font-size: var(--step-1); font-weight: 800; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem 3rem; counter-reset: step; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font-weight: 900; font-stretch: var(--narrow); font-size: 3.5rem; line-height: 1;
  color: var(--hot); margin-bottom: 0.5rem;
}

/* FAQ */
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font-weight: 700; font-stretch: var(--semi); font-size: var(--step-1);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%);
  font-weight: 400; font-size: 1.75rem; line-height: 1;
}
details[open] summary::after { content: "\2212"; }
details p { padding-bottom: 1.25rem; }

/* Quote */
.contact { background: var(--ink); color: var(--paper); padding-block: var(--space); }
.contact-grid { display: grid; gap: 2.5rem 4rem; }
@media (min-width: 60rem) { .contact-grid { grid-template-columns: 1fr 1.4fr; align-items: start; } }
.contact h2 { color: var(--hot); margin-bottom: 1rem; }
.contact-grid > div > p { font-size: var(--step-1); max-width: 28rem; color: #D5DBE6; }

.form { display: grid; gap: 1.15rem; }
.field-row { display: grid; gap: 1.15rem; }
@media (min-width: 36rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.4rem; align-content: start; }
.field label, .label { font-weight: 600; font-stretch: var(--semi); }
.optional { font-weight: 400; color: #A9B2C4; }
.field input, .field textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 2px solid transparent; border-radius: var(--radius);
  padding: 0.75rem 0.85rem; width: 100%;
}
.field input::placeholder, .field textarea::placeholder { color: #8A94A8; }
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--hot); outline-offset: 2px; }
.field input:user-invalid, .field textarea:user-invalid { border-color: #FF8A7A; }

form:not(.js) .dropzone { display: none; }
.dropzone {
  display: grid; justify-items: center; gap: 0.25rem; text-align: center; cursor: pointer;
  border: 2px dashed rgba(255, 255, 255, 0.35); border-radius: var(--radius);
  padding: 1.5rem 1rem; font-weight: 400;
}
.dropzone span { font-size: var(--step--1); color: #A9B2C4; }
.dropzone:hover, .dropzone.over { border-color: var(--hot); background: rgba(232, 85, 31, 0.08); }
.dropzone:focus-within { outline: 3px solid var(--hot); outline-offset: 2px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li {
  display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.95rem;
}
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--hot); text-decoration: underline; cursor: pointer; }

.contact .button { color: var(--ink); background: var(--hot); justify-self: start; }
.contact .button:hover { background: #FF6C35; }
.contact :focus-visible { outline-color: var(--hot); }
.upload-status:empty { display: none; }
.upload-status { font-weight: 600; }
.upload-status.error { color: #FF9C8C; }
.fineprint { font-size: var(--step--1); color: #A9B2C4; }
.hp { display: none; }

/* Footer */
.site-footer { background: var(--ink); color: #A9B2C4; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.5rem; font-size: var(--step--1); }
.site-footer :focus-visible { outline-color: var(--hot); }

/* Simple pages (thanks, 404) */
.simple { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1.25rem; }
.simple-box { max-width: 34rem; }
.simple h1 { font-size: var(--step-4); font-weight: 900; font-stretch: var(--narrow); margin-bottom: 1rem; }
.simple p { font-size: var(--step-1); margin-bottom: 2rem; }
