/*
 * Marcell Cruz — base tokens, reset, layout, header & footer.
 * Propshaft serves every CSS file in this directory; `stylesheet_link_tag :app` includes them all.
 */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --bg-inset: #fbfcfd;
  --ink: #0a2540;
  --ink-soft: #425466;
  --ink-faint: #6b7c93;
  --line: #e3e8ee;
  --line-strong: #cdd5df;
  --accent: #635bff;
  --accent-soft: #efeeff;
  --danger: #cd3d64;
  --danger-soft: #fdeff3;
  --ok: #1a7f4b;
  --ok-soft: #e7f6ed;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(10, 37, 64, 0.06), 0 8px 24px rgba(10, 37, 64, 0.06);
  --container: 68rem;
}

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

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.site-body { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1 0 auto; padding-block: 1.5rem 4rem; }

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

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

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.5rem;
}
.eyebrow a { color: var(--ink-faint); }
.eyebrow a:hover { color: var(--accent); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 3.75rem;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 1.05rem; color: var(--ink); letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark { font-family: var(--mono); color: var(--accent); font-weight: 600; }

.main-nav { display: none; align-items: center; gap: 1.25rem; }

.nav-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.92rem; color: var(--ink-soft); background: none; border: 0;
  padding: 0.35rem 0; cursor: pointer; font-family: inherit;
}
.nav-link:hover { color: var(--accent); text-decoration: none; }
.nav-link kbd {
  font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint);
  border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 0.3rem;
  background: var(--bg-alt); line-height: 1.5;
}
.nav-button { font-size: 0.92rem; }

.menu-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 2.75rem; height: 2.75rem; padding: 0.6rem;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.menu-toggle-bar { display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.menu-toggle.is-open .menu-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open .menu-toggle-bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-open .menu-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 0.5rem 1.25rem 1rem;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav-link {
  display: block; width: 100%; text-align: left;
  padding: 0.8rem 0.25rem; color: var(--ink); font-size: 1rem;
  border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0;
  font-family: inherit; cursor: pointer;
}
.mobile-nav-link:hover { color: var(--accent); text-decoration: none; }
.mobile-nav-button { font-size: 1rem; }

@media (min-width: 48rem) {
  .main-nav { display: flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ---------- Footer ---------- */

.site-footer { flex-shrink: 0; border-top: 1px solid var(--line); background: var(--bg-inset); margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; padding-block: 2.5rem; }
.footer-heading { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 0.75rem; font-weight: 600; }
.footer-text { margin: 0; color: var(--ink-soft); font-size: 0.92rem; max-width: 30ch; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.footer-links a { color: var(--ink-soft); font-size: 0.92rem; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: space-between;
  padding-block: 1.25rem; border-top: 1px solid var(--line);
  color: var(--ink-faint); font-size: 0.82rem;
}
.footer-built { font-family: var(--mono); }

@media (min-width: 48rem) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* ---------- Flash ---------- */

.flash {
  margin-top: 1rem; padding: 0.75rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid; font-size: 0.92rem; transition: opacity 0.4s;
}
.flash-notice { background: var(--ok-soft); border-color: #bfe6cd; color: var(--ok); }
.flash-alert { background: var(--danger-soft); border-color: #f3c6d3; color: var(--danger); }
.flash.is-hidden { opacity: 0; }

/* ---------- Page head / empty state ---------- */

.page-head { padding-block: 2.5rem 1.5rem; }
.page-title {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 5.5vw, 3rem); line-height: 1.15; margin: 0; color: var(--ink);
}
.page-sub { margin-top: 0.75rem; color: var(--ink-soft); }

.empty-state { text-align: center; padding: 4rem 1rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg-inset); }
.empty-state-title { font-size: 1.2rem; font-weight: 600; margin: 0 0 0.35rem; }
.empty-state-text { margin: 0; color: var(--ink-soft); }

.section-heading {
  font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600; margin: 0 0 1rem;
}
