/* ---- Monewden Airfield: design tokens (see STYLE_GUIDE.md) ---- */
@font-face { font-family: "Caladea"; src: url("../fonts/caladea-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Caladea"; src: url("../fonts/caladea-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --cream: #fffde8;
  --ink: #241e20;
  --grey: #6e6f71;
  --paper: #fffff7;
  --cream-2: #f4f0d2;
  --line: #d8d2b2;
  --line-strong: #a9a38a;
  --ok: #2f6b3b;   --ok-bg: #e7f0dc;
  --warn: #8a5a00; --warn-bg: #fbefc9;
  --bad: #b3261e;  --bad-bg: #fbe3dc;
  --radius: 0.75rem;
  --serif: "Caladea", Cambria, Georgia, "DejaVu Serif", serif;
  --sans: "Inter", "Segoe UI", Roboto, "DejaVu Sans", "Liberation Sans", Arial, sans-serif;
  --mono: "DejaVu Sans Mono", "Liberation Mono", Menlo, monospace;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 4vw, 2.4rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--ink); font-weight: 700; text-underline-offset: 0.15em; }
.lead { font-size: 1.1rem; color: var(--grey); }
.small { font-size: 0.9rem; color: var(--grey); }
.label { font-size: 0.85rem; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: 0.05em; }
.container { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 40rem; }
.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: 1rem; top: 0.5rem; background: var(--ink); color: var(--cream); padding: 0.5rem 0.8rem; border-radius: 0.5rem; z-index: 10; }

/* ---- Header ---- */
.site-header { background: var(--cream); border-bottom: 2px solid var(--ink); }
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 0.4rem 1rem; padding-top: 0.5rem; padding-bottom: 0.5rem;
}
.site-header .brand img { height: 2.8rem; width: auto; display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 2.8rem; padding: 0 0.8rem;
  border-radius: 2rem; text-decoration: none; font-weight: 700; color: var(--ink);
}
.site-nav a:hover { background: var(--cream-2); }
.site-nav a[aria-current="page"] { background: var(--ink); color: var(--cream); }
.site-nav a.nav-ppr { border: 2px solid var(--ink); }
.site-nav .ext { font-weight: 400; color: var(--grey); margin-left: 0.2rem; }
.site-nav a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

@media (max-width: 44rem) {
  .site-header .container { justify-content: center; }
  .site-nav ul { justify-content: center; }
  .site-nav a { padding: 0 0.65rem; font-size: 0.95rem; }
}

/* ---- Hero ---- */
.hero { position: relative; border-bottom: 2px solid var(--ink); }
.hero img {
  display: block; width: 100%; height: clamp(22rem, 62vh, 40rem);
  object-fit: cover; object-position: 60% 62%;
}
.hero-panel {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  width: calc(100% - 2rem); max-width: 62rem; pointer-events: none;
}
.hero-panel .panel {
  pointer-events: auto; max-width: 30rem; background: var(--cream);
  border: 2px solid var(--ink); border-radius: 1rem; padding: 1.2rem 1.3rem 1.3rem;
}
.hero-panel h1 { margin-bottom: 0.35em; }
.hero-panel p { margin-bottom: 1rem; }
@media (max-width: 40rem) {
  .hero img { height: 16rem; }
  .hero-panel { position: static; transform: none; width: auto; padding: 0 1rem; margin-top: -2.5rem; }
  .hero-panel .panel { position: relative; max-width: none; }
  .hero { border-bottom: 0; }
}

/* ---- Page heading (inner pages) ---- */
.page-head { padding-top: 2rem; padding-bottom: 0.5rem; }
.page-head .lead { max-width: 40rem; }

/* ---- Sections ---- */
.section { padding: 2rem 0; }
.section + .section { padding-top: 0.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 3.3rem; padding: 0 1.3rem; border: 0; border-radius: var(--radius);
  font: inherit; font-size: 1.1rem; font-weight: 700; text-decoration: none; cursor: pointer;
  background: var(--paper); color: var(--ink);
  transition: transform 0.05s, background 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.btn.primary { background: var(--ink); color: var(--cream); box-shadow: 0 0.2rem 0 #000; }
.btn.primary:active { background: #000; box-shadow: none; }
.btn.secondary { border: 2px solid var(--ink); }
.btn.secondary:hover, .btn.secondary:active { background: var(--cream-2); }
.btn.ghost { background: transparent; border: 2px solid var(--line-strong); color: var(--grey); min-height: 2.8rem; font-size: 1rem; }

/* ---- Cards ---- */
.card { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; }
.card p:last-child { margin-bottom: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.6rem; }
.tile .label { display: block; margin-bottom: 0.2rem; }
.tile .value { font-size: 1.3rem; font-weight: 600; line-height: 1.3; }
.tile .value .sub { display: block; font-size: 0.9rem; font-weight: 400; color: var(--grey); }
.big { font-family: var(--serif); font-weight: 700; font-size: 2.4rem; line-height: 1; }

.two-col { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .two-col { grid-template-columns: 3fr 2fr; align-items: start; } }

/* ---- Messages ---- */
.banner { border-radius: 0.6rem; padding: 0.5rem 0.9rem; font-weight: 600; border: 1px solid; margin: 0 0 1rem; }
.banner.ok   { background: var(--ok-bg);   color: var(--ok);   border-color: var(--ok); }
.banner.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.banner.bad  { background: var(--bad-bg);  color: var(--bad);  border-color: var(--bad); }
.banner.info { background: var(--paper);   color: var(--grey); border-color: var(--line-strong); }
.banner a { color: inherit; }

/* ---- Data table ---- */
.data-table { width: 100%; border-collapse: collapse; background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; border-spacing: 0; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); }
.data-table tr:last-child th, .data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:nth-child(even) { background: var(--cream); }
.data-table th { width: 38%; font-size: 0.85rem; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: 0.05em; }
.data-table td .sub { display: block; font-size: 0.9rem; color: var(--grey); }
.data-table td .note { display: block; font-weight: 600; }
.data-table .freq { font-family: var(--mono); font-weight: 700; }
@media (max-width: 34rem) {
  .data-table th, .data-table td { display: block; width: auto; }
  .data-table th { border-bottom: 0; padding-bottom: 0; }
}

/* ---- Forms ---- */
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.field > span { font-size: 0.85rem; font-weight: 700; color: var(--grey); text-transform: uppercase; letter-spacing: 0.05em; }
.input {
  width: 100%; padding: 0.7rem 0.8rem; font: inherit; font-size: 1.15rem;
  color: var(--ink); background: #fff; border: 2px solid var(--line-strong); border-radius: 0.5rem;
}
textarea.input { min-height: 9rem; resize: vertical; }
.input::placeholder { color: #a19b80; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(36, 30, 32, 0.15); }
.field.error .input { border-color: var(--bad); }
.field .error-text { color: var(--bad); font-weight: 700; font-size: 0.9rem; }
.field-row { display: grid; gap: 0 0.8rem; grid-template-columns: 1fr; }
@media (min-width: 36rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; }
.form-foot .error-summary { color: var(--bad); font-weight: 700; }

/* ---- Weather card ---- */
.wx { margin: 0.6rem 0 0.8rem; }
.wx div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
.wx dt { color: var(--grey); font-size: 0.9rem; flex-shrink: 0; }
.wx dd { margin: 0; font-weight: 600; text-align: right; }
.metar { font-family: var(--mono); font-weight: 700; font-size: 0.9rem; line-height: 1.45; margin: 0.4rem 0; overflow-wrap: anywhere; }
.weather hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }

/* ---- Accommodation (Airbnb embeds) ---- */
.stays { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }
.stay h2 { margin-bottom: 0.6rem; }
.airbnb-embed-frame { width: 100%; max-width: 450px; height: 300px; margin: 0 auto; }

/* ---- Footer ---- */
.site-footer { border-top: 2px solid var(--ink); margin-top: 2rem; padding: 1.5rem 0; font-size: 0.9rem; color: var(--grey); }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink); }

/* ---- Print ---- */
@media print {
  body { background: #fff; }
  .site-nav, .btn, .no-print, .hero img { display: none !important; }
  .hero-panel { position: static; transform: none; }
}
