/* Compost Capital — styles.css
   Organic earth palette. Serif for weight, mono for protocol.
   Front page is a clearing. Depth beneath. */


/* ---------- variables ---------- */

:root {
  /* palette */
  --bg:            #F1E9D7;   /* mycelium substrate */
  --bg-deep:       #EADFCA;   /* slightly deeper, for recessed depth */
  --ink:           #2F2416;   /* body text — deep brown, not black */
  --ink-soft:      #5A4A35;   /* secondary type, rules */
  --gold:          #9E7F3C;   /* primary accent — weathered gold */
  --gold-deep:     #7C6128;
  --moss:          #6B7A4A;   /* living-system accent */
  --sun:           #E9B523;   /* sunshine highlight — used sparingly */

  /* type */
  --serif: "EB Garamond", "Garamond", "Iowan Old Style", Georgia, serif;
  --mono:  "JetBrains Mono", "IBM Plex Mono", ui-monospace, Menlo, monospace;

  /* scale */
  --body-size: 19px;
  --lh:        1.62;

  /* measure */
  --measure-tight: 36rem;
  --measure-body:  42rem;
}


/* ---------- reset, just enough ---------- */

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

html, body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--serif);
  font-size: var(--body-size);
  line-height: var(--lh);
  color: var(--ink);
  background-color: var(--bg);
  background-image: url("assets/hypha.svg");
  background-repeat: repeat;
  background-size: 400px 400px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a {
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(158, 127, 60, 0.35);
  transition: color 160ms ease, border-color 160ms ease;
}

a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

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

.mono { font-family: var(--mono); font-size: 0.9em; letter-spacing: 0.01em; }


/* ---------- layout primitives ---------- */

main {
  display: block;
  width: 100%;
  max-width: 100%;
}

section {
  width: 100%;
}


/* ---------- the clearing ---------- */

.clearing {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 1.75rem 6rem;
  position: relative;
}

.mark {
  margin-bottom: 5rem;
}

.mark-name {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: lowercase;
  letter-spacing: 0.24em;
  color: var(--ink-soft);
}

.proposition {
  max-width: var(--measure-tight);
  margin: 0 auto;
}

.prop-line {
  font-size: clamp(1.5rem, 3.6vw, 2.35rem);
  line-height: 1.28;
  margin: 0 0 0.5rem;
  font-style: italic;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.prop-line + .prop-line {
  color: var(--ink-soft);
  font-style: normal;
}

.call {
  margin: 4rem 0 0;
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.call a {
  border-bottom: 1px solid var(--ink-soft);
  padding-bottom: 2px;
  color: var(--ink);
}

.call a:hover {
  color: var(--gold-deep);
  border-bottom-color: var(--gold);
}

.lede {
  margin: 4rem auto 0;
  max-width: 36rem;
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--ink-soft);
  text-align: center;
}

.descent {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 32px;
  border: none;
  color: var(--ink-soft);
  opacity: 0.55;
  animation: breathe 5s ease-in-out infinite;
}

.descent:hover {
  opacity: 1;
  color: var(--gold-deep);
}

.descent svg { width: 100%; height: 100%; }

@keyframes breathe {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.45; }
  50%      { transform: translate(-50%, 6px); opacity: 0.75; }
}


/* ---------- the deeper layer ---------- */

.deeper {
  padding: 6rem 1.75rem 8rem;
  max-width: var(--measure-body);
  margin: 0 auto;
}

.stanza {
  padding: 3rem 0 5rem;
  border-top: 1px solid rgba(90, 74, 53, 0.22);
}

.stanza p {
  font-size: 1.18rem;
  line-height: 1.7;
  margin: 0 0 1.35rem;
  color: var(--ink);
}

.stanza .emphasis,
.note .emphasis {
  margin-top: 2rem;
  font-style: italic;
  color: var(--gold-deep);
  font-size: 1.22rem;
  line-height: 1.55;
}


/* ---------- rooms ---------- */

.room {
  padding: 4.5rem 0 3rem;
  border-top: 1px solid rgba(90, 74, 53, 0.22);
}

.room-label {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--gold);
  letter-spacing: 0.22em;
  margin: 0 0 1rem;
  text-transform: lowercase;
}

.room h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.room-lede {
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 3rem;
  font-size: 1.08rem;
}


/* ---------- notes ---------- */

.note {
  margin: 0 0 2.75rem;
  padding: 0;
}

.note h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--gold-deep);
  margin: 0 0 0.6rem;
  letter-spacing: 0.005em;
}

.note p {
  margin: 0 0 0.9rem;
  color: var(--ink);
  line-height: 1.68;
}

.note .aside {
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}


/* ---------- index (tools list) ---------- */

.index {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid rgba(90, 74, 53, 0.18);
}

.index li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 1.5rem;
  row-gap: 0.35rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(90, 74, 53, 0.18);
}

.index-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--ink);
  grid-column: 1;
  grid-row: 1;
}

.index-type {
  color: var(--gold);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  align-self: center;
  grid-column: 2;
  grid-row: 1;
  white-space: nowrap;
}

.index-desc {
  grid-column: 1 / -1;
  grid-row: 2;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 38rem;
}


/* ---------- coda ---------- */

.coda {
  padding: 8rem 0 2rem;
  text-align: center;
  color: var(--ink-soft);
  letter-spacing: 0.24em;
  font-size: 0.85rem;
}

.coda p { margin: 0; }


/* ---------- responsive ---------- */

@media (max-width: 620px) {
  :root { --body-size: 18px; }

  .clearing {
    padding: 3rem 1.5rem 5rem;
  }
  .mark { margin-bottom: 3.5rem; }
  .call { margin-top: 3rem; }

  .deeper {
    padding: 4.5rem 1.5rem 6rem;
  }
  .stanza { padding: 2.5rem 0 3.5rem; }
  .room   { padding: 3.5rem 0 2rem; }
  .room-lede { margin-bottom: 2.25rem; }

  .index li {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .index-type {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }
  .index-desc {
    grid-row: 3;
  }
}


@media (prefers-reduced-motion: reduce) {
  .descent { animation: none; }
  html { scroll-behavior: auto; }
}
