/* ==========================================================================
   Loudwren: light content pages (case studies, town pages, niche pages).
   Loaded after fonts.css and style.css. Uses the same tokens (--ink, --signal,
   --f-display ...). No JavaScript needed, nothing is hidden until scripts run.
   ========================================================================== */

/* Fallback tuned to Instrument Serif's width so the swap doesn't shift the headline */
@font-face { font-family: "Instrument Serif Fallback"; src: local("Times New Roman"); size-adjust: 86%; ascent-override: 105%; descent-override: 30%; line-gap-override: 0%; }
body.pg { --f-display: "Instrument Serif", "Instrument Serif Fallback", "Times New Roman", serif; }

body.pg {
  background:
    radial-gradient(ellipse 70% 40% at 80% 0%, rgba(64, 76, 140, .22), transparent 70%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(255, 106, 61, .08), transparent 70%),
    var(--ink);
  background-repeat: no-repeat;
  min-height: 100vh;
}
.pg a:not(.pg-btn) { text-decoration: underline; text-decoration-color: rgba(255, 106, 61, .5); text-underline-offset: 3px; }
.pg a:not(.pg-btn):hover { text-decoration-color: var(--signal); }
.pg-skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 8px; text-decoration: none !important; }
.pg-skip:focus { top: 12px; }

/* header */
.pg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 16px var(--gutter); max-width: 1320px; margin: 0 auto; }
.pg-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; text-decoration: none !important; }
.pg-brand svg { width: 40px; height: 34px; color: var(--paper); }
.pg-brand span { font-family: var(--f-display); font-size: 30px; line-height: 1; letter-spacing: -.02em; }
.pg-brand i { color: var(--signal); }
.pg-nav { display: flex; gap: 22px; font-size: 15px; order: 3; width: 100%; padding-top: 4px; }
.pg-nav a { color: var(--muted); text-decoration: none !important; padding: 8px 0; }
.pg-nav a:hover { color: var(--text); }
@media (min-width: 720px) {
  .pg-nav { order: 0; width: auto; padding: 0; }
}

/* buttons */
.pg-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 26px; border-radius: 999px; font-weight: 500; font-size: 16px; line-height: 1.2; text-align: center; text-decoration: none; transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease); }
.pg-btn--signal { background: var(--signal); color: var(--ink); }
.pg-btn--signal:hover { background: var(--paper); }
.pg-btn--ghost { border: 1px solid var(--line-2); color: var(--text); }
.pg-btn--ghost:hover { background: var(--paper); color: var(--ink); border-color: transparent; }
.pg-btn--sm { min-height: 42px; padding: 8px 20px; font-size: 14.5px; }

/* layout */
.pg-main { padding-bottom: 24px; }
.pg-wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 var(--gutter); }
.pg-hero { padding-top: clamp(28px, 6vw, 72px); padding-bottom: clamp(24px, 4vw, 48px); }
.pg-crumbs { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 24px; }
.pg-crumbs a { color: var(--muted); }
.pg-kicker { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.pg-h1 { font-family: var(--f-display); font-weight: 400; letter-spacing: -.02em; font-size: 44px; font-size: clamp(42px, 8vw, 84px); line-height: .98; margin: 0 0 24px; overflow-wrap: break-word; }
.pg-h1 em { font-style: italic; color: var(--signal); }
.pg-lead { font-size: 19px; font-size: clamp(19px, 2vw, 23px); line-height: 1.5; color: var(--text); max-width: 46ch; margin: 0 0 28px; }
.pg-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.pg-section { padding: clamp(28px, 5vw, 52px) 0; border-top: 1px solid var(--line); }
.pg-section h2 { font-family: var(--f-display); font-weight: 400; font-size: 34px; font-size: clamp(32px, 4.6vw, 50px); line-height: 1.02; letter-spacing: -.015em; margin: 0 0 18px; }
.pg-section h3 { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.15; margin: 28px 0 8px; }
.pg-section p { margin: 0 0 16px; max-width: 66ch; }
.pg-section p.pg-note { color: var(--muted); font-size: 15px; }
.pg-section ul, .pg-section ol { padding-left: 22px; margin: 0 0 18px; max-width: 66ch; }
.pg-section li { margin-bottom: 10px; }
.pg-section li::marker { color: var(--signal); }
.pg-list-tight li { margin-bottom: 6px; }

/* case-study screenshots */
.pg-shots { display: grid; gap: 20px; margin: 8px 0 8px; align-items: end; }
.pg-shots figure { margin: 0; }
.pg-shots img { border-radius: 14px; border: 1px solid var(--line-2); width: 100%; height: auto; background: var(--ink-2); }
.pg-shots figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.pg-shots .pg-shot-phone { max-width: 220px; }
@media (min-width: 720px) {
  .pg-shots { grid-template-columns: 1fr 200px; }
}

/* price cards */
.pg-plans { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 8px 0 18px; padding: 0; list-style: none; max-width: none !important; }
.pg-plans li { margin: 0; padding: 18px 20px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--glass); }
.pg-plans b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.1; }
.pg-plans .pg-price { display: block; font-size: 15px; color: var(--signal); margin: 2px 0 6px; font-weight: 500; }
.pg-plans span:last-child { font-size: 15px; color: var(--muted); display: block; }
@media (min-width: 560px) { .pg-plans { grid-template-columns: 1fr 1fr; } }

/* callout */
.pg-callout { border: 1px solid var(--line-2); border-left: 3px solid var(--signal); border-radius: 12px; padding: 18px 20px; background: var(--glass); margin: 8px 0 18px; max-width: 66ch; }
.pg-callout p { margin: 0 !important; }

/* final call to action */
.pg-final { text-align: left; }
.pg-final .pg-cta-row { margin-top: 20px; }

/* related links */
.pg-related { list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.pg-related li { margin: 0; }
.pg-related a { display: block; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none !important; }
.pg-related a:hover { border-color: var(--signal); }
.pg-related small { display: block; color: var(--muted); font-size: 14px; }

/* footer */
.pg-foot { border-top: 1px solid var(--line); padding: 32px 0 40px; margin-top: 24px; font-size: 14.5px; color: var(--muted); background: rgba(11, 13, 18, .3); }
.pg-foot-in { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 12px; }
.pg-foot p { margin: 0; }
.pg-foot a { color: var(--text); }
.pg-foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; }
.pg-foot-links a { padding: 6px 0; }
.pg-foot svg { display: block; }

@media (prefers-reduced-motion: reduce) {
  .pg-btn { transition: none; }
}

/* inline status badges (our-software page) */
.pg-section > p > .badge { position: static; display: inline-flex; }
