/* Perth & Kinross Cycle Forum. One stylesheet, no build step, no third-party requests. */

@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/poppins-700.woff2") format("woff2"); }

:root {
  --green: #1f4d2e;        /* 8.7:1 on cream */
  --green-mid: #2f6b3f;    /* 5.7:1 on cream */
  --green-soft: #e6eee4;
  --cream: #f6f2e9;
  --white: #fff;
  --amber: #e0a526;
  --amber-hover: #ecb843;
  --button-text: #17361f;  /* 5.8:1 on amber */
  --heather: #6b4a8a;      /* 6.3:1 on cream */
  --ink: #1d2a21;
  --muted: #4a5a4f;
  --radius: 14px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 0.18em; }
a:hover { color: var(--green-mid); }
:focus-visible { outline: 3px solid var(--heather); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-weight: 700; line-height: 1.2; color: var(--green); margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.small { font-size: 0.9rem; color: var(--muted); }

.wrap { width: min(1100px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 46rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--green); color: var(--cream); padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

/* Header */
.site-header { background: var(--cream); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.9rem; }
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: var(--green); }
.brand img { flex: none; }
.brand-text { white-space: nowrap; display: flex; flex-direction: column; line-height: 1.15; }
.brand-top, .brand-name { font-weight: 700; letter-spacing: -0.01em; }
.brand-top { font-size: 1.5rem; }
.brand-name { font-size: 1.1rem; }
.site-header nav { display: flex; gap: 1.4rem; }
@media (max-width: 480px) { .brand img { width: 46px; height: 46px; } .brand-top { font-size: 1rem; } .brand-name { font-size: 0.8rem; } .brand { gap: 0.6rem; } .site-header nav { gap: 0.8rem; font-size: 0.9rem; } }
.site-header nav a { text-decoration: none; font-weight: 600; color: var(--green); padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover { border-bottom-color: var(--amber); }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr; background: var(--green); color: var(--cream); }
.hero-copy { padding: 2.5rem max(1.25rem, calc((100vw - 1100px) / 2)) 3rem; }
.hero h1 { color: var(--cream); max-width: 16ch; }
.lede { font-size: 1.2rem; max-width: 34rem; margin-bottom: 1.6rem; }
.hero-photo { order: -1; max-height: 260px; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
@media (min-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 640px; }
  .hero-copy { padding-right: 3rem; padding-left: max(1.25rem, calc((100vw - 1100px) / 2)); align-self: center; }
  .hero-photo { order: 0; max-height: none; }
  .hero-photo img { object-position: 40% 60%; }
}

/* Forms */
.join { max-width: 26rem; }
.field { margin-bottom: 0.9rem; }
.join label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.25rem; }
.join .opt { font-weight: 400; opacity: 0.8; }
.join input[type="email"], .join input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}
.join input[type="email"]:focus-visible, .join input[type="text"]:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.join button {
  margin-top: 1.2rem;
  font: inherit;
  font-weight: 700;
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-radius: 10px;
  background: var(--amber);
  color: var(--button-text);
  cursor: pointer;
}
.join button:hover { background: var(--amber-hover); }
.join button:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.hero .join a { color: var(--cream); }
.hero .join .small { color: var(--cream); opacity: 0.85; margin: 0.8rem 0 0; }

/* Sections */
.section { padding-block: 4rem; }
.band { background: var(--green-soft); }
.cards { display: grid; gap: 1.2rem; margin-top: 2rem; }
@media (min-width: 700px) { .cards.three { grid-template-columns: repeat(3, 1fr); } .cards.links { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards.links { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--white); border-radius: var(--radius); padding: 1.4rem 1.5rem; border: 1px solid rgb(31 77 46 / 0.12); }
.card h3 { margin-bottom: 0.4em; }
.card p { margin: 0; color: var(--muted); }
.card.link { display: block; text-decoration: none; color: inherit; border-top: 4px solid var(--green-mid); transition: transform 0.15s, box-shadow 0.15s; }
.card.link:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgb(31 77 46 / 0.14); }
.card.link:hover h3 { text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 0.2em; }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--heather); margin-bottom: 0.4rem; }
@media (prefers-reduced-motion: reduce) { .card.link { transition: none; } .card.link:hover { transform: none; } }

/* Footer */
.site-footer { background: var(--green); color: var(--cream); padding-block: 2.2rem; }
.site-footer a { color: var(--cream); }
.site-footer p { margin: 0 0 0.3rem; }
.site-footer .small { color: var(--cream); opacity: 0.8; }
.foot-name { font-weight: 700; font-size: 1.1rem; }

.cards + .narrow { margin-top: 1.5rem; }
