/* brading.co.uk: home page. Loaded after fonts.css. No inline styles (strict CSP). */
:root {
  --ground: #e9eef0; --surface: #ffffff; --surface-2: #f2f5f6;
  --ink: #12303a; --ink-soft: #4a5f66; --hairline: #d3dcde;
  --navy: #0d2b36; --stone: #5c6b70; --red: #b3202b; --red-ink: #b3202b; --gold: #b9862f;
  --pumpkin: #e8742a;

  /* hero scene */
  --down-far: #9fb79a; --down-near: #7d9c74;
  --sea: #6f9fa9; --chalk: #f1ede2;
  --stone-face: #b9b2a2; --stone-shade: #8f887a; --stone-dark: #6e685c;
  --brick: #a4563f; --render: #f6f3ec; --timber: #1c1a19; --thatch: #6d5a43; --thatch-dark: #54452f;
  --slate: #4e5559; --road: #5d6366; --kerb: #c9cdc9; --glass: #3b4a52;

  --maxw: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #08191f; --surface: #0e2830; --surface-2: #123039;
    --ink: #eaf1f2; --ink-soft: #9db3ba; --hairline: #1f3d47;
    --navy: #cfe3e8; --stone: #93a6ac; --red: #e0616a; --red-ink: #e0616a; --gold: #e0b25f;
    --pumpkin: #ff9a4d;
    --down-far: #2f4636; --down-near: #263a2c;
    --sea: #1d4450; --chalk: #a9a493;
    --stone-face: #8a8474; --stone-shade: #66604f; --stone-dark: #4d4839;
    --brick: #6e3a2b; --render: #c9c4b7; --timber: #0f0e0d; --thatch: #43382a; --thatch-dark: #33291d;
    --slate: #2b3134; --road: #262b2d; --kerb: #5b605d; --glass: #1d272c;
  }
}
:root[data-theme="dark"] {
  --ground: #08191f; --surface: #0e2830; --surface-2: #123039;
  --ink: #eaf1f2; --ink-soft: #9db3ba; --hairline: #1f3d47;
  --navy: #cfe3e8; --stone: #93a6ac; --red: #e0616a; --red-ink: #e0616a; --gold: #e0b25f;
  --pumpkin: #ff9a4d;
  --down-far: #2f4636; --down-near: #263a2c;
  --sea: #1d4450; --chalk: #a9a493;
  --stone-face: #8a8474; --stone-shade: #66604f; --stone-dark: #4d4839;
  --brick: #6e3a2b; --render: #c9c4b7; --timber: #0f0e0d; --thatch: #43382a; --thatch-dark: #33291d;
  --slate: #2b3134; --road: #262b2d; --kerb: #5b605d; --glass: #1d272c;
}

* { box-sizing: border-box; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 17px/1.6 Karla, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.eyebrow { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--stone); }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Top bar ---------- */
header.topbar { border-bottom: 1px solid var(--hairline); background: color-mix(in srgb, var(--ground) 86%, transparent); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 28px; max-width: var(--maxw); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .legs { width: 40px; height: 40px; flex: none; }
.brand .legs path { fill: var(--red); }
.brand-name { font: 600 18px/1.15 Fraunces, Georgia, serif; letter-spacing: .01em; color: var(--ink); }
.brand-domain { font: 400 12px/1.3 "IBM Plex Mono", monospace; color: var(--ink-soft); letter-spacing: .02em; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.nav-link { font-weight: 700; font-size: 14.5px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav-link:hover { color: var(--red); }
.status-pill {
  font: 400 11.5px/1 "IBM Plex Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft);
  border: 1px solid var(--hairline); border-radius: 999px; padding: 7px 13px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: pulse 2.8s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 55%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (max-width: 640px) { .topbar-right .hide-sm { display: none; } }
@media (max-width: 520px) {
  .topbar-right .status-pill { display: none; }
  .wrap { padding: 0 16px; }
  .topbar-inner { padding: 13px 16px; }
}

/* ---------- Hero scene ---------- */
.hero-scene { display: block; width: 100%; height: auto; }
.hero-scene .sky-top { stop-color: #b9d6de; animation: skyTop 64s linear infinite; }
.hero-scene .sky-mid { stop-color: #dce9ea; animation: skyMid 64s linear infinite; }
.hero-scene .sky-low { stop-color: #f2ede2; animation: skyLow 64s linear infinite; }
@keyframes skyTop { 0% { stop-color: #0b1b2e; } 18% { stop-color: #33507a; } 40%, 60% { stop-color: #b9d6de; } 78% { stop-color: #3c406a; } 90% { stop-color: #141f38; } 100% { stop-color: #0b1b2e; } }
@keyframes skyMid { 0% { stop-color: #12293d; } 18% { stop-color: #7f6f8c; } 40%, 60% { stop-color: #dce9ea; } 78% { stop-color: #9e5f6b; } 90% { stop-color: #2a2f4f; } 100% { stop-color: #12293d; } }
@keyframes skyLow { 0% { stop-color: #22303f; } 18% { stop-color: #dc9d6d; } 40%, 60% { stop-color: #f2ede2; } 78% { stop-color: #e0885a; } 90% { stop-color: #4a3b4e; } 100% { stop-color: #22303f; } }

.hero-scene .sun { transform: translate(650px, 120px); animation: sunArc 64s linear infinite; }
@keyframes sunArc {
  0% { transform: translate(180px, 420px); opacity: 0; } 15% { transform: translate(230px, 360px); opacity: 0; }
  20% { transform: translate(290px, 290px); opacity: 1; } 35% { transform: translate(460px, 170px); opacity: 1; }
  50% { transform: translate(650px, 115px); opacity: 1; } 65% { transform: translate(860px, 175px); opacity: 1; }
  77% { transform: translate(1030px, 290px); opacity: 1; } 83% { transform: translate(1090px, 380px); opacity: 0; }
  100% { transform: translate(1090px, 420px); opacity: 0; }
}
.hero-scene .night { opacity: 0; animation: nightFade 64s linear infinite; }
@keyframes nightFade { 0%, 12% { opacity: 1; } 22% { opacity: 0; } 74% { opacity: 0; } 88%, 100% { opacity: 1; } }
.hero-scene .moon { transform: translate(980px, 110px); }
.hero-scene .cloud { animation: drift linear infinite; }
.hero-scene .c1 { animation-duration: 52s; animation-delay: -6s; }
.hero-scene .c2 { animation-duration: 74s; animation-delay: -30s; }
.hero-scene .c3 { animation-duration: 63s; animation-delay: -48s; }
@keyframes drift { from { transform: translateX(-280px); } to { transform: translateX(1480px); } }

/* Easter egg: a ghost at the Rectory Mansion window */
.mansion-link { cursor: pointer; outline: none; }
.hero-scene .ghost, .hero-scene .ghost-label { opacity: 0; transition: opacity .5s; }
.hero-scene .ghost-body { animation: ghostFloat 3.4s ease-in-out infinite; }
.mansion-link:hover .ghost, .mansion-link:focus-visible .ghost,
.mansion-link:hover .ghost-label, .mansion-link:focus-visible .ghost-label { opacity: 1; }
.mansion-link:focus-visible .mansion-outline { stroke: var(--gold); }
@keyframes ghostFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* SVG paint from theme tokens (var() in fill="" attributes isn't reliable across browsers) */
.s-sea { fill: var(--sea); } .s-chalk { fill: var(--chalk); }
.s-down-far { fill: var(--down-far); } .s-down-near { fill: var(--down-near); }
.s-slate { fill: var(--slate); } .s-stone-face { fill: var(--stone-face); } .s-stone-shade { fill: var(--stone-shade); } .s-stone-dark { fill: var(--stone-dark); }
.s-glass { fill: var(--glass); } .s-brick { fill: var(--brick); } .s-render { fill: var(--render); }
.s-thatch { fill: var(--thatch); } .s-thatch-dark { fill: var(--thatch-dark); } .s-timber { fill: var(--timber); }
.s-surface { fill: var(--surface); } .s-pumpkin { fill: var(--pumpkin); } .s-gold { fill: var(--gold); }
.s-kerb { fill: var(--kerb); } .s-road { fill: var(--road); }
.k-timber { stroke: var(--timber); fill: none; } .k-stone-dark { stroke: var(--stone-dark); } .k-chalk { stroke: var(--chalk); } .k-render { stroke: var(--render); } .k-kerb { stroke: var(--kerb); }
.k-thatch-dark { stroke: var(--thatch-dark); } .k-timber-edge { stroke: var(--timber); }

/* ---------- Hero copy ---------- */
.hero-copy { max-width: var(--maxw); margin: 0 auto; padding: 46px 28px 40px; }
@media (max-width: 520px) { .hero-copy { padding: 34px 16px 30px; } }
.coords { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: baseline; margin-bottom: 22px; }
.coords .ll { color: var(--ink); }
h1 {
  font: 600 clamp(2.6rem, 6vw, 4.4rem)/1.02 Fraunces, Georgia, serif; letter-spacing: -.015em;
  margin: 0 0 20px; text-wrap: balance; color: var(--ink);
}
h1 em { font-style: italic; color: var(--red-ink); font-weight: 500; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--ink-soft); max-width: 75ch; margin: 0 0 30px; }
.free-note { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 22px; font-size: 15px; color: var(--ink-soft); }
.free-badge {
  font: 400 12px/1 "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-radius: 999px; padding: 7px 13px;
}
.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  font: 600 15px/1 Karla, sans-serif; text-decoration: none; border-radius: 10px; padding: 14px 22px;
  display: inline-flex; align-items: center; gap: 9px; transition: transform .15s, background .15s, border-color .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--red) 88%, #000); }
.btn-ghost { color: var(--ink); border: 1px solid var(--hairline); background: var(--surface); }
.btn-ghost:hover { transform: translateY(-1px); border-color: var(--stone); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- Coming up ---------- */
section.coming { padding: 20px 0 30px; }
.section-head { max-width: 60ch; margin-bottom: 26px; }
.section-head h2 { font: 600 clamp(1.7rem, 3vw, 2.3rem)/1.1 Fraunces, Georgia, serif; margin: 12px 0 0; color: var(--ink); text-wrap: balance; }
.section-head .all { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 15px; color: var(--red-ink); text-decoration: none; }
.section-head .all:hover { text-decoration: underline; }

.feature {
  display: grid; grid-template-columns: 1.1fr 1fr; background: #160f24; color: #f4efe6;
  border-radius: 18px; overflow: hidden; text-decoration: none; transition: transform .2s, box-shadow .2s;
}
.feature:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -18px rgba(22, 15, 36, .55); }
.feature-img { position: relative; min-height: 260px; }
.feature-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.feature-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 55%, #160f24); }
.feature-body { padding: 32px 34px 34px; display: flex; flex-direction: column; gap: 14px; }
.feature-date { display: flex; align-items: center; gap: 14px; }
.cal { width: 64px; flex: none; text-align: center; border-radius: 10px; overflow: hidden; background: #21173a; border: 1px solid #2d2050; }
.cal span { display: block; font: 600 11px/1 "IBM Plex Mono", monospace; letter-spacing: .14em; background: #ff8a3d; color: #2a1206; padding: 6px 0 5px; }
.cal b { display: block; font: 700 28px/1 Fraunces, Georgia, serif; padding: 8px 0 9px; }
.feature-when { font: 500 12px/1.6 "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: #b48cff; }
.feature h3 { font: 700 clamp(1.6rem, 3vw, 2.2rem)/1.08 Fraunces, Georgia, serif; margin: 0; }
.feature h3 em { font-style: italic; font-weight: 600; color: #ff8a3d; text-shadow: 0 0 22px rgba(255, 138, 61, .45); }
.feature p { margin: 0; color: #c9bfd8; font-size: 15.5px; }
.feature .more { margin-top: auto; font-weight: 700; font-size: 15px; color: #ff8a3d; display: inline-flex; gap: 8px; align-items: center; }
.feature:hover .more { text-decoration: underline; }
@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; }
  .feature-img { min-height: 210px; }
  .feature-img::after { background: linear-gradient(180deg, transparent 55%, #160f24); }
  .feature-body { padding: 24px 22px 28px; }
}

.upcoming { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.upcoming a {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 20px 22px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--hairline); text-decoration: none; color: var(--ink);
  transition: transform .15s, border-color .15s;
}
.upcoming a:hover { transform: translateY(-1px); border-color: var(--stone); }
.upcoming .when { font: 400 11.5px/1.5 "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink); }
.upcoming .title { font: 600 1.15rem/1.25 Fraunces, Georgia, serif; }
.upcoming .where { font-size: 14.5px; color: var(--ink-soft); }
@media (max-width: 820px) { .upcoming { grid-template-columns: 1fr; } }

/* ---------- What's being built ---------- */
section.build { padding: 40px 0 20px; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: 16px; overflow: hidden; }
.pillar { background: var(--surface); padding: 30px 28px 34px; display: flex; flex-direction: column; gap: 14px; min-height: 260px; }
.pillar .num { font: 400 12px/1 "IBM Plex Mono", monospace; letter-spacing: .16em; color: var(--stone); }
.pillar .ico { width: 34px; height: 34px; color: var(--red); }
.pillar h3 { font: 600 1.4rem/1.2 Fraunces, Georgia, serif; margin: 4px 0 0; color: var(--ink); }
.pillar p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.pillar .tag { margin-top: auto; font: 400 11.5px/1.4 "IBM Plex Mono", monospace; letter-spacing: .08em; color: var(--stone); border-top: 1px dashed var(--hairline); padding-top: 14px; }
.pillar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.soon-badge {
  font: 400 11px/1 "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-radius: 999px; padding: 6px 11px; white-space: nowrap;
}

/* ---------- Register ---------- */
.register {
  margin: 46px 0 10px; padding: 38px 34px; background: var(--navy); color: #eaf1f2; border-radius: 18px;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center;
}
:root[data-theme="dark"] .register { color: #08191f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .register { color: #08191f; } }
.register h2 { font: 600 clamp(1.5rem, 2.6vw, 2rem)/1.15 Fraunces, Georgia, serif; margin: 0 0 10px; color: inherit; }
.register p { margin: 0; opacity: .8; font-size: 15.5px; }
.register-actions { display: flex; flex-direction: column; gap: 12px; }
.register .btn-primary { justify-content: center; }
.wholine { font: 400 12px/1.4 "IBM Plex Mono", monospace; letter-spacing: .04em; opacity: .7; text-align: center; }

/* ---------- Footer ---------- */
footer.foot { margin-top: 54px; border-top: 1px solid var(--hairline); padding: 34px 0 60px; }
.foot-grid { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: start; }
.motto { display: flex; align-items: center; gap: 16px; }
.motto .legs { width: 40px; height: 40px; flex: none; }
.motto .legs path { fill: var(--stone); }
.motto .latin { font: italic 500 1.15rem/1.3 Fraunces, Georgia, serif; color: var(--ink); }
.motto .gloss { font-size: 13px; color: var(--ink-soft); }
.foot-note { font: 400 12px/1.9 "IBM Plex Mono", monospace; color: var(--stone); text-align: right; }
.foot-note a { color: var(--red-ink); text-decoration: none; }
.foot-note a:hover { text-decoration: underline; }

@media (max-width: 820px) {
  .pillars, .register, .foot-grid { grid-template-columns: 1fr; }
  .foot-note { text-align: left; }
  .register { padding: 30px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* brading.co.uk logo: red spire, ink tower (fill-rule evenodd cuts the window and door) */
.brand .legs .mark-body { fill: var(--ink); }
