/* ===============================================================
   fourskills.co
   Implements docs/SITE_DESIGN.md — palette "river and sagebrush".
   No gradients, no shadows, no colours beyond the five tokens.
   =============================================================== */

/* Bricolage Grotesque, self-hosted (SIL OFL, see assets/fonts/OFL.txt).
   Served from our own origin rather than Google Fonts so the site keeps
   its no-third-party-requests property — same reason there is no
   analytics and no cookie banner. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --river: #1c4a47;  /* headings, nav, footer, deepest rung, primary buttons */
  --sand:  #f5f2eb;  /* page background */
  --sage:  #dcd6c8;  /* card borders, dividers, light rung tint */
  --clay:  #c75b39;  /* accent — elements only, never small text on sand */
  --soil:  #26261f;  /* body text */

  /* Derived from the five tokens only. No new hues. */
  --rung-tint: color-mix(in srgb, var(--sage) 55%, white);
  --muted: color-mix(in srgb, var(--soil) 55%, var(--sand));

  --display: "Bricolage Grotesque", Archivo, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --measure: 680px;
  --speed: 150ms;
}

@supports not (color: color-mix(in srgb, red 50%, white)) {
  :root {
    --rung-tint: #eeeae0;
    --muted: #6d6b60;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--soil);
  background: var(--sand);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--river);
  margin: 0 0 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; margin-top: 2.25rem; }
h3 { font-size: 1.1rem; }

@media (min-width: 45rem) {
  h1 { font-size: 2.5rem; }
}

p { margin: 0 0 1.1rem; }

/* Links are clay and underlined. Clay is never used for paragraph text
   itself — contrast on sand is borderline at small sizes. */
a { color: var(--clay); text-decoration: underline; }
a:hover { color: var(--clay); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  a,
  .btn,
  .copy-btn,
  .rung,
  .ladder-card,
  .download { transition: background-color var(--speed), color var(--speed),
                          border-color var(--speed); }
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.15rem;
}

main { flex: 1 0 auto; padding: 1.75rem 0 3.5rem; }

/* ---------------------------------------------------------------
   Wordmark
   --------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--sage); }

.site-header .wrap {
  padding-top: 0.85rem;
  padding-bottom: 0.7rem;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--river);
  text-decoration: none;
}

.wordmark:hover { color: var(--river); }

/* ---------------------------------------------------------------
   Nav — text links in one wrapping row, no hamburger
   --------------------------------------------------------------- */
.site-nav {
  border-bottom: 1px solid var(--sage);
  background: var(--sand);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-nav .wrap {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1rem;
  row-gap: 0.15rem;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.site-nav a {
  font-size: 0.9rem;
  padding: 0.3rem 0;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover { color: var(--river); }

.site-nav a[aria-current="page"] {
  color: var(--river);
  font-weight: 600;
}

/* The 01–04 numbering carried into the nav, so the four skills read as a
   set rather than as four unrelated links. Decorative — the skill name is
   the label, so keep the number out of the accessible name's way by
   leaving it quiet rather than hiding it. */
.nav-num {
  font-family: var(--display);
  font-size: 0.78em;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

/* ---------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--sage);
  padding: 1.5rem 0 2.5rem;
  font-size: 0.9rem;
}

.site-footer p { margin: 0 0 0.25rem; }

.site-footer .tagline {
  font-family: var(--display);
  font-weight: 600;
  color: var(--river);
}

/* ---------------------------------------------------------------
   Email gate
   --------------------------------------------------------------- */
.gate {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  padding: 3rem 0 4rem;
}

.gate-card { max-width: 30rem; }

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1.75rem;
  max-width: 24rem;
}

label { font-size: 0.9rem; font-weight: 600; }

input[type="email"] {
  font: inherit;
  min-height: 44px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--sage);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  width: 100%;
}

input[type="email"]:focus { border-color: var(--river); }

.btn {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  cursor: pointer;
  border: 1px solid var(--river);
  border-radius: 8px;
  padding: 0.7rem 1.1rem;
  background: var(--river);
  color: var(--sand);
}

.btn:hover { background: var(--soil); border-color: var(--soil); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.form-msg { min-height: 1.4rem; font-size: 0.9rem; margin: 0; }
.form-msg[data-state="error"] { color: #8f3a22; }
.form-msg[data-state="ok"] { color: var(--river); }

/* ---------------------------------------------------------------
   Ladder cards — the one memorable thing
   Rungs run top to bottom: Try it, Make it a routine, Automate it.
   Each bar is wider than the one above it, so the stack steps down
   toward the bottom-most, widest, deepest rung.
   --------------------------------------------------------------- */
.ladder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .ladder-grid { grid-template-columns: 1fr 1fr; gap: 1.15rem; }
}

/* The grid carries its own top margin for when it opens a page. Under a
   heading that margin doubles up, so pull it back in. */
h2 + .ladder-grid { margin-top: 1rem; }

.ladder-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--sage);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
}

.ladder-card:hover { border-color: var(--river); color: inherit; }

.card-left { min-width: 0; }

.skill-num {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.skill-name {
  display: block;
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.15;
  color: var(--river);
}

.rungs {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 0 0 8.75rem;
}

.rung {
  display: block;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.72rem;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  padding: 0.4rem 0.4rem;
  border-radius: 4px;
  margin-left: auto;
  background: var(--rung-tint);
  color: var(--river);
}

/* Widths step outward toward the bottom. Counting from the last child
   keeps the steps even whether the card has two rungs or three. */
.rung:last-child { width: 100%; }
.rung:nth-last-child(2) { width: 82%; }
.rung:nth-last-child(3) { width: 64%; }

/* The deepest rung the card reaches. */
.rung:last-child {
  background: var(--river);
  color: var(--sand);
}

/* On skill pages the rungs are anchor links into the sections below. */
a.rung:hover { color: var(--sand); background: var(--soil); }

.skill-header { margin: 0 0 2rem; }

/* ---------------------------------------------------------------
   Prompt block — something you take, not something you read
   --------------------------------------------------------------- */
.prompt-block {
  background: #fff;
  border: 1px solid var(--sage);
  border-radius: 8px;
  padding: 1rem;
  margin: 0 0 1.5rem;
}

.prompt-block .prompt-text {
  font-family: var(--mono);
  font-size: 0.9375rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0 0 0.9rem;
}

.copy-btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 44px;
  width: 100%;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border: 1px solid var(--clay);
  border-radius: 8px;
  background: var(--clay);
  color: var(--sand);
}

@media (min-width: 40rem) {
  .copy-btn { width: auto; }
}

.copy-btn:hover,
.copy-btn[data-copied="true"] {
  background: var(--river);
  border-color: var(--river);
}

/* A short aside under a prompt block — how to feed it, not what to ask. */
.prompt-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: -0.9rem 0 1.5rem;
}

/* ---------------------------------------------------------------
   Callout — a bonus move beside the ladder, not a rung on it.
   Same white-on-sage card as .ladder-card so it belongs, but full
   width and left-aligned so it never reads as a fourth rung.
   --------------------------------------------------------------- */
.callout {
  background: #fff;
  border: 1px solid var(--sage);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 2rem 0 0;
}

.callout h3 {
  margin-top: 0;
  color: var(--river);
}

.callout > :last-child { margin-bottom: 0; }

/* The prompt inside a callout sits on the card, so it drops the card
   treatment and keeps only the monospace and the copy button. */
.callout .prompt-block {
  border: 0;
  border-left: 3px solid var(--sage);
  border-radius: 0;
  padding: 0 0 0 1rem;
  margin: 0 0 1.1rem;
}

/* ---------------------------------------------------------------
   Page furniture
   --------------------------------------------------------------- */
.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin-top: -0.2rem;
}

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

.section { margin-top: 2.5rem; scroll-margin-top: 4rem; }

/* Explains the three rungs on the home page. Sage markers rather than
   disc bullets, so it echoes the ladder without redrawing it. */
.rung-key {
  margin: 0 0 1.1rem;
  padding-left: 1.1rem;
  list-style: none;
}

.rung-key li {
  position: relative;
  margin-bottom: 0.6rem;
}

.rung-key li::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 0.6em;
  width: 0.6rem;
  height: 2px;
  background: var(--sage);
}

.rung-key strong { color: var(--river); }

.next-link {
  display: block;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--sage);
  font-weight: 600;
}

.download {
  display: inline-block;
  min-height: 44px;
  margin: 0 0 2rem;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--river);
  border-radius: 8px;
  background: var(--river);
  color: var(--sand);
  font-weight: 600;
  text-decoration: none;
}

.download:hover { background: var(--soil); border-color: var(--soil); color: var(--sand); }

.library-group { margin-top: 2.5rem; }
.library-group h2 { margin-bottom: 0.9rem; }

/* Back-link to wherever the prompt is explained in full. */
.library-source {
  font-size: 0.9rem;
  margin: -0.6rem 0 0;
}

/* A skill can carry more than one prompt. The h3 and its lede separate
   the extras from the headline prompt without starting a new group. */
.library-group h3 { margin-top: 2rem; }

.prompt-lede {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
