/* ==========================================================================
   Intelletto — main stylesheet
   Ports the design-handoff tokens + per-section inline styles from the
   three .dc.html design references into a single class-based stylesheet.
   Forked from the Futuristic theme; cobalt accent, flat editorial style:
   NO border radius anywhere, NO shadows.
   ========================================================================== */

:root {
  --paper: #F0EBE0;        /* background */
  --card: #EDE7DA;         /* card / hover tint */
  --placeholder: #E4DECF;  /* placeholder-image fill */
  --ink: #131210;          /* headings, dark section bg */
  --body: #2A2822;         /* body text */
  --muted: #6B665A;        /* muted text (excerpts, standfirst) */
  --label: #8A8578;        /* mono label gray */
  --rule: #D9D3C4;         /* light border */
  --chip: #C4BEAE;         /* chip / dotted border */
  --dark-rule: #33301F;    /* dark-section border */
  --dark-muted: #77725F;   /* dark-section muted */
  --dark-outline: #4A473C; /* dark outline-border */
  --dark-soft: #A39E8C;    /* dark-section soft text */
  --accent: #2244CE;       /* cobalt */

  --max: 1440px;
  --pad: 48px;
}
@media (max-width: 720px) {
  :root { --pad: clamp(20px, 5vw, 48px); }
}

/* ----- reset & base ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  background: var(--paper);
  color: var(--ink);
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--ink); text-decoration: none; transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
a:hover { color: var(--accent); }
button { font-family: inherit; cursor: pointer; }
img, svg { max-width: 100%; }

::selection { background: var(--accent); color: var(--paper); }

/* ----- typographic primitives ------------------------------------------ */
.it-mono { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace; }
.it-serif { font-family: 'Instrument Serif', 'Times New Roman', serif; }
.it-ital { font-style: italic; }
.it-accent { color: var(--accent); }
.it-muted { color: var(--muted); }

/* Italic accent word inside display headings — one per headline. */
h1 em, h2 em, h3 em, .it-em {
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
}

.it-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--label);
}

.it-h1 { font-weight: 700; font-size: clamp(64px, 10.5vw, 158px); line-height: 0.96; letter-spacing: -0.035em; }
.it-h2 { font-weight: 700; font-size: clamp(40px, 5.2vw, 76px); line-height: 1.02; letter-spacing: -0.03em; }
.it-h3 { font-weight: 700; font-size: 27px; letter-spacing: -0.02em; }

/* ----- container -------------------------------------------------------- */
.it-container { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
.it-rule { border-top: 1px solid var(--rule); }

/* ----- section base ----------------------------------------------------- */
.it-section { padding-block: 110px; }
@media (max-width: 720px) {
  .it-section { padding-block: 72px; }
}
.it-section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px; flex-wrap: wrap; margin-bottom: 56px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.14em; color: var(--label);
  text-transform: uppercase;
}
.it-section-head a { color: var(--label); }
.it-section-head a:hover { color: var(--accent); }
.it-section-h2 { margin: 0 0 72px; max-width: 22ch; }

/* ============================================================ NAV */
.it-nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--paper);
  transition: border-color .25s ease;
}
.it-nav.is-scrolled { border-bottom-color: var(--rule); }
.it-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-block: 20px;
}
.it-nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 13px; letter-spacing: 0.12em; font-weight: 500;
  color: var(--ink);
}
.it-nav-brand svg { width: 14px; height: 14px; flex: none; }
.it-nav-links { display: flex; gap: 30px; }
.it-nav-links a {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.04em; color: var(--ink);
}
.it-nav-links a:hover, .it-nav-links a.is-active { color: var(--accent); }
.it-nav-cta {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.04em;
  border: 1px solid var(--ink); color: var(--ink);
  padding: 10px 18px; background: var(--paper);
  white-space: nowrap;
}
.it-nav-cta:hover { background: var(--ink); color: var(--paper); }
.it-nav-burger { display: none; background: none; border: 0; padding: 6px; color: var(--ink); }
@media (max-width: 900px) {
  .it-nav-links, .it-nav-cta { display: none; }
  .it-nav-burger { display: block; }
  .it-nav.is-open .it-nav-links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 12px var(--pad);
  }
  .it-nav.is-open .it-nav-links a { padding: 12px 0; font-size: 14px; }
}

/* ============================================================ HERO */
.it-hero { padding: 96px 0 110px; }
.it-hero-meta {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.14em; color: var(--label);
  margin-bottom: 40px;
}
.it-hero-meta .it-dot { color: var(--accent); }
.it-hero h1 { margin: 0 0 90px; }
.it-hero-body {
  display: grid; grid-template-columns: minmax(300px, 1.4fr) minmax(300px, 1fr);
  gap: 64px; align-items: start;
}
.it-hero-lede {
  font-size: 24px; line-height: 1.5; letter-spacing: -0.01em;
  margin: 0; max-width: 30ch;
}
.it-hero-cta { display: flex; flex-direction: column; gap: 14px; }
.it-hero-note {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11.5px; line-height: 1.7; letter-spacing: 0.02em;
  color: var(--label); margin: 6px 0 0;
}
@media (max-width: 700px) {
  .it-hero { padding-top: 64px; }
  .it-hero h1 { margin-bottom: 56px; }
  .it-hero-body { grid-template-columns: 1fr; gap: 40px; }
}

/* ----- buttons (full-width row style: label left + glyph right) --------- */
.it-btn-solid, .it-btn-outline, .it-btn-accent {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 20px 24px; font-size: 17px; letter-spacing: -0.01em;
}
.it-btn-solid { background: var(--ink); color: var(--paper); }
.it-btn-solid:hover { background: var(--accent); color: var(--paper); }
.it-btn-outline { border: 1px solid var(--ink); color: var(--ink); }
.it-btn-outline:hover { background: var(--ink); color: var(--paper); }
.it-btn-accent { background: var(--accent); color: var(--paper); }
.it-btn-accent:hover { background: var(--paper); color: var(--ink); }
.it-btn-dark-outline {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 20px 24px; font-size: 17px;
  border: 1px solid var(--dark-outline); color: var(--paper);
}
.it-btn-dark-outline:hover { border-color: var(--paper); color: var(--paper); }

/* ============================================================ CARD ROWS (§01, §03) */
.it-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0;
  border: 1px solid var(--rule);
}
.it-card {
  padding: 36px 32px 44px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-right: -1px; margin-bottom: -1px;
}
.it-card-kicker {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.14em; color: var(--accent);
  text-transform: uppercase; margin-bottom: 22px;
}
.it-card p { font-size: 17px; line-height: 1.65; margin: 0; color: var(--body); }

/* ============================================================ §02 ABOUT */
.it-about-grid {
  display: grid; grid-template-columns: minmax(300px, 1.5fr) minmax(260px, 1fr);
  gap: 0; border: 1px solid var(--rule);
}
@media (max-width: 700px) {
  .it-about-grid { grid-template-columns: 1fr; }
}
.it-bio {
  padding: 40px 40px 48px;
  border-right: 1px solid var(--rule);
  background: var(--card);
}
@media (max-width: 700px) {
  .it-bio { border-right: 0; border-bottom: 1px solid var(--rule); }
}
.it-bio .it-label { margin-bottom: 14px; }
.it-bio h3 { font-weight: 700; font-size: 40px; letter-spacing: -0.025em; margin: 0 0 22px; }
.it-bio p { font-size: 17px; line-height: 1.65; margin: 0 0 28px; color: var(--body); max-width: 62ch; }
.it-bio p a { color: var(--ink); border-bottom: 1px solid currentColor; }
.it-bio p a:hover { color: var(--accent); }
.it-chips {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
}
.it-chips span { border: 1px solid var(--chip); padding: 7px 13px; }
.it-portrait { position: relative; min-height: 320px; background: var(--placeholder); }
.it-portrait img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.it-portrait-blank { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ============================================================ §03 ENGAGEMENT */
.it-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0; border: 1px solid var(--rule);
  list-style: none; margin: 0; padding: 0;
}
.it-step {
  padding: 32px 28px 40px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-right: -1px; margin-bottom: -1px;
  display: flex; flex-direction: column;
}
.it-step-top {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 22px;
}
.it-step-num { font-weight: 700; font-size: 52px; letter-spacing: -0.03em; color: var(--accent); }
.it-step-dur {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.06em; color: var(--label);
}
.it-step h3 { font-weight: 700; font-size: 27px; letter-spacing: -0.02em; margin: 0 0 14px; }
.it-step p { font-size: 16px; line-height: 1.6; margin: 0 0 26px; color: var(--body); flex: 1; }
.it-step-out { border-top: 1px dotted var(--chip); padding-top: 16px; }
.it-step-out-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.14em; color: var(--label);
  text-transform: uppercase; margin-bottom: 6px;
}
.it-step-out-value {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12.5px; letter-spacing: 0.02em;
}
.it-section-intro {
  font-size: 19px; line-height: 1.6; margin: 0 0 72px;
  color: var(--body); max-width: 56ch;
}
.it-section-intro + .it-steps { margin-top: 0; }
.it-engagement .it-section-h2 { margin-bottom: 24px; max-width: 20ch; }

/* ============================================================ §04 RECENT POSTS + BLOG LIST */
.it-posts-intro {
  display: grid; grid-template-columns: minmax(300px, 1.6fr) minmax(240px, 1fr);
  gap: 64px; align-items: end; margin-bottom: 56px;
}
.it-posts-intro h2, .it-posts-intro h1 { margin: 0; }
.it-posts-intro p { font-size: 16px; line-height: 1.6; margin: 0; color: var(--body); }
@media (max-width: 700px) {
  .it-posts-intro { grid-template-columns: 1fr; gap: 28px; }
}
.it-post-list { border-top: 1px solid var(--rule); }
.it-post-row {
  display: grid; grid-template-columns: 140px 1fr 40px;
  gap: 32px; align-items: start;
  padding: 30px 8px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.it-post-row:hover { background: var(--card); color: var(--ink); }
.it-post-row--blog { grid-template-columns: 140px 1fr 100px; padding: 34px 8px; }
.it-post-date {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: 0.06em; color: var(--label);
  padding-top: 5px; text-transform: uppercase;
}
.it-post-cat {
  display: block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.14em; color: var(--accent);
  text-transform: uppercase; margin-bottom: 10px;
}
.it-post-title {
  display: block; font-weight: 700; font-size: 27px;
  letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 8px;
}
.it-post-row--blog .it-post-title { font-size: 30px; line-height: 1.12; margin-bottom: 10px; }
.it-post-excerpt {
  display: block; font-size: 15.5px; line-height: 1.55;
  color: var(--muted); max-width: 80ch;
}
.it-post-arrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 15px; padding-top: 5px;
}
.it-post-side {
  display: flex; justify-content: space-between; gap: 8px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: 0.04em; color: var(--label);
  padding-top: 6px;
}
.it-post-side .it-post-side-arrow { color: var(--ink); }
@media (max-width: 700px) {
  .it-post-row, .it-post-row--blog { grid-template-columns: 1fr; gap: 10px; padding-inline: 0; }
  .it-post-date, .it-post-arrow, .it-post-side { padding-top: 0; }
  .it-post-arrow { display: none; }
}

/* Pagination (blog index) */
.it-pagination {
  display: flex; justify-content: space-between; gap: 24px;
  padding-top: 40px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
}
.it-pagination a { color: var(--ink); }
.it-pagination a:hover { color: var(--accent); }
.it-pagination .page-numbers { padding: 0 6px; color: var(--label); }
.it-pagination .page-numbers.current { color: var(--ink); }
.it-pagination a.page-numbers { color: var(--ink); }

/* ============================================================ §05 CONTACT (dark) */
.it-contact { background: var(--ink); color: var(--paper); }
.it-contact-inner { padding: 110px var(--pad) 64px; max-width: var(--max); margin: 0 auto; }
.it-contact .it-section-head { color: var(--dark-muted); }
.it-contact h2 {
  font-weight: 700; font-size: clamp(52px, 8vw, 128px);
  line-height: 0.98; letter-spacing: -0.035em;
  margin: 0 0 80px; max-width: 12ch;
}
.it-contact-body {
  display: grid; grid-template-columns: minmax(300px, 1fr) minmax(300px, 1.1fr);
  gap: 72px; align-items: start;
}
@media (max-width: 700px) {
  .it-contact-body { grid-template-columns: 1fr; gap: 48px; }
}
.it-contact-cta { display: flex; flex-direction: column; gap: 14px; }
.it-contact-reply { font-size: 15px; line-height: 1.65; color: var(--dark-soft); margin: 12px 0 0; }
.it-coverage-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.14em; color: var(--dark-muted);
  text-transform: uppercase; margin-bottom: 16px;
}
.it-coverage-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--dark-rule);
}
@media (max-width: 480px) {
  .it-coverage-grid { grid-template-columns: 1fr; }
}
.it-coverage-cell {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--dark-rule);
  border-right: 1px solid var(--dark-rule);
  margin-right: -1px; margin-bottom: -1px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px; letter-spacing: 0.06em;
}
.it-coverage-cell .it-coverage-note { color: var(--dark-muted); }

/* Bottom bar (inside dark contact section on home; standalone footer elsewhere) */
.it-bar {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.06em; color: var(--dark-muted);
  text-transform: uppercase;
}
.it-contact .it-bar { border-top: 1px solid var(--dark-rule); margin-top: 96px; padding-top: 28px; }
.it-bar a { color: var(--dark-muted); }
.it-bar a:hover { color: var(--paper); }
.it-bar-links { display: flex; gap: 22px; flex-wrap: wrap; }

/* Standalone slim dark footer (blog / single / pages) */
.it-footer { background: var(--ink); color: var(--paper); }
.it-footer .it-bar {
  padding: 32px var(--pad);
  max-width: var(--max); margin: 0 auto;
}

/* ============================================================ SINGLE POST */
.it-page { padding-block: 80px 110px; }
.it-post-meta-row {
  display: flex; justify-content: space-between; gap: 24px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.14em; color: var(--label);
  text-transform: uppercase; margin-bottom: 48px;
}
.it-post-meta-row a { color: var(--label); }
.it-post-meta-row a:hover { color: var(--accent); }
.it-post-header { max-width: 900px; }
.it-post-header .it-post-kicker {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.14em; color: var(--accent);
  text-transform: uppercase; margin-bottom: 20px;
}
.it-post-header h1 {
  font-weight: 700; font-size: clamp(40px, 5.5vw, 76px);
  line-height: 1.02; letter-spacing: -0.03em; margin: 0 0 28px;
}
.it-standfirst {
  font-size: 22px; line-height: 1.5; color: var(--muted);
  letter-spacing: -0.01em; margin: 0 0 56px;
}
.it-article {
  max-width: 720px;
  border-top: 1px solid var(--rule);
  padding-top: 48px;
}
.it-article .wp-block-post-featured-image,
.it-article .it-featured { margin: 20px 0 28px; }
.it-article .wp-block-post-featured-image img,
.it-article .it-featured img { border: 1px solid var(--rule); width: 100%; height: auto; display: block; }

/* Post prose (WordPress content) */
.it-prose { font-size: 18.5px; line-height: 1.75; color: var(--body); }
.it-prose p { margin: 0 0 28px; }
.it-prose h2, .it-prose h3 {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 700; letter-spacing: -0.02em; color: var(--ink);
  margin: 2em 0 0.6em; line-height: 1.1;
}
.it-prose h2 { font-size: clamp(28px, 3vw, 40px); }
.it-prose h3 { font-size: clamp(21px, 2vw, 27px); }
.it-prose a { color: var(--ink); border-bottom: 1px solid currentColor; }
.it-prose a:hover { color: var(--accent); }
.it-prose blockquote {
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-style: italic; font-size: 24px; line-height: 1.45;
  color: var(--ink);
  border-left: 2px solid var(--accent);
  padding-left: 24px; margin: 1.6em 0;
}
.it-prose blockquote p { margin: 0 0 0.6em; }
.it-prose ul, .it-prose ol { margin: 0 0 28px; padding-left: 1.3em; }
.it-prose li { margin-bottom: 8px; }
.it-prose img { border: 1px solid var(--rule); width: 100%; height: auto; margin: 1.4em 0; display: block; }
.it-prose figure { margin: 1.4em 0; }
.it-prose figure img { margin: 0; }
.it-prose figcaption {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11.5px; color: var(--label); margin-top: 10px;
}
.it-prose pre, .it-prose code {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 14px; background: var(--card);
}
.it-prose pre { padding: 20px; overflow-x: auto; border: 1px solid var(--rule); }
.it-prose iframe { max-width: 100%; }

/* Post footer row (byline / next post) */
.it-post-endrow {
  display: flex; justify-content: space-between; gap: 24px;
  border-top: 1px solid var(--rule);
  margin-top: 56px; padding-top: 24px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase;
}
.it-post-endrow .it-byline { color: var(--label); }
.it-post-endrow a { color: var(--ink); }
.it-post-endrow a:hover { color: var(--accent); }

/* ============================================================ GENERIC PAGE */
.it-page-header { margin-bottom: 48px; }
.it-page-header h1 { margin: 0; }
