/* AIP podcast app - shared styles (header, footer, forms, modals). Head of IT, 17/09/2026.
   Visual language follows the main AIP site theme (sites/aip-wordpress/theme/aip). Local fonts only. */

@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/podcast/fonts/source-serif-4-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 400 700; font-display: swap; src: url("/podcast/fonts/source-serif-4-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("/podcast/fonts/source-sans-3-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: italic; font-weight: 300 800; font-display: swap; src: url("/podcast/fonts/source-sans-3-italic.woff2") format("woff2"); }

:root {
  --navy: #0e1d4f;
  --navy-2: #16296a;
  --blue: #14308f;
  --gold: #f2c313;
  --gold-soft: #f7d75a;
  --gold-deep: #8a6a00;
  --green: #2f7a62;
  --red: #b3141c;
  --ink: #1b2233;
  --muted: #5a6275;
  --line: #dfe3ec;
  --mist: #eef1f8;
  --parchment: #f8f6ef;
  --white: #ffffff;
  --radius: 6px;
  --shadow: 0 6px 24px rgba(14, 29, 79, 0.10);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--parchment); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
button { font-family: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.hp-field { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Crest-quarters rule: blue | gold | green | red ---------- */
.quarters { height: 5px; border: 0; background: linear-gradient(90deg, var(--blue) 0 25%, var(--gold) 25% 50%, var(--green) 50% 75%, var(--red) 75% 100%); }

/* ---------- Header (matches main site) ---------- */
.aip-topbar { background: var(--navy); color: #fff; font-size: 0.85rem; }
.aip-topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 0.4rem; padding-bottom: 0.4rem; flex-wrap: wrap; }
.aip-topbar p { margin: 0; opacity: 0.92; letter-spacing: 0.02em; }
.aip-topbar a { color: #fff; text-decoration: none; }
.aip-topbar a:hover { color: var(--gold); }
.aip-topbar a + a { margin-left: 1.25rem; }
.aip-topbar a:last-child { color: var(--gold); font-weight: 600; }
.aip-masthead { background: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 var(--line); }
.aip-masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.aip-brand { display: flex; align-items: center; gap: 0.85rem; text-decoration: none; min-width: 0; }
.aip-brand img { width: auto; height: 58px; flex-shrink: 0; }
.aip-brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; line-height: 1.15; color: var(--navy); display: block; }
.aip-brand-tag { display: block; margin-top: 2px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-deep); }
.aip-nav { display: flex; align-items: center; gap: 1.3rem; list-style: none; flex-wrap: wrap; justify-content: flex-end; }
.aip-nav a { color: var(--navy); text-decoration: none; padding: 0.35rem 0; border-bottom: 2px solid transparent; font-weight: 500; white-space: nowrap; }
.aip-nav a:hover, .aip-nav a[aria-current="page"] { border-bottom-color: var(--gold); color: var(--blue); }
.aip-nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; color: var(--navy); }
.aip-nav-toggle svg { width: 28px; height: 28px; display: block; }
@media (max-width: 900px) {
  .aip-topbar .wrap > p:first-child { display: none; }
  .aip-topbar .wrap { justify-content: center; }
  .aip-brand img { height: 44px; }
  .aip-brand-name { font-size: 1.02rem; }
  .aip-brand-tag { font-size: 0.64rem; letter-spacing: 0.1em; }
  .aip-nav-toggle { display: block; }
  .aip-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 24px 1rem; box-shadow: 0 10px 20px rgba(14,29,79,.12); }
  .aip-nav.open { display: flex; }
  .aip-nav a { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Footer (matches main site) ---------- */
.aip-footer { background: var(--navy); color: #fff; padding: 3rem 0 1.5rem; font-size: 0.95rem; }
.aip-footer a { color: #fff; }
.aip-footer a:hover { color: var(--gold); }
.aip-footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
.aip-footer-brand { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.aip-footer-brand img { height: 64px; width: auto; }
.aip-footer-brand strong { font-family: var(--serif); font-size: 1.1rem; }
.aip-footer p { color: rgba(255,255,255,0.85); margin-bottom: 0.6rem; }
.aip-motto { font-family: var(--serif); font-style: italic; color: var(--gold) !important; }
.aip-footer h3 { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.9rem; }
.aip-footer ul { list-style: none; }
.aip-footer li { margin-bottom: 0.45rem; }
.aip-footer li a { text-decoration: none; }
.aip-footer-note { margin-top: 2rem; font-size: 0.85rem; color: rgba(255,255,255,0.75) !important; }
.aip-footer-sep { border: 0; border-top: 1px solid rgba(255,255,255,0.15); margin: 1.5rem 0 1rem; }
.aip-footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; font-size: 0.82rem; }
.aip-footer-bottom p { color: rgba(255,255,255,0.7) !important; margin: 0; }
@media (max-width: 780px) { .aip-footer-cols { grid-template-columns: 1fr; gap: 1.6rem; } }

/* ---------- Type helpers ---------- */
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 0.4rem; display: block; }
.rule { width: 56px; height: 3px; background: var(--gold); margin: 0.55rem 0 1.4rem; border: 0; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.2; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--sans); font-size: 0.92rem; font-weight: 700; letter-spacing: 0.02em; border-radius: var(--radius); padding: 0.7rem 1.3rem; cursor: pointer; text-decoration: none; border: 2px solid transparent; transition: background .2s, color .2s, border-color .2s; line-height: 1.2; white-space: nowrap; }
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #fff; color: var(--navy); border-color: var(--gold); }
.btn-outline { background: transparent; color: var(--blue); border-color: currentColor; }
.btn-outline:hover { background: var(--mist); color: var(--navy); }
.btn-danger { background: transparent; color: var(--red); border-color: rgba(179,20,28,.45); }
.btn-danger:hover { background: rgba(179,20,28,.06); border-color: var(--red); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label, .field .label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field .req { color: var(--red); margin-left: 2px; }
.field .opt { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field select, .field textarea { font-family: var(--sans); font-size: 1rem; color: var(--ink); background: var(--parchment); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 12px; outline: none; width: 100%; transition: border-color .2s, background .2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); background: #fff; }
.field textarea { resize: vertical; min-height: 84px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6275' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.field .invalid { border-color: var(--red) !important; }
.field-error { font-size: 0.82rem; color: var(--red); min-height: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.93rem; color: var(--ink); cursor: pointer; line-height: 1.45; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex-shrink: 0; }
.msg { font-size: 0.95rem; padding: 12px 14px; border-radius: var(--radius); display: none; }
.msg.success { display: block; background: rgba(47,122,98,.1); color: #1f5a47; border: 1px solid rgba(47,122,98,.35); }
.msg.error { display: block; background: rgba(179,20,28,.06); color: var(--red); border: 1px solid rgba(179,20,28,.3); }
.msg.info { display: block; background: var(--mist); color: var(--navy); border: 1px solid var(--line); }
.privacy-note { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* ---------- Modals ---------- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(9, 18, 50, 0.82); z-index: 600; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 32px 16px; backdrop-filter: blur(3px); }
.modal-overlay.open { display: block; }
.modal { background: #fff; max-width: 580px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; position: relative; box-shadow: 0 24px 80px rgba(0,0,0,.35); animation: modalIn .25s ease; }
.modal-wide { max-width: 760px; }
.modal-head { background: var(--navy); color: #fff; padding: 26px 64px 22px 28px; position: relative; }
.modal-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--blue) 0 25%, var(--gold) 25% 50%, var(--green) 50% 75%, var(--red) 75% 100%); }
.modal-head h2, .modal-head h3 { color: #fff; font-size: 1.5rem; margin-bottom: 6px; }
.modal-head p { color: rgba(255,255,255,.78); font-size: 0.95rem; line-height: 1.5; }
.modal-head .eyebrow { color: var(--gold); }
.modal-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; 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; }
.modal-close:hover { background: rgba(255,255,255,.28); }
.modal-body { padding: 26px 28px 28px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .modal-head { padding: 22px 56px 20px 20px; } .modal-body { padding: 20px; } .modal-overlay { padding: 12px; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 11px 18px; border-radius: var(--radius); font-size: 0.93rem; box-shadow: 0 6px 24px rgba(0,0,0,.25); z-index: 9999; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); }
.toast.error { background: var(--red); }
.toast button { background: rgba(255,255,255,.18); border: 0; color: #fff; border-radius: 4px; padding: 4px 10px; cursor: pointer; font-weight: 700; }

/* ---------- Simple page shell (account / manage / offline / 404) ---------- */
.page-band { background: var(--navy); color: #fff; padding: 44px 0 38px; background-image: radial-gradient(ellipse at 88% 20%, rgba(242,195,19,.2), transparent 50%); }
.page-band h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 2.5rem); }
.page-band p { color: rgba(255,255,255,.8); max-width: 60ch; margin-top: 0.5rem; }
.page-band .eyebrow { color: var(--gold); }
.page-main { padding: 40px 0 64px; }
.card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow); max-width: 640px; }
.card + .card { margin-top: 24px; }
.card h2 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.card p { margin-bottom: 0.8rem; }
.card-green { border-top-color: var(--green); }
.card-red { border-top-color: var(--red); }
.card-gold { border-top-color: var(--gold); }
.status-pill { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 10px; border-radius: 20px; }
.status-pill.active { background: rgba(47,122,98,.12); color: var(--green); }
.status-pill.unsubscribed { background: rgba(179,20,28,.08); color: var(--red); }
.spinner { width: 28px; height: 28px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .9s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
.field > label.check { font-size: 0.95rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); }
