/* Rey Talandrata — automation engineer site
   Design system: Trust & Authority palette + Developer Mono type
   No frameworks, no JS dependencies. */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --primary: #0F172A;
  --secondary: #334155;
  --accent: #0369A1;
  --accent-hover: #075985;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --fg: #020617;
  --fg-muted: #475569;
  --muted: #E8ECF1;
  --border: #E2E8F0;
  --ok: #15803D;
  --radius: 10px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --shadow: 0 1px 2px rgba(2, 6, 23, .06), 0 4px 12px rgba(2, 6, 23, .05);
  --shadow-lg: 0 2px 4px rgba(2, 6, 23, .08), 0 12px 28px rgba(2, 6, 23, .10);
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #E2E8F0;
    --secondary: #94A3B8;
    --accent: #38BDF8;
    --accent-hover: #7DD3FC;
    --bg: #0B1220;
    --surface: #101a2c;
    --fg: #E5EAF2;
    --fg-muted: #A6B3C6;
    --muted: #182338;
    --border: #22304a;
    --ok: #4ADE80;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, h4 { font-family: var(--mono); line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 .5em; color: var(--primary); }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}
code, .mono { font-family: var(--mono); font-size: .92em; }
img, svg { max-width: 100%; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section.tight { padding: 36px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 18px; min-height: 60px; }
.brand { font-family: var(--mono); font-weight: 700; color: var(--primary); font-size: 1rem; white-space: nowrap; }
.brand .tld { color: var(--accent); }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-links a {
  font-family: var(--mono); font-size: .82rem; color: var(--fg-muted);
  padding: 9px 11px; border-radius: 7px; min-height: 44px; display: inline-flex; align-items: center;
}
.nav-links a:hover { color: var(--primary); background: var(--muted); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav-toggle { display: none; }
.nav-toggle-label { display: none; margin-left: auto; cursor: pointer; padding: 10px; border-radius: 8px; }
.nav-toggle-label svg { display: block; stroke: var(--primary); }
@media (max-width: 800px) {
  .nav { flex-wrap: wrap; }
  .nav-toggle-label { display: block; }
  .nav-links {
    display: none; flex-basis: 100%; flex-direction: column; align-items: stretch;
    padding-bottom: 12px; margin-left: 0;
  }
  .nav-links a { width: 100%; }
  .nav-toggle:checked ~ .nav-links { display: flex; }
}

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; }
.kicker {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 14px;
}
.hero .lede { font-size: 1.13rem; color: var(--fg-muted); max-width: 46rem; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--mono); font-size: .88rem; font-weight: 600;
  padding: 12px 22px; min-height: 46px; border-radius: 9px; border: 1px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; text-decoration: none; }
@media (prefers-color-scheme: dark) {
  .btn-primary { color: #06121f; }
  .btn-primary:hover { color: #06121f; }
}
.btn-ghost { border-color: var(--border); color: var(--primary); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat .n { font-family: var(--mono); font-size: 1.55rem; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.stat .l { color: var(--fg-muted); font-size: .88rem; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  transition: border-color .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
}
.card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.card h3 { display: flex; align-items: center; gap: 9px; }
.card h3 svg { flex: none; stroke: var(--accent); }
.card .meta { font-family: var(--mono); font-size: .74rem; color: var(--fg-muted); letter-spacing: .04em; margin-bottom: 8px; text-transform: uppercase; }
.card p { color: var(--fg-muted); font-size: .95rem; }
.card .foot { margin-top: auto; padding-top: 10px; font-family: var(--mono); font-size: .82rem; }
.tag {
  display: inline-block; font-family: var(--mono); font-size: .72rem; padding: 3px 9px;
  background: var(--muted); color: var(--secondary); border-radius: 20px; margin: 0 6px 6px 0;
}
.badge-line { margin-top: 6px; }

/* ---------- tables ---------- */
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fg-muted); }
td .mono { font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

/* ---------- process steps ---------- */
.steps { counter-reset: step; display: grid; gap: 16px; }
.step { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--mono); font-weight: 700; font-size: 1.15rem; color: var(--accent);
  border: 1px solid var(--border); background: var(--surface); border-radius: 10px;
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
}
.step h3 { margin-bottom: 4px; }
.step p { color: var(--fg-muted); margin-bottom: 4px; }

/* ---------- prose / faq ---------- */
.prose { max-width: 46rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: .45em; }
details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 4px 18px; margin-bottom: 10px;
}
details summary {
  cursor: pointer; font-weight: 600; font-family: var(--mono); font-size: .92rem;
  padding: 12px 0; color: var(--primary); list-style: none; display: flex; justify-content: space-between; align-items: center;
}
details summary::after { content: "+"; color: var(--accent); font-size: 1.2rem; }
details[open] summary::after { content: "–"; }
details p { color: var(--fg-muted); }

/* ---------- callout ---------- */
.callout {
  border-left: 4px solid var(--accent); background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 20px; margin: 20px 0;
}
.callout p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 36px 0; margin-top: 40px; color: var(--fg-muted); font-size: .9rem; }
.site-footer .cols { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.site-footer a { color: var(--fg-muted); }
.site-footer a:hover { color: var(--accent); }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* terminal flourish */
.term {
  background: #0B1220; color: #C9D6E8; border-radius: var(--radius); padding: 18px 20px;
  font-family: var(--mono); font-size: .84rem; line-height: 1.7; overflow-x: auto;
  border: 1px solid #22304a;
}
.term .p { color: #38BDF8; }
.term .c { color: #64748B; }
.term .g { color: #4ADE80; }
