/* Palette from the original Kubio theme. */
:root {
  --gold: rgb(230, 176, 46);
  --gold-light: rgb(238, 207, 114);
  --cream: rgb(250, 235, 188);
  --teal: rgb(186, 219, 215);
  --grey: rgb(65, 64, 68);
  --yellow: rgb(253, 219, 14);
  --navy: rgb(50, 75, 106);
  --blue: rgb(33, 120, 168);
  --ink: #2b2b30;
  --muted: #5b5b63;
  --line: #e4e4e8;
  --radius: 6px;
  --wrap: 1140px;
  --heading: "Oswald", "Arial Narrow", Arial, sans-serif;
  --body: "Open Sans", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: #fff;
}

img, video, iframe { max-width: 100%; }
img { height: auto; display: block; }

a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--navy); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p, ul, ol, table, figure, blockquote, details { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .35em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }

.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.logo img { width: 128px; height: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.site-nav li { margin: 0; }
.site-nav a {
  display: block;
  padding: 10px 14px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--grey);
  text-decoration: none;
  border-radius: var(--radius);
}
.site-nav a:hover { color: var(--navy); background: var(--cream); }
.site-nav a[aria-current="page"] { color: var(--gold); }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 10px; width: 24px; height: 3px; background: var(--navy); border-radius: 2px; content: "";
}
.nav-toggle-bar { top: 20px; }
.nav-toggle-bar::before { top: -8px; left: 0; }
.nav-toggle-bar::after { top: 8px; left: 0; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding: 8px 24px 16px; }
}

/* Hero */
.hero {
  position: relative;
  color: #fff;
  text-align: center;
  background: var(--navy) var(--photo, none) center / cover no-repeat;
  padding: clamp(70px, 12vw, 140px) 0;
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(20, 24, 32, .5); }
.hero-inner { position: relative; }
.hero h1 { color: #fff; margin-bottom: .3em; }
.hero-home { padding: clamp(100px, 16vw, 200px) 0; }
.hero-home h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); }
.hero-sub { font-size: 1.15rem; margin-bottom: 1.4em; }
.is-post .hero h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); max-width: 900px; margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--yellow);
  color: var(--navy);
  font-family: var(--body);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 30px;
  border-radius: var(--radius);
  border: 0;
  cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--gold); color: var(--navy); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }

/* Kubio sections, rows and columns */
.sec { padding: clamp(48px, 7vw, 90px) 0; position: relative; }
.sec > .wrap { position: relative; }
.row { display: grid; gap: 32px; align-items: center; }
.row + .row { margin-top: 32px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.cols-5, .cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col > :last-child { margin-bottom: 0; }
.col-empty { display: none; }

@media (max-width: 860px) {
  .cols-2, .cols-3, .cols-4, .cols-5, .cols-6 { grid-template-columns: 1fr; }
}

.sec h2 { position: relative; }
.lead { font-size: 1.2rem; }
.sec-loose > .wrap > h2, .cols-1 > .col > h2 { text-align: center; }
.sec-loose { padding-top: 24px; }
.cols-1 > .col > p:only-of-type, .cols-1 > .col > p.lead { text-align: center; }
.bg-c7 .cols-1 p { font-size: 1.15rem; }
.bg-c7 .cols-1 p:first-child { font-family: var(--heading); font-size: 1.35rem; color: var(--navy); margin-bottom: .2em; }

.figure, figure.img img { border-radius: var(--radius); }
figure.img { margin: 0 0 1.1em; }
figure.img img { width: 100%; object-fit: cover; }

/* Background colours from Kubio colour slots */
.bg-c1 { background: var(--gold); }
.bg-c1v { background: var(--cream); }
.bg-c2 { background: var(--gold-light); }
.bg-c3 { background: var(--cream); }
.bg-c4 { background: var(--teal); }
.bg-c5 { background: #fff; }
.bg-c7 { background: var(--yellow); }
.bg-c6, .bg-c6v, .bg-c8, .bg-c9 { color: #fff; }
.bg-c6, .bg-c6v { background: var(--grey); }
.bg-c8 { background: var(--navy); }
.bg-c9 { background: var(--blue); }
.bg-c6 h2, .bg-c6 h3, .bg-c6 h4, .bg-c6v h2, .bg-c6v h3, .bg-c6v h4,
.bg-c8 h2, .bg-c8 h3, .bg-c8 h4, .bg-c9 h2, .bg-c9 h3, .bg-c9 h4 { color: #fff; }
.bg-c6 a:not(.btn), .bg-c6v a:not(.btn), .bg-c8 a:not(.btn), .bg-c9 a:not(.btn) { color: var(--yellow); }
.sec.bg-c7 { text-align: center; }
.sec.bg-c7 .btns { justify-content: center; }

.col.bg-c3, .col.bg-c4, .col.bg-c5, .col.bg-c6, .col.bg-c7, .col.bg-c8, .col.bg-c9 { padding: 28px; border-radius: var(--radius); align-self: stretch; }
.col.bg-c7 > h2:first-child, .col.bg-c7 > h3:first-child { text-align: center; }
.col .row { gap: 0; }
.col.bg-c5 { box-shadow: 0 6px 24px rgba(0, 0, 0, .08); }

/* Photo backgrounds: sections and columns */
.has-photo { background-image: var(--photo); background-size: cover; background-position: center; }
.sec.has-photo { color: #fff; text-align: center; }
.sec.has-photo::before { content: ""; position: absolute; inset: 0; background: rgba(20, 24, 32, .55); }
.sec.has-photo h2, .sec.has-photo h3 { color: #fff; }
.sec.has-photo .btns { justify-content: center; }
.col.has-photo { min-height: 360px; border-radius: var(--radius); align-self: stretch; }

/* Supporter logos */
#clients .cols-3 { max-width: 760px; margin-left: auto; margin-right: auto; }
#clients figure.img {
  background: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .1);
  border-radius: var(--radius);
  height: 150px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#clients figure.img a { display: contents; }
#clients figure.img img { width: auto; max-width: 100%; max-height: 110px; object-fit: contain; }

/* Media */
figure.video { margin-top: 1em; }
figure.video video { width: 100%; max-height: 520px; border-radius: var(--radius); background: #000; }
figure.embed { position: relative; aspect-ratio: 16 / 9; }
figure.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }

table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
th { background: var(--cream); }

blockquote { border-left: 4px solid var(--yellow); padding: 4px 0 4px 20px; font-style: italic; color: var(--muted); }
hr, hr.divider { border: 0; border-top: 3px solid var(--yellow); width: 80px; margin: 1.4em 0; }
.bg-c7 hr.divider { border-color: var(--navy); margin-left: auto; margin-right: auto; }

details { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; }
summary { cursor: pointer; font-weight: 600; color: var(--navy); }

/* Post */
.post { padding-top: 48px; padding-bottom: 72px; }
.post-meta { color: var(--muted); font-size: .95rem; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.post h2 { font-size: 1.9rem; margin-top: 1.2em; }
.post h3 { margin-top: 1.1em; }
.post figure img { border-radius: var(--radius); margin: 0 auto; }
.post figure.wp-block-gallery, .post figure { margin: 1.4em 0; }
.post-back { margin-top: 2.4em; }

/* Story cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 28px 0 8px; text-align: left; }
.card { background: #fff; border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0, 0, 0, .08); overflow: hidden; display: flex; flex-direction: column; }
.card-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 1.3rem; }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { font-size: .95rem; color: var(--muted); }
.card-date { font-size: .82rem !important; text-transform: uppercase; letter-spacing: 1px; margin-bottom: .5em; }
.card-more { margin-top: auto; font-weight: 700; font-size: .9rem; color: var(--navy); }

@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }

/* Contact form */
.contact-form { text-align: left; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
  width: 100%;
  padding: 12px;
  font: inherit;
  font-size: 1rem;
  border: 1px solid var(--grey);
  border-radius: 4px;
  background: #fff;
}
.contact-form .consent label { font-weight: 400; font-size: .92rem; display: flex; gap: 10px; align-items: flex-start; }
.contact-form .consent input { margin-top: 5px; }
.contact-form .hp { position: absolute; left: -9999px; }
.contact-form .g-recaptcha { margin: 0 0 1.1em; max-width: 100%; overflow-x: auto; }
.form-ok { background: var(--teal); padding: 16px 20px; border-radius: var(--radius); }
.form-errors { background: #fde8e8; border: 1px solid #e3a3a3; padding: 12px 20px; border-radius: var(--radius); margin-bottom: 1.2em; }
.form-errors ul { margin-bottom: 0; }

/* Footer */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: .95rem; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.footer-inner p { margin-bottom: .4em; }
.footer-name { font-family: var(--heading); font-size: 1.3rem; font-weight: 600; color: var(--navy); }
@media (max-width: 620px) { .footer-inner { grid-template-columns: 1fr; } }
