/* Llangenny Land CIC — llangenny.land
   Palette: river-valley slate greens with an Old Red Sandstone hairline.
   Type: Cormorant Garamond (display, echoing the wordmark) + Public Sans (text). */

:root {
  --ground:    #e9ede8;
  --surface:   #f7f9f5;
  --ink:       #16201a;
  --muted:     #56655a;
  --hairline:  #c3ccbf;
  --accent:    #2e5b4c;
  --accent-ink:#1f4235;
  --sandstone: #96543a;
  --logo-filter: none;

  --f-display: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --f-text: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 34rem;
  --pad: clamp(1.25rem, 5vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:    #131714;
    --surface:   #1b211c;
    --ink:       #e6ebe4;
    --muted:     #9aa89d;
    --hairline:  #364038;
    --accent:    #8fc4ac;
    --accent-ink:#a9d4bf;
    --sandstone: #cd8a68;
    --logo-filter: invert(1);
  }
}

:root[data-theme="dark"] {
  --ground:    #131714;
  --surface:   #1b211c;
  --ink:       #e6ebe4;
  --muted:     #9aa89d;
  --hairline:  #364038;
  --accent:    #8fc4ac;
  --accent-ink:#a9d4bf;
  --sandstone: #cd8a68;
  --logo-filter: invert(1);
}

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 0.75rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.shell {
  max-width: calc(var(--measure) + var(--pad) * 2);
  margin: 0 auto;
  padding: 0 var(--pad) 4rem;
}

/* ---------- masthead ---------- */

.masthead { padding-top: clamp(2rem, 7vw, 4.5rem); }

.mark {
  display: block;
  width: min(100%, 25rem);
  height: auto;
  filter: var(--logo-filter);
}

.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.masthead nav a[aria-current="page"] {
  color: var(--muted);
  text-decoration: none;
  cursor: default;
}

/* ---------- the rule motif, taken from the wordmark:
     one full hairline, one shorter and indented ---------- */

.rule {
  border: 0;
  margin: 2.75rem 0;
  height: 1px;
  background: var(--hairline);
  position: relative;
}
.rule::after {
  content: "";
  position: absolute;
  left: 35%;
  right: 0;
  top: 5px;
  height: 1px;
  background: var(--sandstone);
  opacity: 0.75;
}

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 500;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1.4rem, 4vw, 1.8rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

h3 {
  font-family: var(--f-text);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 0.3rem;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.lead {
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 3.5vw, 1.5rem);
  line-height: 1.45;
  color: var(--ink);
  margin: 1.25rem 0 0;
}

p { margin: 1.1rem 0; }
p:last-child { margin-bottom: 0; }

main section { margin-top: 2.75rem; }
main section:first-child { margin-top: 0; }

a {
  color: var(--accent-ink);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--sandstone); }

:focus-visible {
  outline: 2px solid var(--sandstone);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- aims list ---------- */

.aims {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.6rem;
}

.aims > li { padding-left: 1.1rem; border-left: 2px solid var(--hairline); }
.aims p { margin: 0; color: var(--muted); }

/* ---------- notes, definitions, small print ---------- */

.note {
  background: var(--surface);
  border: 1px solid var(--hairline);
  padding: 1.1rem 1.25rem;
  margin-top: 1.5rem;
}
.note p { font-size: 0.9375rem; color: var(--muted); }

dl.plain { margin: 1.25rem 0 0; }
dl.plain dt {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-top: 1.25rem;
}
dl.plain dd { margin: 0.3rem 0 0; color: var(--muted); }

ul.body { padding-left: 1.15rem; }
ul.body li { margin: 0.5rem 0; }
ul.body li::marker { color: var(--sandstone); }

/* ---------- footer ---------- */

footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.875rem;
  color: var(--muted);
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
}
footer p { margin: 0.5rem 0; }
footer .fine { font-size: 0.8125rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
