/* ==========================================================================
   The Archive Migration Review — editorial/magazine stylesheet
   Warm off-white, Fraunces display serif, Inter body, deep teal accent.
   Deliberately distinct from the owner's dark-navy/gold business sites.
   ========================================================================== */

:root {
  --paper:      #faf9f7;
  --paper-dim:  #f2f0ec;
  --card:       #ffffff;
  --ink:        #1f1d1a;
  --ink-soft:   #4a4640;
  --ink-faint:  #7a746b;
  --teal:       #1a6b6b;
  --teal-dark:  #114b4b;
  --teal-tint:  #e7f0ef;
  --line:       #e4e0d9;
  --rust:       #a4562f;
  --shadow:     0 1px 2px rgba(31,29,26,.04), 0 8px 24px rgba(31,29,26,.06);
  --shadow-lg:  0 4px 12px rgba(31,29,26,.08), 0 18px 48px rgba(31,29,26,.10);
  --radius:     10px;
  --maxw:       1140px;
}

/* ------------------------------ reset ------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ------------------------------ header ----------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(250,249,247,.88);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 76px;
}
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand a { color: var(--ink); text-decoration: none; }
.brand .kicker {
  font-family: "Inter", sans-serif;
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--teal); font-weight: 600; margin-bottom: 5px;
}
.brand .name {
  font-family: "Fraunces", serif; font-size: 25px; font-weight: 600;
  letter-spacing: -0.02em; color: var(--ink);
}
.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
  color: var(--ink-soft); font-size: 15px; font-weight: 500;
  text-decoration: none; padding: 6px 0; position: relative;
}
.nav a:hover { color: var(--teal); }
.nav a.active { color: var(--ink); }
.nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--teal);
}
.nav-toggle { display: none; background: none; border: 0; cursor: pointer;
  font-size: 24px; color: var(--ink); }

/* ------------------------------ hero ------------------------------------- */
.hero { padding: 84px 0 56px; border-bottom: 1px solid var(--line); }
.hero .wrap { max-width: 900px; }
.hero .eyebrow {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--teal); font-weight: 600; margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 600;
  line-height: 1.04; margin-bottom: 24px;
}
.hero h1 em { font-style: italic; color: var(--teal); }
.hero .lede {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem); color: var(--ink-soft);
  max-width: 720px; line-height: 1.55;
}
.hero .actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block; font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 8px; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ------------------------------ sections --------------------------------- */
.section { padding: 64px 0; }
.section-head { margin-bottom: 36px; max-width: 720px; }
.section-head .eyebrow {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--teal); font-weight: 600; margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin: 12px 0 0; }

/* ------------------------------ browse axes ------------------------------ */
.axes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.axis-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  display: flex; flex-direction: column; gap: 8px;
}
.axis-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg);
  border-color: var(--teal); text-decoration: none; }
.axis-card .icon { font-size: 26px; line-height: 1; margin-bottom: 6px; }
.axis-card h3 { font-size: 1.35rem; margin: 0; }
.axis-card p { color: var(--ink-faint); font-size: .95rem; margin: 0; }
.axis-card .tags { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ------------------------------ story cards ------------------------------ */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}
.story-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.story-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg);
  border-color: var(--teal); text-decoration: none; color: inherit; }
.story-card .card-body { padding: 24px 24px 22px; display: flex; flex-direction: column; height: 100%; }
.story-card .migration {
  font-family: "Fraunces", serif; font-weight: 600; color: var(--teal);
  font-size: .92rem; letter-spacing: .01em; margin-bottom: 12px;
  display: inline-flex; align-items: center; gap: 8px;
}
.story-card h3 { font-size: 1.32rem; margin: 0 0 8px; line-height: 1.18; }
.story-card .meta {
  font-size: .82rem; color: var(--ink-faint); margin-bottom: 14px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.story-card .meta .dot { opacity: .5; }
.story-card p.excerpt { color: var(--ink-soft); font-size: .96rem; margin: 0 0 16px; }
.story-card .tags { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.tag {
  display: inline-block; font-size: 11.5px; font-weight: 500;
  padding: 3px 10px; border-radius: 999px; background: var(--paper-dim);
  color: var(--ink-soft); border: 1px solid var(--line); text-decoration: none;
  letter-spacing: .01em;
}
.tag.software { background: var(--teal-tint); color: var(--teal-dark); border-color: #cfe1df; }
a.tag:hover { border-color: var(--teal); color: var(--teal); text-decoration: none; }

/* ------------------------------ filters ---------------------------------- */
.filters {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 34px; box-shadow: var(--shadow);
}
.filters .row { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; gap: 7px; }
.filter-group label {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600;
}
.filter-group select, .filters input[type="search"] {
  font-family: inherit; font-size: 15px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
  color: var(--ink); min-width: 180px;
}
.filter-group select:focus, .filters input:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-tint);
}
.filters .search-group { flex: 1 1 240px; }
.filters .search-group input { width: 100%; }
.filters .clear {
  background: none; border: 0; color: var(--teal); font-weight: 600;
  cursor: pointer; font-size: 14px; padding: 9px 4px;
}
.filters .clear:hover { text-decoration: underline; }
.result-count { color: var(--ink-faint); font-size: .9rem; margin-bottom: 20px; }
.empty {
  text-align: center; padding: 60px 20px; color: var(--ink-faint);
  border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ------------------------------ entry page ------------------------------- */
.entry { padding: 56px 0 40px; }
.entry .wrap { max-width: 760px; }
.breadcrumb { font-size: .85rem; color: var(--ink-faint); margin-bottom: 26px; }
.breadcrumb a { color: var(--ink-faint); }
.breadcrumb a:hover { color: var(--teal); }
.entry .migration-label {
  font-family: "Fraunces", serif; color: var(--teal); font-weight: 600;
  font-size: 1.05rem; margin-bottom: 10px;
}
.entry h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 18px; }
.entry .entry-meta {
  display: flex; flex-wrap: wrap; gap: 10px 20px; padding: 18px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  margin-bottom: 32px; font-size: .92rem;
}
.entry .entry-meta div { display: flex; flex-direction: column; gap: 2px; }
.entry .entry-meta .k {
  font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600;
}
.entry .entry-meta .v { color: var(--ink); font-weight: 500; }
.entry .summary { font-size: 1.18rem; line-height: 1.7; color: var(--ink); }
.entry .summary p { margin: 0 0 1.1em; }
.source-box {
  background: var(--paper-dim); border: 1px solid var(--line); border-left: 3px solid var(--teal);
  border-radius: 8px; padding: 22px 24px; margin: 36px 0;
}
.source-box .k {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 600; margin-bottom: 8px;
}
.source-box .src-title { font-family: "Fraunces", serif; font-size: 1.12rem; margin-bottom: 4px; }
.source-box .src-pub { color: var(--ink-faint); font-size: .9rem; margin-bottom: 14px; }
.source-box .src-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.source-box .archived-note { font-size: .82rem; color: var(--ink-faint); margin-top: 12px; }
.entry .tags { margin: 8px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }

.disclaimer {
  font-size: .82rem; color: var(--ink-faint); font-style: italic;
  border-top: 1px solid var(--line); padding-top: 20px; margin-top: 40px;
}

/* ------------------------------ prose (about) ---------------------------- */
.prose { max-width: 720px; }
.prose h2 { font-size: 1.7rem; margin-top: 1.6em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.4em; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.callout {
  background: var(--teal-tint); border-radius: var(--radius); padding: 24px 26px;
  margin: 28px 0; border: 1px solid #cfe1df;
}
.callout p { color: var(--teal-dark); margin: 0; }

/* ------------------------------ stats strip ------------------------------ */
.stats { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 40px; }
.stat .num { font-family: "Fraunces", serif; font-size: 2.6rem; font-weight: 600; color: var(--teal); line-height: 1; }
.stat .lbl { font-size: .85rem; color: var(--ink-faint); margin-top: 6px; letter-spacing: .02em; }

/* ------------------------------ footer ----------------------------------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--paper-dim);
  margin-top: 72px; padding: 54px 0 40px;
}
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-footer .name { font-family: "Fraunces", serif; font-size: 1.3rem; margin-bottom: 10px; }
.site-footer p { color: var(--ink-faint); font-size: .92rem; max-width: 360px; }
.site-footer h4 {
  font-family: "Inter", sans-serif; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--ink-soft); font-size: .95rem; }
.site-footer a:hover { color: var(--teal); }
.site-footer .base {
  border-top: 1px solid var(--line); margin-top: 40px; padding-top: 22px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: .84rem; color: var(--ink-faint);
}
.site-footer .base a { color: var(--ink-faint); }

/* ------------------------------ responsive ------------------------------- */
@media (max-width: 820px) {
  .axes { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 32px; }
  .nav {
    display: none; position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: 8px 24px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; }
  .nav a.active::after { display: none; }
  .nav-toggle { display: block; }
  .hero { padding: 56px 0 40px; }
  .filters .row { flex-direction: column; align-items: stretch; }
  .filter-group select { min-width: 0; width: 100%; }
}
