/* Bert van den Heever QS Inc — site styles
   Palette: drawing paper, slate ink, plan-line blue, tape-measure yellow */
:root {
  --paper: #f5f6f4;
  --white: #ffffff;
  --ink: #1c2a20;
  --ink-soft: #4d5a50;
  --line: #0f4a1e;      /* logo green */
  --tape: #993333;      /* logo maroon */
  --rule: #d5dad8;
  --head: "Archivo", "Arial Narrow", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--line); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid #c8a24a; outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--head);
  font-stretch: 87.5%;
  line-height: 1.12;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: 66ch; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--white); padding: .5rem 1rem; z-index: 10; }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 5;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .8rem; font-family: var(--head); font-stretch: 87.5%; text-decoration: none; color: var(--ink); line-height: 1.15; }
.brand strong { display: block; font-size: 1.15rem; font-weight: 700; }
.brand span { font-size: .85rem; color: var(--ink-soft); }
.nav { display: flex; align-items: center; gap: 1.2rem; white-space: nowrap; font-family: var(--head); font-size: .98rem; }
.nav a { color: var(--ink); text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--tape); }
.nav .lang { border: 1px solid var(--ink); padding: .25rem .6rem; border-radius: 3px; }
.nav .lang:hover { background: var(--ink); color: var(--white); }
.menu-btn { display: none; background: none; border: 1px solid var(--ink); border-radius: 3px; font: 600 .95rem var(--head); padding: .45rem .8rem; color: var(--ink); cursor: pointer; }

@media (max-width: 1140px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--white); flex-direction: column; align-items: flex-start; padding: 1rem 1.5rem 1.5rem; border-bottom: 1px solid var(--rule); gap: .6rem; }
  .nav.open { display: flex; }
}

/* Hero: the plan comparison is the signature element */
.hero { padding: 4.5rem 0 4rem; background: var(--white); border-bottom: 1px solid var(--rule); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3rem; align-items: center; }
.hero .lede { font-size: 1.25rem; color: var(--ink-soft); }
.hero .since { font-family: var(--head); color: var(--ink-soft); font-size: 1rem; margin-bottom: 1rem; }
.btn {
  display: inline-block; font: 600 1rem var(--head); text-decoration: none;
  background: var(--ink); color: var(--white); padding: .8rem 1.3rem; border-radius: 3px; margin: .5rem .75rem 0 0;
}
.btn:hover { background: var(--line); color: var(--white); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--white); }

.plan-figure { margin: 0; }
.plan-figure figcaption { font-size: .98rem; color: var(--ink-soft); margin-top: .8rem; max-width: 52ch; }
.plan-figure .plan { fill: rgba(15,74,30,.07); stroke: var(--line); stroke-width: 2; }
.plan-figure .dim { stroke: var(--tape); stroke-width: 2; }
.plan-figure .dim-text { font: 600 15px var(--head); fill: var(--ink); }
.plan-figure .note { font: 14px var(--head); fill: var(--ink-soft); }
.plan-figure .grid { stroke: #e7eae9; stroke-width: 1; }

@media (max-width: 880px) {
  .hero { padding: 3rem 0; }
  .hero .wrap { grid-template-columns: 1fr; gap: 2rem; }
}

/* Sections */
.section { padding: 4.5rem 0; border-bottom: 1px solid var(--rule); }
.section.alt { background: var(--white); }
.section-intro { max-width: 62ch; margin-bottom: 2.5rem; }
.section-intro p { color: var(--ink-soft); }

/* Services follow the stages of a project */
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 3rem; }
.stages li { padding: 1.4rem 0 1.4rem 1.2rem; border-left: 3px solid var(--rule); margin-bottom: 1rem; }
.stages li:hover { border-left-color: var(--tape); }
.stages h3 { margin-bottom: .3rem; }
.stages p { margin: 0; color: var(--ink-soft); font-size: 1.05rem; }
.stage-no { font-family: var(--head); font-size: .9rem; color: var(--line); display: block; margin-bottom: .2rem; }

/* Feature band linking to Design and building cost */
.feature { background: #043304; color: #e6efe7; padding: 4.5rem 0; }
.feature h2 { color: var(--white); }
.feature .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: start; }
.feature ul { margin: 0; padding-left: 1.2rem; }
.feature li { margin-bottom: .5rem; }
.feature .btn { background: var(--tape); color: var(--white); }
.feature .btn:hover { background: var(--white); color: var(--ink); }
@media (max-width: 880px) { .feature .wrap { grid-template-columns: 1fr; gap: 1.5rem; } }

/* Projects as a schedule */
.schedule { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.schedule th { font: 600 .95rem var(--head); text-align: left; color: var(--ink-soft); border-bottom: 2px solid var(--ink); padding: .6rem .8rem .6rem 0; }
.schedule td { border-bottom: 1px solid var(--rule); padding: .9rem .8rem .9rem 0; vertical-align: top; }
.schedule td:first-child { font-family: var(--head); white-space: nowrap; color: var(--line); width: 7.5rem; }
.schedule .detail { display: block; color: var(--ink-soft); font-size: .98rem; }
@media (max-width: 640px) {
  .schedule thead { display: none; }
  .schedule tr { display: block; border-bottom: 1px solid var(--rule); padding: .8rem 0; }
  .schedule td { display: block; border: 0; padding: .1rem 0; width: auto; }
}

/* Team */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; }
.person { display: grid; grid-template-columns: 96px 1fr; gap: 1.4rem; align-items: start; }
.monogram {
  width: 96px; height: 96px; border: 2px solid var(--line); border-radius: 50%;
  display: grid; place-items: center; font: 700 1.6rem var(--head); color: var(--line); background: var(--white);
}
.person h3 { margin-bottom: .1rem; }
.person .role { font-family: var(--head); color: var(--ink-soft); font-size: .98rem; margin-bottom: .8rem; }
.person p { font-size: 1.05rem; }

/* Insights */
.press { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.press li { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.press .src { display: block; color: var(--ink-soft); font-size: .98rem; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contact dl { margin: 0; }
.contact dt { font: 600 .95rem var(--head); color: var(--ink-soft); margin-top: 1rem; }
.contact dd { margin: 0; font-size: 1.2rem; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { padding: 2rem 0; font-family: var(--head); font-size: .92rem; color: var(--ink-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

/* Article page: Design and building cost */
.article-head { background: var(--white); padding: 4rem 0 3rem; border-bottom: 1px solid var(--rule); }
.article-head .lede { font-size: 1.25rem; color: var(--ink-soft); max-width: 60ch; }
.article { display: grid; grid-template-columns: 220px 1fr; gap: 3rem; padding: 3.5rem 1.5rem 4rem; }
.toc { position: sticky; top: 96px; align-self: start; font-family: var(--head); font-size: .95rem; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.toc a { display: block; padding: .3rem 0 .3rem .9rem; text-decoration: none; color: var(--ink-soft); }
.toc a:hover { color: var(--ink); }
.article-body { max-width: 70ch; }
.article-body h2 { margin-top: 2.6rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 1.8rem; }
.article-body h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.article-body ul { padding-left: 1.2rem; }
.article-body li { margin-bottom: .4rem; }
.callout { background: var(--white); border-left: 4px solid var(--tape); padding: 1.2rem 1.4rem; margin: 1.5rem 0; }
.callout p:last-child { margin-bottom: 0; }
.small { font-size: .95rem; color: var(--ink-soft); }
@media (max-width: 880px) {
  .article { grid-template-columns: 1fr; gap: 1.5rem; }
  .toc { position: static; }
}

/* Wall-to-floor calculator */
.calc { background: var(--white); border: 1px solid var(--rule); padding: 1.5rem; margin: 1.5rem 0; }
.calc-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.calc label { display: block; font: 600 .92rem var(--head); color: var(--ink-soft); margin-bottom: .3rem; }
.calc input { width: 100%; font: 1.1rem var(--head); padding: .55rem .6rem; border: 1px solid #aab4b9; border-radius: 3px; background: var(--paper); color: var(--ink); }
.calc-out { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem 1.5rem; margin: 0; }
.calc-out dt { font: .92rem var(--head); color: var(--ink-soft); }
.calc-out dd { margin: 0 0 .4rem; font: 600 1.35rem var(--head); }
.calc-compare { margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 1.05rem; }
@media (max-width: 560px) { .calc-inputs, .calc-out { grid-template-columns: 1fr; } }

.brand img { height: 56px; width: auto; }
.brand-text strong { display: block; color: var(--ink); white-space: nowrap; font-size: 1.15rem; font-weight: 700; }
.brand-text span { font-size: .85rem; color: var(--ink-soft); }
@media (max-width: 400px) { .brand img { height: 44px; } .brand-text strong { font-size: 1rem; } }

/* Articles */
.articles { list-style: none; margin: 0; padding: 0; max-width: 780px; }
.articles li { padding: 1.3rem 0; border-bottom: 1px solid var(--rule); }
.articles h3 { margin: 0 0 .25rem; font-size: 1.2rem; }
.articles h3 a { color: var(--ink); text-decoration: none; }
.articles h3 a:hover { color: var(--line); text-decoration: underline; }
.articles .meta { display: block; font-family: var(--head); font-size: .92rem; color: var(--ink-soft); margin-bottom: .35rem; }
.articles p { margin: 0; font-size: 1.05rem; color: var(--ink-soft); }
.more { margin-top: 1.8rem; }

/* Contact buttons */
.contact-buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.contact-buttons .btn { margin: 0; }
.contact-logo { width: 180px; justify-self: end; }
@media (max-width: 760px) { .contact-logo { justify-self: start; width: 140px; } }

/* Single article pages (articles/*.html) */
.article-single { padding: 3rem 1.5rem 4rem; }
.article-meta { font-family: var(--head); color: var(--ink-soft); margin: 0; }
.article-body img { max-width: 100%; height: auto; margin: 1.2rem 0; }
.article-body h3 { margin-top: 1.8rem; }
.article-body blockquote { margin: 1.5rem 0; padding: .2rem 0 .2rem 1.2rem; border-left: 3px solid var(--rule); color: var(--ink-soft); }
.article-body table { border-collapse: collapse; width: 100%; margin: 1.5rem 0; font-size: 1rem; display: block; overflow-x: auto; }
.article-body th, .article-body td { border: 1px solid var(--rule); padding: .5rem .7rem; text-align: left; vertical-align: top; }
.article-body .video { position: relative; padding-top: 56.25%; margin: 1.5rem 0; }
.article-body .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
