/*
Theme Name: HCK Autoritet
Theme URI: https://informatickicentar.com/
Author: CIP — Centar za Informatičku Podršku
Author URI: https://informatickicentar.com/
Description: Shared brand-locked theme for the Hristov Consulting web estate — aleksandrahristov.com (EN, personal authority, Insights-led) and odnosisajavnoscu.com (SR-Latn, agency newsroom, Vesti-led). Direction A "Autoritet": corporate neo-grotesque, two-tone red/charcoal signature, statement headlines. One system, two sites, driven by the hck_site_mode option. Gutenberg-editable via block patterns + theme.json.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: Proprietary — CIP client work
Text Domain: hck
*/

/* =========================================================================
   HCK Autoritet — brand-locked design system
   Palette derived from the authoritative vector logo + NY cards (LOCKED).
   HRISTOV = red, CONSULTING = charcoal on white. Red is the only accent.
   ========================================================================= */

:root {
  --brand-red: #C4262B;
  --brand-red-ink: #A81F24;   /* darker red for text-on-light AA */
  --ink: #1E1A1B;
  --ground: #FFFFFF;
  --body: #4A4540;
  --muted: #8A8378;
  --line: #E6E3DD;
  --panel: #F6F4F1;
  --panel-red: #FBF1F1;       /* faint red wash for newsletter well */

  --maxw: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 2px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;

  --step--1: clamp(0.8rem, 0.77rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4:  clamp(2.6rem, 1.9rem + 3.4vw, 4.6rem);
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-red-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { color: var(--ink); font-weight: 800; line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: var(--step-4); font-weight: 900; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1.1em; }
.em-red { color: var(--brand-red); }
strong { color: var(--ink); }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }
.eyebrow {
  font-size: var(--step--1); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand-red); margin: 0 0 1rem;
}
.eyebrow--muted { color: var(--muted); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font-weight: 700; font-size: var(--step--1); letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none; padding: 0.95em 1.6em; border-radius: var(--radius);
  border: 1.5px solid var(--ink); transition: background .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.2) blur(6px);
}
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 64px; }
.brand { display: flex; flex-direction: column; line-height: 1; text-decoration: none; }
.brand__name { font-weight: 900; letter-spacing: -0.01em; font-size: 1.02rem; color: var(--ink); text-transform: uppercase; }
.brand__name .em-red { color: var(--brand-red); }
.brand__tag { font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-top: 3px; font-weight: 600; }
.nav-primary { display: flex; align-items: center; gap: 1.6rem; }
.nav-primary ul { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav-primary a { color: var(--ink); text-decoration: none; font-size: var(--step--1); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav-primary a:hover, .nav-primary .current-menu-item > a { border-bottom-color: var(--brand-red); }
.nav-cta .btn { padding: 0.6em 1.1em; }
.family-switch { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-decoration: none; font-weight: 700; border: 1px solid var(--line); padding: 6px 10px; border-radius: var(--radius); }
.family-switch:hover { border-color: var(--brand-red); color: var(--brand-red); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

/* ---------- hero (front page) ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__title { font-size: var(--step-4); font-weight: 900; letter-spacing: -0.025em; line-height: 1.02; }
.hero__lead { font-size: var(--step-1); color: var(--body); max-width: 34ch; margin-top: 1.2rem; line-height: 1.5; }
.hero__cta { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero__media { position: relative; }
.hero__media img { width: 100%; filter: grayscale(1) contrast(1.02); border-radius: var(--radius); }
.hero__media--placeholder { aspect-ratio: 3/4; background: linear-gradient(160deg, var(--panel), #ded9d2); display: grid; place-items: center; color: var(--muted); font-size: var(--step--1); letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- credibility strip ---------- */
.credstrip { border-block: 1px solid var(--line); background: var(--panel); }
.credstrip__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; padding-block: 1.1rem; }
.credstrip__item { font-size: var(--step--1); color: var(--ink); }
.credstrip__item .lbl { color: var(--muted); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-right: 0.6rem; }
.credstrip__item .vals { font-style: italic; }

/* ---------- featured insight ---------- */
.feature-card { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 3rem); background: var(--ground); }
.feature-card__meta { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.tag { display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--radius); background: var(--panel-red); color: var(--brand-red); }
.tag--ink { background: var(--panel); color: var(--muted); }
.feature-card__date { font-size: var(--step--1); color: var(--muted); }
.feature-card h2 { font-size: var(--step-3); margin: 0 0 0.6rem; }
.feature-card p { max-width: 62ch; }
.readmore { font-weight: 700; color: var(--brand-red); text-decoration: none; font-size: var(--step--1); letter-spacing: 0.04em; text-transform: uppercase; }
.readmore:hover { color: var(--ink); }
.readmore::after { content: " →"; }

/* ---------- section head ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.section-head .viewall { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--ink); }
.section-head .viewall:hover { color: var(--brand-red); }

/* ---------- card grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; background: var(--ground); transition: border-color .15s, transform .15s; text-decoration: none; }
.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card__kicker { margin-bottom: 0.9rem; }
.card__title { font-size: var(--step-1); color: var(--ink); font-weight: 800; line-height: 1.12; margin: 0 0 1.2rem; }
.card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 1rem; border-top: 1px solid var(--line); font-size: var(--step--1); }
.card__source { text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.card__year { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- pull quote band ---------- */
.quoteband { background: var(--ink); color: #F0ECE6; border-left: 6px solid var(--brand-red); padding: clamp(2rem, 5vw, 3.5rem); border-radius: var(--radius); }
.quoteband blockquote { margin: 0; font-family: var(--font-sans); font-weight: 800; font-style: italic; font-size: var(--step-2); line-height: 1.35; letter-spacing: -0.01em; }
.quoteband cite { display: block; margin-top: 1.4rem; font-style: normal; font-size: var(--step--1); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand-red); }

/* ---------- newsletter CTA ---------- */
.newsletter { background: var(--panel-red); }
.newsletter__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.newsletter h2 { margin: 0 0 0.6rem; }
.newsletter p { margin: 0; color: var(--body); max-width: 44ch; }
.newsletter__form { display: flex; gap: 0.75rem; }
.newsletter__form input[type=email] { flex: 1; padding: 0.95em 1.1em; border: 1.5px solid var(--line); border-radius: var(--radius); font: inherit; font-size: var(--step--1); background: #fff; }
.newsletter__form input[type=email]:focus { outline: 2px solid var(--brand-red); border-color: var(--brand-red); }

/* ---------- services / pillars (odnosi) ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.pillar { border: 1px solid var(--line); border-top: 3px solid var(--brand-red); border-radius: var(--radius); padding: 1.6rem; background: var(--ground); }
.pillar h3 { font-size: var(--step-1); margin: 0 0 0.5rem; }
.pillar p { margin: 0; font-size: var(--step--1); color: var(--body); }
.pillar__num { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); font-weight: 700; }

/* ---------- team (odnosi) ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.team-member { text-align: left; }
.team-member__avatar { aspect-ratio: 1; background: var(--panel); border-radius: var(--radius); display: grid; place-items: center; color: var(--muted); font-size: 2rem; font-weight: 800; margin-bottom: 0.8rem; filter: grayscale(1); }
.team-member__name { font-weight: 800; color: var(--ink); }
.team-member__role { font-size: var(--step--1); color: var(--muted); }

/* ---------- enrichment (Radar / U medijima) ---------- */
.radar-list { display: grid; gap: 0; }
.radar-item { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: baseline; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.radar-item:last-child { border-bottom: 1px solid var(--line); }
.radar-item__src { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-red); white-space: nowrap; }
.radar-item__title { color: var(--ink); text-decoration: none; font-weight: 600; }
.radar-item__title:hover { color: var(--brand-red); }
.radar-item__date { font-size: var(--step--1); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.enrich-badge { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--step--1); color: var(--muted); }
.enrich-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-red); }

/* ---------- single / article ---------- */
.article { max-width: 720px; margin-inline: auto; }
.article__header { margin-bottom: 2rem; }
.article__title { font-size: var(--step-3); }
.article__meta { font-size: var(--step--1); color: var(--muted); letter-spacing: 0.04em; }
.article__body { font-size: 1.14rem; line-height: 1.75; color: var(--body); }
.article__body.is-editorial { font-family: var(--font-serif); }
.article__body h2, .article__body h3 { margin-top: 1.8em; }
.article__body img { border-radius: var(--radius); margin: 1.6em 0; }
.article__body a { color: var(--brand-red-ink); }
.article__body blockquote { border-left: 4px solid var(--brand-red); margin: 1.6em 0; padding: 0.4em 0 0.4em 1.4em; font-style: italic; color: var(--ink); }

/* ---------- archive list ---------- */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list__item { display: grid; grid-template-columns: 120px 1fr; gap: 1.5rem; padding: 1.3rem 0; border-top: 1px solid var(--line); align-items: baseline; }
.post-list__item:last-child { border-bottom: 1px solid var(--line); }
.post-list__date { font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }
.post-list__title { font-size: var(--step-1); font-weight: 700; }
.post-list__title a { color: var(--ink); text-decoration: none; }
.post-list__title a:hover { color: var(--brand-red); }
.post-list__cat { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand-red); font-weight: 700; }

/* ---------- pagination ---------- */
.pagination { display: flex; gap: 0.5rem; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination a, .pagination .current { padding: 0.5em 0.9em; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-size: var(--step--1); font-weight: 600; }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination a:hover { border-color: var(--brand-red); color: var(--brand-red); }

/* ---------- footer ---------- */
.site-footer { background: var(--panel); border-top: 1px solid var(--line); }
.site-footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-block: clamp(2.5rem, 5vw, 4rem); }
.site-footer h4 { font-size: var(--step--1); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0 0 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: var(--ink); text-decoration: none; font-size: var(--step--1); }
.site-footer a:hover { color: var(--brand-red); }
.hc-lockup { font-size: var(--step--1); color: var(--muted); }
.hc-lockup a { color: var(--muted); text-decoration: underline; }
.hc-lockup a:hover { color: var(--brand-red); }
.site-footer__bottom { border-top: 1px solid var(--line); padding-block: 1.2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: var(--step--1); color: var(--muted); }

/* ---------- utilities ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 0.6em 1em; z-index: 100; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 2px; }
.stack > * + * { margin-top: 1.5rem; }
.lede { font-size: var(--step-1); color: var(--body); line-height: 1.5; max-width: 60ch; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; max-width: 360px; }
  .card-grid, .pillars { grid-template-columns: 1fr 1fr; }
  .newsletter__grid, .site-footer__top { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .card-grid, .pillars { grid-template-columns: 1fr; }
  .nav-primary ul, .nav-cta { display: none; }
  .nav-primary.is-open ul { display: flex; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); padding: 1rem var(--gutter); gap: 0.4rem; }
  .nav-toggle { display: block; }
  .post-list__item { grid-template-columns: 1fr; gap: 0.3rem; }
  .radar-item { grid-template-columns: 1fr; gap: 0.3rem; }
  .newsletter__form { flex-direction: column; }
}

/* ---------- dark mode (respect user preference) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #171313; --ink: #F0ECE6; --body: #D8D1C9; --muted: #9A9086;
    --line: #322A2A; --panel: #201A1A; --panel-red: #241717; --brand-red: #E24A4F; --brand-red-ink: #E86A6E;
  }
  .site-header { background: rgba(23,19,19,0.96); }
  .hero__media img, .team-member__avatar { filter: grayscale(1) contrast(1.05) brightness(0.9); }
  .quoteband { color: #F0ECE6; }
}
