@import url("https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,300..600;1,6..72,300..500&family=Public+Sans:wght@300..700&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* Valley Workshop — shared visual foundation for Webmaster-owned pages. */
:root {
  --valley-paper: #f2f1ed;
  --valley-paper-deep: #e5e4dc;
  --valley-surface: #fdfcf9;
  --valley-ink: #181a17;
  --valley-muted: #6e736c;
  --valley-faint: #a3a79e;
  --valley-rule: #cfd1c6;
  --valley-rule-soft: #e0dfd7;
  /* Historically "rust". Now a deep moss — kept under the old names so every
     template that aliases these tokens follows the palette without edits. */
  --valley-rust: #2f4b3f;
  --valley-rust-dark: #22392f;
  --valley-rust-wash: #e9ede8;
  --valley-focus: #4a7a63;
  /* Semantic, deliberately not the accent. Destructive actions only. */
  --valley-danger: #a3341f;
  --valley-danger-wash: #f7e7e1;
  --valley-shadow: 0 10px 28px rgb(24 26 23 / 0.07);
  --valley-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --valley-sans: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --valley-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  color-scheme: light;
}

html {
  background: var(--valley-paper);
}

body {
  min-height: 100vh;
  text-rendering: optimizeLegibility;
}

::selection {
  color: var(--valley-ink);
  background: #cfe0d4;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--valley-focus) 52%, transparent);
  outline-offset: 3px;
}

:where(button, input, select, textarea) {
  font: inherit;
}

/* Opt-in layout primitives. Namespaced so app-specific templates stay in control. */
.valley-shell {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
  padding-block: clamp(1.5rem, 4vw, 3.5rem) 4rem;
}

.valley-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--valley-rule);
}

.valley-eyebrow,
.valley-section-label {
  margin: 0;
  color: var(--valley-rust);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.valley-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
  gap: 0.9rem;
}

.valley-card {
  color: var(--valley-ink);
  background: var(--valley-surface);
  border: 1px solid var(--valley-rule);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.8);
}

.valley-card.is-muted {
  color: var(--valley-muted);
  background: color-mix(in srgb, var(--valley-paper-deep) 58%, var(--valley-surface));
  border-style: dashed;
  box-shadow: none;
}

.valley-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.8rem;
  color: var(--valley-ink);
  background: var(--valley-surface);
  border: 1px solid var(--valley-rule);
  border-radius: 5px;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
}

.valley-button:hover {
  background: var(--valley-paper-deep);
  border-color: #b0b3a5;
}

.valley-button--primary {
  color: #fff;
  background: var(--valley-rust);
  border-color: var(--valley-rust);
}

.valley-button--primary:hover {
  background: var(--valley-rust-dark);
  border-color: var(--valley-rust-dark);
}

.valley-muted {
  color: var(--valley-muted);
}

@media (max-width: 640px) {
  .valley-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
