/* =========================================================
   Warp & Weft — the textile industry and why it matters
   Industrial mill / woven process-flow stylesheet
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:ital,wght@0,400;0,500;0,600;0,700;1,500&family=Manrope:wght@400;500;600;700&family=Roboto+Mono:wght@400;500&display=swap');

:root{
  --canvas:   #EDE6D6;
  --panel:    #E3DAC4;
  --ink:      #23201A;
  --ink-soft: #5B5548;
  --ink-faint:#938C7A;
  --indigo:   #263A5C;
  --rust:     #C1642F;
  --line:     #D3C9AE;

  --display: 'Zilla Slab', serif;
  --body:    'Manrope', sans-serif;
  --mono:    'Roboto Mono', monospace;

  --max: 820px;
  --wide: 1180px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

::selection{ background: var(--rust); color: #fff; }

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

.wrap{ max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.wrap-wide{ max-width: var(--wide); margin: 0 auto; padding: 0 28px; }

/* -------------------- masthead -------------------- */
.masthead{
  background: var(--indigo);
  color: #EDE6D6;
  padding: 20px 0;
}

.masthead .wrap-wide{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.masthead-title{
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.masthead-title span{ color: var(--rust); }

.masthead-meta{
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #B9B2A0;
  display: flex;
  gap: 20px;
}

/* -------------------- hero -------------------- */
.hero{
  padding: 84px 0 0;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 38px, rgba(35,32,26,0.05) 38px, rgba(35,32,26,0.05) 39px);
}

.hero-kicker{
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
  margin: 0 0 22px;
}

.hero h1{
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.6vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0 0 26px;
  max-width: 15ch;
}

.hero-lede{
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0;
}

.hero-image{
  width: 100%;
  aspect-ratio: 21 / 8;
  object-fit: cover;
  margin-top: 54px;
  filter: saturate(1.05) contrast(1.02);
}

.hero-image-cap{
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  margin: 12px 28px 0;
  max-width: var(--wide);
}

/* -------------------- process strip -------------------- */
.process{
  padding: 64px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.process-head{
  margin-bottom: 34px;
}

.process-head h2{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.7rem;
  margin: 0 0 10px;
}

.process-head p{
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0;
}

.process-strip{
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--ink);
}

.p-step{
  flex: 1 1 150px;
  padding: 22px 18px 26px;
  border-right: 1px solid var(--ink);
  position: relative;
}

.p-step:last-child{ border-right: none; }

.p-step:nth-child(odd){ background: var(--panel); }
.p-step:nth-child(even){ background: var(--canvas); }

.p-step .num{
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--rust);
  display: block;
  margin-bottom: 10px;
}

.p-step h3{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 10px;
}

.p-step p{
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0;
}

/* -------------------- entries -------------------- */
.almanac{ padding: 70px 0 20px; }

.entry{
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 50px 0;
  border-top: 1px solid var(--line);
}

.entry:first-child{ border-top: none; }

@media (min-width: 860px){
  .entry{ grid-template-columns: 200px minmax(0,1fr); gap: 50px; }
}

.entry-number{
  font-family: var(--display);
  font-weight: 700;
  font-style: italic;
  font-size: 2.6rem;
  color: var(--panel);
  -webkit-text-stroke: 1px var(--ink-faint);
  line-height: 1;
}

.entry-body h2{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.75rem;
  margin: 0 0 18px;
  color: var(--indigo);
}

.entry-body img{
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 10px;
}

.entry-body .cap{
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--ink-faint);
  margin: 0 0 22px;
}

.entry-body p{
  max-width: 62ch;
  color: var(--ink-soft);
  margin: 0 0 14px;
}

.entry-body p:last-child{ margin-bottom: 0; }

.entry-body strong{ color: var(--ink); font-weight: 600; }

/* -------------------- ledger -------------------- */
.ledger{ padding: 70px 0; border-top: 2px solid var(--ink); }

.ledger-head h2{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.8rem;
  margin: 0 0 12px;
}

.ledger-head p{
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 0 36px;
}

table.spacing{ width: 100%; border-collapse: collapse; font-size: 0.94rem; }

table.spacing th{
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  color: var(--ink-faint);
  border-bottom: 2px solid var(--ink);
  padding: 0 14px 12px 0;
}

table.spacing td{
  padding: 16px 14px 16px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-soft);
}

table.spacing td:first-child{
  color: var(--indigo);
  font-weight: 600;
  font-family: var(--display);
}

table.spacing .day{
  font-family: var(--mono);
  color: var(--rust);
  white-space: nowrap;
}

/* -------------------- glossary -------------------- */
.glossary{ padding: 70px 0 90px; border-top: 1px solid var(--line); }

.glossary h2{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.8rem;
  margin: 0 0 40px;
}

.terms{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px 40px;
}

.term dt{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--indigo);
  margin-bottom: 8px;
}

.term dd{
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

/* -------------------- footer -------------------- */
footer{
  background: var(--indigo);
  color: #C9C2AE;
  padding: 26px 0 40px;
}

footer .wrap-wide{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.7rem;
}

footer .colophon{ max-width: 46ch; }
