/* ═══════════════════════════════════════════════
   LIBERTAS NUMERIS — style.css
   Fonts: Fraunces (display) · Source Serif 4 (body) · IBM Plex Mono (UI)
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,300;1,9..144,400;1,9..144,600&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300;1,8..60,400&family=IBM+Plex+Mono:wght@300;400&display=swap');

/* ── TOKENS ─────────────────────────────────── */
:root {
  --bg:       #f5f2ed;
  --surface:  #ffffff;
  --card:     #edeae3;
  --ink:      #1e1a13;
  --muted:    #6c6153;
  --faint:    #dedad1;
  --gold:     #96700e;
  --gold-lt:  #bf9638;
  --gold-bg:  #fdf6e8;
  --terra:    #8b3e28;

  --ff-display: 'Fraunces', Georgia, serif;
  --ff-body:    'Source Serif 4', Georgia, serif;
  --ff-mono:    'IBM Plex Mono', 'Courier New', monospace;

  --maxw: 1080px;
  --pad:  28px;
  --r:    4px;
}

em.gold, .gold { color: var(--gold); font-style: normal; }


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; }
img   { display: block; max-width: 100%; }
a     { color: inherit; text-decoration: none; }

/* ── BASE ────────────────────────────────────── */
body {
  background:  var(--bg);
  color:       var(--ink);
  font-family: var(--ff-body);
  font-size:   18px;
  font-weight: 400;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* ── UTILITIES ───────────────────────────────── */
.wrap {
  max-width: var(--maxw);
  margin:    0 auto;
  padding:   0 var(--pad);
}

/* ── HEADER ──────────────────────────────────── */
header {
  position:       sticky;
  top:            0;
  z-index:        100;
  background:     rgba(245,242,237,.95);
  backdrop-filter: blur(10px);
  border-bottom:  1px solid var(--faint);
}
.header-inner {
  max-width:      var(--maxw);
  margin:         0 auto;
  padding:        0 var(--pad);
  height:         64px;
  display:        flex;
  align-items:    center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display:     flex;
  align-items: center;
  gap:         14px;
}
.logo img {
  height: 40px;
  width:  auto;
}
.logo-name {
  font-family:    var(--ff-display);
  font-size:      20px;
  font-weight:    600;
  letter-spacing: .02em;
  color:          var(--ink);
}
.logo-sub {
  font-family:    var(--ff-mono);
  font-size:      10px;
  color:          var(--gold);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-top:     2px;
}

/* Nav */
nav {
  display:     flex;
  align-items: center;
  gap:         4px;
}
nav a {
  font-family:    var(--ff-mono);
  font-size:      11px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color:          var(--muted);
  padding:        6px 12px;
  border-radius:  var(--r);
  transition:     color .2s, background .2s;
}
nav a:hover,
nav a.active {
  color:      var(--ink);
  background: var(--faint);
}
nav .nav-cta {
  color:        var(--gold);
  border:       1px solid var(--gold);
  margin-left:  8px;
}
nav .nav-cta:hover {
  background: var(--gold);
  color:      #fff;
}

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  font-family:    var(--ff-mono);
  font-size:      11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding:        11px 24px;
  border-radius:  var(--r);
  transition:     all .2s;
  display:        inline-block;
  cursor:         pointer;
  border:         none;
}
.btn-primary {
  background: var(--gold);
  color:      #fff;
}
.btn-primary:hover { background: #745409; }
.btn-ghost {
  border: 1px solid var(--faint);
  color:  var(--muted);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color:        var(--gold);
}

/* ── SECTION HEADER ──────────────────────────── */
.section-header {
  display:      flex;
  align-items:  baseline;
  gap:          16px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--faint);
}
.section-header h2 {
  font-family: var(--ff-display);
  font-size:   26px;
  font-weight: 400;
  color:       var(--ink);
}
.section-label {
  font-family:    var(--ff-mono);
  font-size:      10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color:          var(--gold);
}

/* ── PAGE HERO (mission / principles) ────────── */
.page-hero {
  padding:       80px 0 68px;
  background:    var(--surface);
  border-bottom: 1px solid var(--faint);
}
.page-eyebrow {
  font-family:    var(--ff-mono);
  font-size:      10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color:          var(--gold);
  margin-bottom:  18px;
}
.page-hero h1 {
  font-family:  var(--ff-display);
  font-size:    clamp(40px, 5vw, 66px);
  font-weight:  300;
  line-height:  1.06;
  color:        var(--ink);
  margin-bottom: 20px;
}
.page-hero h1 em {
  font-style: italic;
  color:      var(--gold);
}
.page-lead {
  font-family: var(--ff-body);
  font-size:   18px;
  color:       var(--muted);
  max-width:   70ch;
  line-height: 1.82;
  font-weight: 300;
}

/* ── PROSE (mission) ─────────────────────────── */
.prose h2 {
  font-family:   var(--ff-display);
  font-size:     30px;
  font-weight:   400;
  color:         var(--ink);
  margin-bottom: 22px;
}
.prose p {
  font-family: var(--ff-body);
  font-size:   17px;
  color:       var(--muted);
  line-height: 1.85;
  font-weight: 300;
}
.prose p + p { margin-top: 18px; }
.prose strong {
  color:       var(--ink);
  font-weight: 600;
}
.pullquote {
  border-left: 3px solid var(--gold-lt);
  padding:     20px 26px;
  margin:      34px 0;
  background:  var(--gold-bg);
  border-radius: 0 var(--r) var(--r) 0;
}
.pullquote p {
  font-family: var(--ff-display);
  font-style:  italic;
  font-size:   21px !important;
  font-weight: 300 !important;
  color:       var(--ink) !important;
  line-height: 1.5;
}

/* ── SIDEBAR (mission) ───────────────────────── */
.content-grid {
  display:               grid;
  grid-template-columns: 1fr 1px 300px;
  gap:                   56px;
}
.divider-v { background: var(--faint); }

.sidebar-label {
  font-family:    var(--ff-mono);
  font-size:      10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color:          var(--gold);
  margin-bottom:  14px;
}
.sidebar-block + .sidebar-block {
  margin-top:   36px;
  padding-top:  36px;
  border-top:   1px solid var(--faint);
}

.focus-list { list-style: none; }
.focus-list li {
  font-family:  var(--ff-body);
  font-size:    15px;
  color:        var(--muted);
  padding:      8px 0;
  border-bottom: 1px solid var(--faint);
  display:      flex;
  align-items:  flex-start;
  gap:          10px;
}
.focus-list li::before {
  content:        '—';
  color:          var(--gold);
  flex-shrink:    0;
  font-family:    var(--ff-mono);
  font-size:      11px;
  margin-top:     2px;
}
.join-links { display: flex; flex-direction: column; gap: 8px; }
.join-links a {
  font-family:    var(--ff-mono);
  font-size:      11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color:          var(--muted);
  border:         1px solid var(--faint);
  padding:        10px 14px;
  border-radius:  var(--r);
  transition:     all .2s;
  display:        flex;
  align-items:    center;
  justify-content: space-between;
}
.join-links a:hover { border-color: var(--gold); color: var(--gold); }
.join-links a::after { content: '↗'; font-size: 12px; }

/* ── PRINCIPLES PAGE ─────────────────────────── */
.motto-strip {
  background:    var(--surface);
  border-bottom: 1px solid var(--faint);
  padding:       22px 0;
}
.motto-inner {
  max-width:  var(--maxw);
  margin:     0 auto;
  padding:    0 var(--pad);
  display:    flex;
  align-items: stretch;
}
.motto-item {
  flex:        1;
  padding:     0 24px;
  border-right: 1px solid var(--faint);
  text-align:  center;
}
.motto-item:first-child { padding-left: 0; }
.motto-item:last-child  { border-right: none; padding-right: 0; }
.motto-latin {
  font-family:   var(--ff-display);
  font-style:    italic;
  font-size:     15px;
  color:         var(--gold);
  margin-bottom: 4px;
}
.motto-en {
  font-family:    var(--ff-mono);
  font-size:      9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color:          var(--muted);
}

.principles-section { padding: 64px 0 84px; }
.principle-block {
  display:               grid;
  grid-template-columns: 110px 1fr;
  border:                1px solid var(--faint);
  border-radius:         var(--r);
  background:            var(--surface);
  overflow:              hidden;
  margin-bottom:         2px;
  transition:            border-color .2s;
}
.principle-block:hover { border-color: var(--gold-lt); }
.principle-num-col {
  background:    var(--card);
  display:       flex;
  align-items:   center;
  justify-content: center;
  border-right:  1px solid var(--faint);
}
.principle-roman {
  font-family: var(--ff-display);
  font-size:   52px;
  font-weight: 300;
  color:       var(--faint);
  line-height: 1;
  transition:  color .2s;
}
.principle-block:hover .principle-roman { color: var(--gold-lt); }
.principle-body  { padding: 32px 38px; }
.principle-latin {
  font-family:   var(--ff-display);
  font-style:    italic;
  font-size:     15px;
  color:         var(--gold);
  margin-bottom: 6px;
}
.principle-body h3 {
  font-family:   var(--ff-display);
  font-size:     26px;
  font-weight:   400;
  color:         var(--ink);
  margin-bottom: 14px;
}
.principle-body p {
  font-family: var(--ff-body);
  font-size:   16px;
  color:       var(--muted);
  line-height: 1.82;
  font-weight: 300;
}

/* ── INDEX — HERO ────────────────────────────── */
.hero {
  padding:       36px 0 32px;
  border-bottom: 1px solid var(--faint);
  background:    var(--surface);
}
.hero-inner {
  max-width:             var(--maxw);
  margin:                0 auto;
  padding:               0 var(--pad);
  display:               grid;
  grid-template-columns: 1fr auto;
  gap:                   52px;
  align-items:           center;
}
.hero-eyebrow {
  font-family:    var(--ff-mono);
  font-size:      10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color:          var(--gold);
  margin-bottom:  18px;
  display:        flex;
  align-items:    center;
  gap:            12px;
}
.hero-eyebrow::after {
  content:    '';
  display:    block;
  height:     1px;
  width:      30px;
  background: var(--gold-lt);
}
.hero h1 {
  font-family:   var(--ff-display);
  font-size:     clamp(42px, 5.5vw, 66px);
  font-weight:   300;
  line-height:   1.06;
  color:         var(--ink);
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: italic;
  color:      var(--gold);
}
.hero-motto {
  font-family:    var(--ff-mono);
  font-size:      10px;
  letter-spacing: .14em;
  color:          var(--muted);
  text-transform: uppercase;
  margin-bottom:  26px;
}
.hero-lead {
  font-family:   var(--ff-body);
  font-size:     15px;
  color:         var(--muted);
  line-height:   1.78;
  font-weight:   300;
  max-width:     72ch;
  margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero sidebar card */
.hero-card {
  background:    var(--card);
  border:        1px solid var(--faint);
  border-radius: var(--r);
  padding:       28px 28px;
  text-align:    center;
  min-width:     196px;
}
.hero-card-name {
  font-family:    var(--ff-display);
  font-size:      15px;
  font-weight:    600;
  letter-spacing: .03em;
  color:          var(--ink);
  margin-bottom:  8px;
}
.hero-card-sep {
  width:      32px;
  height:     1px;
  background: var(--faint);
  margin:     8px auto 14px;
}
.hero-card-motto {
  font-family: var(--ff-display);
  font-style:  italic;
  font-size:   13px;
  color:       var(--muted);
  line-height: 1.7;
}
.hero-card-links { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.hero-card-links a {
  font-family:    var(--ff-mono);
  font-size:      10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color:          var(--gold);
  border:         1px solid var(--faint);
  padding:        8px 14px;
  border-radius:  var(--r);
  transition:     all .2s;
  display:        flex;
  align-items:    center;
  justify-content: space-between;
}
.hero-card-links a:hover { border-color: var(--gold); background: var(--gold); color: #fff; }
.hero-card-links a::after { content: '↗'; font-size: 11px; }

/* ── INDEX — ARTICLES ────────────────────────── */
#articles { padding: 62px 0 84px; }

/* Shared article meta */
.article-badge {
  font-family:    var(--ff-mono);
  font-size:      10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color:          var(--gold);
  margin-bottom:  14px;
}
.article-date {
  font-family:    var(--ff-mono);
  font-size:      10px;
  letter-spacing: .1em;
  color:          var(--muted);
  margin-bottom:  10px;
}
.read-link {
  font-family:    var(--ff-mono);
  font-size:      11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color:          var(--gold);
  display:        inline-flex;
  align-items:    center;
  gap:            8px;
  transition:     gap .2s;
}
.read-link:hover { gap: 14px; }

/* Featured */
.article-featured {
  display:               grid;
  grid-template-columns: 1fr 1fr;
  border:                1px solid var(--faint);
  border-radius:         var(--r);
  overflow:              hidden;
  margin-bottom:         2px;
  background:            var(--surface);
  transition:            border-color .2s;
}
.article-featured:hover { border-color: var(--gold-lt); }

.featured-img {
  background:      var(--card);
  min-height:      300px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  overflow:        hidden;
}
.featured-img img {
  width:       100%;
  height:      100%;
  object-fit:  cover;
  opacity:     .85;
}
.featured-img-placeholder {
  font-family: var(--ff-display);
  font-size:   110px;
  font-weight: 300;
  color:       var(--faint);
  line-height: 1;
  user-select: none;
}
.featured-body {
  padding:         36px 34px;
  display:         flex;
  flex-direction:  column;
  justify-content: center;
  border-left:     1px solid var(--faint);
}
.featured-title {
  font-family:   var(--ff-display);
  font-size:     30px;
  font-weight:   400;
  color:         var(--ink);
  line-height:   1.2;
  margin-bottom: 16px;
}
.featured-title a { transition: color .2s; }
.featured-title a:hover { color: var(--gold); }
.article-excerpt {
  font-family:   var(--ff-body);
  font-size:     16px;
  color:         var(--muted);
  line-height:   1.8;
  font-weight:   300;
  margin-bottom: 24px;
  flex:          1;
}

/* Grid cards */
.articles-grid {
  display:               grid;
  grid-template-columns: repeat(3, 1fr);
  gap:                   1px;
  background:            var(--faint);
  border:                1px solid var(--faint);
  border-top:            none;
  border-radius:         0 0 var(--r) var(--r);
  overflow:              hidden;
}
.article-card {
  background:  var(--surface);
  padding:     24px 22px;
  transition:  background .2s;
}
.article-card:hover { background: var(--card); }
.card-img {
  width:         100%;
  height:        140px;
  object-fit:    cover;
  display:       block;
  margin:        -24px -22px 16px;
  width:         calc(100% + 44px);
  opacity:       .88;
}

  font-family:   var(--ff-display);
  font-size:     20px;
  font-weight:   400;
  color:         var(--ink);
  line-height:   1.28;
  margin-bottom: 10px;
}
.card-title a { transition: color .2s; }
.card-title a:hover { color: var(--gold); }
.card-excerpt {
  font-family:   var(--ff-body);
  font-size:     14.5px;
  color:         var(--muted);
  line-height:   1.68;
  font-weight:   300;
  margin-bottom: 16px;
}

/* States */
.sw-loading {
  min-height:      240px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  border:          1px solid var(--faint);
  border-radius:   var(--r);
  background:      var(--surface);
  margin-bottom:   2px;
}
.sw-loading p {
  font-family: var(--ff-display);
  font-style:  italic;
  font-size:   20px;
  color:       var(--muted);
}
.sw-error {
  padding:       50px 24px;
  text-align:    center;
  border:        1px solid var(--faint);
  border-radius: var(--r);
  background:    var(--surface);
}
.sw-error p {
  font-family:   var(--ff-mono);
  font-size:     12px;
  color:         var(--terra);
  margin-bottom: 16px;
}
.articles-footer { margin-top: 32px; text-align: center; }

/* ── FOOTER ──────────────────────────────────── */
footer { border-top: 1px solid var(--faint); padding: 36px 0; }
.footer-inner {
  max-width:       var(--maxw);
  margin:          0 auto;
  padding:         0 var(--pad);
  display:         flex;
  align-items:     center;
  justify-content: space-between;
  flex-wrap:       wrap;
  gap:             16px;
}
.footer-name {
  font-family: var(--ff-display);
  font-size:   17px;
  font-weight: 600;
  color:       var(--ink);
}
.footer-motto {
  font-family:    var(--ff-mono);
  font-size:      10px;
  letter-spacing: .1em;
  color:          var(--muted);
  margin-top:     4px;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a {
  font-family:    var(--ff-mono);
  font-size:      10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color:          var(--muted);
  transition:     color .2s;
}
.footer-links a:hover { color: var(--gold); }

/* ── ANIMATIONS ──────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-inner > * { animation: fadeUp .65s ease both; }
.hero-inner > *:nth-child(1) { animation-delay: .05s; }
.hero-inner > *:nth-child(2) { animation-delay: .2s; }

/* ── HAMBURGER MENU ──────────────────────────── */
.nav-toggle {
  display:        none;
  flex-direction: column;
  justify-content: center;
  gap:            5px;
  cursor:         pointer;
  padding:        8px;
  background:     none;
  border:         none;
  border-radius:  var(--r);
}
.nav-toggle span {
  display:    block;
  width:      22px;
  height:     2px;
  background: var(--ink);
  transition: all .25s;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  nav {
    display:        none;
    position:       absolute;
    top:            64px;
    left:           0;
    right:          0;
    background:     rgba(245,242,237,.98);
    backdrop-filter: blur(10px);
    border-bottom:  1px solid var(--faint);
    padding:        10px var(--pad) 16px;
    flex-direction: column;
    gap:            2px;
    z-index:        99;
  }
  nav.open  { display: flex; }
  nav a     { font-size: 12px; padding: 10px 12px; }
  nav a:not(.nav-cta) { display: flex; }
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner            { grid-template-columns: 1fr; }
  .hero-card             { display: none; }
  .article-featured      { grid-template-columns: 1fr; }
  .featured-img          { min-height: 200px; }
  .featured-body         { border-left: none; border-top: 1px solid var(--faint); }
  .articles-grid         { grid-template-columns: repeat(2, 1fr); }
  .content-grid          { grid-template-columns: 1fr; }
  .divider-v             { display: none; }
}
@media (max-width: 700px) {
  .principle-block       { grid-template-columns: 1fr; }
  .principle-num-col     { padding: 18px 0; border-right: none; border-bottom: 1px solid var(--faint); }
  .motto-inner           { flex-wrap: wrap; gap: 16px; }
  .motto-item            { flex: 1 1 45%; border-right: none; padding: 0; text-align: left; }
}
@media (max-width: 600px) {
  :root                  { --pad: 16px; }
  .articles-grid         { grid-template-columns: 1fr; }
  .hero                  { padding: 28px 0 24px; }
}
