/* keeganried.com — site styles, Design System "Precision" v1.
 * Class values mirror the reference designs exactly (Home.dc.html et al.).
 */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--canvas);
  color: var(--ink);
}

a { color: var(--accent); text-decoration: none; transition: color var(--hover-dur); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container { max-width: var(--content-max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  background: rgba(246, 248, 250, 0.8);
  border-bottom: 1px solid rgba(23, 26, 31, 0.08);
}
.nav-inner { max-width: var(--content-max); margin: 0 auto; padding: 18px var(--gutter); display: flex; align-items: center; justify-content: space-between; }
.nav-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.nav-links { display: flex; gap: 34px; font: 500 12.5px/1 var(--font-mono); letter-spacing: 0.05em; }
.nav-links a { color: #626A75; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

/* ---- Typography helpers ---- */
.mono-label { font: 500 12px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.mono-label.accent { color: var(--accent); }
.mono-eyebrow { font: 500 13px/1 var(--font-mono); letter-spacing: 0.1em; color: var(--accent); }
.mono-link { font: 500 14px/1 var(--font-mono); letter-spacing: 0.02em; white-space: nowrap; display: inline-block; }
.mono-link.small { font-size: 13px; }
.mono-caption { font: 500 12px/1 var(--font-mono); color: var(--faint); letter-spacing: 0.03em; }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 500; padding: 15px 28px; border-radius: 10px;
  transition: background var(--hover-dur);
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 12px;
  border: 1px solid rgba(23, 26, 31, 0.18); color: var(--ink);
  font-size: 16px; font-weight: 500; padding: 15px 28px; border-radius: 10px;
  transition: border-color var(--hover-dur);
}
.btn-secondary:hover { border-color: rgba(23, 26, 31, 0.4); color: var(--ink); }

/* ---- Rail sections (160px mono-label + content) ---- */
.rail-section { display: grid; grid-template-columns: var(--label-rail) 1fr; gap: 72px; align-items: start; }
.rail-section > .mono-label { letter-spacing: 0.12em; padding-top: 10px; }

/* ---- Stat grids ---- */
.stat-grid {
  border: 1px solid rgba(23, 26, 31, 0.12); border-radius: var(--r-lg);
  overflow: hidden; display: grid; background: var(--surface);
}
.stat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.stat-cell { padding: 34px 30px; }
.stat-cell:not(:last-child) { border-right: 1px solid var(--hairline); }
.stat-cell .mono-label { font-size: 11px; }
.stat-value { font-size: 46px; font-weight: 600; letter-spacing: -0.03em; margin-top: 16px; }
.stat-desc { font-size: 14px; line-height: 1.45; color: var(--muted); margin-top: 10px; }

/* ---- Figures (tinted inset + caption rail) ---- */
.figure { background: var(--panel-tint); border: 1px solid rgba(23, 26, 31, 0.09); border-radius: var(--r-xl); padding: 22px; }
.figure-media {
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  overflow: hidden; text-align: center; padding: 12px;
}
.figure-media.placeholder { background-image: repeating-linear-gradient(135deg, #DFE5EC 0 15px, #D5DCE5 15px 30px); }
.figure-media.placeholder span { font: 500 13px/1.4 var(--font-mono); color: #97A0AB; }
.figure-media img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 9px; padding: 0; }
.figure-media img.obj-right { object-position: right center; }
.figure-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 16px 4px 2px; font: 500 12px/1 var(--font-mono); color: var(--faint); letter-spacing: 0.03em; }

/* ---- Cards ---- */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-xl); overflow: hidden; }
.card-body { padding: 28px 30px 32px; }

/* ---- Dark band ---- */
.dark-band { background: var(--ink-panel); color: var(--on-dark); }
.dark-band .mono-label { color: var(--accent-on-dark); }
.dark-band p { color: var(--on-dark-muted); }
.dark-chip {
  background: var(--ink-panel-card); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-sm); padding: 12px 16px;
  font: 500 13px/1 var(--font-mono); color: var(--on-dark);
}
.dark-chip.accent { background: var(--accent); }

/* ---- Pills / chips ---- */
.pill { border: 1px solid rgba(23, 26, 31, 0.16); border-radius: var(--r-pill); padding: 9px 18px; font-size: 14px; color: var(--ink); }
.pill.on-dark { border-color: rgba(255, 255, 255, 0.18); color: var(--on-dark); }

/* ---- Built-with strip ---- */
.built-with { display: flex; align-items: center; gap: 20px 32px; flex-wrap: wrap; padding-top: 44px; padding-bottom: 44px; }
.built-with .mono-label { font-size: 11px; letter-spacing: 0.12em; }
.built-with span.item { font-size: 14.5px; color: #626A75; }
.built-with span.sep { color: #C6CCD3; }

/* ---- Next-link band ---- */
.next-band { display: block; background: var(--canvas); }
.next-band-inner { max-width: var(--content-max); margin: 0 auto; padding: 64px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.next-band .next-title { font-size: 36px; font-weight: 600; letter-spacing: -0.025em; color: var(--ink); margin-top: 14px; }
.next-band .arrow { font-size: 40px; color: var(--accent); }

/* ---- Footer ---- */
.footer { border-top: 1px solid rgba(23, 26, 31, 0.08); background: var(--surface); }
.footer-inner {
  max-width: var(--content-max); margin: 0 auto; padding: 26px var(--gutter);
  display: flex; justify-content: space-between;
  font: 500 12.5px/1 var(--font-mono); color: var(--faint); letter-spacing: 0.03em;
}
.footer-inner a { color: var(--faint); }
.footer-inner a:hover { color: var(--ink); }

/* ---- Scroll reveal (JS adds .revealed) ---- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity var(--reveal-dur) var(--ease-out), transform var(--reveal-dur) var(--ease-out); }
.js [data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* ---- Terminal block (supporting page) ---- */
.terminal {
  background: var(--terminal); border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--r-lg); padding: 26px 28px;
  font: 500 13px/1.7 var(--font-mono); color: #8FBF83; overflow: hidden;
}
.terminal .cmd { color: var(--accent-on-dark); }
.terminal .dim { color: #6E7681; }

/* ---- Status badges (demo) ---- */
.status-ok { background: var(--status-ok-bg); color: var(--status-ok-fg); }
.status-warn { background: var(--status-warn-bg); color: var(--status-warn-fg); }
.status-idle { background: var(--status-idle-bg); color: var(--status-idle-fg); }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .stat-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid.cols-4 .stat-cell:nth-child(2) { border-right: none; }
  .stat-grid.cols-4 .stat-cell:nth-child(-n+2) { border-bottom: 1px solid var(--hairline); }
  .rail-section { grid-template-columns: 1fr; gap: 28px; }
  .rail-section > .mono-label { padding-top: 0; }
  .two-col, .two-col-rev { grid-template-columns: 1fr !important; }
  .two-col-rev > *:first-child { order: 2; }
  .two-col-rev > *:last-child { order: 1; }
}
@media (max-width: 720px) {
  :root { --gutter: 24px; }
  .stat-grid.cols-4, .stat-grid.cols-3, .stat-grid.cols-2 { grid-template-columns: 1fr; }
  .stat-grid .stat-cell { border-right: none !important; }
  .stat-grid .stat-cell:not(:last-child) { border-bottom: 1px solid var(--hairline) !important; }
  .nav-links { gap: 20px; }
  h1 { font-size: 44px !important; }
  h2 { font-size: 32px !important; }
  body { overflow-x: hidden; }
}
