/* Shared styles for Hepworth Labs subpages (insights, legal). */
:root {
  /* Palette from the Hepworth Labs redesign (package 4) */
  --navy: #0E2229; --navy-deep: #0E2229; --blue: #E8692E; --blue-dark: #C9561F;
  --ink: #0E2229; --body: #3E4C52; --muted: #5E6B70; --rule: #E2DACB; --surface: #EFE8D9; --white: #F6F1E7;
  --gold: #F4C03A; --mono: 'IBM Plex Mono', ui-monospace, monospace; --display: 'Archivo', sans-serif;
  --card: #FFFDF8; --head-bg: rgba(246,241,231,0.94); --on-solid: #F6F1E7; --solid: #0E2229;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --navy: #0E2229; --navy-deep: #0E2229; --blue: #E8692E; --blue-dark: #F4C03A;
  --ink: #F3EFE6; --body: #B4C0C2; --muted: #8A989C; --rule: #27393F; --surface: #16282E; --white: #0F1C21;
  --card: #16282E; --head-bg: rgba(15,28,33,0.92); --on-solid: #0E2229; --solid: #F3EFE6;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'IBM Plex Sans', system-ui, sans-serif; background: var(--white); color: var(--ink); line-height: 1.65; font-size: 17px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
.eyebrow { display: inline-block; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); margin-bottom: 16px; }
h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.1; font-weight: 700; }
h1, .page-head h1, .posts h2, .article-cta h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.04em; }

/* Nav */
header.nav { position: sticky; top: 0; z-index: 10; background: var(--head-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.nav-row { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.mark { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; color: var(--navy); }
.mark-badge { position: relative; width: 34px; height: 34px; background: #0E2229; color: #F6F1E7; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 500; }
.mark-badge::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, #1FA59A 0 25%, #F4C03A 25% 50%, #F07A6A 50% 75%, #E8692E 75%); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--ink); }
.nav-links a:hover, .nav-links a.active { color: #E8692E; }
.btn { display: inline-flex; align-items: center; padding: 12px 22px; font-size: 15px; font-weight: 600; background: #E8692E; color: #0E2229 !important; border-radius: 999px; }
.btn:hover { background: #F4C03A; color: #0E2229 !important; }
.theme-toggle { width: 40px; height: 40px; display: grid; place-items: center; background: transparent; border: 1.5px solid var(--ink); border-radius: 50%; cursor: pointer; color: var(--ink); }
.theme-toggle:hover { border-color: #E8692E; color: #E8692E; }
.nav-actions .theme-toggle { display: none; }
.theme-toggle span { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.btn:hover { background: var(--blue-dark); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 10px; flex-direction: column; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Page head */
.page-head { background: #0E2229; color: #F6F1E7; padding: 72px 0 64px; }
.page-head .eyebrow { color: #F4C03A; }
.page-head h1 { font-size: clamp(40px, 6vw, 80px); line-height: 0.95; max-width: 22ch; }
.page-head .lede { margin-top: 18px; color: #BFC9C9; font-size: 18px; max-width: 60ch; }
.breadcrumb { font-family: var(--mono); font-size: 12px; color: #8E9CA0; margin-bottom: 20px; }
.breadcrumb a:hover { color: var(--white); }

/* Article body */
main { padding: 72px 0 96px; }
.article { max-width: 72ch; }
.article h2 { font-size: 26px; font-weight: 600; margin: 44px 0 14px; }
.article h3 { font-size: 20px; font-weight: 600; margin: 32px 0 10px; }
.article p, .article li { color: var(--body); }
.article p { margin-bottom: 18px; }
.article ul, .article ol { margin: 0 0 18px 24px; }
.article li { margin-bottom: 8px; }
.article strong { color: var(--ink); }
.article a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.article .meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 32px; }
.note { border-left: 4px solid var(--blue); background: var(--surface); padding: 18px 22px; margin: 28px 0; font-size: 15px; }
.note p:last-child { margin-bottom: 0; }

/* Post list (insights hub) */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post { border: 1px solid var(--rule); border-top: 6px solid #1FA59A; background: var(--card); padding: 28px; display: flex; flex-direction: column; gap: 10px; transition: transform 0.25s; }
.post:hover { transform: translateY(-4px); }
.post:nth-child(3n+2) { border-top-color: #F4C03A; }
.post:nth-child(3n) { border-top-color: #F07A6A; }
.post-meta { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.post h2 { font-size: 19px; font-weight: 600; }
.post p { color: var(--body); font-size: 15px; flex: 1; }
.post-more { font-size: 14px; font-weight: 600; color: var(--blue); }

/* Article CTA */
.article-cta { margin-top: 56px; background: #2B4EDB; color: #FFFFFF; padding: 36px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.article-cta h2 { font-size: 22px; font-weight: 600; margin: 0 0 6px; }
.article-cta p { color: #D7DEFF; margin: 0; font-size: 15px; }

/* Footer */
footer { background: #0E2229; color: #A9B7BA; padding: 40px 0 32px; font-size: 13px; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.foot-legal { display: flex; gap: 20px; flex-wrap: wrap; }
footer a:hover { color: var(--white); }

@media (max-width: 960px) { .posts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .nav-row { flex-wrap: nowrap; }
  .nav-toggle { display: flex; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--white); border-bottom: 1px solid var(--rule); padding: 8px 0 16px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 20px; border-top: 1px solid var(--rule); font-size: 16px; }
  .nav-links a.btn { margin: 12px 20px 0; border-top: 0; justify-content: center; }
  .nav-links a:not(.btn) { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
  .nav-links .theme-toggle { display: none; }
  .nav-actions { display: flex; align-items: center; gap: 10px; }
  .nav-actions .theme-toggle { display: grid; width: 44px; height: 44px; }
  .page-head { padding: 48px 0 40px; }
  main { padding: 48px 0 64px; }
  .posts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
