/* Markham Grange Steam Museum - site styles
   Colours are set once here; change them to restyle the whole site. */
:root {
  --navy: #16264a;
  --navy-dark: #0e1a35;
  --brass: #c79a2b;
  --brass-light: #f1d27a;
  --cream: #fbf6e8;
  --paper: #ffffff;
  --ink: #222222;
  --muted: #5b5b5b;
  --line: #e2d9bf;
  --notice: #8f2d14;
  --radius: 6px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: #1a4f9c; }
a:hover { color: var(--notice); }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.25; margin: 1.6em 0 .5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-top: .8em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); }
h3 { font-size: 1.2rem; }
p, ul, ol { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 10; }

/* Bars */
.staging-bar { background: repeating-linear-gradient(45deg, #b00, #b00 12px, #900 12px, #900 24px); color: #fff; text-align: center; font-weight: 700; padding: 6px; letter-spacing: .05em; }
.notice-bar { background: var(--notice); color: #fff; text-align: center; padding: 10px 16px; font-weight: 600; }

/* Header */
.site-header { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%); color: #fff; border-bottom: 4px solid var(--brass); position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.header-inner { display: flex; align-items: center; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
html { scroll-padding-top: 140px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; margin-right: auto; }
.brand:hover { color: #fff; }
.brand-mark { color: var(--brass-light); display: flex; }
.brand-text { display: flex; flex-direction: column; font-family: var(--serif); line-height: 1.1; }
.brand-name { font-size: 1.6rem; font-weight: 700; color: var(--brass-light); letter-spacing: .02em; }
.brand-sub { font-size: 1rem; text-transform: uppercase; letter-spacing: .18em; }
.header-info { text-align: right; font-size: .9rem; display: flex; flex-direction: column; }
.header-info a { color: var(--brass-light); font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.menu-toggle { display: none; background: transparent; color: #fff; border: 2px solid var(--brass-light); border-radius: var(--radius); padding: 8px 14px; font: 600 1rem var(--sans); cursor: pointer; }
.site-nav { background: rgba(0,0,0,.25); }
.site-nav ul { list-style: none; margin: 0 auto; display: flex; flex-wrap: wrap; }
.site-nav a { display: block; padding: 11px 13px; color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--brass); color: var(--navy-dark); }

@media (max-width: 860px) {
  .header-info { display: none; }
  .menu-toggle { display: block; }
  .js .site-nav { display: none; }
  .js .site-nav.open { display: block; max-height: calc(100vh - 70px); overflow-y: auto; }
  html { scroll-padding-top: 80px; }
  .site-nav ul { flex-direction: column; padding: 0; }
  .site-nav a { padding: 13px 16px; border-top: 1px solid rgba(255,255,255,.1); }
  .brand-name { font-size: 1.3rem; }
  .brand-sub { font-size: .8rem; }
}

/* Main */
main { padding-bottom: 48px; }
.lead { font-size: 1.15rem; }
.muted { color: var(--muted); }
.breadcrumb { font-size: .9rem; margin: 18px 0 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 24px; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.panel-navy { background: var(--navy); color: #fff; border: 0; }
.panel-navy h2, .panel-navy h3 { color: var(--brass-light); }
.panel-navy a { color: var(--brass-light); }
.btn { display: inline-block; background: var(--brass); color: var(--navy-dark); text-decoration: none; font-weight: 700; padding: 10px 18px; border-radius: var(--radius); margin: 4px 8px 4px 0; }
.btn:hover { background: var(--brass-light); color: var(--navy-dark); }
.btn-outline { background: transparent; border: 2px solid var(--brass); color: inherit; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; margin: 24px 0; border-radius: var(--radius); overflow: hidden; background: var(--navy); color: #fff; }
.hero-text { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.hero-text h1 { color: #fff; margin: 0 0 .4em; }
.hero-text p { font-size: 1.1rem; }
.hero-text .btn-outline { color: #fff; }
.hero img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; } .hero-text { padding: 22px; } .hero img { max-height: 300px; } }

/* Layout helpers */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Content figures */
figure { margin: 0 0 1.2em; }
figure img { border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
figcaption { font-size: .9rem; color: var(--muted); margin-top: 6px; }
.media { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px; align-items: start; margin: 0 0 1.4em; }
.media.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.media.flip figure { order: 2; }
@media (max-width: 760px) { .media, .media.flip { grid-template-columns: 1fr; } .media.flip figure { order: 0; } }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin: 0 0 1.4em; align-items: start; }
.prose { max-width: 820px; }
.legacy-news h2 { border-top: 2px solid var(--line); padding-top: .8em; }

/* Engine cards */
.engine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.engine-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.engine-card:hover { border-color: var(--brass); box-shadow: 0 4px 14px rgba(0,0,0,.08); color: var(--ink); }
.engine-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.engine-card div { padding: 12px 14px 16px; }
.engine-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.engine-card p { margin: 0; font-size: .92rem; color: var(--muted); }

/* Spec table */
.specs { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 1.5em; }
.specs th, .specs td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.specs th { width: 30%; background: #f6efd9; font-family: var(--serif); color: var(--navy); }
@media (max-width: 600px) { .specs th, .specs td { display: block; width: auto; } .specs th { border-bottom: 0; padding-bottom: 2px; } }

/* Opening times box */
.opening { font-size: 1.05rem; }
.opening dt { font-weight: 700; color: var(--brass-light); margin-top: .6em; }
.opening dd { margin: 0; }

/* Video / map embeds */
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.map-box iframe { width: 100%; height: 420px; border: 0; border-radius: var(--radius); }

/* Shop */
.product { display: grid; grid-template-columns: 130px 1fr; gap: 18px; align-items: start; }
.product img { border: 1px solid var(--line); }
.price { font-weight: 700; color: var(--navy); }

/* Footer */
.site-footer { background: var(--navy-dark); color: #dfe4ef; font-size: .95rem; border-top: 4px solid var(--brass); }
.site-footer a { color: var(--brass-light); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-top: 28px; }
.footer-grid h2 { color: var(--brass-light); font-size: 1.1rem; margin: 0 0 .5em; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; padding-bottom: 20px; margin-top: 8px; font-size: .85rem; }
.footer-base p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* Engine pop-up panel */
.engine-dialog { width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: var(--radius); background: var(--cream); box-shadow: 0 20px 60px rgba(0,0,0,.4); overflow-y: auto; }
.engine-dialog::backdrop { background: rgba(10, 18, 38, .7); }
.dialog-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--navy); padding: 10px 16px; border-bottom: 3px solid var(--brass); }
.dialog-bar a { color: var(--brass-light); font-size: .9rem; }
.dialog-close { background: var(--brass); color: var(--navy-dark); border: 0; border-radius: var(--radius); padding: 8px 14px; font: 700 1rem var(--sans); cursor: pointer; }
.dialog-close:hover { background: var(--brass-light); }
.dialog-body { padding: 4px 24px 24px; }
.dialog-body h1 { margin-top: .6em; }
html.dialog-open { overflow: hidden; }
@media (max-width: 600px) { .engine-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; margin: 0; border-radius: 0; } .dialog-body { padding: 4px 16px 20px; } }
