/* Freddy Manager — shared styles */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --paper: #f3ede0;
  --paper-2: #ebe3d1;
  --paper-3: #e0d5bc;
  --ink: #1a1814;
  --ink-2: #3a352c;
  --ink-soft: #6b6558;
  --rule: #1a18141a;
  --rule-strong: #1a181433;
  --amber: #c85a1f;      /* terminal phosphor, warm */
  --amber-soft: #e8a472;
  --cyan: #2d5c6b;       /* cool accent */
  --ok: #3f6b3a;
  --warn: #b8841a;
  --red: #a13826;

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(rgba(26,24,20,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 0 0;
}

a { color: inherit; }

/* --- Paper noise overlay --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: multiply;
}

/* --- Nav --- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.logo-mark {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
}
.logo-mark svg { display: block; }
.logo small {
  color: var(--ink-soft);
  font-weight: 400;
  margin-left: 2px;
}
.nav-links {
  display: flex; align-items: center; gap: 28px;
  font-family: var(--mono);
  font-size: 13px;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink-2);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color .15s, color .15s;
}
.nav-links a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.nav-links a.active { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform .1s ease, box-shadow .15s;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border-color: var(--rule-strong);
}
.btn.ghost:hover { box-shadow: 3px 3px 0 var(--ink); background: var(--paper-2); }
.btn.amber {
  background: var(--amber); border-color: var(--amber); color: var(--paper);
  box-shadow: 3px 3px 0 var(--ink);
}

/* --- Layout --- */
main { position: relative; z-index: 2; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px; background: var(--amber);
  display: inline-block;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.01em; line-height: 1.05; }
h1 { font-size: clamp(56px, 8vw, 104px); }
h2 { font-size: clamp(40px, 5vw, 68px); }
h3 { font-size: 28px; }
.display-italic { font-style: italic; color: var(--amber); }

p { margin: 0; }

/* --- Blinking cursor --- */
.cursor {
  display: inline-block;
  width: 0.55em; height: 1em;
  background: var(--ink);
  vertical-align: -0.15em;
  margin-left: 0.1em;
  animation: blink 1s steps(2, end) infinite;
}
.cursor.amber { background: var(--amber); }
@keyframes blink { 50% { opacity: 0; } }

/* --- Divider (ASCII) --- */
.divider-ascii {
  font-family: var(--mono);
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.2em;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--rule);
  margin-top: 80px;
  padding: 56px 0 40px;
  background: var(--paper-2);
  position: relative;
  z-index: 2;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
  text-decoration: none;
  font-size: 14px;
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
}
.footer-col a:hover { border-bottom-color: var(--ink-2); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
}

/* --- Sticky note (Freddy says) --- */
.note {
  font-family: var(--mono);
  font-size: 12px;
  background: #f4e29a;
  padding: 10px 12px;
  border: 1px solid #d9c068;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.08);
  transform: rotate(-1.5deg);
  color: #4a3e00;
  max-width: 220px;
  line-height: 1.4;
}
.note b { color: var(--ink); }

/* --- Card --- */
.card {
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  padding: 24px;
  position: relative;
}
.card.elevated {
  box-shadow: 4px 4px 0 var(--ink);
}

/* --- Section spacing --- */
section { padding: 96px 0; position: relative; }
section + section { border-top: 1px solid var(--rule); }

/* --- Utility --- */
.mono { font-family: var(--mono); }
.small { font-size: 13px; }
.muted { color: var(--ink-soft); }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  letter-spacing: 0.04em;
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.tag.amber .dot { background: var(--amber); }
.tag.warn .dot { background: var(--warn); }
.tag.cyan .dot { background: var(--cyan); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  section { padding: 64px 0; }
  .container { padding: 0 20px; }
}
