/* ServiceLift AI shared styles: base, layout, header, mobile menu, buttons, rows, footer.
   Requires tokens.css. Reused by every page. No gradients, no shadows except focus rings,
   no decorative animation (spec 2.2). */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px; /* WCAG 2.4.11: focus not hidden by sticky header */
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

/* The hidden attribute must win over any display rule above or in page CSS (QUALITY defect D1, v1:
   the svg display:block rule kept the menu's close icon visible next to the hamburger). */
[hidden] { display: none !important; }

h1, h2, h3 { margin: 0; color: inherit; }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: var(--fs-display-l); line-height: 1.08; }
h2 { font-size: var(--fs-h2); line-height: 1.15; }
h3 { font-family: var(--font-body); font-weight: 600; font-size: var(--fs-h3); line-height: 1.25; }
p { margin: 0; max-width: var(--measure); }
ul, ol { margin: 0; padding: 0; }

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.band-ink :focus-visible,
.site-footer :focus-visible { outline-color: var(--focus-on-dark); }

/* Utilities */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s5);
}
.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;
}

.skip-link {
  position: absolute;
  left: var(--s4);
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: var(--s3) var(--s4);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: var(--s3); }
.skip-link:focus-visible { outline-color: var(--accent-dark-bg); }

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: var(--s3);
}
.band-ink .eyebrow { color: var(--eyebrow-on-dark); }

.lead { font-size: var(--fs-body-l); line-height: 1.5; }
.small { font-size: var(--fs-small); line-height: 1.5; }

/* Sections (spec 3.3: s8 at 390, s9 at 820, s10 at 1280) */
.section { padding-block: var(--s8); }
.band-paper-2 { background: var(--paper-2); }
.band-ink { background: var(--ink); color: var(--on-dark); }
.band-ink a:not(.btn) { color: var(--on-dark); }
.section-head { margin-bottom: var(--s7); }
.section-head h2 + p { margin-top: var(--s4); }

/* Buttons (one filled accent; secondary outlined) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--s3) var(--s5);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--motion), color var(--motion), border-color var(--motion);
}
.btn-primary { background: var(--button); color: var(--white); }
.btn-primary:hover { background: var(--button-hover); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--white); }
.band-ink .btn-primary { background: var(--accent-dark-bg); color: var(--ink); }
.band-ink .btn-primary:hover { background: var(--on-dark); color: var(--ink); }
.band-ink .btn-secondary { color: var(--on-dark); border-color: var(--on-dark); }
.band-ink .btn-secondary:hover { background: var(--on-dark); color: var(--ink); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s4); margin-top: var(--s6); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s5);
  min-height: var(--header-h);
}
.lockup {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.lockup .ai { color: var(--button); }
.band-ink .lockup, .site-footer .lockup { color: var(--on-dark); }
.band-ink .lockup .ai, .site-footer .lockup .ai { color: var(--accent-dark-bg); }

.primary-nav { display: none; }
.header-actions { display: flex; align-items: center; gap: var(--s4); margin-left: auto; }
.header-tel {
  display: none;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  align-items: center;
}
.header-tel:hover { text-decoration: underline; }
.header-cta { display: none; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}
.icon-btn svg { width: 20px; height: 20px; }

/* Mobile menu panel (below 820px). Hidden attribute controls visibility; works as links without JS
   because the footer repeats every destination. */
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 49;
  background: var(--paper);
  overflow-y: auto;
  padding-block: var(--s6) var(--s8);
  border-top: 1px solid var(--line);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu ul { list-style: none; }
.mobile-menu li { border-bottom: 1px solid var(--line); }
.mobile-menu a.menu-link {
  display: flex;
  align-items: center;
  min-height: 56px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  text-decoration: none;
}
.mobile-menu .btn { width: 100%; margin-top: var(--s6); }
.mobile-menu .menu-tel { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--s4); font-weight: 600; }
body.menu-open { overflow: hidden; }

/* Typographic rows divided by hairlines (not cards, spec 2.2 rule 2) */
.rows { list-style: none; border-top: 1px solid var(--line); }
.row {
  display: grid;
  gap: var(--s3);
  padding-block: var(--s5);
  border-bottom: 1px solid var(--line);
}
.row h3 { margin: 0; }
.row-link { font-weight: 600; justify-self: start; align-self: start; display: inline-flex; align-items: center; min-height: 44px; }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--fs-small); }
.tag-list li { white-space: normal; }
.label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Diagrams */
.diagram { width: 100%; }
.diagram text { font-family: var(--font-mono); }
.diagram-caption { margin-top: var(--s3); font-size: var(--fs-small); }

/* Footer */
.site-footer { background: var(--ground-dark); color: var(--on-dark); padding-block: var(--s8) var(--s6); }
.site-footer a { color: var(--on-dark); }
.footer-grid { display: grid; gap: var(--s6); }
.footer-grid h2 {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eyebrow-on-dark);
  margin-bottom: var(--s3);
}
.footer-grid ul { list-style: none; }
.footer-grid li a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-contact p { margin-bottom: var(--s2); }
.footer-contact a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-legal {
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  font-size: var(--fs-small);
}
.footer-legal ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 var(--s5); }
.footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }

/* Breakpoints: 820 and 1280 (spec 12.1). Primary nav moves to 1024 (m3 r2, DECISIONS 59): seven
   destinations wrap to two lines at 820, so the menu button stays until there is room. */
@media (min-width: 820px) {
  .container { padding-inline: var(--s7); }
  .section { padding-block: var(--s9); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (min-width: 1024px) {
  .menu-toggle, .mobile-menu { display: none !important; }
  .primary-nav { display: block; }
  .primary-nav ul { list-style: none; display: flex; gap: var(--s5); }
  .primary-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
    font-weight: 600;
    font-size: var(--fs-small);
    white-space: nowrap;
  }
  .primary-nav a:hover { text-decoration: underline; }
}
@media (min-width: 1100px) {
  .tel-icon { display: none !important; }
  .header-tel { display: inline-flex; font-size: var(--fs-small); }
  .header-cta { display: inline-flex; min-height: 44px; padding-block: var(--s2); font-size: var(--fs-small); }
}
@media (min-width: 1280px) {
  .section { padding-block: var(--s10); }
}

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

/* claude: in-page anchors land below the sticky header (header is about 65 px tall) */
html { scroll-padding-top: 88px; }
