/* techwriters.eu preview
   Palette carried over from the live site: W3.CSS teal (#009688) darkened to
   #00695c / #004d40 so that text and bands clear WCAG AA on white.
   One radius (--radius) for every corner on the page. */

:root {
  --ink: #14201f;
  --ink-2: #4c5c5a;
  --teal: #00695c;
  --teal-deep: #004d40;
  --teal-light: #9fd6cd;
  --paper: #ffffff;
  --paper-2: #eff3f2;
  --rule: #d5dedc;
  --radius: 2px;

  --s1: 0.25rem; --s2: 0.5rem;  --s3: 0.75rem; --s4: 1rem;
  --s5: 1.5rem; --s6: 2rem;     --s7: 3rem;    --s8: 4.5rem;

  --t--1: 0.875rem;
  --t-0: 1.0625rem;
  --t-1: 1.1875rem;
  --t-2: 1.375rem;
  --t-3: clamp(1.5rem, 1.15rem + 1.5vw, 2.05rem);
  --t-4: clamp(1.7rem, 1.05rem + 3.2vw, 3.1rem);

  --measure: 62ch;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: var(--t-0)/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--s3); font-weight: 650; }
h1 { font-size: var(--t-4); letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: var(--t-3); letter-spacing: -0.01em; }
h3 { font-size: var(--t-2); margin-top: var(--s6); }
p { margin: 0 0 var(--s4); max-width: var(--measure); text-wrap: pretty; }

a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: var(--radius);
}
.band :focus-visible, .site-foot :focus-visible { outline-color: var(--teal-light); }

.skip {
  position: absolute; left: var(--s4); top: -4rem;
  background: var(--teal-deep); color: #fff; padding: var(--s3) var(--s4);
  border-radius: var(--radius); z-index: 2; text-decoration: none;
}
.skip:focus { top: var(--s2); }

.wrap { max-width: 72rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

/* Header: plain, opaque, not fixed. Nothing overlays the content. */
.site-head { border-bottom: 1px solid var(--rule); background: var(--paper); }
.head-row {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--s2);
  padding-block: var(--s2);
}
.brand {
  display: inline-flex; align-items: center; gap: var(--s2);
  color: var(--ink); text-decoration: none;
  font-size: var(--t-1); font-weight: 650;
  min-height: 44px;
}
.brand .dot { color: var(--teal); }
.navlist { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); list-style: none; margin: 0; padding: 0; }
.navlist a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding-inline: var(--s2);
  color: var(--ink-2); text-decoration: none; font-size: var(--t--1);
}
.navlist a:hover { color: var(--teal); text-decoration: underline; text-underline-offset: 4px; }

/* Bands */
.band { background: var(--teal-deep); color: #fff; }
.band a { color: var(--teal-light); }
.band h1, .band h2 { color: #fff; }
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.hero h1 { max-width: 20ch; }
.lead { font-size: var(--t-1); max-width: 56ch; }
.hero-meta { font-size: var(--t--1); color: var(--teal-light); margin-bottom: 0; }
.hero-meta a { color: var(--teal-light); display: inline-block; padding-block: 0.7rem; }

.band-2 { padding-block: clamp(2rem, 5vw, 3.5rem); }
.band-2 h2 { margin-bottom: 0; }

/* Sections: deliberately different rhythms, not one padding for all */
.sec-services { padding-block: var(--s8) var(--s7); }
.sec-work     { padding-block: var(--s7); }
.sec-knowledge{ padding-block: var(--s7) var(--s8); background: var(--paper-2); border-block: 1px solid var(--rule); }
.sec-about    { padding-block: var(--s8) var(--s7); }

.cols { display: grid; gap: var(--s5); }
@media (min-width: 60em) {
  .cols { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: var(--s7); }
  .col-head h2 { margin-top: var(--s1); }
}
.col-head h2 { border-left: 3px solid var(--teal); padding-left: var(--s3); }
.col-body > h3:first-child { margin-top: 0; }
.note { color: var(--ink-2); font-size: var(--t--1); }

/* Lists */
ul.ticks { list-style: none; margin: 0 0 var(--s4); padding: 0; }
ul.ticks li { position: relative; padding-left: var(--s5); margin-bottom: var(--s2); max-width: var(--measure); }
ul.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.72em;
  width: 0.6rem; height: 2px; background: var(--teal);
}
@media (min-width: 45em) {
  ul.two-up { columns: 2; column-gap: var(--s6); }
  ul.two-up li { break-inside: avoid; }
}

ul.linklist { list-style: none; margin: 0 0 var(--s4); padding: 0; }
ul.linklist li {
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--rule);
  max-width: var(--measure);
}
ul.linklist a {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3); width: 100%; min-height: 44px; font-weight: 650;
}
ul.linklist a::after {
  content: "\203A"; font-size: 1.5em; line-height: 1; opacity: 0.5;
  text-decoration: none; flex: none;
}
ul.linklist span { display: block; color: var(--ink-2); font-size: var(--t--1); }

ol.articles { list-style: none; margin: 0 0 var(--s6); padding: 0; counter-reset: art; }
ol.articles > li { padding-block: var(--s4); border-top: 1px solid var(--rule); }
ol.articles > li:last-child { border-bottom: 1px solid var(--rule); }
ol.articles h3 { margin: 0 0 var(--s1); font-size: var(--t-1); }
ol.articles h3 a { display: inline-flex; align-items: center; min-height: 44px; }
.when { font-size: var(--t--1); color: var(--ink-2); margin-bottom: var(--s2); }

/* Images */
.strip img { width: 100%; height: clamp(8rem, 26vw, 15rem); object-fit: cover; }
.strip { margin: 0; }
figure.inset { margin: var(--s6) 0 0; max-width: 34rem; }
figure.inset img { border-radius: var(--radius); aspect-ratio: 3 / 2; object-fit: cover; }
figcaption { font-size: var(--t--1); color: var(--ink-2); padding-top: var(--s2); }
.portrait { width: 100%; max-width: 15rem; border-radius: var(--radius); margin-top: var(--s4); }

.lead-2 { font-size: var(--t-1); }
.cta {
  display: inline-block; min-height: 44px; padding: var(--s3) var(--s5);
  background: var(--teal-deep); color: #fff; border-radius: var(--radius);
  text-decoration: none; font-weight: 650;
}
.cta:hover { background: var(--teal); text-decoration: underline; }

dl.contact { margin: 0; }
dl.contact dt { font-size: var(--t--1); color: var(--teal-light); }
dl.contact dd { margin: 0; font-size: var(--t-1); border-bottom: 1px solid rgba(255,255,255,0.22); }
dl.contact dt { padding-top: var(--s3); }
dl.contact a { display: flex; align-items: center; width: 100%; min-height: 56px; }

.site-foot { border-top: 1px solid var(--rule); padding-top: var(--s5); }
.site-foot p { font-size: var(--t--1); color: var(--ink-2); margin-bottom: var(--s3); }

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


/* ─────────────────────────────────────────────────────────────────────
   Mobile pass 2026-09-26. Phones get their own nav, section rhythm and
   image treatment; the >=60em layout above is untouched.
   ───────────────────────────────────────────────────────────────────── */

/* Nav: one row that fits. Five anchors share the width below the brand,
   with a scroll fallback for anything narrower than about 330px. */
@media (max-width: 47.99em) {
  .head-row { padding-block: var(--s1); gap: 0; }
  .brand { font-size: var(--t-0); padding-block: var(--s1); }
  .navlist {
    width: 100%;
    flex-wrap: nowrap;
    gap: 0;
    justify-content: space-between;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    border-top: 1px solid var(--rule);
  }
  .navlist::-webkit-scrollbar { display: none; }
  .navlist li { flex: 1 1 auto; display: flex; }
  .navlist a {
    width: 100%;
    justify-content: center;
    white-space: nowrap;
    font-size: 0.75rem;
    padding-inline: var(--s1);
    min-height: 48px;
    border-bottom: 2px solid transparent;
  }
  .navlist a:hover, .navlist a:focus-visible { border-bottom-color: var(--teal); }
}

/* Section rhythm: the label sits on a full-width rule instead of a 3px
   left border, and the 4pt scale tightens by two steps. */
@media (max-width: 59.99em) {
  .col-head h2 { border-left: 0; padding-left: 0; }
  .sec .col-head {
    border-top: 2px solid var(--teal);
    padding-top: var(--s3);
  }
  .sec .col-head .note { margin-bottom: 0; }
  .cols { gap: var(--s5); }

  .sec-services  { padding-block: var(--s6) var(--s5); }
  .sec-work      { padding-block: var(--s6) var(--s5); }
  .sec-knowledge { padding-block: var(--s6); }
  .sec-about     { padding-block: var(--s6) var(--s5); }
  .band-2        { padding-block: var(--s6); }

  h3 { margin-top: var(--s5); font-size: var(--t-1); }
}

/* Lists: tighter leading so an eight-item list is a block, not a screen. */
@media (max-width: 47.99em) {
  ul.ticks li { line-height: 1.45; margin-bottom: var(--s3); }
  ul.ticks li::before { top: 0.6em; }
  ol.articles > li { padding-block: var(--s3); }
  ol.articles h3 { margin-top: 0; }
  ul.linklist span { line-height: 1.45; }
}

/* Images: on a phone the portrait leads the About text at full column
   width instead of leaving a column of white beside it. On a tablet the
   column is wide enough that a full-bleed portrait would dominate, so it
   keeps a cap there. */
@media (max-width: 47.99em) {
  .portrait {
    width: 100%;
    max-width: none;
    margin-top: var(--s4);
  }
  figure.inset { margin-top: var(--s5); }
}
@media (min-width: 48em) and (max-width: 59.99em) {
  .portrait { max-width: 18rem; margin-top: var(--s4); }
}
