/* EngineerIT — editorial design system for the legal / secondary pages.
   The landing page (index) keeps its CSS inline; this file exists so
   privacy.html and terms.html don't duplicate the same tokens twice.
   Keep the token values in sync with the landing page. */

:root {
  --ground:    #F2EFE7;  /* cream paper */
  --ink:       #1A1A1A;
  --red:       #C7322E;  /* accent text on cream — 4.6:1 */
  --red-deep:  #B32B27;  /* accent fills behind cream text — 5.6:1 */
  --olive:     #5E6347;  /* secondary text on cream — 5.5:1 */
  --hairline:  #C8C2B0;  /* RULES ONLY — never use for text on cream */
  --maxw:      1200px;
  --measure:   68ch;     /* comfortable reading width for long prose */
  --gutter:    clamp(20px, 4vw, 40px);
  --nav-h:     84px;

  /* Type system: kept in sync with the landing page (see index.html). */
  --font-display:   'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --font-body:      'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --font-editorial: 'Newsreader', Georgia, serif;
  --font-interface: 'IBM Plex Mono', ui-monospace, monospace;
}

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

html {
  font-size: 106.25%;           /* ≈17px, but still scales with user preference */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
  font-family: var(--font-body);
  background: var(--ground);
  color: var(--ink);
  line-height: 1.6;
  text-wrap: pretty;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-color: var(--hairline);
  text-decoration-thickness: 1px;
  transition: text-decoration-color .2s, color .2s;
}
a:hover { text-decoration-color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* `.page` and `.section` can land on the same element, so both use
   single-axis padding — a shorthand would zero the other axis. */
.page { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); width: 100%; }

.mono {
  font-family: var(--font-interface);
  font-weight: 500;
  font-size: 0.625rem; letter-spacing: .1em; text-transform: uppercase;
}

/* --- Skip link --- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--ground);
  font-family: var(--font-interface);
  font-weight: 500;
  font-size: 0.7rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 14px 22px; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* --- Nav --- */
.nav-wrap { border-bottom: 1px solid var(--hairline); background: var(--ground); }
.nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: var(--nav-h); }
.nav-logo { display: block; line-height: 0; }
/* The 2026 wordmark is drawn for light backgrounds; used as-is, no filter. */
.nav-logo img { height: 20px; width: auto; }
.nav-back {
  font-family: var(--font-interface);
  font-weight: 500;
  font-size: 0.625rem; letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  display: inline-flex; align-items: center; min-height: 44px;
}
.nav-back:hover { color: var(--red); }

/* --- Dateline --- */
.dateline {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-interface);
  font-weight: 500;
  font-size: 0.625rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--olive);
}
.dateline .accent { color: var(--red); }

/* --- Legal document --- */
main { flex: 1; }
.doc { padding-block: clamp(48px, 7vw, 84px); }
.doc-head { margin-bottom: clamp(32px, 4vw, 48px); }
.doc-head .kicker {
  font-family: var(--font-interface);
  font-weight: 500;
  font-size: 0.625rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--red); display: block; margin-bottom: 12px;
}
.doc-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.95rem, 4.2vw, 3.3rem);
  line-height: 1.02; letter-spacing: -0.03em;
  text-wrap: balance;
  margin-bottom: 14px;
}
.doc-head .updated {
  font-family: var(--font-interface);
  font-weight: 500;
  font-size: 0.625rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--olive);
}

.prose { max-width: var(--measure); }
.prose h2 {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.3rem; line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 40px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.prose p { font-family: var(--font-body); font-weight: 400; font-size: 0.94rem; line-height: 1.6; }
.prose p + p { margin-top: 14px; }

/* Third-party / service detail blocks, set off with a rule instead of an indent */
.prose .note {
  border-left: 1px solid var(--hairline);
  padding-left: 20px;
  margin: 18px 0;
  color: var(--olive);
}
.prose .note p { font-size: 0.88rem; }

/* --- Footer --- */
.footer {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px 24px;
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-interface);
  font-weight: 500;
  font-size: 0.625rem; letter-spacing: .06em; color: var(--olive);
}
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.footer-links li { display: flex; align-items: center; }
/* Mixed <a> and <button> children align differently unless both are forced
   into the same inline-flex box with an explicit line-height. */
.footer-links a, .footer-links button {
  display: inline-flex; align-items: center;
  text-decoration: none; color: var(--olive);
  font: inherit; letter-spacing: inherit; line-height: 1;
  background: none; border: none; cursor: pointer; padding: 6px 0;
}
.footer-links a:hover, .footer-links button:hover { color: var(--red); }

/* --- Cookie banner (markup comes from js/cookie-consent.js) --- */
#cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: var(--ink); color: var(--ground);
  border-top: 1px solid #3A3A38;
  padding: 16px 0;
}
.cookie-banner-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
}
.cookie-banner-inner p { font-size: 0.86rem; color: #CFCABA; }
.cookie-banner-inner a { color: var(--ground); }
.cookie-banner-inner a:hover { color: #E8615C; }
.cookie-banner-buttons { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner-buttons button {
  font-family: var(--font-interface);
  font-weight: 500;
  font-size: 0.688rem; letter-spacing: .1em; text-transform: uppercase;
  min-height: 44px; padding: 0 20px; cursor: pointer;
  border: 1px solid var(--ground); background: transparent; color: var(--ground);
  transition: background .18s, color .18s;
}
#cookie-accept { background: var(--ground); color: var(--ink); }
#cookie-accept:hover { background: #E8615C; border-color: #E8615C; color: var(--ink); }
#cookie-decline:hover { background: var(--ground); color: var(--ink); }

@media (max-width: 760px) {
  :root { --nav-h: 68px; }
}

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

@media print {
  .nav-wrap, .skip-link, #cookie-banner { display: none !important; }
  html { font-size: 11pt; }
  body { background: #fff; color: #000; }
  .prose { max-width: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
}
