/* Cordovan blog and static pages. Tokens and type scale follow the advisor
   portal's home page (advisor-portal/src/features/home/home.css). */
:root {
  --cv-oxblood: #5A1A1F;
  --cv-ochre: #7A5A24;
  --cv-ochre-light: #D9BE8A;
  --cv-ivory: #F3EEE6;
  --cv-parchment: #E9E2D6;
  --cv-ink: #2A1A17;
  --cv-ink-soft: #5B4A43;
  --cv-night: #1F1311;
  --cv-rule: color-mix(in oklab, var(--cv-oxblood) 15%, transparent);
  --cv-display: "Cormorant Garamond", Georgia, serif;
  --cv-text: Mulish, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cv-ivory);
  color: var(--cv-ink);
  font-family: var(--cv-text);
  font-size: 1rem;
  line-height: 1.6;
}
h1, h2, h3 { font-family: var(--cv-display); font-weight: 500; text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
a { color: inherit; }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid #B48A45; outline-offset: 3px; }

.cv-skip { position: absolute; left: -999px; top: 0; background: var(--cv-oxblood); color: var(--cv-ivory); padding: 0.6rem 1rem; z-index: 50; }
.cv-skip:focus { left: 1rem; }

.cv-wrap { width: 100%; max-width: 84rem; margin-inline: auto; padding-inline: clamp(1rem, 5vw, 5rem); }
.cv-narrow { max-width: 52rem; }
.cv-section { padding-block: clamp(3.5rem, 8vw, 7rem); }

/* -- Header ------------------------------------------------------------- */
.cv-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--cv-ivory) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in oklab, var(--cv-oxblood) 12%, transparent);
}
.cv-header__row { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.cv-mark { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--cv-oxblood); text-decoration: none; }
.cv-mark svg { width: 2rem; height: 2rem; }
.cv-mark span { font-family: var(--cv-display); font-weight: 500; font-size: 18px; letter-spacing: 0.24em; }
.cv-nav { margin-left: auto; display: none; gap: 2rem; font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cv-ink-soft); }
.cv-nav a {
  padding-block: 0.4rem; text-decoration: underline; text-decoration-color: transparent;
  text-underline-offset: 0.55em; text-decoration-thickness: 1px;
  transition: color 160ms ease-out, text-decoration-color 160ms ease-out;
}
.cv-nav a:hover, .cv-nav a[aria-current="page"] { color: var(--cv-oxblood); text-decoration-color: currentColor; }
.cv-signin {
  margin-left: auto; white-space: nowrap; border: 1px solid var(--cv-oxblood); color: var(--cv-oxblood);
  padding: 0.5rem 1rem; font-size: 11.5px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.cv-signin:hover { background: var(--cv-oxblood); color: var(--cv-ivory); }
@media (min-width: 1024px) {
  .cv-nav { display: flex; }
  .cv-signin { margin-left: 0; }
  .cv-mark span { font-size: 22px; letter-spacing: 0.3em; }
}

/* -- Type --------------------------------------------------------------- */
.cv-display-lg { font-size: clamp(2.5rem, 1.5rem + 4.4vw, 5.5rem); line-height: 1; letter-spacing: -0.015em; }
.cv-display-md { font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.75rem); line-height: 1.05; letter-spacing: -0.01em; }
.cv-display-sm { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.6rem); line-height: 1.1; }
.cv-lede { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.35rem); line-height: 1.6; max-width: 46ch; margin: 1.5rem 0 0; }
.cv-body { font-size: 1.05rem; line-height: 1.7; max-width: 62ch; color: var(--cv-ink-soft); }
.cv-kicker { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cv-ochre); margin: 0 0 1.25rem; }
.cv-kicker a { text-decoration: none; }
.cv-meta { font-size: 0.85rem; color: var(--cv-ink-soft); letter-spacing: 0.02em; margin: 1rem 0 0; }
.cv-small { font-size: 0.8rem; }
.cv-inline { text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 40%, transparent); text-underline-offset: 0.2em; }
.cv-inline:hover { text-decoration-color: currentColor; }

.cv-btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 1rem 1.9rem;
  background: var(--cv-oxblood); color: var(--cv-ivory); text-decoration: none;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  box-shadow: 0 2px 4px hsl(355 45% 8% / 0.18), 0 10px 22px -8px hsl(355 45% 8% / 0.35);
  transition: background-color 160ms ease-out;
}
.cv-btn:hover { background: var(--cv-ink); }
.cv-btn--cream { background: var(--cv-ivory); color: var(--cv-oxblood); }
.cv-btn--cream:hover { background: #fff; }

/* -- Blog --------------------------------------------------------------- */
.cv-postlist { list-style: none; padding: 0; margin: 3.5rem 0 0; }
.cv-postcard { border-top: 1px solid var(--cv-rule); padding-block: 2rem; }
.cv-postcard .cv-meta { margin: 0 0 0.6rem; }
.cv-postcard__title { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); line-height: 1.15; }
.cv-postcard__title a { text-decoration: none; }
.cv-postcard__title a:hover { color: var(--cv-oxblood); }

.cv-prose { margin-top: 2.5rem; font-size: 1.1rem; line-height: 1.75; }
.cv-prose > * { max-width: 65ch; }
.cv-prose h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); margin: 2.75rem 0 0.75rem; color: var(--cv-oxblood); }
.cv-prose h3 { font-size: 1.4rem; margin: 2rem 0 0.5rem; }
.cv-prose a { color: var(--cv-oxblood); text-underline-offset: 0.2em; }
.cv-prose blockquote { margin: 2rem 0; padding-left: 1.25rem; border-left: 2px solid var(--cv-ochre); font-family: var(--cv-display); font-size: 1.45rem; font-style: italic; line-height: 1.4; }
.cv-prose ul, .cv-prose ol { padding-left: 1.25rem; }
.cv-prose li + li { margin-top: 0.4rem; }
.cv-prose hr { border: 0; border-top: 1px solid var(--cv-rule); margin: 3rem 0; }

/* -- Info pages --------------------------------------------------------- */
.cv-hero { background: var(--cv-night); color: var(--cv-ivory); }
.cv-hero .cv-kicker { color: var(--cv-ochre-light); }
.cv-hero .cv-lede { color: var(--cv-parchment); max-width: 52ch; }
.cv-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 2.5rem; }
.cv-hero__actions a:not(.cv-btn) { color: var(--cv-ochre-light); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; text-underline-offset: 0.5em; }

.cv-video { margin: clamp(2.5rem, 6vw, 4.5rem) 0 0; max-width: 60rem; }
.cv-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--cv-ivory); border-radius: 4px; box-shadow: 0 2px 4px hsl(355 45% 4% / 0.3), 0 24px 48px -16px hsl(355 45% 4% / 0.6); }
.cv-video figcaption { margin-top: 1rem; font-size: 0.85rem; letter-spacing: 0.02em; color: var(--cv-parchment); opacity: 0.75; }

.cv-band--parchment { background: var(--cv-parchment); }
.cv-head { display: flex; align-items: baseline; gap: 1.25rem; font-family: var(--cv-display); font-size: 1.15rem; letter-spacing: 0.04em; color: var(--cv-ochre); margin-bottom: 2rem; }
.cv-head__n { font-size: 2.6rem; line-height: 1; font-weight: 500; }
.cv-head__rule { flex: 1; height: 1px; background: currentColor; opacity: 0.25; transform: translateY(-0.35em); }
.cv-split { display: grid; gap: 2rem 4rem; }
@media (min-width: 900px) { .cv-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.cv-split h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.2rem); line-height: 1.05; }

.cv-pipeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; counter-reset: step; }
.cv-pipeline li { position: relative; padding: 0 0 1.75rem 3.25rem; counter-increment: step; }
.cv-pipeline li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  border: 1px solid var(--cv-oxblood); color: var(--cv-oxblood); display: grid; place-items: center;
  font-family: var(--cv-display); font-size: 1.15rem;
}
.cv-pipeline li::after { content: ""; position: absolute; left: 1.05rem; top: 2.3rem; bottom: 0.2rem; width: 1px; background: repeating-linear-gradient(var(--cv-ochre) 0 4px, transparent 4px 8px); }
.cv-pipeline li:last-child { padding-bottom: 0; }
.cv-pipeline li:last-child::after { display: none; }
.cv-pipeline h3 { font-size: 1.5rem; line-height: 1.2; }
.cv-pipeline p { margin: 0.35rem 0 0; color: var(--cv-ink-soft); }

.cv-rules { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
@media (min-width: 700px) { .cv-rules { grid-template-columns: 1fr 1fr; gap: 2rem 3rem; } }
.cv-rules li { border-top: 1px solid var(--cv-rule); padding-top: 1rem; }
.cv-rules h3 { font-size: 1.35rem; color: var(--cv-oxblood); }
.cv-rules p { margin: 0.4rem 0 0; color: var(--cv-ink-soft); }

.cv-table-wrap { overflow-x: auto; margin-top: 2.5rem; border-top: 1px solid var(--cv-oxblood); }
.cv-table { width: 100%; border-collapse: collapse; min-width: 36rem; font-size: 0.98rem; }
.cv-table th, .cv-table td { text-align: left; vertical-align: top; padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--cv-rule); }
.cv-table thead th { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cv-ochre); }
.cv-table tbody th { font-family: var(--cv-display); font-size: 1.2rem; font-weight: 500; color: var(--cv-ink); width: 22%; }
.cv-table td:nth-child(2) { color: var(--cv-ink-soft); width: 32%; }

.cv-pull { font-family: var(--cv-display); font-style: italic; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem); line-height: 1.3; color: var(--cv-oxblood); max-width: 30ch; margin: 0; }

/* -- Footer ------------------------------------------------------------- */
.cv-footer { background: var(--cv-night); color: var(--cv-ivory); padding: clamp(4rem, 9vw, 7rem) 0 3rem; }
.cv-footer .cv-lede { color: var(--cv-parchment); }
.cv-footer .cv-inline { color: var(--cv-ochre-light); }
.cv-footer__base { margin-top: 4rem; padding-top: 1.75rem; border-top: 1px solid color-mix(in oklab, var(--cv-ochre) 30%, transparent); color: color-mix(in oklab, var(--cv-parchment) 80%, transparent); font-size: 0.9rem; }
.cv-footer__base p { margin: 0.25rem 0; }
.cv-footer__name { font-family: var(--cv-display); font-size: 1.05rem; letter-spacing: 0.12em; color: var(--cv-ivory); }

/* On phones each row becomes a card; the column heads move into labels. */
@media (max-width: 640px) {
  .cv-table-wrap { overflow: visible; }
  .cv-table { min-width: 0; }
  .cv-table thead { display: none; }
  .cv-table tr { display: block; padding-block: 1.1rem; border-bottom: 1px solid var(--cv-rule); }
  .cv-table th, .cv-table td { display: block; width: auto !important; padding: 0; border: 0; }
  .cv-table tbody th { font-size: 1.35rem; margin-bottom: 0.5rem; }
  .cv-table td + td { margin-top: 0.6rem; }
  .cv-table td::before { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cv-ochre); margin-bottom: 0.15rem; }
  .cv-table--profile td:nth-child(2)::before { content: "What it captures"; }
  .cv-table--profile td:nth-child(3)::before { content: "How it shapes the draft"; }
  .cv-table--failures td:nth-child(2)::before { content: "Generic AI planner"; }
  .cv-table--failures td:nth-child(3)::before { content: "Cordovan"; }
}
