/* Toolspot4u Child Theme — Base Styles
   CSS reset, body, typography, utility classes, layout primitives.
   Everything here uses tokens from tokens.css. */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background:              var(--paper);
  color:                   var(--ink);
  font-family:             var(--body);
  font-size:               17px;
  line-height:             1.6;
  -webkit-font-smoothing:  antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }

button { font-family: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }

input, textarea, select { font-family: inherit; font-size: inherit; }

ul, ol { list-style: none; }

/* ── Layout primitives ───────────────────────────────────────────────────── */

.wrap {
  max-width: var(--max-width);
  margin:    0 auto;
  padding:   0 var(--wrap-px);
}

.t4u-main {
  padding-top: var(--nav-height); /* compensate for sticky nav */
  min-height:  60vh;
}

section { padding: 88px 0; }

/* ── Typography ──────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family:    var(--disp);
  font-weight:    700;
  letter-spacing: -0.03em;
  line-height:    1.1;
}

h1, h2 { letter-spacing: -0.03em; }

h1.page {
  font-size:      clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: -0.04em;
  max-width:      840px;
}

h2 {
  font-size:     clamp(2rem, 4.2vw, 3.1rem);
  margin-bottom: 14px;
}

h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }

.eyebrow {
  font-family:    var(--mono);
  font-weight:    500;
  font-size:      0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color:          var(--ink-60);
  margin-bottom:  18px;
}

.eyebrow-mark {
  display:        inline-flex;
  align-items:    center;
  gap:            10px;
  font-family:    var(--mono);
  font-weight:    500;
  font-size:      0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color:          var(--ink-60);
  margin-bottom:  18px;
}
.eyebrow-mark::before {
  content:       '';
  width:         24px;
  height:        3px;
  border-radius: 2px;
  background:    var(--ember);
  flex:          0 0 auto;
}

.lede {
  color:     var(--ink-60);
  font-size: 1.18rem;
  max-width: 600px;
}

.accent { color: var(--ember); }

.page-head { padding: 88px 0 48px; }

.crumb {
  font-family:    var(--mono);
  font-size:      0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color:          var(--ink-60);
  margin-bottom:  26px;
}
.crumb a:hover { color: var(--ember-deep); }

/* ── Prose (long-form articles) ──────────────────────────────────────────── */

.prose {
  max-width:  720px;
  font-size:  1.1rem;
}
.prose p { margin: 0 0 24px; }
.prose h2 { font-size: 1.9rem; margin: 48px 0 16px; }
.prose blockquote {
  border-left: 3px solid var(--ember);
  padding:     4px 0 4px 24px;
  font-family: var(--disp);
  font-size:   1.3rem;
  line-height: 1.4;
  margin:      36px 0;
}
.prose ul, .prose ol { list-style: disc; padding-left: 24px; margin-bottom: 24px; }
.prose li + li { margin-top: 8px; }
.prose a { border-bottom: 1px solid var(--ink-12); transition: border-color var(--dur-std); }
.prose a:hover { border-color: var(--ember); color: var(--ember-deep); }

/* ── Band (full-bleed linen section) ─────────────────────────────────────── */

.band {
  background:    var(--linen);
  border-radius: var(--r-4xl);
  padding:       72px 0;
}

/* ── Section headings with subtitle ─────────────────────────────────────── */

.section-head { margin-bottom: 48px; }
.section-head h2 { margin-bottom: 10px; }
.section-head .lede { margin-top: 0; }

/* ── Grid helpers ────────────────────────────────────────────────────────── */

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* ── Skip link (keyboard accessibility) ─────────────────────────────────── */

.skip-link {
  position:   absolute;
  top:        -40px;
  left:       0;
  background: var(--ember);
  color:      #fff;
  padding:    8px 16px;
  font-size:  0.9rem;
  font-weight: 600;
  z-index:    var(--z-intro);
  border-radius: 0 0 var(--r-sm) 0;
  transition: top var(--dur-fast);
}
.skip-link:focus { top: 0; }

/* ── WordPress utility: .screen-reader-text ──────────────────────────────── */
/* Standard WP accessibility class — visually hidden but available to AT.
   Used by core, plugins, and our skip link (which overrides with .skip-link). */

.screen-reader-text {
  clip:       rect(1px, 1px, 1px, 1px);
  clip-path:  inset(50%);
  height:     1px;
  margin:     -1px;
  overflow:   hidden;
  padding:    0;
  position:   absolute;
  width:      1px;
  word-wrap:  normal !important;
}
.screen-reader-text:focus {
  background:  var(--linen);
  clip:        auto !important;
  clip-path:   none;
  color:       var(--ink);
  display:     block;
  font-size:   0.875rem;
  font-weight: 700;
  height:      auto;
  left:        5px;
  line-height: normal;
  padding:     15px 23px 14px;
  text-decoration: none;
  top:         5px;
  width:       auto;
  z-index:     var(--z-intro);
}

/* ── Responsive breakpoints ──────────────────────────────────────────────── */

@media (max-width: 900px) {
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
  .page-head { padding: 64px 0 36px; }
  .wrap { --wrap-px: 20px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .lede { font-size: 1.05rem; }
}
