/* Article pages (/conseils/, /blog/). Loaded after surface-pages.css and
   reuses its tokens (--hero-bg, --g, --ink, --body...). Built by
   scripts/build-articles.mjs; nothing here is used by the service pages. */

/* ---------- Hero ---------- */
.article-hero {
  position: relative;
  color: var(--white);
  background:
    radial-gradient(900px 520px at 85% 20%, rgba(76, 175, 80, 0.28), transparent 60%),
    radial-gradient(700px 480px at 0% 100%, rgba(76, 175, 80, 0.14), transparent 65%),
    linear-gradient(180deg, var(--hero-bg) 0%, var(--hero-dark) 100%);
  padding: calc(var(--topbar-h) + 130px) 0 0 0;
  /* The photo hangs over the bottom edge, so the section ends in the body
     instead of on a hard line. */
  margin-bottom: 160px;
}

.article-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: end;
}

.article-hero-text {
  padding-bottom: 96px;
}

.article-crumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 28px;
}
.article-crumbs li + li::before {
  content: '›';
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.35);
}
.article-crumbs a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}
.article-crumbs a:hover { color: var(--g2); }

.article-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g2);
  background: rgba(76, 175, 80, 0.14);
  border: 1px solid rgba(105, 193, 109, 0.35);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.article-hero h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.2rem, 4.6vw, 3.9rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.04;
  color: var(--white);
  margin-bottom: 24px;
  text-wrap: balance;
}

.article-lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  max-width: 600px;
  margin-bottom: 28px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

.article-hero-photo {
  position: relative;
  margin: 0 0 -120px 0;
  transform: rotate(1.5deg);
}
.article-hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: cover;
  border-radius: 28px;
  border: 6px solid var(--white);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
}
.article-hero-photo figcaption {
  position: absolute;
  left: 20px;
  bottom: 22px;
  right: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--white);
  background: rgba(6, 10, 6, 0.72);
  backdrop-filter: blur(6px);
  padding: 8px 12px;
  border-radius: 12px;
  width: fit-content;
}

/* Index page hero: the first card rises into it, the same overhang the
   article photo uses, so the dark section never ends on a hard line. */
.article-hero.article-hero-index {
  margin-bottom: 0;
  padding-bottom: 170px;
}
.article-hero-index h1 { max-width: 820px; }

/* ---------- Body layout ---------- */
.article-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 720px);
  justify-content: center;
  gap: 72px;
  padding-bottom: 40px;
}

.article-aside {
  position: sticky;
  top: calc(var(--topbar-h) + 110px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.article-toc {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px;
  background: var(--white);
}
.article-toc summary {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.article-toc summary::-webkit-details-marker { display: none; }
.article-toc ol {
  list-style: none;
  counter-reset: toc;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.article-toc li {
  counter-increment: toc;
  display: grid;
  grid-template-columns: 24px 1fr;
  font-size: 0.93rem;
  line-height: 1.4;
}
.article-toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-weight: 800;
  font-size: 0.75rem;
  color: var(--g);
  padding-top: 2px;
}
.article-toc a {
  color: var(--ink);
  text-decoration: none;
}
.article-toc a:hover { color: var(--g-dark); }

.article-aside-cta {
  border-radius: 18px;
  padding: 22px;
  background: linear-gradient(160deg, var(--hero-mid), var(--hero-bg));
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.93rem;
  line-height: 1.5;
}
.article-aside-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--white);
  margin-bottom: 8px;
}
.article-inline-cta { display: none; }

.article-btn {
  display: block;
  text-align: center;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--g);
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.article-btn:hover { background: var(--g2); transform: translateY(-1px); }
.article-btn-ghost {
  margin-top: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.article-btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

/* ---------- Article typography ---------- */
.article-body {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--body);
  min-width: 0;
}
.article-body > * + * { margin-top: 20px; }
.article-body > h2 {
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--ink);
  margin-top: 64px;
  scroll-margin-top: calc(var(--topbar-h) + 110px);
}
.article-body > h2:first-child { margin-top: 0; }
.article-body > h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
  margin-top: 36px;
}
.article-body strong { color: var(--ink); }
.article-body > p a,
.article-body li a {
  color: var(--g-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(76, 175, 80, 0.45);
  text-underline-offset: 3px;
}
.article-body > p a:hover,
.article-body li a:hover { text-decoration-color: var(--g); }
.article-body > ul,
.article-summary ul { padding-left: 0; list-style: none; }
.article-body > ul li,
.article-summary li {
  position: relative;
  padding-left: 30px;
}
.article-body > ul li + li,
.article-summary li + li { margin-top: 10px; }
.article-body > ul li::before,
.article-summary li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0.72em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--g);
}
/* "En bref": the answer first, for readers and for AI answers alike. */
.article-summary {
  background: var(--pale);
  border: 1px solid var(--border-g);
  border-radius: 20px;
  padding: 26px 28px;
}
.article-summary-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g-dark);
}
.article-summary ul { margin-top: 12px; }
.article-summary li { color: var(--ink); }

/* His own words to a client. */
.article-quote {
  position: relative;
  margin: 40px 0;
  padding: 8px 0 8px 36px;
  border-left: 4px solid var(--g);
}
.article-quote p {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.article-quote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Photos inside the text. Phone photos are portrait, so two sit side by side. */
.article-figure { margin: 36px 0; }
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
}
.article-figure figcaption {
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}
.article-figure-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.article-figure-pair img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.article-figure-pair figcaption { grid-column: 1 / -1; margin-top: 0; }

/* A single portrait photo sits beside the text instead of filling the
   column top to bottom. */
.article-figure-side {
  float: right;
  width: 44%;
  margin: 6px 0 24px 32px;
}
.article-figure-side img { aspect-ratio: 3 / 4; object-fit: cover; }
.article-body > h2 { clear: both; }

/* Done right vs done cheap. */
.article-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 32px 0;
}
.article-compare-card {
  border-radius: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  background: var(--white);
}
.article-compare-card.is-good {
  border-color: var(--border-g);
  background: var(--pale);
}
.article-compare-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.article-compare-card.is-good .article-compare-label { color: var(--g-dark); }
.article-compare-value {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 6px 0 8px;
  line-height: 1.1;
}
.article-compare-card p:last-child { font-size: 0.98rem; line-height: 1.55; }

.article-author {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 64px !important;
  padding: 24px;
  border-radius: 20px;
  background: var(--off);
}
.article-author img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.article-author-title {
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 4px;
}
.article-author p { font-size: 0.98rem; line-height: 1.6; }

/* ---------- Site components inside an article ----------
   These reuse surface-pages.css classes (step-card, why-card, ba-slider,
   faq-item) so an article looks like the rest of duovert.ca; only sizing
   for the narrower text column is set here. */
.article-hero-cta { margin: 4px 0 28px; }

.article-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 32px 0;
}
.article-steps .step-card {
  padding: 30px 26px;
  min-height: 230px;
  justify-content: flex-end;
}
.article-steps .step-num { font-size: 3.4rem; }
.article-steps .step-card h3 { font-size: 1.15rem; margin-bottom: 8px; }

.article-dark {
  clear: both;
  border-radius: 24px;
  padding: 34px 30px;
  margin: 36px 0;
  background:
    radial-gradient(520px 260px at 100% 0%, rgba(76, 175, 80, 0.22), transparent 70%),
    #0d1e0d !important;
}
.article-dark-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--white);
}
.article-dark .why-grid { margin-top: 22px; gap: 14px; }
.article-dark .why-card { padding: 22px 20px; }
.article-dark .why-icon { width: 46px; height: 46px; margin-bottom: 14px; }
.article-dark .why-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.article-dark .why-card p { font-size: 0.95rem; line-height: 1.5; }

/* surface-pages.css shrinks .ba-slider to 145-340px on small screens with
   !important, because its sliders sit two side by side. An article shows one
   at full width, so it keeps its height. */
.article-ba.ba-slider {
  height: 600px !important;
  border-radius: 20px !important;
}
.article-ba {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  transform: translate3d(0, 0, 0);
}
.article-ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-ba-after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
  will-change: clip-path;
  overflow: hidden;
}
.article-ba-label {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 4;
  background: rgba(0, 0, 0, 0.72);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 30px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  pointer-events: none;
}
.article-ba-label.is-after { left: auto; right: 14px; background: var(--g); }
.article-ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  background: var(--white);
  z-index: 3;
  pointer-events: none;
}
.article-ba-handle > div {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.article-faq-list { margin-top: 24px !important; max-width: none; }
.article-faq-list .faq-header { font-size: 1.08rem; padding: 20px 24px; }
/* surface-pages.css pads the bottom of .faq-answer-inner, and padding
   survives the closed (0fr) row, so every closed question carried an empty
   strip. The space goes inside instead, where closing hides it. */
.article-faq-list .faq-answer-inner { padding: 0 24px; }
.article-faq-list .faq-answer-inner::after { content: ''; display: block; height: 20px; }

/* ---------- Index ---------- */
.article-index {
  position: relative;
  z-index: 2;
  margin-top: -120px;
  padding-top: 0;
}
.article-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}
.article-card {
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.article-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
/* The newest article leads the page as a wide card, so an index with one or
   two articles reads as a feature instead of a half-empty grid. */
.article-card:first-child {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: stretch;
}
.article-card:first-child img {
  width: 46%;
  aspect-ratio: auto;
  min-height: 360px;
  max-height: 460px;
}
.article-card:first-child .article-card-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 44px;
}
.article-card:first-child h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.article-card-text { padding: 24px; }
.article-card-text .article-eyebrow { color: var(--g-dark); background: var(--pale); border-color: var(--border-g); align-self: flex-start; }
.article-card h2 {
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 10px;
}
.article-card p { color: var(--body); line-height: 1.55; }
.article-card-more { display: inline-block; margin-top: 16px; font-weight: 800; color: var(--g-dark); }

/* ---------- Tablet and phone ---------- */
@media (max-width: 1023px) {
  .article-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .article-hero-text { padding-bottom: 0; }
  .article-hero { margin-bottom: 80px; }
  .article-hero-photo {
    margin-bottom: -80px;
    max-width: 520px;
    transform: rotate(1deg);
  }
  .article-hero-photo img { aspect-ratio: 4 / 3; max-height: none; }

  .article-layout {
    grid-template-columns: minmax(0, 720px);
    gap: 32px;
  }
  /* On a phone the table of contents starts closed at the top, and the call
     card moves into the text (build-articles.mjs puts a copy there), so
     nothing the desktop reader gets is missing. */
  .article-aside { position: static; }
  .article-aside-cta-side { display: none; }
  .article-inline-cta { display: block; margin: 40px 0; }
  .article-toc:not([open]) { padding-bottom: 20px; }
}

/* Below 768px surface-pages.css pads the body for the fixed header, and
   .hero pulls itself back up under it by 64px. Same here, or a white band
   shows between the top bar and the dark hero. */
@media (max-width: 768px) {
  .article-hero { margin-top: -64px; padding-top: 104px; }
  .article-hero.article-hero-index { padding-bottom: 120px; }
  .article-index { margin-top: -80px; }
}

@media (max-width: 640px) {
  .article-card:first-child { flex-direction: column; }
  .article-card:first-child img { width: 100%; aspect-ratio: 4 / 3; min-height: 0; }
  .article-card:first-child .article-card-text { padding: 24px; }
  .article-steps { grid-template-columns: 1fr; }
  .article-steps .step-card { min-height: 190px; }
  .article-dark { padding: 26px 20px; }
  .article-dark .why-grid { grid-template-columns: 1fr; gap: 10px; }
  /* Icon beside the text on a phone, so four cards do not take four screens. */
  .article-dark .why-card {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 14px;
    padding: 16px;
  }
  .article-dark .why-icon { grid-row: span 2; width: 40px; height: 40px; margin-bottom: 0; }
  .article-ba.ba-slider { height: 520px !important; }
  .article-figure-side { float: none; width: 100%; margin: 32px 0; }
  .article-figure-side img { aspect-ratio: 4 / 5; }
  .article-body { font-size: 1.06rem; }
  .article-compare { grid-template-columns: 1fr; }
  .article-figure-pair { gap: 10px; }
  .article-quote { padding-left: 22px; }
  .article-author { flex-direction: column; }
}
