/* ==========================================================================
   idlhost.com — reset, typography, layout primitives
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--idl-body);
  background: var(--idl-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--idl-ink);
  line-height: 1.2;
  margin: 0 0 var(--sp-4);
  font-weight: 600;
  letter-spacing: -0.015em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-xl); }

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--idl-blue);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
a:hover { color: var(--idl-blue-dark); text-decoration: underline; }

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

ul, ol { margin: 0 0 var(--sp-4); padding-left: var(--sp-5); }
li { margin-bottom: var(--sp-2); }

strong, b { font-weight: 600; color: var(--idl-ink); }

hr {
  border: 0;
  border-top: 1px solid var(--idl-line);
  margin: var(--sp-7) 0;
}

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--idl-bg-alt);
  border: 1px solid var(--idl-line);
  border-radius: var(--r-sm);
  padding: 0.1em 0.4em;
}

/* --- Focus: always visible, never removed -------------------------------- */
:focus-visible {
  outline: 2px solid var(--idl-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--idl-blue);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 500;
}
.skip-link:focus {
  left: 0;
  color: #fff;
  text-decoration: none;
}

/* --- Layout -------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--sp-8); }
.section--lg { padding-block: var(--sp-9); }
.section--sm { padding-block: var(--sp-7); }
.section--alt { background: var(--idl-bg-alt); }

.section--dark {
  background: var(--idl-navy);
  color: rgba(255, 255, 255, 0.78);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: #fff; }
.section--dark a { color: #fff; }

/* Dot-grid motif, from the logo */
.dotted { position: relative; isolation: isolate; }
.dotted::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--dot-grid);
  background-size: var(--dot-size);
  z-index: -1;
  pointer-events: none;
}
.dotted--fade::before {
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%);
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
.section--dark.dotted::before { background-image: var(--dot-grid-light); }

/* --- Section headings ---------------------------------------------------- */
.sec-head {
  max-width: 660px;
  margin: 0 auto var(--sp-7);
  text-align: center;
}
.sec-head p {
  font-size: var(--fs-lg);
  margin-bottom: 0;
}
.sec-head--left { margin-inline: 0; text-align: left; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--idl-blue);
  margin-bottom: var(--sp-3);
}
.section--dark .eyebrow { color: var(--idl-orange); }

.lede { font-size: var(--fs-lg); }

/* --- Grids --------------------------------------------------------------- */
.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* --- Utilities ----------------------------------------------------------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mb-6 { margin-bottom: var(--sp-6); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 900px) {
  :root {
    --fs-display: 2.25rem;
    --fs-h1: 2rem;
    --fs-h2: 1.625rem;
  }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .section { padding-block: var(--sp-7); }
  .section--lg { padding-block: var(--sp-8); }
}

@media (max-width: 640px) {
  :root { --fs-display: 1.875rem; --fs-h1: 1.75rem; }
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }
  .wrap { padding-inline: var(--sp-4); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header, .site-footer, .hero__search, .btn { display: none !important; }
  body { color: #000; font-size: 12pt; }
}
