/*
 * Perranporth Airfield – PDF Content Only
 * Presentation styles only. No editorial copy is defined here.
 * Tweak the variables below to match the Perranporth Driving Centre theme.
 */

.pah-site {
  --ink: #1a1f1d;
  --muted: #4d554f;
  --paper: #f6f3ec;
  --paper-alt: #ebe6da;
  --dark: #141c1a;
  --line: rgba(23, 27, 25, .14);
  --accent: #bf2b2c;          /* kicker / numerals on light */
  --accent-light: #bf2b2c;    /* kicker / numerals on dark */
  --note-bg: #fff;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --measure: 68ch;

  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.pah-site, .pah-site * { box-sizing: border-box; }
.pah-site img { max-width: 100%; height: auto; display: block; }
.pah-site p { margin: 0 0 1.25em; }
.pah-site a { color: inherit; }

.pah-wrap {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

/* ---------- Cover ---------- */
.pah-cover {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(88vh, 860px);
  padding: 140px 0 72px;
  background: #0e1513;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.pah-cover__media { position: absolute; inset: 0; z-index: -1; }
.pah-cover__media img { width: 100%; height: 100%; object-fit: cover; }
.pah-cover__media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(5,8,7,.85) 0%, rgba(5,8,7,.45) 55%, rgba(5,8,7,.3) 100%),
    linear-gradient(0deg, rgba(5,8,7,.7) 0%, rgba(5,8,7,0) 45%);
}
.pah-cover__inner { max-width: 1180px; }
.pah-cover .pah-kicker { color: var(--accent-light); }
.pah-cover__title {
  margin: 0 0 .35em;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 9vw, 120px);
  line-height: .98;
  letter-spacing: -.035em;
  color: #fff;
}
.pah-cover__title span { display: block; font-style: italic; color: var(--accent-light); }
.pah-cover__lede {
  margin: 0 0 .1em;
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.25;
}
.pah-cover__years {
  font-size: 13px; font-weight: 700; letter-spacing: .22em;
  color: var(--accent-light);
}
.pah-cover__sub { max-width: 560px; color: rgba(255,255,255,.88); font-size: 19px; }
.pah-cover__meta {
  display: inline-block;
  margin: 18px 0 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.35);
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.pah-cover__credit { margin: 0; font-size: 13px; color: rgba(255,255,255,.65); max-width: 640px; }

/* ---------- Index strip ---------- */
.pah-index {
  position: sticky; top: 0; z-index: 20;
  background: rgba(20, 28, 26, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
body.admin-bar .pah-index { top: 32px; }
.pah-index ol {
  display: flex; gap: 2px; margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scrollbar-width: none;
}
.pah-index ol::-webkit-scrollbar { display: none; }
.pah-index a {
  display: block; padding: 14px 10px;
  color: rgba(255,255,255,.62);
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-decoration: none;
  transition: color .2s, background .2s;
}
.pah-index a:hover, .pah-index a:focus-visible { color: #fff; background: rgba(255,255,255,.08); outline: none; }

/* ---------- Sections ---------- */
.pah-section {
  padding: clamp(72px, 9vw, 130px) 0;
  scroll-margin-top: 48px;
  background: var(--paper);
}
.pah-section--alt { background: var(--paper-alt); }
.pah-section .pah-wrap {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
}

.pah-head { position: sticky; top: 90px; }
body.admin-bar .pah-head { top: 122px; }

.pah-num {
  display: block;
  margin-bottom: 18px;
  font-family: var(--serif);
  font-size: clamp(56px, 7vw, 96px);
  line-height: 1;
  color: var(--accent);
  opacity: .35;
}
.pah-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; line-height: 1.5;
}
.pah-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.06;
  letter-spacing: -.03em;
  color: inherit;
}
main#main {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0;
}
.pah-body { max-width: var(--measure); color: var(--muted); }
.pah-lead {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.55;
}
.pah-small { font-size: 14.5px; line-height: 1.65; color: var(--muted); }
.pah-small--top { margin-bottom: 28px; }

/* ---------- Notes ---------- */
.pah-note {
  margin: 2em 0;
  padding: 22px 26px;
  background: var(--note-bg);
  border-left: 3px solid var(--accent);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04);
}
.pah-note p { margin: 0; font-size: 16px; line-height: 1.65; }
.pah-note strong { color: var(--ink); }
.pah-section--alt .pah-note { background: var(--paper); }

/* ---------- Tables ---------- */
.pah-table-wrap {
  margin: 0 0 1.5em;
  overflow-x: auto;
  border-top: 2px solid var(--ink);
}
.pah-table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.pah-table thead th {
  padding: 14px 16px 12px 0;
  text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}
.pah-table tbody th,
.pah-table tbody td {
  padding: 14px 16px 14px 0;
  text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.pah-table tbody th { width: 34%; color: var(--ink); font-weight: 700; white-space: nowrap; }
.pah-table tbody tr:hover { background: rgba(255,255,255,.4); }
.pah-table--timeline tbody th { font-family: var(--serif); font-size: 18px; width: 28%; }

/* ---------- Figure ---------- */
.pah-figure { margin: 0 0 2.2em; }
.pah-figure img { width: 100%; border-radius: 2px; box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.pah-figure figcaption {
  margin-top: 12px; font-size: 13px; line-height: 1.55; color: var(--muted);
}

/* ---------- Dark remembrance ---------- */
.pah-section--dark { background: var(--dark); color: #f2eee4; }
.pah-section--dark .pah-kicker,
.pah-section--dark .pah-num { color: var(--accent-light); }
.pah-section--dark .pah-body,
.pah-section--dark .pah-small { color: #c3c8c1; }
.pah-person {
  padding: 26px 0;
  border-top: 1px solid rgba(255,255,255,.14);
}
.pah-person:first-of-type { border-top: 0; padding-top: 0; }
.pah-person p { margin: 0; }
.pah-person strong { display: block; margin-bottom: 6px; color: #fff; font-family: var(--serif); font-size: 22px; font-weight: 400; }
.pah-section--dark .pah-small { margin-top: 28px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); }

/* ---------- References ---------- */
.pah-section--refs { background: #0f1614; color: #e8e4da; padding-block: clamp(56px, 7vw, 96px); }
.pah-section--refs + .pah-section--refs { padding-top: 0; }
.pah-section--refs .pah-kicker, .pah-section--refs .pah-num { color: var(--accent-light); }
.pah-section--refs .pah-title { font-size: clamp(28px, 3vw, 40px); }
.pah-section--refs .pah-body, .pah-section--refs .pah-small { color: #aeb4ad; }
.pah-refs { margin: 0; padding: 0; list-style: none; font-size: 14.5px; line-height: 1.6; }
.pah-refs li { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.pah-section--refs .pah-small { margin-top: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .pah-site { font-size: 17px; }
  .pah-wrap { width: calc(100% - 32px); }
  .pah-section .pah-wrap { grid-template-columns: 1fr; gap: 28px; }
  .pah-head { position: static; }
  .pah-num { font-size: 48px; margin-bottom: 8px; }
  .pah-cover { min-height: 78vh; padding: 110px 0 48px; }
  .pah-table tbody th { white-space: normal; width: 38%; }
  body.admin-bar .pah-index { top: 46px; }
}

@media print {
  .pah-index { display: none; }
  .pah-section { page-break-inside: avoid; padding: 40px 0; }
  .pah-head { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  .pah-site * { transition: none !important; scroll-behavior: auto !important; }
}
html { scroll-behavior: smooth; }