/* ═══════════════════════════════════════════
   Manuskrito – Design System
   Palette: deep navy + warm gold + cream paper
   Type: Playfair Display (display) + DM Sans (body)
═══════════════════════════════════════════ */

:root {
  --ink:       #0f1723;
  --navy:      #1a2844;
  --navy-mid:  #243563;
  --gold:      #c9973a;
  --gold-lt:   #e8b85a;
  --cream:     #f7f3ec;
  --paper:     #fdf9f4;
  --mist:      #eae4d9;
  --text:      #2c3347;
  --text-sub:  #5a6278;
  --white:     #ffffff;
  --radius:    6px;
  --radius-lg: 14px;
  --shadow:    0 4px 24px rgba(15,23,35,.10);
  --shadow-lg: 0 12px 48px rgba(15,23,35,.18);
  --max-w:     1140px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Typography helpers ── */
.serif { font-family: 'Playfair Display', Georgia, serif; }
h1,h2,h3 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
p  { max-width: 68ch; }

/* ══════════════════════════════════
   HEADER / NAV
══════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid rgba(201,151,58,.25);
  backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: .6rem;
  flex-shrink: 0;
}
.logo-mark {
  width: 34px; height: 34px;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
}
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--white);
  letter-spacing: .01em;
}
.nav-links {
  display: flex; align-items: center; gap: .25rem;
  flex-wrap: wrap;
}
.nav-links a {
  color: rgba(255,255,255,.78);
  font-size: .875rem;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover { color: var(--gold-lt); background: rgba(255,255,255,.06); }
.nav-cta {
  background: var(--gold) !important;
  color: var(--navy) !important;
  font-weight: 600 !important;
  padding: .45rem 1rem !important;
  border-radius: var(--radius) !important;
}
.nav-cta:hover { background: var(--gold-lt) !important; }
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: .4rem;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: var(--transition);
}

/* ══════════════════════════════════
   SHARED SECTION UTILITIES
══════════════════════════════════ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-alt { background: var(--cream); }
.section-dark { background: var(--navy); color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: .75rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}
.lead {
  font-size: 1.15rem; color: var(--text-sub);
  max-width: 62ch; line-height: 1.7;
}
.lead-white { color: rgba(255,255,255,.7); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  border: 2px solid transparent;
}
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-lt); }
.btn-outline { border-color: var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--navy); }
.btn-white { background: var(--white); color: var(--navy); }
.btn-white:hover { background: var(--cream); }
.btn-ghost { color: var(--gold); }
.btn-ghost:hover { text-decoration: underline; }

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

/* Stat boxes */
.stat-block { text-align: center; padding: 2rem 1.5rem; }
.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--gold);
  line-height: 1;
  margin-bottom: .25rem;
}
.stat-label { font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-sub); }

/* Page hero */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(201,151,58,.12) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero h1 { color: var(--white); }
.page-hero .lead { color: rgba(255,255,255,.72); }

/* Tag pill */
.pill {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 999px;
  font-size: .78rem; font-weight: 600;
  background: rgba(201,151,58,.15);
  color: var(--gold);
  border: 1px solid rgba(201,151,58,.3);
  margin-bottom: 1rem;
}

/* Divider */
.gold-divider {
  width: 56px; height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin: 1.25rem 0;
}

/* List style */
.styled-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.styled-list li {
  padding-left: 1.4rem;
  position: relative;
  font-size: .95rem;
  color: var(--text-sub);
}
.styled-list li::before {
  content: '→';
  position: absolute; left: 0;
  color: var(--gold);
}

/* ══════════════════════════════════
   HOME – HERO
══════════════════════════════════ */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 85% 40%, rgba(201,151,58,.13) 0%, transparent 65%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(36,53,99,.5) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem;
}
.hero h1 { color: var(--white); margin-bottom: 1.25rem; max-width: 16ch; }
.hero h1 em { color: var(--gold-lt); font-style: italic; }
.hero .lead { margin-bottom: 2rem; color: rgba(255,255,255,.72); }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Home stats bar */
.stats-bar {
  background: var(--cream);
  border-bottom: 1px solid var(--mist);
  padding: 2.5rem 0;
}
.stats-bar .container { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-around; }

/* Feature grid */
.feature-icon {
  width: 48px; height: 48px;
  background: rgba(201,151,58,.12);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.65);
  padding: 4rem 0 0;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 2.5rem;
}
.footer-brand .footer-logo {
  display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem;
}
.footer-brand .logo-text { color: var(--white); }
.footer-tagline { font-size: .875rem; max-width: 24ch; line-height: 1.5; }
.footer-col h4 {
  font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .85rem;
}
.footer-col a {
  display: block; font-size: .875rem;
  padding: .2rem 0;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--gold-lt); }
.footer-links { display: contents; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.25rem 1.5rem;
  max-width: var(--max-w); margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between;
  font-size: .8rem;
}

/* ══════════════════════════════════
   BLOG LIST
══════════════════════════════════ */
.blog-card { display: flex; flex-direction: column; gap: .75rem; }
.blog-card .pill { margin-bottom: 0; }
.blog-card h3 a:hover { color: var(--gold); }
.blog-card .meta { font-size: .8rem; color: var(--text-sub); }

/* ══════════════════════════════════
   CONTACT FORM
══════════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.25rem; }
.form-group label { font-size: .85rem; font-weight: 600; }
.form-group input,
.form-group textarea,
.form-group select {
  padding: .65rem .9rem;
  border: 1.5px solid var(--mist);
  border-radius: var(--radius);
  font-family: inherit; font-size: .95rem;
  background: var(--white);
  transition: border-color var(--transition);
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
}
.form-group textarea { min-height: 130px; resize: vertical; }

/* Notice box */
.notice {
  background: rgba(201,151,58,.1);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  font-size: .9rem;
}

/* ══════════════════════════════════
   404
══════════════════════════════════ */
.error-page {
  min-height: 60vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 4rem 1.5rem;
}
.error-code {
  font-family: 'Playfair Display', serif;
  font-size: 8rem; line-height: 1;
  color: var(--mist); margin-bottom: .5rem;
}

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--navy); padding: 1rem 1.5rem 1.5rem; border-bottom: 1px solid rgba(201,151,58,.2); }
  .nav-links.is-open { display: flex; }
  .nav-toggle { display: flex; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero { padding: 4rem 0 3.5rem; }
  .section { padding: 3.5rem 0; }
}
@media (max-width: 420px) {
  .footer-inner { grid-template-columns: 1fr; }
}
