/* ===== Valpak Ad Specs & Templates ===== */

/* Self-hosted brand fonts (latin) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/Inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/Inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/Inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/Inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/Poppins-600.woff2') format('woff2'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/Poppins-700.woff2') format('woff2'); }

:root {
  --brand: #002f6c;        /* Valpak navy */
  --brand-2: #034191;      /* secondary blue */
  --brand-dark: #021f49;
  --green: #82bc00;        /* Valpak green */
  --green-dark: #4a7729;   /* accessible green for text */
  --cyan: #00a0df;

  --ink: #1f2937;
  --muted: #6e7787;
  --line: #e6e9ef;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --bg: #eef2f6;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --shadow-md: 0 6px 18px rgba(2,31,73,.12);
  --maxw: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); text-decoration: none; transition: top .15s ease; }
.skip-link:focus { top: 12px; }
.icon { width: 1.15em; height: 1.15em; flex: none; }
.svg-sprite { position: absolute; }

/* Header */
.site-header { background: var(--brand); position: sticky; top: 0; z-index: 30; box-shadow: 0 1px 0 rgba(255,255,255,.06), var(--shadow-sm); }
.site-header__inner { display: flex; align-items: center; min-height: 64px; padding-block: 8px; }
.site-header__logo { display: inline-flex; align-items: center; }
.site-header__logo img { height: 38px; width: auto; }

/* Hero */
.hero { background: radial-gradient(1200px 240px at 12% -40%, rgba(0,160,223,.25), transparent 60%), linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%); color: #fff; padding-block: 42px 88px; }
.hero__title { margin: 0 0 10px; font-family: var(--font-head); font-weight: 700; font-size: clamp(28px, 4vw, 42px); line-height: 1.1; letter-spacing: -.01em; }
.hero__lede { margin: 0; max-width: 64ch; color: rgba(255,255,255,.92); font-size: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 600; font-size: 15px; text-decoration: none; padding: 12px 20px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: transform .04s ease, box-shadow .15s ease, background .15s ease; }
.btn--primary { background: var(--green-dark); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { background: #3d6322; transform: translateY(-1px); }

/* Controls */
.controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-top: -52px; position: relative; z-index: 5; box-shadow: var(--shadow-md); }
.search { display: flex; align-items: center; gap: 10px; flex: 1 1 280px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; color: var(--muted); }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,47,108,.15); }
.search input { border: 0; background: transparent; outline: none; width: 100%; font: inherit; color: var(--ink); padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); transition: all .12s ease; }
.chip:hover { border-color: #cdd6e4; color: var(--ink); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.results { color: var(--muted); font-size: 14px; margin: 18px 2px 4px; }
.no-results { margin: 24px 2px; font-size: 16px; }
.linkbtn { font: inherit; color: var(--brand); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; font-weight: 600; }

/* Groups & cards */
.group { margin-top: 30px; }
.group__title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; font-family: var(--font-head); font-weight: 600; font-size: 20px; color: var(--brand); padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); transition: border-color .15s ease, box-shadow .15s ease; }
.card:hover { border-color: #cdd6e4; box-shadow: var(--shadow-md); }
.card__body { min-width: 0; width: 100%; }
.card__title { margin: 0; font-family: var(--font-head); font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.card__note { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.card__actions { margin-top: auto; display: flex; align-items: center; gap: 8px; width: 100%; }
.card__dl { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--green-dark); background: rgba(130,188,0,.13); padding: 9px 14px; border-radius: 999px; transition: background .12s ease, color .12s ease; }
.card__dl:hover { background: var(--green-dark); color: #fff; }
.card__copy { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; cursor: pointer; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 50%; transition: color .12s ease, border-color .12s ease, background .12s ease; }
.card__copy:hover { color: var(--brand); border-color: #cdd6e4; }
.card__copy.is-copied { color: var(--green-dark); border-color: rgba(130,188,0,.55); background: rgba(130,188,0,.12); }
.card__copy .icon { width: 17px; height: 17px; }
.card.is-hidden, .group.is-hidden, .grid.is-hidden { display: none !important; }
mark { background: #ffe39a; color: var(--ink); border-radius: 3px; padding: 0 2px; }

/* Detail page */
.detail { padding-top: 26px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--brand); }
.back:hover { text-decoration: underline; }
.detail__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-block; margin: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); background: rgba(0,47,108,.09); padding: 4px 10px; border-radius: 999px; }
.detail__title { margin: 8px 0 16px; font-family: var(--font-head); font-weight: 700; font-size: clamp(22px, 3vw, 32px); line-height: 1.15; color: var(--ink); }
.detail__actions { margin: 4px 0 20px; }
.detail__actions--bottom { margin-top: 28px; }

/* Migrated WordPress content */
.content { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px clamp(16px, 4vw, 32px); box-shadow: var(--shadow-sm); }
.content h2, .content h3, .content h4 { font-family: var(--font-head); line-height: 1.25; margin: 1.4em 0 .5em; color: var(--brand); }
.content h2 { font-size: 20px; } .content h3 { font-size: 17px; }
.content p { margin: 0 0 1em; }
.content ul, .content ol { margin: 0 0 1em; padding-left: 1.4em; }
.content li { margin: .25em 0; }
.content a { color: var(--brand); font-weight: 600; }
.content img { height: auto; border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; }
.content figure { margin: 16px 0; }
.content figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.content table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 14px; }
.content th, .content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.content th { background: var(--surface-2); }
.content strong { color: var(--ink); }

/* Footer */
.site-footer { margin-top: 56px; background: var(--surface); border-top: 1px solid var(--line); }
.site-footer__inner { padding-block: 28px; text-align: center; }
.site-footer__help { margin: 0 0 8px; font-size: 15px; }
.site-footer__help a { font-weight: 700; }
.site-footer__links { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; }
.site-footer__links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.site-footer__links a:hover { color: var(--brand); text-decoration: underline; }

:focus-visible { outline: 3px solid rgba(0,47,108,.45); outline-offset: 2px; border-radius: 6px; }
.hero :focus-visible { outline-color: rgba(255,255,255,.85); }

@media (max-width: 640px) {
  .controls { margin-top: -40px; }
  .grid { grid-template-columns: 1fr; }
  .site-header__logo img { height: 32px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
