/* DE Fractional — defractional.com
   Plain CSS, no frameworks. System fonts. Accessible contrast. */

:root {
  --bg: #f7f4ee;
  --bg-elevated: #fffcf7;
  --bg-shade: #eee9e0;
  --ink: #1b1d1a;
  --ink-muted: #4f5550;
  --line: #d4cec4;
  --line-strong: #c2bbb0;
  --forest: #123C67;
  --navy: #123C67;
  --navy-hover: #0C335C;
  --navy-soft: #E6ECF3;
  --navy-deep: #0B1F33;
  --gold: #988A69;
  --forest-hover: #0C335C;
  --forest-soft: #E6ECF3;
  --copper: #988A69;
  --focus: #123C67;
  --danger: #7a2e2e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Source Serif Pro", "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, -apple-system, Roboto, Arial, sans-serif;
  --page: 72rem;
  --measure: 42rem;
  --gutter: clamp(1.25rem, 4vw, 2.25rem);
  --radius: 0.35rem;
  --shadow: 0 1px 2px rgba(27, 29, 26, 0.05), 0 8px 24px rgba(27, 29, 26, 0.06);
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--forest);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: rgba(18, 60, 103, 0.45);
}

a:hover {
  color: var(--forest-hover);
  text-decoration-color: var(--forest-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
.nav-toggle:focus-visible + .nav-toggle-label {
  outline: 3px solid var(--forest);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.15rem); margin: 0 0 0.7em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); margin: 1.6em 0 0.55em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 0.4em; }
h4 { font-size: 1.05rem; margin: 1.2em 0 0.35em; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.15em; padding-left: 1.25em; }
li { margin-bottom: 0.4em; }
li::marker { color: var(--copper); }

blockquote {
  margin: 1.5em 0;
  padding: 0 0 0 1.15em;
  border-left: 3px solid var(--copper);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--forest);
  color: #fff;
  padding: 0.5rem 0.85rem;
  z-index: 100;
  text-decoration: none;
  border-radius: var(--radius);
}
.skip:focus { top: 0.6rem; }

.wrap {
  width: min(var(--page), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  padding-block: 0.55rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 1;
  min-width: 0;
  line-height: 0;
}
.wordmark:hover { color: var(--ink); text-decoration: none; }
.wordmark img {
  display: block;
  height: 3rem; /* 48px; within the 44–56px target */
  width: auto;
  max-width: min(16.5rem, 62vw);
  background: transparent;
}

.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

.nav-toggle-label {
  display: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.4rem 0.7rem;
  background: var(--bg-elevated);
  user-select: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--forest); }

.site-nav a[aria-current="page"] {
  color: var(--forest);
  border-bottom-color: var(--copper);
}

/* ---------- Hero / mast ---------- */
.hero {
  padding: clamp(2.5rem, 6vw, 4.75rem) 0 clamp(2.75rem, 6vw, 4.25rem);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 0.85rem;
}

.lead {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.55;
  max-width: 40rem;
  color: var(--ink);
}

.hero .lead { margin-bottom: 1.75rem; }

.mast {
  padding: clamp(2.25rem, 5vw, 3.5rem) 0 2rem;
}
.mast h1 { margin-bottom: 0.55em; }
.mast .lead { margin-bottom: 0; }

/* ---------- Buttons / CTA ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--forest);
  color: #fff;
}
.btn-primary:hover {
  background: var(--forest-hover);
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background: transparent;
  color: var(--forest);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  background: var(--forest-soft);
  color: var(--forest-hover);
  text-decoration: none;
}

.cta-band {
  background: var(--navy-deep);
  color: #f7f4ee;
  padding: clamp(2.25rem, 5vw, 3.25rem) 0;
  margin-top: 0;
}
.cta-band h2,
.cta-band p { color: #f7f4ee; }
.cta-band h2 { margin-top: 0; }
.cta-band p { max-width: 38rem; }
.cta-band a:not(.btn) {
  color: #fff;
  text-decoration-color: rgba(247, 244, 238, 0.55);
}
.cta-band .btn-primary {
  background: var(--bg);
  color: var(--navy);
}
.cta-band .btn-primary:hover {
  background: #fff;
  color: var(--navy-hover);
}
.cta-band .btn-secondary {
  color: #f7f4ee;
  border-color: rgba(247, 244, 238, 0.45);
}
.cta-band .btn-secondary:hover {
  background: rgba(247, 244, 238, 0.1);
  color: #fff;
}

/* ---------- Layout blocks ---------- */
.section {
  padding: clamp(2.25rem, 5vw, 3.75rem) 0;
  border-bottom: 1px solid var(--line);
}
.section:last-of-type { border-bottom: 0; }

.section-head {
  max-width: var(--measure);
  margin-bottom: 1.75rem;
}
.section-head h2 { margin-top: 0; }

.grid-2,
.grid-3 {
  display: grid;
  gap: 1.25rem;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.1rem);
  padding: 1.35rem 1.4rem 1.45rem;
  box-shadow: var(--shadow);
}
.card h2,
.card h3 { margin-top: 0; }
.card .card-kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 0.45rem;
}
.card a.card-link {
  font-weight: 600;
  text-decoration: none;
}
.card a.card-link:hover { text-decoration: underline; }

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3.25rem);
  align-items: start;
}
.split.reverse { grid-template-columns: 0.85fr 1.15fr; }
.split-text { max-width: 40rem; }

.portrait {
  width: 100%;
  max-width: 26rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 0.4rem;
  border: 1px solid var(--line);
  background: var(--bg-shade);
}

.prose {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.72;
  max-width: var(--measure);
}
.prose h2,
.prose h3 { font-family: var(--serif); }
.prose a { font-weight: 500; }

.meta {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink-muted);
  margin: 0 0 1.5rem;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.steps > li {
  position: relative;
  padding: 0 0 1.75rem 3.25rem;
  margin: 0;
  border-left: 1px solid var(--line);
  margin-left: 0.85rem;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: -0.85rem;
  top: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--forest);
  color: #f7f4ee;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps h3 { margin: 0 0 0.35em; font-size: 1.2rem; }

.timeline h3 { margin-top: 0; }
.timeline-item {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.timeline-item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.timeline-when {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 0.4rem;
}

.faq-list { max-width: 46rem; }
.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
}
.faq-list summary {
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.12rem;
  line-height: 1.35;
  list-style: none;
  padding-right: 1.5rem;
  position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--copper);
  font-weight: 600;
  font-family: var(--sans);
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p {
  margin: 0.7rem 0 0.4rem;
  max-width: var(--measure);
}

.contact-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  max-width: 50rem;
}
.contact-item {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}
.contact-item dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 0.35rem;
}
.contact-item dd { margin: 0; font-family: var(--serif); font-size: 1.25rem; }
.contact-item a { text-decoration: none; color: var(--ink); }
.contact-item a:hover { color: var(--forest); text-decoration: underline; }

.article-list { display: grid; gap: 1.15rem; }
.article-teaser {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
}
.article-teaser:last-child { border-bottom: 0; padding-bottom: 0; }
.article-teaser h2,
.article-teaser h3 { margin: 0; font-size: 1.35rem; }
.article-teaser h2 a,
.article-teaser h3 a { text-decoration: none; color: var(--ink); }
.article-teaser h2 a:hover,
.article-teaser h3 a:hover { color: var(--forest); text-decoration: underline; }
.article-teaser p { margin: 0.4rem 0 0; color: var(--ink); max-width: 42rem; }

.crumbs {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}
.crumbs a { color: var(--forest); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; margin: 0; padding: 0; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 0.5rem; color: var(--line-strong); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #d8d4cc;
  padding: 2.5rem 0 2rem;
  margin-top: 0;
  font-size: 0.95rem;
}
.site-footer a { color: #f7f4ee; text-decoration-color: rgba(247, 244, 238, 0.35); }
.site-footer a:hover { text-decoration-color: #f7f4ee; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem 1.5rem;
}
.footer-brand {
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.65rem;
  line-height: 0;
}
.footer-brand img {
  display: block;
  height: 3.25rem; /* 52px */
  width: auto;
  max-width: min(20rem, 100%);
  background: transparent;
}
.site-footer h2 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C4B08A;
  margin: 0 0 0.7rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 0.35rem; }
.legal {
  margin-top: 2rem;
  padding-top: 1.15rem;
  border-top: 1px solid #1A3A55;
  color: #9a9b96;
  font-size: 0.85rem;
}

/* ---------- 404 ---------- */
.page-404 { padding: 4rem 0 5rem; }
.page-404 h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }

@media (min-width: 901px) {
  .split .portrait { position: sticky; top: 5.5rem; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .split,
  .split.reverse { grid-template-columns: 1fr; }
  .portrait { max-width: 20rem; }
  .contact-block { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
  .nav-toggle-label { display: inline-flex; }
  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1rem;
    display: none;
  }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; align-items: stretch; }
  .site-nav a { display: block; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); }
  .header-inner { position: relative; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

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

@media print {
  .site-header, .site-nav, .nav-toggle-label, .cta-band, .site-footer, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after, a[href^="mailto"]::after, a[href^="tel"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    font-family: var(--sans);
  }
  .prose, .wrap { max-width: none; }
}


/* ---------- Review revision: DE Fractional, panels, parallax backgrounds ---------- */

body {
  background: var(--navy-deep);
}

.site-header {
  background: #fffcf7;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 760px) {
  .wordmark img { height: 2.25rem; } /* 36px on small screens */
}

/* Photo bands: content sits on a solid panel; the image shows around it. */
.band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: transparent;
  border-bottom: 0;
  padding: clamp(1.6rem, 4.2vw, 2.85rem) 0;
}

.hero.band {
  padding: clamp(2.1rem, 5.5vw, 3.75rem) 0;
}

.mast.band {
  padding: clamp(1.85rem, 4.6vw, 3rem) 0 clamp(1.6rem, 4vw, 2.4rem);
}

.page-404.band,
article.band {
  padding: clamp(1.85rem, 4.6vw, 3.15rem) 0;
}

.hero,
.section,
.mast,
.page-404 {
  border-bottom: 0;
  background: transparent;
}

.band-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: -50vh;
  height: calc(100% + 100vh);
  z-index: 0;
  pointer-events: none;
}

.band-bg-img {
  position: absolute;
  inset: 0;
  background-color: #0B1F33;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
}

.band-bg-shade {
  position: absolute;
  left: 0;
  right: 0;
  top: 50vh;
  height: 100%;
  height: calc(100% - 100vh);
  top: 50vh;
  background: rgba(11, 31, 51, 0.40);
}

/* The shade should cover only the band's visible area, not the extra
   overflow used for parallax. Position it against the band, not the tall layer. */
.band > .band-bg-shade,
.band-shade {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(11, 31, 51, 0.40);
}

.bg-img-shop-floor { background-image: url("/images/bg/shop-floor.webp"); }
.bg-img-welding { background-image: url("/images/bg/welding.webp"); }
.bg-img-machining { background-image: url("/images/bg/machining.webp"); }
.bg-img-laboratory { background-image: url("/images/bg/laboratory.webp"); }
.bg-img-stainless-tanks { background-image: url("/images/bg/stainless-tanks.webp"); }
.bg-img-rd-lab { background-image: url("/images/bg/rd-lab.webp"); }
.bg-img-circuit-assembly { background-image: url("/images/bg/circuit-assembly.webp"); }
.bg-img-boardroom { background-image: url("/images/bg/boardroom.webp"); }

.wrap.panel {
  position: relative;
  z-index: 1;
  background: #fffcf7;
  border: 1px solid rgba(212, 206, 196, 0.9);
  border-radius: 0.45rem;
  box-shadow: 0 1px 2px rgba(27, 29, 26, 0.06), 0 12px 32px rgba(27, 29, 26, 0.12);
  padding: clamp(1.45rem, 3.4vw, 2.55rem) clamp(1.2rem, 3vw, 2.2rem);
}

.cta-band,
.site-footer {
  position: relative;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .band-bg-img {
    transform: none !important;
    will-change: auto;
  }
}

@media print {
  body { background: #fff !important; }
  .band-bg, .band-shade { display: none !important; }
  .wrap.panel {
    background: #fff !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
  }
}
