/* Gilson Technologies — site styles. No external fonts, no scripts. */
:root {
  --paper: #ffffff;
  --surface: #f1f3f5;
  --line: #d9dde2;
  --ink: #1d2228;
  --ink-soft: #4a525c;
  --steel: #8e9099;
  --signal: #d41a00;      /* brand red, darkened for contrast on white */
  --signal-ink: #ffffff;
  --code-bg: #1d2228;
  --code-ink: #e9edf1;
  --focus: #0a66d8;

  --font-display: "Bahnschrift", "DIN Alternate", "DIN Next", "D-DIN", "Barlow", "Roboto Condensed", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-code: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --measure: 68ch;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15191d;
    --surface: #1f252b;
    --line: #333b44;
    --ink: #e8ebee;
    --ink-soft: #b3bac2;
    --steel: #9aa0aa;
    --signal: #ff5a3d;
    --signal-ink: #15191d;
    --code-bg: #0e1114;
    --code-ink: #e8ebee;
    --focus: #6aa8ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--signal); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.25rem, 5.5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand svg { width: 2rem; height: 2.3rem; flex: none; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-word b { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; letter-spacing: .04em; color: var(--signal); }
.brand-word small { font-family: var(--font-display); font-size: .6rem; letter-spacing: .42em; color: var(--steel); margin-top: .2rem; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.nav a { text-decoration: none; font-weight: 500; padding: .25rem 0; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"] { border-bottom-color: var(--signal); }
.nav details { display: none; }

@media (max-width: 52rem) {
  .nav > ul { display: none; }
  .nav details { display: block; position: relative; }
  .nav summary { list-style: none; cursor: pointer; font-weight: 600; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 4px; }
  .nav summary::-webkit-details-marker { display: none; }
  .nav details[open] summary { background: var(--surface); }
  .nav details ul { position: absolute; right: 0; top: calc(100% + .5rem); flex-direction: column; gap: 0; min-width: 14rem; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: .5rem 0; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 5; }
  .nav details a { display: block; padding: .6rem 1rem; border: 0; }
  .nav details a[aria-current="page"] { color: var(--signal); }
}

/* ---------- buttons ---------- */
.btn { display: inline-block; font-weight: 600; text-decoration: none; padding: .8rem 1.3rem; border-radius: 4px; border: 2px solid var(--signal); background: var(--signal); color: var(--signal-ink); }
.btn:hover { color: var(--signal-ink); filter: brightness(1.08); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { color: var(--ink); border-color: var(--ink); filter: none; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ---------- home hero ---------- */
.hero { padding: clamp(3rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero h1 {
  font-size: clamp(2.75rem, 9vw, 6.5rem);
  line-height: .95;
  letter-spacing: -.02em;
  max-width: 11ch;
  margin-bottom: .35em;
}
.hero h1::after { content: ""; display: block; width: 4.5rem; height: .45rem; background: var(--signal); margin-top: .35em; }
.hero .lede { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-soft); max-width: 46ch; }

/* ---------- generic sections ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--line); }
.section-head { max-width: var(--measure); margin-bottom: 2rem; }
.section-head p { color: var(--ink-soft); }

/* engagement steps: a real sequence */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; padding-top: 1rem; border-top: 3px solid var(--ink); }
.steps li::before { content: counter(step); font-family: var(--font-display); font-weight: 700; font-size: 2.5rem; line-height: 1; color: var(--signal); display: block; margin-bottom: .5rem; }
.steps p { color: var(--ink-soft); margin: 0; }

/* service groups */
.groups { display: grid; gap: 2.5rem 2rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.groups ul { list-style: none; margin: 0; padding: 0; }
.groups li { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.groups li:last-child { border-bottom: 0; }
.also { margin-top: 2rem; color: var(--ink-soft); }

/* credentials strip */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1.5rem; margin: 0; }
.facts div { border-left: 3px solid var(--signal); padding-left: 1rem; }
.facts dt { color: var(--ink-soft); font-size: .95rem; }
.facts dd { margin: .15rem 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.2; }

/* news list */
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { padding: 1.4rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 9rem 1fr; gap: .25rem 1.5rem; }
.notes li:first-child { padding-top: 0; }
.notes time { color: var(--ink-soft); font-size: .95rem; padding-top: .2rem; }
.notes h3 { margin: 0 0 .3rem; font-size: 1.3rem; }
.notes h3 a { text-decoration: none; }
.notes h3 a:hover { text-decoration: underline; }
.notes p { margin: 0; color: var(--ink-soft); max-width: var(--measure); }
@media (max-width: 40rem) { .notes li { grid-template-columns: 1fr; } }
.year { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--steel); margin: 2.5rem 0 1rem; letter-spacing: .05em; }

/* call to action band */
.cta { background: var(--surface); padding: clamp(2.5rem, 6vw, 4rem) 0; }
.cta .wrap { display: grid; gap: 1.5rem 3rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); align-items: start; }
.cta h2 { margin-bottom: .3em; }
.cta p { color: var(--ink-soft); max-width: 44ch; }
.contact-list { margin: 0; display: grid; gap: 1rem; }
.contact-list dt { color: var(--ink-soft); font-size: .95rem; }
.contact-list dd { margin: 0; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }
.contact-list dd a { text-decoration: none; }
.contact-list dd a:hover { text-decoration: underline; }
.contact-list .note { font-family: var(--font-body); font-size: .9rem; font-weight: 400; color: var(--ink-soft); display: block; margin-top: .15rem; }

/* ---------- interior pages ---------- */
.page-head { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(1.5rem, 4vw, 2.5rem); }
.page-head p { font-size: 1.2rem; color: var(--ink-soft); max-width: 50ch; margin: 0; }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.2em; font-size: 1.75rem; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }
.split { display: grid; gap: 2rem 4rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 60rem) { .split { grid-template-columns: minmax(0, 1fr) 20rem; } }
.aside { border-top: 3px solid var(--ink); padding-top: 1rem; align-self: start; }
.aside h2 { font-size: 1.2rem; margin: 0 0 .75rem; }
.aside ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.aside li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.aside p { color: var(--ink-soft); }

/* ---------- articles ---------- */
.article-head { padding: clamp(2.5rem, 7vw, 4.5rem) 0 1.5rem; max-width: var(--measure); }
.article-head h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
.byline { color: var(--ink-soft); margin: 0; }
.article { max-width: var(--measure); padding-bottom: 2rem; }
.article h2 { font-size: 1.6rem; margin-top: 1.5em; }
.article figure { margin: 1.5rem 0; }
.article img { display: block; border-radius: 4px; border: 1px solid var(--line); }
.article blockquote { margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 3px solid var(--steel); color: var(--ink-soft); }
.article ol, .article ul { padding-left: 1.4rem; }
.article li { margin-bottom: .4em; }
.article audio { width: 100%; max-width: 28rem; margin: .5rem 0; }
code { font-family: var(--font-code); font-size: .9em; background: var(--surface); padding: .1em .35em; border-radius: 3px; overflow-wrap: anywhere; }
pre { font-family: var(--font-code); font-size: .85rem; line-height: 1.55; background: var(--code-bg); color: var(--code-ink); padding: 1rem 1.15rem; border-radius: 4px; overflow-x: auto; margin: 1.25rem 0; tab-size: 4; }
pre code { background: none; padding: 0; font-size: inherit; color: inherit; overflow-wrap: normal; }
.article-foot { max-width: var(--measure); border-top: 1px solid var(--line); padding: 1.5rem 0 3rem; display: grid; gap: 1.5rem; }
.pager { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.pager a { text-decoration: none; display: block; }
.pager span { display: block; color: var(--ink-soft); font-size: .9rem; }
.pager strong { font-weight: 600; }
.pager .next { text-align: right; }
.help { background: var(--surface); padding: 1.25rem 1.4rem; border-radius: 4px; }
.help p { margin: 0; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 2.5rem 0; color: var(--ink-soft); font-size: .95rem; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; padding: 0; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print { .site-head nav, .cta, .help, .pager, .site-foot ul { display: none; } pre { white-space: pre-wrap; } }

/* utilities */
.pad-b { padding-bottom: 4rem; }
.flush { margin: 0; }
.actions.flush { margin-top: 0; }
.mt { margin-top: 2rem; }
