/* croviconsulting.com — design system */
:root {
  --c-bg: #fafaf7;
  --c-surface: #ffffff;
  --c-ink: #1a1d23;
  --c-ink-soft: #5b6470;
  --c-line: #e8e6df;
  --c-brand: #b8472b;
  --c-brand-dark: #8f3520;
  --c-accent: #d4a531;
  --max-w: 1100px;
  --max-w-text: 740px;
  --r: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-display: Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--c-brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--c-brand-dark); text-decoration-thickness: 2px; }

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; color: var(--c-ink); letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); margin: 0 0 .8rem; }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin: 2.2rem 0 .8rem; }
h3 { font-size: 1.2rem; margin: 1.8rem 0 .6rem; }

p { margin: 0 0 1.1rem; }
ul, ol { padding-left: 1.4rem; margin: 0 0 1.1rem; }
li { margin-bottom: .35rem; }

blockquote { border-left: 3px solid var(--c-brand); margin: 1.5rem 0; padding: .25rem 0 .25rem 1.2rem; color: var(--c-ink-soft); font-style: italic; }
code { background: #f1efe9; padding: 2px 6px; border-radius: 3px; font-size: .92em; }
pre { background: #1a1d23; color: #f8f8f2; padding: 1rem; border-radius: var(--r); overflow-x: auto; }
hr { border: 0; border-top: 1px solid var(--c-line); margin: 2.4rem 0; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.container-text { max-width: var(--max-w-text); margin: 0 auto; padding: 0 1.25rem; }

/* === Skip link === */
.skip-link { position: absolute; left: -9999px; top: 0; padding: .6rem 1rem; background: var(--c-ink); color: #fff; z-index: 100; }
.skip-link:focus { left: 0; }

/* === Header === */
.site-header { background: var(--c-surface); border-bottom: 1px solid var(--c-line); position: sticky; top: 0; z-index: 50; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; max-width: var(--max-w); margin: 0 auto; }
.site-logo { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--c-ink); text-decoration: none; letter-spacing: -.01em; }
.site-logo:hover { color: var(--c-brand); text-decoration: none; }
.site-logo span { color: var(--c-brand); }

.site-nav { display: flex; gap: 1.6rem; }
.site-nav a { color: var(--c-ink); text-decoration: none; font-size: .95rem; font-weight: 500; }
.site-nav a:hover { color: var(--c-brand); }
.site-nav a.is-active { color: var(--c-brand); }

.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--c-ink); }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--c-surface); border-bottom: 1px solid var(--c-line); padding: 1rem 1.25rem; gap: .8rem; }
  .site-nav.is-open { display: flex; }
}

/* === Hero === */
.hero { padding: 3.5rem 1.25rem 2.5rem; text-align: center; }
.hero__eyebrow { color: var(--c-brand); font-size: .85rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: .8rem; }
.hero h1 { max-width: 22ch; margin-left: auto; margin-right: auto; }
.hero__lead { font-size: 1.15rem; color: var(--c-ink-soft); max-width: 56ch; margin: 1rem auto 0; }

/* === Cards / Article grid === */
.section { padding: 3rem 0; }
.section__title { text-align: center; margin-bottom: 2.2rem; }
.section__title h2 { margin-top: 0; }
.section__title p { color: var(--c-ink-soft); max-width: 60ch; margin: .4rem auto 0; }

.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r); padding: 1.4rem; transition: transform .15s ease, box-shadow .15s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card__category { font-size: .78rem; font-weight: 600; color: var(--c-brand); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.card h3 { margin: 0 0 .5rem; font-size: 1.15rem; line-height: 1.3; }
.card h3 a { color: var(--c-ink); text-decoration: none; }
.card h3 a:hover { color: var(--c-brand); }
.card__excerpt { color: var(--c-ink-soft); font-size: .95rem; flex-grow: 1; margin-bottom: .8rem; }
.card__meta { font-size: .82rem; color: var(--c-ink-soft); display: flex; gap: .6rem; align-items: center; }

/* === Article === */
.article-header { padding: 2.5rem 0 1.5rem; text-align: center; border-bottom: 1px solid var(--c-line); margin-bottom: 2.5rem; }
.article-header .breadcrumbs { font-size: .85rem; color: var(--c-ink-soft); margin-bottom: 1rem; }
.article-header .breadcrumbs a { color: var(--c-ink-soft); }
.article-header h1 { margin-bottom: .8rem; }
.article-meta { font-size: .9rem; color: var(--c-ink-soft); display: flex; gap: 1rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.article-meta time { font-variant-numeric: tabular-nums; }

.article-body { font-size: 1.08rem; }
.article-body p:first-of-type::first-letter { font-family: var(--font-display); font-size: 3.2rem; font-weight: 700; float: left; line-height: 1; margin: .15rem .6rem 0 0; color: var(--c-brand); }
.article-body figure { margin: 2rem 0; }
.article-body figcaption { font-size: .85rem; color: var(--c-ink-soft); text-align: center; margin-top: .5rem; }

.toc { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r); padding: 1.2rem 1.4rem; margin-bottom: 2rem; }
.toc__title { font-weight: 600; font-size: .95rem; margin-bottom: .6rem; text-transform: uppercase; letter-spacing: .04em; color: var(--c-ink-soft); }
.toc ol { margin: 0; padding-left: 1.2rem; }

/* === Author box === */
.author-box { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r); padding: 1.4rem; margin: 3rem 0; display: flex; gap: 1.2rem; align-items: flex-start; }
.author-box__photo { width: 64px; height: 64px; border-radius: 50%; background: var(--c-line); flex-shrink: 0; }
.author-box__name { font-weight: 600; margin-bottom: .2rem; }
.author-box__bio { font-size: .92rem; color: var(--c-ink-soft); margin: 0; }

/* === CTA === */
.cta-block { background: linear-gradient(135deg, var(--c-brand) 0%, var(--c-brand-dark) 100%); color: #fff; padding: 3rem 1.5rem; border-radius: var(--r); text-align: center; margin: 3rem 0; }
.cta-block h2 { color: #fff; margin-top: 0; }
.cta-block p { color: rgba(255,255,255,.9); max-width: 50ch; margin-left: auto; margin-right: auto; }
.btn { display: inline-block; padding: .85rem 1.6rem; background: #fff; color: var(--c-brand); border-radius: var(--r); text-decoration: none; font-weight: 600; transition: transform .15s; }
.btn:hover { transform: translateY(-1px); text-decoration: none; color: var(--c-brand-dark); }
.btn--outline { background: transparent; color: #fff; border: 2px solid #fff; }

/* === Footer === */
.site-footer { background: #1a1d23; color: #b4b9c2; padding: 3rem 1.25rem 1.5rem; margin-top: 4rem; }
.site-footer__grid { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .9rem; }
.site-footer a { color: #b4b9c2; text-decoration: none; display: block; padding: .25rem 0; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.site-footer__about { font-size: .92rem; line-height: 1.6; }
.site-footer__bottom { max-width: var(--max-w); margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid #2a2d33; font-size: .82rem; color: #6c727b; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

/* === Utility === */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.tag { display: inline-block; padding: .2rem .6rem; background: #f1efe9; color: var(--c-ink-soft); border-radius: 100px; font-size: .78rem; font-weight: 500; }

/* === 404 === */
.page-404 { padding: 6rem 1.25rem; text-align: center; }
.page-404 h1 { font-size: 5rem; color: var(--c-brand); margin-bottom: 0; }

/* === print === */
@media print { .site-header, .site-footer, .cta-block, .author-box { display: none; } }
