/*
 * PUB Services — category landing pages stylesheet
 * Loaded only when one of the three category page templates is active.
 * Builds on services.css (same tokens, same .pub-svc scope).
 */

/* ─── Page-level accent (set as inline custom property in the wrapper) ──
   Lets us color CTAs, kickers, dots without per-page rules. */
.pub-svc--category { --cat-accent: var(--pub-ink); }

/* ─── Breadcrumb ────────────────────────────────────────────────── */
.pub-svc-bc {
  max-width: var(--pub-maxw);
  margin: 0 auto;
  padding: 28px var(--pub-gutter) 0;
  font-family: var(--pub-mono);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--pub-muted);
  display: flex; align-items: center; gap: 10px;
}
.pub-svc-bc__link {
  color: var(--pub-muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--pub-muted);
  padding-bottom: 1px;
}
.pub-svc-bc__link:hover { color: var(--pub-ink); border-bottom-color: var(--pub-ink); }
.pub-svc-bc__here { color: var(--pub-ink); }

/* ─── Category hero ─────────────────────────────────────────────── */
.pub-svc-cathero {
  padding-top: 60px;
  padding-bottom: 64px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 56px;
  align-items: center;
}
.pub-svc-cathero__kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--pub-mono); font-size: 11px;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--cat-accent);
  margin-bottom: 24px; font-weight: 600;
}
.pub-svc-cathero__kicker::before {
  content: ""; width: 28px; height: 1px; background: var(--cat-accent);
}
.pub-svc-cathero__title {
  font-family: var(--pub-display);
  font-size: clamp(48px, 5.8vw, 84px);
  line-height: .96; letter-spacing: -2px;
  margin: 0 0 24px;
  font-weight: 500; color: var(--pub-ink);
  text-wrap: balance;
}
.pub-svc-cathero__title em {
  font-style: italic; color: var(--cat-accent); font-weight: 500;
}
.pub-svc-cathero__line { display: block; }
.pub-svc-cathero__lead {
  font-size: 18px; line-height: 1.55;
  color: var(--pub-body); max-width: 540px;
  margin: 0 0 32px;
}
.pub-svc-cathero__meta {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--pub-mono); font-size: 12px;
  color: var(--pub-muted); letter-spacing: .4px;
}

/* ─── Composition (right side of hero) ───────────────────────────
   Each category has its own block. Kept verbose on purpose so any
   piece is straightforward to nudge in the inspector. */
.pub-svc-cathero__compo {
  position: relative; height: 420px;
}
.pub-svc-cathero__compo > * { position: absolute; }
.pub-cathero-index {
  font-family: var(--pub-mono); font-size: 11px;
  color: var(--pub-muted); letter-spacing: 1px;
  right: 20px; bottom: 0;
}

/* Académique — stack of book spines */
.pub-cathero-spine { height: 36px; border-radius: 2px; }
.pub-cathero-spine--1 { left: 40px;  top: 60px;  width: 280px; background: var(--pub-navy); }
.pub-cathero-spine--2 { left: 60px;  top: 104px; width: 260px; background: var(--pub-navy-deep); }
.pub-cathero-spine--3 { left: 30px;  top: 148px; width: 300px; background: var(--pub-navy); opacity: .85; }
.pub-cathero-spine--4 { left: 70px;  top: 192px; width: 240px; background: var(--pub-gold); }
.pub-cathero-spine--5 { left: 50px;  top: 236px; width: 280px; background: var(--pub-magenta); }
.pub-cathero-spine--6 { left: 80px;  top: 280px; width: 220px; background: var(--pub-navy); }
.pub-cathero-stamp {
  right: 20px; top: 30px;
  width: 116px; height: 116px; border-radius: 50%;
  border: 1.5px solid var(--pub-navy);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  font-family: var(--pub-mono); font-size: 10px; letter-spacing: 1.8px;
  color: var(--pub-navy); text-transform: uppercase;
  background: var(--pub-paper);
}
.pub-cathero-stamp__big {
  font-family: var(--pub-display); font-size: 28px; letter-spacing: -1px;
  line-height: 1; font-style: italic; margin-bottom: 4px;
  text-transform: none;
}

/* Travaux — sheet + circle + square */
.pub-cathero-sheet {
  left: 30px; top: 12px; width: 200px; height: 380px;
  background: var(--pub-paper);
  border: 1px solid var(--pub-rule-strong);
  transform: rotate(-3deg);
}
.pub-cathero-sheet__rule { left: 16px; right: 16px; height: 1px; position: absolute; }
.pub-cathero-sheet__rule--top { top: 20px; background: var(--pub-magenta); }
.pub-cathero-sheet__rule--sub { top: 30px; right: 60px; background: var(--pub-navy); opacity: .4; }
.pub-cathero-sheet__frame {
  left: 30px; top: 60px; width: 130px; height: 130px;
  border: 1.5px solid var(--pub-magenta); position: absolute;
}
.pub-cathero-sheet__fill {
  left: 50px; top: 80px; width: 90px; height: 90px;
  background: var(--pub-magenta); opacity: .15; position: absolute;
}
.pub-cathero-sheet__label {
  position: absolute;
  left: 16px; bottom: 24px;
  font-family: var(--pub-mono); font-size: 8px; color: var(--pub-muted);
}
.pub-cathero-circle {
  right: 20px; top: 40px; width: 200px; height: 200px;
  border-radius: 50%; background: var(--pub-magenta);
}
.pub-cathero-square {
  right: 30px; bottom: 30px; width: 140px; height: 140px;
  background: var(--pub-gold);
}
.pub-cathero-strip {
  right: 80px; top: 220px; width: 180px; height: 24px;
  background: var(--pub-navy); transform: rotate(-8deg);
}

/* Studio — mint disc + gold square + magenta dot + baseline grid */
.pub-cathero-mint {
  left: 20px; top: 30px; width: 220px; height: 220px;
  border-radius: 50%; background: var(--pub-mint);
}
.pub-cathero-gold {
  left: 140px; top: 130px; width: 200px; height: 200px;
  background: var(--pub-gold);
}
.pub-cathero-binding {
  right: 80px; top: 60px; width: 28px; height: 300px;
  background: var(--pub-navy); border-radius: 2px;
}
.pub-cathero-dot {
  left: 80px; bottom: 60px; width: 96px; height: 96px;
  border-radius: 50%; background: var(--pub-magenta);
}
.pub-cathero-baseline {
  left: 40px; top: 80px; width: 200px; height: 240px;
  background-image: repeating-linear-gradient(
    to bottom, transparent 0 11px, rgba(15,16,32,.12) 11px 12px
  );
}
.pub-cathero-tag {
  right: 20px; bottom: 60px;
  padding: 8px 14px;
  background: var(--pub-ink); color: var(--pub-paper);
  font-family: var(--pub-mono); font-size: 11px;
  letter-spacing: 1.4px; text-transform: uppercase;
}

/* ─── Sticky section nav ────────────────────────────────────────── */
.pub-svc-secnav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(248,246,240,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--pub-rule);
  border-bottom: 1px solid var(--pub-rule);
}
.pub-svc-secnav__inner {
  display: flex; align-items: center; gap: 24px;
  padding-top: 14px; padding-bottom: 14px;
  font-family: var(--pub-body); font-size: 13px;
  overflow-x: auto;
}
.pub-svc-secnav__label {
  font-family: var(--pub-mono); font-size: 11px;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--pub-muted); white-space: nowrap;
}
.pub-svc-secnav__link {
  text-decoration: none; color: var(--pub-body);
  font-weight: 500; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 0; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.pub-svc-secnav__link.is-active {
  color: var(--cat-accent); font-weight: 600;
  border-bottom-color: var(--cat-accent);
}
.pub-svc-secnav__idx {
  font-family: var(--pub-mono); font-size: 11px; opacity: .55;
}

/* ─── Deep-dive section ─────────────────────────────────────────── */
.pub-svc-deep { padding-top: 72px; }
.pub-svc-deep__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.pub-svc-deep--flip .pub-svc-deep__grid {
  direction: rtl;
}
.pub-svc-deep--flip .pub-svc-deep__visual,
.pub-svc-deep--flip .pub-svc-deep__copy { direction: ltr; }

/* Photo placeholder card */
.pub-svc-deep__ph {
  width: 100%; aspect-ratio: 4 / 5;
  background:
    repeating-linear-gradient(45deg,
      var(--pub-paper) 0 14px,
      var(--pub-paper-deep) 14px 28px);
  border: 1px solid var(--pub-rule-strong);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  border-radius: 4px;
  overflow: hidden;
}
.pub-svc-deep__ph-caption {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--pub-mono); font-size: 10px; letter-spacing: 1.4px;
  color: var(--pub-muted); text-transform: uppercase;
}
.pub-svc-deep__ph-dot {
  position: absolute; top: 16px; right: 16px;
  width: 14px; height: 14px;
}
.pub-svc-deep__ph-tag {
  padding: 14px 20px;
  background: var(--pub-paper);
  border: 1px solid var(--pub-rule-strong);
  font-family: var(--pub-mono); font-size: 12px; letter-spacing: .8px;
  color: var(--pub-ink-soft); max-width: 70%;
  text-align: center;
}
.pub-svc-deep__ph-foot {
  position: absolute; bottom: 16px; left: 16px;
  font-family: var(--pub-mono); font-size: 10px; letter-spacing: 1.2px;
  color: var(--pub-muted); text-transform: uppercase;
}

/* Real product photo (replaces the placeholder card once `photo` is set).
   Framed like a printed photo: a light paper mat + a soft ambient shadow. */
.pub-svc-deep__photo {
  width: 100%; aspect-ratio: 4 / 5;
  position: relative;
  box-sizing: border-box;
  padding: 10px;
  background: var(--pub-paper);
  border: 1px solid var(--pub-rule-strong);
  border-radius: 6px;
  box-shadow:
    0 28px 48px -30px rgba(15, 16, 32, .18),
    0 2px 8px -4px rgba(15, 16, 32, .08);
}
.pub-svc-deep__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(15, 16, 32, .06);
}
.pub-svc-deep__photo .pub-svc-deep__ph-dot {
  top: 16px; right: 16px;
  box-shadow: 0 0 0 3px var(--pub-paper);
}

/* Shorter frame for landscape source photos (cartes de visite, mailing/VDP)
   so object-fit: cover doesn't crop away most of the image. */
.pub-svc-deep__photo--wide {
  aspect-ratio: 4 / 3;
}

/* Copy column */
.pub-svc-deep__kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--pub-mono); font-size: 11px;
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 14px; font-weight: 600;
}
.pub-svc-deep__num {
  font-family: var(--pub-mono); font-size: 11px;
  padding: 2px 7px; color: #fff;
}
.pub-svc-deep__title {
  font-family: var(--pub-display);
  font-size: clamp(36px, 4vw, 56px);
  margin: 0 0 18px;
  font-weight: 500; letter-spacing: -1.2px; line-height: 1;
  color: var(--pub-ink);
}
.pub-svc-deep__pitch {
  font-size: 16px; line-height: 1.6;
  color: var(--pub-body); margin: 0 0 28px;
}
.pub-svc-deep__eyebrow {
  font-family: var(--pub-mono); font-size: 11px;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--pub-muted); margin-bottom: 10px;
}
.pub-svc-deep__pourqui {
  margin: 0 0 28px; padding: 0; list-style: none;
  font-size: 14.5px; line-height: 1.6;
  color: var(--pub-ink-soft); display: grid; gap: 4px;
}
.pub-svc-deep__pourqui li {
  display: grid; grid-template-columns: 18px 1fr; align-items: baseline; gap: 8px;
}
.pub-svc-deep__pourqui li span { font-weight: 700; }
.pub-svc-deep__ctas {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.pub-svc-deep__primary-cta:hover { filter: brightness(.92); }
.pub-svc-deep__prix {
  font-size: 13.5px; color: var(--pub-muted); line-height: 1.55;
  margin: 0;
}
.pub-svc-deep__prix strong {
  color: var(--pub-ink-soft); font-weight: 600;
}

/* Specs strip (6 cells) */
.pub-svc-deep__specs {
  margin-top: 48px;
  border-top: 1px solid var(--pub-rule);
  border-bottom: 1px solid var(--pub-rule);
  padding: 20px 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
}
.pub-svc-deep__spec-k {
  font-family: var(--pub-mono); font-size: 10px; letter-spacing: 1.3px;
  text-transform: uppercase; color: var(--pub-muted); margin-bottom: 6px;
}
.pub-svc-deep__spec-v {
  font-size: 14px; line-height: 1.35; color: var(--pub-ink); font-weight: 500;
}

/* Options list */
.pub-svc-deep__options {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  align-items: start;
}
.pub-svc-deep__options-label {
  font-family: var(--pub-mono); font-size: 11px;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--pub-muted); padding-top: 8px;
}
.pub-svc-deep__options-list {
  margin: 0; padding: 0; list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 10px; column-gap: 32px;
  font-size: 14.5px; line-height: 1.5;
  color: var(--pub-ink-soft);
}
.pub-svc-deep__options-list li {
  display: grid; grid-template-columns: 14px 1fr; gap: 10px;
  padding-top: 10px; border-top: 1px dashed var(--pub-rule);
}
.pub-svc-deep__options-dot {
  width: 12px; height: 12px; border-radius: 50%; margin-top: 4px;
}

/* Direct-order-by-email callout (memoire / these) — set apart from the
   options list above with its own top rule + surface so it doesn't
   read as just another CTA in the pair near the top of the section. */
.pub-svc-deep__print {
  margin-top: 40px;
  padding: 28px 32px;
  border-top: 1px solid var(--pub-rule);
  background: var(--pub-surface);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.pub-svc-deep__print-label {
  font-family: var(--pub-mono); font-size: 11px;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--cat-accent); font-weight: 600; margin-bottom: 8px;
}
.pub-svc-deep__print-text p {
  margin: 0; font-size: 14.5px; line-height: 1.55;
  color: var(--pub-ink-soft); max-width: 520px;
}
.pub-svc-deep__print-btn { flex-shrink: 0; white-space: nowrap; }

/* ─── Related categories ────────────────────────────────────────── */
.pub-svc-related {
  padding-top: 96px; padding-bottom: 40px;
}
.pub-svc-related__eyebrow {
  font-family: var(--pub-mono); font-size: 11px;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--pub-muted); margin-bottom: 18px;
}
.pub-svc-related__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.pub-svc-related__card {
  --cat-accent: var(--pub-ink);
  display: block;
  padding: 32px 36px;
  background: var(--pub-surface);
  border: 1px solid var(--pub-rule);
  border-radius: 6px;
  text-decoration: none; color: var(--pub-ink);
  position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.pub-svc-related__card:hover {
  transform: translateY(-2px);
  border-color: var(--cat-accent);
  box-shadow: 0 16px 32px -16px rgba(15,16,32,.15);
}
.pub-svc-related__card-disc {
  position: absolute; right: -30px; top: -30px;
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--cat-accent); opacity: .18;
}
.pub-svc-related__card-eyebrow {
  font-family: var(--pub-mono); font-size: 11px;
  letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--cat-accent); margin-bottom: 10px; font-weight: 600;
}
.pub-svc-related__card-title {
  font-family: var(--pub-display); font-size: 30px; font-weight: 500;
  letter-spacing: -0.6px; line-height: 1.1; margin-bottom: 10px;
}
.pub-svc-related__card-lead {
  font-size: 14px; line-height: 1.55;
  color: var(--pub-body); margin: 0 0 18px;
}
.pub-svc-related__card-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600;
  color: var(--cat-accent);
}

/* ─── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .pub-svc-deep__specs { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
}
@media (max-width: 820px) {
  .pub-svc-cathero { grid-template-columns: 1fr; gap: 40px;
    padding-top: 44px; padding-bottom: 48px;
  }
  .pub-svc-cathero__compo { height: 340px; }
  .pub-svc-deep { padding-top: 56px; }
  .pub-svc-deep__grid,
  .pub-svc-deep--flip .pub-svc-deep__grid {
    grid-template-columns: 1fr; gap: 32px; direction: ltr;
  }
  .pub-svc-deep__specs { grid-template-columns: repeat(2, 1fr); }
  .pub-svc-deep__options { grid-template-columns: 1fr; gap: 16px; }
  .pub-svc-deep__options-list { grid-template-columns: 1fr; }
  .pub-svc-deep__print { flex-direction: column; align-items: flex-start; gap: 18px; padding: 24px; }
  .pub-svc-deep__print-btn { width: 100%; text-align: center; }
  .pub-svc-related__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pub-svc-cathero__title { font-size: clamp(40px, 11vw, 64px); }
  .pub-svc-secnav__inner { gap: 16px; padding-left: 16px; padding-right: 16px; }
}

/* ─── Animations: hero entrance + scroll reveals ───────────── */

/* Category hero — staggered rise on page load. */
.pub-svc-cathero__kicker,
.pub-svc-cathero__title .pub-svc-cathero__line,
.pub-svc-cathero__lead,
.pub-svc-cathero__meta {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  animation: pub-cat-rise .75s cubic-bezier(.2, .7, .2, 1) forwards;
}
.pub-svc-cathero__kicker { animation-delay: 80ms; }
.pub-svc-cathero__title .pub-svc-cathero__line:nth-child(1) { animation-delay: 180ms; }
.pub-svc-cathero__title .pub-svc-cathero__line:nth-child(2) { animation-delay: 260ms; }
.pub-svc-cathero__title .pub-svc-cathero__line:nth-child(3) { animation-delay: 340ms; }
.pub-svc-cathero__lead { animation-delay: 420ms; }
.pub-svc-cathero__meta { animation-delay: 540ms; }

.pub-svc-cathero__compo > * {
  opacity: 0;
  transform: scale(.94);
  animation: pub-cat-pop .85s cubic-bezier(.2, .7, .2, 1) forwards;
  animation-delay: 240ms;
}
.pub-svc-cathero__compo > *:nth-child(2) { animation-delay: 320ms; }
.pub-svc-cathero__compo > *:nth-child(3) { animation-delay: 400ms; }
.pub-svc-cathero__compo > *:nth-child(4) { animation-delay: 480ms; }
.pub-svc-cathero__compo > *:nth-child(5) { animation-delay: 560ms; }
.pub-svc-cathero__compo > *:nth-child(6) { animation-delay: 640ms; }
.pub-svc-cathero__compo > *:nth-child(7) { animation-delay: 720ms; }

@keyframes pub-cat-rise {
  to { opacity: 1; transform: none; }
}
@keyframes pub-cat-pop {
  to { opacity: 1; transform: none; }
}

/* Scroll reveals — same pattern as services.css; redeclared here so
   the category stylesheet works even if loaded alone. */
.pub-svc--category [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition:
    opacity .7s cubic-bezier(.2, .7, .2, 1),
    transform .7s cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}
.pub-svc--category [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Hover micro-interactions */
.pub-svc-secnav__link {
  transition: color .25s, border-color .25s;
}
.pub-svc-related__card,
.pub-svc-deep__primary-cta {
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s, border-color .25s;
}
@media (hover: hover) {
  .pub-svc-related__card:hover {
    transform: translateY(-4px);
  }
}
.pub-svc-related__card-arrow span[aria-hidden] {
  display: inline-block;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.pub-svc-related__card:hover .pub-svc-related__card-arrow span[aria-hidden] {
  transform: translateX(5px);
}
.pub-svc-deep__ph,
.pub-svc-deep__photo {
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s cubic-bezier(.2, .7, .2, 1);
}
@media (hover: hover) {
  .pub-svc-deep__visual:hover .pub-svc-deep__ph {
    transform: translateY(-3px);
  }
  .pub-svc-deep__visual:hover .pub-svc-deep__photo {
    transform: translateY(-3px);
    box-shadow:
      0 32px 56px -28px rgba(15, 16, 32, .22),
      0 4px 10px -4px rgba(15, 16, 32, .1);
  }
}

/* ─── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .pub-svc--category *,
  .pub-svc--category *::before,
  .pub-svc--category *::after {
    transition: none !important; animation: none !important;
  }
  .pub-svc-cathero__kicker,
  .pub-svc-cathero__title .pub-svc-cathero__line,
  .pub-svc-cathero__lead,
  .pub-svc-cathero__meta,
  .pub-svc-cathero__compo > *,
  .pub-svc--category [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
