/* ==========================================================================
   breireik.com — shared styles for every page.
   Plain CSS, no build step. Mobile first, 16px side gutter, no horizontal scroll.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Neutrals */
  --bg: #ffffff;
  --bg-subtle: #f5f7fa;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e4e8ef;
  --line-strong: #cbd5e1;

  /* Brand */
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.10);
  --accent-ring: rgba(79, 70, 229, 0.35);

  /* Draft / todo */
  --warn-bg: #fff8e6;
  --warn-line: #e0a800;
  --warn-ink: #7a5c00;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -12px rgba(15, 23, 42, 0.12);
  --maxw: 760px;
  --gutter: 16px;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f1c;
    --bg-subtle: #0f1626;
    --surface: #111a2e;
    --ink: #f1f5f9;
    --ink-2: #cbd5e1;
    --muted: #93a1b5;
    --line: #1e293b;
    --line-strong: #2b3a52;

    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --accent-soft: rgba(129, 140, 248, 0.14);
    --accent-ring: rgba(129, 140, 248, 0.45);

    --warn-bg: #241f10;
    --warn-line: #b7881f;
    --warn-ink: #e6c766;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -14px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-soft); color: var(--ink); }

/* Thin brand bar across the very top */
body::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6 55%, #22d3ee);
}

/* ---- Layout containers --------------------------------------------------- */

.site-header,
main,
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

main { padding-top: 8px; padding-bottom: 72px; }

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.brand::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.nav-links {
  display: flex;
  gap: 22px;
  font-size: 14.5px;
  font-weight: 500;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--ink); }

/* ---- Hero ---------------------------------------------------------------- */

.hero {
  background:
    radial-gradient(90% 120% at 0% 0%, var(--accent-soft), transparent 60%),
    var(--bg-subtle);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px var(--gutter);
}

.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 11px;
  border-radius: 999px;
  margin: 0 0 20px;
}

.hero h1 {
  margin: 0 0 18px;
}

.hero .lead {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 44ch;
  margin: 0;
}

/* ---- Headings & text ----------------------------------------------------- */

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 16px;
}

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 14px;
}

p { margin: 0 0 16px; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 2px solid var(--accent-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Sections ------------------------------------------------------------ */

.section { padding-top: 44px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--sans);
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---- App cards ----------------------------------------------------------- */

.cards { display: grid; gap: 14px; }

.card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 16px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.card-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
}

.card-desc { grid-column: 1; color: var(--muted); font-size: 0.95rem; }

.card-arrow {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--accent);
  font-size: 1.3rem;
  transition: transform 0.16s ease;
}

.card:hover .card-arrow { transform: translateX(3px); }

/* ---- Details panel ------------------------------------------------------- */

.details {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.details > div {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 4px 20px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
}

.details > div:first-child { border-top: none; }

.details dt {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.details dd { margin: 0; color: var(--ink); font-weight: 500; }

/* ---- Draft note & todo --------------------------------------------------- */

.draft-note {
  display: flex;
  gap: 12px;
  background: var(--warn-bg);
  border: 1px solid color-mix(in srgb, var(--warn-line) 45%, transparent);
  border-left: 4px solid var(--warn-line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 24px 0 28px;
  color: var(--warn-ink);
  font-size: 0.95rem;
  line-height: 1.55;
}

.draft-note::before { content: "\26A0\FE0F"; flex: none; }
.draft-note strong { color: var(--warn-ink); }

.todo {
  background: var(--warn-bg);
  border-bottom: 1.5px dashed var(--warn-line);
  color: var(--warn-ink);
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 500;
}

.updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 24px;
}

/* ---- Lists in body copy -------------------------------------------------- */

main ul:not(.cards) { padding-left: 20px; }
main ul:not(.cards) li { margin-bottom: 8px; }

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

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 28px;
  padding-bottom: 48px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.site-footer a { color: var(--muted); text-decoration-color: var(--line-strong); }
.site-footer a:hover { color: var(--ink); }
.site-footer .foot-brand {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  font-size: 1rem;
  margin-bottom: 6px;
}

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero-inner { padding: 44px var(--gutter); }
  .hero .lead { font-size: 1.08rem; }
  .details > div { grid-template-columns: 1fr; gap: 4px; }
  .nav-links { gap: 16px; }
}
