/* Clarity Signal | field-notes/style.css | v1.0 | 2026-05-02 */

:root {
  --bg: #0c0d0f;
  --bg2: #111318;
  --text: #ddd8ce;
  --muted: #7a7870;
  --dim: #3a3830;
  --accent: #c8b98a;
  --accent2: #7a9e8a;
  --line: rgba(200,185,138,.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'EB Garamond', Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

/* Header */
header {
  padding: 48px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp .8s ease .1s forwards;
}

.wordmark {
  font-size: 13px;
  font-family: 'DM Mono', monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.wordmark-sub {
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

.wordmark-sub:hover { color: var(--accent); }

.wordmark-sub::before { content: '— '; opacity: .5; }

/* Article */
article {
  padding: 64px 0 32px;
  opacity: 0;
  animation: fadeUp .9s ease .25s forwards;
}

.meta {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

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

article h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: 20px;
}

article h1 em { font-style: italic; color: var(--accent); }

.subtitle {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
  font-style: italic;
  line-height: 1.55;
  max-width: 52ch;
  border-left: 2px solid var(--dim);
  padding-left: 20px;
  margin-bottom: 48px;
}

article h2 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  font-style: italic;
  color: var(--text);
  margin: 56px 0 20px;
  letter-spacing: -.005em;
}

article p {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 22px;
  max-width: 62ch;
}

article p strong {
  color: var(--accent);
  font-weight: 500;
}

article p em { font-style: italic; }

article a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(200,185,138,.4);
  transition: text-decoration-color .15s;
}

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

article blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin: 32px 0;
  font-style: italic;
  color: var(--muted);
  max-width: 58ch;
}

article blockquote p { color: var(--muted); }

article ul, article ol {
  margin: 0 0 22px 28px;
  max-width: 60ch;
}

article li {
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.75;
  margin-bottom: 8px;
  color: var(--text);
}

.lift {
  margin: 40px 0;
  padding: 24px 28px;
  border-left: 2px solid var(--accent);
  background: rgba(200,185,138,.03);
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--text);
  line-height: 1.5;
  max-width: 60ch;
}

.byline {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
}

.byline a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--dim);
}

.byline a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* Outbound links section (capsule, github) */
.outbound {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.outbound a {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--accent2);
  text-decoration: none;
}

.outbound a::before { content: '→ '; color: var(--dim); }

.outbound a:hover { color: var(--accent); }

/* Nav between posts */
.post-nav {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.post-nav a {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}

.post-nav a:hover { color: var(--accent); }

/* Footer */
footer {
  padding: 48px 0 60px;
  margin-top: 48px;
  opacity: 0;
  animation: fadeIn .6s ease .8s forwards;
}

.footer-rule {
  height: 1px;
  background: var(--line);
  margin-bottom: 28px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 13px;
  color: var(--muted);
}

.footer-link {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color .15s;
}

.footer-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Index page (field-notes/index.html) */
.notes-intro {
  padding: 64px 0 32px;
  opacity: 0;
  animation: fadeUp .9s ease .25s forwards;
}

.notes-intro h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: 20px;
}

.notes-intro h1 em { font-style: italic; color: var(--accent); }

.notes-intro p {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--muted);
  line-height: 1.7;
  max-width: 56ch;
  margin-bottom: 16px;
}

.notes-list {
  margin: 32px 0 64px;
  list-style: none;
  padding: 0;
}

.notes-list li {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  margin: 0;
}

.notes-list li:first-child { border-top: 1px solid var(--line); }

.notes-list a {
  display: block;
  text-decoration: none;
  color: var(--text);
  transition: color .15s;
}

.notes-list a:hover .note-title { color: var(--accent); }

.note-date {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.note-title {
  font-size: clamp(20px, 2.6vw, 24px);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 6px;
  transition: color .15s;
}

.note-title em { font-style: italic; color: var(--accent); }

.note-summary {
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.55;
  max-width: 56ch;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Mobile */
@media (max-width: 600px) {
  article { padding: 48px 0 24px; }
  article h2 { margin: 40px 0 16px; }
  .lift { padding: 20px 22px; }
}
