/* ============================================================
   THE OFFICE OF SAYO FOLAWIYO — shared.css
   Design System: The Curated Monolith
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,500&family=Newsreader:wght@700&display=swap');

/* ---- Brand Tokens ---- */
:root {
  /* Surfaces */
  --depth:      #402A23;
  --silver-start: #9E9E9E;
  --silver-mid:   #E8E8E8;
  --silver-end:   #A0A0A0;
  --gallery:    #C7C4B9; /* The Gallery — dusty sage at 80% over white (≈ rgba(185,180,164,0.8) on #FFF) */
  --cobalt:     #0047AB;
  --industrial: #1A1A1B;

  /* Foil gradient (text on depth surfaces) */
  --foil-start: #C0C0C0;
  --foil-end:   #E8E8E8;
  --foil-dark:  #626363;

  /* Typography */
  --font-main:  'EB Garamond', Georgia, serif;
  --font-label: 'Newsreader', Georgia, serif;

  /* Spacing */
  --nav-height: 48px;
}

/* ---- Reset ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--depth);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Surface Classes ---- */
.s-depth {
  background: var(--depth);
  position: relative;
}
.s-silver {
  background: linear-gradient(
    135deg,
    #9E9E9E 0%,
    #B8B8B8 15%,
    #E8E8E8 35%,
    #F5F5F5 45%,
    #E0E0E0 55%,
    #B0B0B0 75%,
    #A0A0A0 100%
  );
  position: relative;
}
.s-gallery {
  background: var(--gallery);
  position: relative;
}

/* ---- Grain Overlay (fixed, covers everything) ---- */
.grain {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ---- Parchment texture for gallery surfaces ---- */
.s-gallery::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 512px 512px;
  z-index: 0;
}
.s-gallery > * { position: relative; z-index: 1; }

/* ---- Cobalt Pinstripe (depth surfaces) ---- */
.pinstripe::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to right,
    transparent 0px,
    transparent 39px,
    rgba(0, 71, 171, 0.20) 39px,
    rgba(0, 71, 171, 0.20) 40px
  );
  z-index: 0;
}
.pinstripe > * { position: relative; z-index: 1; }

/* ---- Silver Foil Text ---- */
.silver {
  background: linear-gradient(135deg, var(--foil-start), var(--foil-end), var(--foil-start));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Typography ---- */
/* Display / Headlines — ALL CAPS, Light, wide tracking */
.t-display {
  font-family: var(--font-main);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  line-height: 1.3;
}
/* Body — Regular, sentence case */
.t-body {
  font-family: var(--font-main);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.75;
}
/* Labels — Newsreader Bold, 0.75rem */
.t-label {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

/* ---- Tags ---- */
/* Tags live at the POST level. Thread-level tag lists are an aggregation
   (union) of the area tags on the posts within that thread. */
.tag {
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  margin-right: 8px;
  color: #555;
  transition: color 0.15s;
}
.tag:hover {
  text-decoration: underline;
  text-decoration-color: var(--cobalt);
  text-underline-offset: 3px;
}
.tag-area { color: #555; }
/* Tags sitting on a dark (brown) header */
.s-depth .tag {
  color: rgba(192,192,192,0.6);
}
/* Hover: underline goes blue, text colour stays put */
.s-depth .tag:hover {
  text-decoration-color: var(--cobalt);
}

/* ---- Mode label ---- */
/* Mode is a label, not a filterable tag, and it only appears on the post
   itself (never in summary lists). Mode is also the one label family that
   carries cobalt — RFI types and feed event kinds stay neutral. Post pages
   style `.post-mode` locally, top-right of the article column. */
.mode-label {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cobalt);
}

/* ---- Byline / collaborators ---- */
.byline {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(192,192,192,0.5);
}
.byline a {
  color: rgba(192,192,192,0.78);
  text-decoration: none;
  border-bottom: 1px solid rgba(192,192,192,0.3);
  transition: color 0.2s, border-color 0.2s;
}
.byline a:hover { color: rgba(192,192,192,0.95); border-bottom-color: rgba(192,192,192,0.6); }
/* Byline on a light/gallery background (e.g. inline in a post body) */
.byline-dark { color: #999; }
.byline-dark a {
  color: var(--cobalt);
  border-bottom: 1px solid rgba(0,71,171,0.3);
}
.byline-dark a:hover { color: var(--cobalt); border-bottom-color: var(--cobalt); }

/* ---- Navigation ---- */
.site-nav {
  background: var(--depth);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: relative;
  z-index: 100;
  border-bottom: 1px solid rgba(192, 192, 192, 0.12);
}
.site-nav .nav-wordmark {
  font-family: var(--font-main);
  font-weight: 300;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  text-decoration: none;
  background: linear-gradient(135deg, var(--foil-start), var(--foil-end), var(--foil-start));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.site-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.site-nav .nav-links a {
  font-family: var(--font-main);
  font-weight: 400;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  text-decoration: none;
  color: rgba(192, 192, 192, 0.6);
  transition: color 0.15s;
}
.site-nav .nav-links a:hover {
  color: rgba(232, 232, 232, 0.9);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--cobalt);
}
/* While hovering the nav, the active page drops its underline so only one shows at a time */
.site-nav .nav-links:hover a.active:not(:hover) {
  text-decoration: none;
}
.site-nav .nav-links a.active {
  color: rgba(232, 232, 232, 0.95);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--cobalt);
}

/* ---- Standard Footer ---- */
.site-footer {
  background: var(--depth);
  border-top: 1px solid rgba(192, 192, 192, 0.12);
  padding: 2.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-footer .footer-mark {
  font-family: var(--font-main);
  font-weight: 300;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  background: linear-gradient(135deg, var(--foil-start), var(--foil-end), var(--foil-start));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.site-footer .footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.site-footer .footer-links a {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(192, 192, 192, 0.5);
  transition: color 0.15s;
}
.site-footer .footer-links a:hover {
  color: rgba(192, 192, 192, 0.85);
}
/* Subscribe sits level with the other footer links rather than shouting; the
   real capture is the inline form at the foot of a post. */
.site-footer .footer-subscribe {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(192, 192, 192, 0.5);
  transition: color 0.15s;
}
.site-footer .footer-subscribe:hover {
  color: rgba(192, 192, 192, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--cobalt);
}

/* ---- Borders / Depth ---- */
.border-industrial { border: 3px solid var(--industrial); }
.border-cobalt-left { border-left: 2px solid var(--cobalt); }

/* ---- Utility ---- */
a { color: inherit; }
img { display: block; max-width: 100%; }

/* ---- Open Graph / Meta head snippet (not CSS, reminder only) ---- */
/* All pages should include:
   <meta property="og:title" content="...">
   <meta property="og:description" content="...">
   <meta property="og:image" content="/assets/images/og-default.png">
   <meta property="og:url" content="...">
   <meta property="og:type" content="website">
   <meta name="twitter:card" content="summary_large_image">
   <link rel="alternate" type="application/rss+xml" title="The Office of Sayo Folawiyo" href="/feed.xml">
*/
