/* croft.ing — plain HTML + one CSS file. No JS, no external requests.
   Type and palette sources of record: the discovery repo's
   beta/socialization/visual-identity-and-the-progressive-depth-website.md */

/* ---- Self-hosted type (subset latin, weights as listed) ---- */
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/lora-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/lora-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/inter-latin-600-normal.woff2") format("woff2");
}

/* ---- The tectonic palette ---- */
:root {
  --schist:   #2F3539;  /* Deep Schist: structure, dark blocks */
  --granite:  #A2A9AB;  /* Light Granite: rules, subtle text */
  --ruddy:    #B75C34;  /* Ruddy Orange: primary action, heading accents */
  --moss:     #3D6546;  /* Dark Moss: links, growth, active states */
  --ink:      #1C1E20;  /* Iron Ore Black: primary text */
  --canvas:   #E9E1D6;  /* Oatmeal Canvas: page background */

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 42rem;
  --measure-wide: 56rem;
  --section-gap: clamp(3rem, 8vw, 5.5rem);
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Centered single column */
.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.5rem;
}
.wrap--wide { max-width: var(--measure-wide); }

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

/* ---- Headings ---- */
h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 1rem;
}
h1 {
  font-weight: 600;
  font-size: clamp(2.5rem, 8vw, 3.75rem);
  letter-spacing: 0.01em;
  margin-bottom: 1.5rem;
}
h2 {
  font-size: 1.5rem;
  font-weight: 600;
}
h3 {
  font-size: 1.2rem;
  font-weight: 500;
}
.accent { color: var(--ruddy); }

/* ---- Links ---- */
a {
  color: var(--moss);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color 0.15s ease;
}
a:hover,
a:focus { color: #2c4a33; } /* deepened moss */

/* ---- The one button style ---- */
.button {
  display: inline-block;
  background: var(--ruddy);
  color: var(--canvas);
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: 3px;
  box-shadow: none;
  background-image: none;
}
.button:hover,
.button:focus { color: var(--canvas); background: #a4502d; }

/* ---- Header ---- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: var(--measure-wide);
  margin-inline: auto;
  padding: 1.75rem 1.5rem 1.25rem;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark:hover,
.wordmark:focus { color: inherit; }
.wm-croft { color: var(--ink); }
.wm-ing { color: var(--ruddy); }

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}
.site-nav a {
  color: var(--granite);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a:focus {
  color: var(--moss);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* ---- Main / sections ---- */
main { padding-block: 1.5rem 4rem; }

.section { margin-block: var(--section-gap); }
.section:first-of-type { margin-top: 2rem; }

/* ---- Drystone course divider (defined once, reused) ---- */
.course {
  height: 14px;
  margin: var(--section-gap) auto;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='14' viewBox='0 0 220 14' fill='none' stroke='%23A2A9AB' stroke-width='1.5'%3E%3Crect x='0.75' y='1.5' width='26.5' height='11'/%3E%3Crect x='28.75' y='1.5' width='22.5' height='11'/%3E%3Crect x='52.75' y='1.5' width='28.5' height='11'/%3E%3Crect x='82.75' y='1.5' width='20.5' height='11'/%3E%3Crect x='104.75' y='1.5' width='24.5' height='11'/%3E%3Crect x='130.75' y='1.5' width='22.5' height='11'/%3E%3Crect x='154.75' y='1.5' width='28.5' height='11'/%3E%3Crect x='184.75' y='1.5' width='34.5' height='11'/%3E%3C/svg%3E");
}

/* ---- Hero ---- */
.hero .lede {
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 34rem;
}
.hero-links {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 1rem;
}

/* ---- Lede (Signpost lines) ---- */
.lede {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--schist);
  margin: 0 0 1rem;
}

/* ---- Pillar cards (landing) ---- */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.pillar {
  display: flex;
  flex-direction: column;
}
.pillar h2 { margin-bottom: 0.6rem; }
.pillar .lede { font-size: 1.1rem; }
.pillar .more { margin-top: auto; padding-top: 0.75rem; font-size: 0.95rem; }

@media (min-width: 48rem) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

/* ---- Growing list ---- */
.growing-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.growing-list > li { margin-bottom: 1.5rem; }
.growing-list .term {
  font-weight: 600;
  color: var(--ink);
}

/* ---- Closing blockquote ---- */
.closing {
  text-align: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--schist);
  border: none;
  margin: var(--section-gap) auto 0;
  max-width: 32rem;
}
.closing p { margin: 0; }

/* ---- Pillar / depth-tier pages ---- */
.tier { margin-block: var(--section-gap); }
.tier-label {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variant: small-caps;
  color: var(--granite);
  margin: 0 0 0.9rem;
}
.tier .surface,
.tier .soil { font-size: 1.0625rem; }
.bedrock-links {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}
.bedrock-links > li { margin-bottom: 0.5rem; }
.bedrock-links a { overflow-wrap: anywhere; }

/* ---- Colophon (guide-page footnote line) ---- */
.colophon {
  text-align: right;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--granite);
  margin-top: var(--section-gap);
}

/* ---- Plain link lists (library) ---- */
.link-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.link-list > li { margin-bottom: 0.9rem; }
.link-list .term { font-weight: 600; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--granite);
  margin-top: 3rem;
  padding: 1.75rem 1.5rem 2.5rem;
  font-size: 0.875rem;
  color: var(--schist);
  max-width: var(--measure-wide);
  margin-inline: auto;
}
.site-footer p { margin: 0 0 0.4rem; }
.site-footer p:last-child { margin-bottom: 0; }

/* ---- Reduced motion: drop the only transition we use ---- */
@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
}
