/* NetHighTech site styles
   Palette taken from the BAIA book covers and the NetHighTech wordmark. */

:root {
  --navy: #0f2238;
  --navy-2: #173150;
  --ink: #17283a;
  --muted: #55667a;
  --line: #d8dfe6;
  --mist: #f3f6f9;
  --paper: #ffffff;
  --blue: #1f7bbf;
  --blue-dark: #17639b;
  --cyan: #63bbdd;
  --ok: #1d7a4f;
  --err: #b3261e;
  --wrap: 1120px;
  --font: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dark); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 500; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.lead { font-size: 1.15rem; max-width: 62ch; }
.measure { max-width: 68ch; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 24px; }
.wordmark { font-weight: 700; font-size: 1.3rem; letter-spacing: 0.08em; text-decoration: none; color: var(--navy); white-space: nowrap; }
.wordmark span { color: var(--blue); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.98rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--blue); color: var(--navy); }
.nav a.btn { padding: 9px 18px; border-bottom: 0; color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; font: inherit; font-size: 0.95rem; color: var(--navy); cursor: pointer; }

/* ---------- buttons ---------- */
.btn { display: inline-block; font: inherit; font-weight: 500; font-size: 1rem; text-decoration: none; text-align: center; padding: 12px 22px; border-radius: 4px; border: 1px solid var(--blue); background: var(--blue); color: #fff; cursor: pointer; }
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn.secondary { background: transparent; color: var(--blue-dark); }
.btn.secondary:hover { background: var(--mist); color: var(--navy); }
.band .btn.secondary { color: #fff; border-color: rgba(255,255,255,0.5); }
.band .btn.secondary:hover { background: rgba(255,255,255,0.08); color: #fff; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- dark bands (hero, page headers, contact, footer) ---------- */
.band { background: var(--navy); color: #dbe5ee; }
.band h1, .band h2, .band h3 { color: #fff; }
.band a { color: #fff; }
.band .muted { color: #9fb3c6; }

.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero p { font-size: 1.15rem; max-width: 46ch; margin-top: 20px; }
.hero-products { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.hero-products a { display: block; height: 100%; padding: 22px 20px; border: 1px solid rgba(99, 187, 221, 0.55); border-radius: 3px; background: var(--navy-2); text-decoration: none; }
.hero-products a:hover { border-color: #fff; }
.hero-products strong { display: block; font-weight: 500; font-size: 1.1rem; color: #fff; }
.hero-products span { display: block; margin-top: 6px; font-size: 0.92rem; color: #9fb3c6; }

.page-head .wrap { padding-top: 44px; padding-bottom: 44px; }
.page-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); max-width: 26ch; }
.page-head .tagline { font-size: 1.15rem; max-width: 60ch; margin: 14px 0 0; }
.crumbs { font-size: 0.9rem; margin-bottom: 18px; color: #9fb3c6; }
.crumbs a { color: #c9d8e6; }
.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 24px 0 0; padding: 0; }
.facts div { min-width: 140px; }
.facts dt { font-size: 0.85rem; color: #9fb3c6; }
.facts dd { margin: 2px 0 0; color: #fff; font-weight: 500; }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--mist); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; margin-bottom: 32px; }
.section-head p { margin: 10px 0 0; max-width: 62ch; color: var(--muted); }
.section-head .more { font-weight: 500; white-space: nowrap; }

/* product list on the home page */
.product-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); list-style: none; }
.product-list li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.product-list a { display: block; height: 100%; padding: 28px; text-decoration: none; color: inherit; }
.product-list a:hover { background: var(--mist); }
.product-list .kind { font-size: 0.9rem; color: var(--muted); margin: 0 0 6px; }
.product-list h3 { font-size: 1.35rem; font-weight: 500; margin-bottom: 10px; }
.product-list p { margin: 0 0 14px; color: var(--ink); }
.product-list .go { color: var(--blue-dark); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* two-column text + table layouts */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }

/* rows: category list, course list */
.rows { list-style: none; border-top: 1px solid var(--line); }
.rows li { border-bottom: 1px solid var(--line); }
.rows a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; padding: 16px 4px; text-decoration: none; color: inherit; align-items: baseline; }
.rows a:hover { background: rgba(31, 123, 191, 0.06); }
.rows .t { font-weight: 500; color: var(--navy); }
.rows .d { grid-column: 1; color: var(--muted); font-size: 0.95rem; }
.rows .n { grid-row: 1 / span 2; grid-column: 2; color: var(--muted); font-size: 0.95rem; white-space: nowrap; text-align: right; align-self: center; }

/* books */
.book-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; list-style: none; }
.book-row img { border: 1px solid var(--line); width: 100%; max-width: 300px; }
.book-row h3 { margin-top: 18px; font-weight: 500; font-size: 1.2rem; }
.book-row p { margin: 4px 0 12px; color: var(--muted); }
.book-row .links { display: flex; flex-wrap: wrap; gap: 6px 20px; font-weight: 500; }

.book { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; padding: 56px 0; border-bottom: 1px solid var(--line); }
.book:last-child { border-bottom: 0; }
.book img { border: 1px solid var(--line); }
.book .series { color: var(--muted); font-size: 0.95rem; margin: 0 0 6px; }
.book h2 { font-size: 1.9rem; }
.book .subtitle { font-size: 1.15rem; color: var(--blue-dark); margin: 6px 0 4px; }
.book .author { color: var(--muted); margin-bottom: 20px; }

/* how we work */
.principles { display: grid; gap: 22px; margin: 0; }
.principles dt { font-weight: 600; color: var(--navy); }
.principles dd { margin: 4px 0 0; color: var(--muted); }
.steps { list-style: none; counter-reset: step; border-left: 2px solid var(--line); margin-left: 15px; }
.steps li { counter-increment: step; position: relative; padding: 0 0 28px 34px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: counter(step); position: absolute; left: -17px; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; }
.steps h3 { margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); }

/* contact band */
.contact-band .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.contact-band p { margin: 10px 0 0; max-width: 56ch; }

/* ---------- datasheet / document pages ---------- */
.doc { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 56px; padding-top: 48px; padding-bottom: 72px; }
.doc-nav { position: sticky; top: 92px; align-self: start; font-size: 0.95rem; }
.doc-nav ul { list-style: none; border-left: 1px solid var(--line); }
.doc-nav a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.doc-nav a:hover { color: var(--navy); border-left-color: var(--blue); }
.doc-nav .print { margin-top: 20px; padding-left: 16px; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.doc-body > section { padding: 0 0 40px; margin: 0 0 40px; border-bottom: 1px solid var(--line); scroll-margin-top: 92px; }
.doc-body > section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.doc-body h2 { font-size: 1.45rem; margin-bottom: 18px; }
.doc-body p { max-width: 72ch; }

.ticks { list-style: none; display: grid; gap: 10px; }
.ticks.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; }
.ticks li { position: relative; padding-left: 20px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 2px; background: var(--blue); }

.caps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 48px; }
.caps h3 { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.caps .ticks { font-size: 0.97rem; }

.table-scroll { overflow-x: auto; }
table.spec { width: 100%; border-collapse: collapse; font-size: 0.97rem; margin-top: 8px; }
table.spec caption { text-align: left; font-weight: 600; color: var(--navy); padding: 0 0 8px; }
table.spec th, table.spec td { text-align: left; vertical-align: top; padding: 10px 14px; border: 1px solid var(--line); }
table.spec thead th { background: var(--navy); color: #fff; font-weight: 500; border-color: var(--navy); }
table.spec tbody th { font-weight: 500; color: var(--navy); background: var(--mist); width: 28%; }
table.spec + table.spec, .table-scroll + .table-scroll { margin-top: 28px; }

.syllabus { list-style: none; border-top: 1px solid var(--line); }
.syllabus > li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 24px; }
.syllabus .m { color: var(--muted); font-size: 0.95rem; padding-top: 2px; }
.syllabus h3 { font-size: 1.05rem; }
.syllabus p { margin: 4px 0 0; color: var(--muted); }
.syllabus .ticks { margin-top: 10px; font-size: 0.97rem; }

.note { background: var(--mist); border-left: 3px solid var(--blue); padding: 18px 22px; }
.note p:last-child { margin-bottom: 0; }
.aside-book { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 24px; align-items: center; }
.aside-book img { border: 1px solid var(--line); }

.others { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 28px; }

/* training catalogue */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.filters button { font: inherit; font-size: 0.95rem; padding: 7px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); cursor: pointer; }
.filters button:hover { border-color: var(--blue); }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.cat-block { margin-bottom: 48px; scroll-margin-top: 92px; }
.cat-block h2 { margin-bottom: 4px; }
.cat-block > p { color: var(--muted); margin-bottom: 14px; }

/* ---------- contact page ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 64px; padding-top: 56px; padding-bottom: 80px; }
.details { margin: 20px 0 0; }
.details dt { font-size: 0.9rem; color: var(--muted); margin-top: 16px; }
.details dd { margin: 2px 0 0; font-weight: 500; }
form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 500; font-size: 0.95rem; margin-bottom: 6px; color: var(--navy); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid #b9c4cf; border-radius: 4px; padding: 11px 12px; }
.field .hint { margin: 6px 0 0; font-size: 0.85rem; color: var(--muted); }
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(99, 187, 221, 0.5); border-color: var(--blue); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 18px; padding: 14px 18px; border-left: 3px solid var(--ok); background: #eef7f2; color: #14553a; }
.form-status.error { border-left-color: var(--err); background: #fbefee; color: #8a1c16; }
.form-status[hidden] { display: none; }

/* ---------- footer ---------- */
.site-footer { font-size: 0.95rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-top: 56px; padding-bottom: 40px; }
.site-footer h4 { color: #fff; font-weight: 500; margin-bottom: 12px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { color: #c9d8e6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .wordmark { color: #fff; }
.site-footer .wordmark span { color: var(--cyan); }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,0.14); padding-top: 20px; padding-bottom: 28px; color: #9fb3c6; font-size: 0.85rem; }
.site-footer .legal p { margin: 0 0 6px; max-width: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap, .split, .contact-grid, .doc, .book { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero .wrap { padding-top: 48px; padding-bottom: 48px; }
  .doc-nav { display: none; }
  .book img { max-width: 240px; }
  .book-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .contact-band .wrap { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 56px 0; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a.btn { margin-top: 14px; }
  .product-list, .caps, .ticks.two, form .row, .book-row { grid-template-columns: minmax(0, 1fr); }
  .hero-products { gap: 10px; }
  .hero-products a { padding: 16px 14px; }
  form .row { gap: 0; }
  .syllabus > li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .rows a { grid-template-columns: minmax(0, 1fr); }
  .rows .n { grid-row: auto; grid-column: 1; text-align: left; }
  body { font-size: 16px; }
}
@media (max-width: 480px) {
  .site-footer .cols { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- print: a product or course page prints as a clean datasheet ---------- */
@media print {
  .site-header, .site-footer, .doc-nav, .actions, .no-print, .crumbs { display: none !important; }
  body { font-size: 10.5pt; }
  .band { background: #fff !important; color: #000; }
  .band h1, .facts dd { color: #000; }
  .band .muted, .facts dt { color: #444; }
  .page-head .wrap { padding: 0 0 12pt; border-bottom: 2pt solid #0f2238; }
  .doc { display: block; padding: 14pt 0 0; }
  .doc-body > section { padding-bottom: 12pt; margin-bottom: 12pt; }
  .caps > div, table.spec tr, .syllabus > li { break-inside: avoid; }
  table.spec thead th { background: #0f2238 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
  .ticks li::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .wrap { max-width: none; padding-left: 0; padding-right: 0; }
}
