/* =========================================================
   Stefan Gauci Scicluna - Politics & Policy
   Shared editorial stylesheet (Reform UK palette)
   ========================================================= */

:root {
  --ink: #10243a;
  --paper: #ffffff;
  --paper-2: #eef5f8;
  --paper-3: #e0ecf1;
  --navy: #0a2a4e;
  --navy-soft: #36577a;
  --accent: #12b6cf;
  --accent-dark: #0c8ea3;
  --accent-ink: #0a6e80;
  --gold: #f3911e;
  --muted: #5e6b78;
  --line: rgba(10, 42, 78, 0.13);
  --line-strong: rgba(10, 42, 78, 0.26);
  --shadow: 0 1px 2px rgba(16,36,58,0.04), 0 12px 28px rgba(16,36,58,0.07);
  --maxw: 1140px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper);
  line-height: 1.65; font-size: 18px; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--serif); color: var(--navy); font-weight: 600;
  line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

.eyebrow {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 12px; font-weight: 600; color: var(--accent-ink); margin: 0 0 14px;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: flex; line-height: 1.05; }
.brand a { color: var(--navy); text-decoration: none; }
.brand .name { font-family: var(--serif); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; }
.brand .role { font-family: var(--sans); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.brandlink { display: flex; align-items: center; gap: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-chip { width: 42px; height: 42px; background: transparent; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; overflow: hidden; }
.logo-chip img { width: 100%; height: 100%; object-fit: contain; display: block; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--navy); font-size: 15px; font-weight: 500; text-decoration: none; padding: 6px 0; }
.nav a:hover { color: var(--accent-ink); }
.nav a.active { color: var(--accent-ink); }
.nav a.pill { background: var(--navy); color: #fff; padding: 9px 16px; border-radius: 999px; font-weight: 600; }
.nav a.pill:hover { background: var(--accent); color: #05323c; text-decoration: none; }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; }

/* ---------- Hero ---------- */
.hero { padding: 76px 0 56px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(38px, 6vw, 68px); max-width: 16ch; }
.hero p.lead { font-size: 21px; color: var(--navy-soft); max-width: 60ch; margin: 18px 0 28px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn { display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 999px; cursor: pointer; border: 1px solid transparent; transition: all .15s ease; }
.btn-primary { background: var(--accent); color: #05323c; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--navy); text-decoration: none; }

/* ---------- Section heads ---------- */
.section { padding: 60px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0; }
.section-head .more { font-size: 15px; font-weight: 600; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card { background: #ffffff; border: 1px solid var(--line); border-radius: 14px; padding: 26px; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(16,36,58,.08), 0 18px 40px rgba(16,36,58,.10); }
.card .kicker { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--accent-ink); margin-bottom: 12px; }
.card h3 { font-size: 22px; margin: 0 0 10px; }
.card h3 a { color: var(--navy); }
.card h3 a:hover { color: var(--accent-ink); text-decoration: none; }
.card p { margin: 0 0 16px; color: var(--muted); font-size: 16px; }
.card .meta { margin-top: auto; font-size: 13px; color: var(--muted); }

.topic { display: block; padding: 28px 24px; border-radius: 14px; text-decoration: none; background: var(--navy); color: #fff; border: 1px solid var(--navy); transition: transform .15s ease, background .15s ease; }
.topic:hover { transform: translateY(-3px); background: #0c2036; text-decoration: none; }
.topic .num { font-family: var(--serif); font-size: 14px; color: var(--gold); }
.topic h3 { color: #fff; font-size: 22px; margin: 10px 0 8px; }
.topic p { color: rgba(255,255,255,.74); font-size: 15px; margin: 0; }

.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 42px; align-items: center; }
.feature h2 { font-size: clamp(28px, 4vw, 44px); }
.feature p { font-size: 18px; color: var(--navy-soft); }
.feature .panel { background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px; padding: 30px; }
.feature .panel ul { margin: 0; padding-left: 18px; }
.feature .panel li { margin-bottom: 12px; color: var(--navy-soft); }

/* ---------- Article list ---------- */
.post-list { border-top: 1px solid var(--line); }
.post-row { display: grid; grid-template-columns: 130px 1fr; gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: start; }
.post-row .date { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; padding-top: 4px; }
.post-row h3 { font-size: 24px; margin: 0 0 8px; }
.post-row h3 a { color: var(--navy); }
.post-row h3 a:hover { color: var(--accent-ink); text-decoration: none; }
.post-row p { margin: 0 0 10px; color: var(--muted); font-size: 16px; }

.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--navy-soft); background: var(--paper-3); border: 1px solid var(--line); padding: 4px 11px; border-radius: 999px; }
.tag.red { color: #05323c; background: var(--accent); border-color: var(--accent); }

/* ---------- Band / subscribe ---------- */
.band { background: var(--navy); color: #fff; }
.band h2 { color: #fff; }
.band-inner { padding: 64px 0; }
.band p { color: rgba(255,255,255,.78); font-size: 18px; max-width: 56ch; }
.subscribe { display: flex; gap: 12px; max-width: 460px; margin-top: 22px; flex-wrap: wrap; }
.subscribe input { flex: 1; min-width: 220px; padding: 13px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: #fff; font-size: 15px; font-family: var(--sans); }
.subscribe input::placeholder { color: rgba(255,255,255,.55); }
.subscribe .btn-primary { background: var(--accent); color: #05323c; }
.subscribe .btn-primary:hover { background: #2ccfe6; }

/* ---------- Pillars (Viewpoint principles) ---------- */
.pillars { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.pillar { background:#ffffff; border:1px solid var(--line); border-radius: 14px; padding: 24px; }
.pillar .n { font-family: var(--serif); color: var(--accent-ink); font-size: 15px; }
.pillar h3 { font-size: 19px; margin: 8px 0; }
.pillar p { font-size: 15px; color: var(--muted); margin: 0; }

/* ---------- Article page ---------- */
.article-head { padding: 60px 0 34px; border-bottom: 1px solid var(--line); }
.article-head .eyebrow a { color: var(--accent-ink); }
.article-head h1 { font-size: clamp(32px, 4.6vw, 52px); max-width: 22ch; }
.article-head .standfirst { font-size: 21px; color: var(--navy-soft); max-width: 64ch; margin-top: 16px; }
.article-meta { display: flex; gap: 16px; align-items: center; margin-top: 22px; font-size: 14px; color: var(--muted); }
.article-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }

.article-body { padding: 40px 0 20px; }
.article-body p, .article-body ul, .article-body ol, .article-body blockquote { max-width: 700px; }
.article-body p { margin: 0 0 22px; font-size: 19px; line-height: 1.75; }
.article-body h2 { font-size: 30px; margin: 40px 0 14px; }
.article-body h3 { font-size: 23px; margin: 32px 0 10px; }
.article-body blockquote { margin: 28px 0; padding: 6px 0 6px 26px; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 24px; color: var(--navy); line-height: 1.4; }
.article-body ul, .article-body ol { padding-left: 22px; }
.article-body li { margin-bottom: 10px; font-size: 19px; }
.article-body table { border-collapse: collapse; margin: 26px 0; width: 100%; max-width: 700px; font-size: 15px; font-family: var(--sans); }
.article-body th, .article-body td { border: 1px solid var(--line-strong); padding: 9px 12px; text-align: left; vertical-align: top; }
.article-body th { background: var(--paper-2); color: var(--navy); font-weight: 600; }

.byline-card { display: flex; gap: 18px; align-items: flex-start; margin: 44px 0; padding: 24px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; max-width: 700px; }
.byline-card .avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 22px; flex: 0 0 auto; }
.byline-card strong { color: var(--navy); font-size: 16px; display: block; margin-bottom: 4px; }
.byline-card p { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- Portrait / about teaser ---------- */
.about-teaser { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: center; }
.portrait, .portrait-ph { width: 100%; aspect-ratio: 4/5; border-radius: 16px; box-shadow: var(--shadow); }
.portrait { object-fit: cover; border: 1px solid var(--line); background: var(--paper-3); display: block; }
.portrait-ph { border: 1px dashed var(--line-strong); background: var(--paper-2); display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); font-size: 13px; padding: 18px; line-height: 1.5; }
.about-teaser h2 { font-size: clamp(26px, 3.4vw, 34px); }
.about-teaser p { color: var(--navy-soft); font-size: 18px; }

/* ---------- Cartoons ---------- */
.cartoon-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cartoon { background: #ffffff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.cartoon:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(16,36,58,.08), 0 18px 40px rgba(16,36,58,.10); }
.cartoon .frame { aspect-ratio: 4/3; background: var(--paper-2); display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); }
.cartoon .frame img { width: 100%; height: 100%; object-fit: cover; }
.cartoon .ph { color: var(--muted); font-size: 13px; text-align: center; padding: 22px; line-height: 1.5; }
.cartoon .cap { padding: 16px 18px; }
.cartoon .cap h4 { font-family: var(--serif); color: var(--navy); font-size: 17px; margin: 0 0 6px; line-height: 1.25; }
.cartoon .cap p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Watch / videos (larger, two per row) ---------- */
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.video { background: #ffffff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.video:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(16,36,58,.08), 0 18px 40px rgba(16,36,58,.10); }
.video .embed { position: relative; aspect-ratio: 16 / 9; background: #0a1322; }
.video .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .embed .ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: rgba(255,255,255,.72); font-size: 13px; text-align: center; padding: 18px; }
.video .play { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.video .play:after { content: ""; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #05323c; margin-left: 4px; }
.video .cap { padding: 18px 20px; }
.video .cap .src { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; margin-bottom: 6px; }
.video .cap h4 { font-family: var(--serif); color: var(--navy); font-size: 19px; margin: 0; line-height: 1.25; }

/* ---------- Footer ---------- */
.footer { background: #11192b; color: rgba(255,255,255,.72); padding: 56px 0 30px; }
.footer a { color: rgba(255,255,255,.82); }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.footer h4 { color: #fff; font-family: var(--sans); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 9px; font-size: 15px; }
.footer .mast { font-family: var(--serif); font-size: 20px; color: #fff; margin-bottom: 10px; }
.footer .disc { font-size: 13px; color: rgba(255,255,255,.5); max-width: 46ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 20px; font-size: 13px; color: rgba(255,255,255,.5); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Utilities ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cartoon-grid { grid-template-columns: 1fr 1fr; }
  .about-teaser { grid-template-columns: 200px 1fr; gap: 28px; }
}
@media (max-width: 680px) {
  body { font-size: 17px; }
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 4px; background: var(--paper); padding: 16px 24px 22px; border-bottom: 1px solid var(--line); }
  .nav.open a { width: 100%; padding: 10px 0; }
  .menu-toggle { display: block; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .cartoon-grid { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 1fr; gap: 8px; }
  .post-row .date { padding-top: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .about-teaser { grid-template-columns: 1fr; gap: 22px; }
  .portrait, .portrait-ph { max-width: 260px; }
  .hero { padding: 52px 0 40px; }
}


/* ---------- Sponsor rotator (home) ---------- */
.sponsor-label { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.16em; font-size: 11px; font-weight: 600; color: var(--muted); margin: 0 0 12px; }
.adrotator { position: relative; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.adrotator__viewport { overflow: hidden; }
.adrotator__track { display: flex; transition: transform .55s cubic-bezier(.4,0,.2,1); }
.adslide { flex: 0 0 100%; min-width: 100%; display: block; text-decoration: none; background: var(--navy); color: #fff; padding: 40px 58px; }
.adslide:hover { text-decoration: none; }
.adslide .k { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.16em; font-size: 12px; font-weight: 600; color: var(--gold); margin: 0 0 12px; }
.adslide h3 { font-family: var(--serif); color: #fff; font-size: clamp(23px,3vw,34px); line-height: 1.2; margin: 0 0 10px; max-width: 24ch; }
.adslide p { color: rgba(255,255,255,.82); font-size: 17px; line-height: 1.6; max-width: 56ch; margin: 0 0 22px; }
.adslide .adbtn { display: inline-block; background: var(--accent); color: #05323c; font-family: var(--sans); font-weight: 600; font-size: 15px; padding: 11px 22px; border-radius: 999px; transition: background .15s ease; }
.adslide:hover .adbtn { background: #2ccfe6; }
.adrotator__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s ease; z-index: 2; }
.adrotator__arrow:hover { background: rgba(255,255,255,.28); }
.adrotator__arrow--prev { left: 14px; } .adrotator__arrow--next { right: 14px; }
.adrotator__dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; gap: 8px; justify-content: center; z-index: 2; }
.adrotator__dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255,255,255,.42); cursor: pointer; padding: 0; transition: width .2s ease, background .2s ease; }
.adrotator__dots button.is-active { background: var(--gold); width: 22px; border-radius: 999px; }
@media (max-width: 620px) { .adslide { padding: 30px 26px; } .adrotator__arrow { display: none; } }
@media (prefers-reduced-motion: reduce) { .adrotator__track { transition: none; } }

/* ---------- Inline SVG charts (article figures) ---------- */
.figure-chart { margin: 26px 0 6px; }
.figure-chart svg { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px 18px 14px; }
.figure-chart figcaption { font-size: 14px; color: var(--navy-soft); margin-top: 8px; }
.chart-t { font-family: var(--sans); font-size: 14px; font-weight: 700; fill: var(--navy); }
.chart-s { font-family: var(--sans); font-size: 11.5px; fill: #5e6b78; }
.chart-l { font-family: var(--sans); font-size: 12px; fill: #10243a; }
.chart-lb { font-family: var(--sans); font-size: 12px; font-weight: 700; fill: var(--navy); }
.chart-v { font-family: var(--sans); font-size: 12px; font-weight: 700; fill: var(--navy); }
.chart-vw { font-family: var(--sans); font-size: 12px; font-weight: 700; fill: #ffffff; }
