/* HARMATTAN — guide & process pages (shared) */

@font-face {
  font-family: 'Epilogue';
  src: url('../fonts/epilogue-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --haze: #E8E2D6;
  --rose: #C9977B;
  --sky: #B9C4C9;
  --ember: #8A3B22;
  --night: #211D1B;
  --night2: #2B2623;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Epilogue', system-ui, sans-serif;
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  line-height: 1.65;
  background: var(--night);
  color: var(--haze);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--ember); color: var(--haze); }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: fixed; top: -4rem; left: 1rem; z-index: 100;
  background: var(--haze); color: var(--night);
  padding: .6rem 1rem; border-radius: 4px; text-decoration: none;
  transition: top .15s ease;
}
.skip:focus-visible { top: 1rem; }

/* header */
.p-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(.9rem, 2vw, 1.4rem) clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid color-mix(in srgb, var(--haze) 12%, transparent);
}
.p-head .mark {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--haze); text-decoration: none;
  font-weight: 640; font-size: .9rem; letter-spacing: .22em;
}
.p-head nav { display: flex; gap: clamp(.9rem, 2.4vw, 1.8rem); flex-wrap: wrap; }
.p-head nav a {
  color: var(--haze); text-decoration: none;
  font-size: .8rem; font-weight: 560; letter-spacing: .14em; text-transform: uppercase;
  border-bottom: 1px solid transparent;
}
.p-head nav a:hover, .p-head nav a[aria-current="page"] { border-bottom-color: var(--rose); color: var(--rose); }

/* hero */
.p-hero {
  padding: clamp(4rem, 10vw, 8rem) clamp(1rem, 6vw, 4rem) clamp(3rem, 6vw, 5rem);
  max-width: 76rem; margin: 0 auto;
}
.kicker {
  font-size: .72rem; font-weight: 660; letter-spacing: .42em; text-transform: uppercase;
  color: var(--rose); margin-bottom: 1.4rem;
}
.p-hero h1 {
  font-size: clamp(2.4rem, 1.6rem + 4.6vw, 5.6rem);
  font-weight: 240; line-height: 1.06; letter-spacing: .002em;
  max-width: 22ch;
}
.p-hero h1 strong { font-weight: 620; }
.p-hero .lede {
  margin-top: 2rem; max-width: 58ch; font-weight: 330;
  font-size: clamp(1.05rem, 1rem + .5vw, 1.3rem); opacity: .9;
}
.p-hero .lede a { color: var(--rose); }

/* body sections */
main { display: block; }
.sec {
  max-width: 62rem; margin: 0 auto;
  padding: clamp(2.6rem, 6vw, 4.6rem) clamp(1rem, 6vw, 4rem);
  border-top: 1px solid color-mix(in srgb, var(--haze) 10%, transparent);
}
.sec-n {
  font-family: var(--mono);
  font-size: .75rem; letter-spacing: .3em; color: var(--rose);
  display: block; margin-bottom: 1rem;
}
.sec h2 {
  font-size: clamp(1.7rem, 1.3rem + 2.2vw, 3rem);
  font-weight: 300; line-height: 1.15; max-width: 26ch;
  margin-bottom: 1.6rem;
}
.sec h2 em { font-style: normal; color: var(--rose); font-weight: 460; }
.sec h3 {
  font-size: 1.1rem; font-weight: 620; letter-spacing: .04em;
  margin: 2.2rem 0 .8rem; color: var(--rose);
}
.sec p { max-width: 66ch; margin-bottom: 1.1rem; font-weight: 330; }
.sec p strong { font-weight: 620; }
.sec a { color: var(--rose); text-underline-offset: 3px; }
.sec a:hover { color: var(--haze); }
.sec ul, .sec ol { max-width: 62ch; margin: 0 0 1.2rem 1.2rem; font-weight: 330; }
.sec li { margin-bottom: .55rem; }
.sec li::marker { color: var(--rose); }

.cols {
  display: grid; gap: clamp(1.4rem, 3vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

/* code */
pre {
  background: var(--night2);
  border: 1px solid color-mix(in srgb, var(--haze) 12%, transparent);
  border-left: 3px solid var(--ember);
  border-radius: 6px;
  padding: 1.1rem 1.3rem;
  margin: 1.4rem 0 1.8rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: .82rem;
  line-height: 1.6;
  color: #DDD5C6;
  max-width: 46rem;
}
code { font-family: var(--mono); font-size: .88em; color: var(--rose); }
pre code { color: inherit; font-size: inherit; }
pre .c { color: #8F857A; }        /* comments */
pre .k { color: #C9977B; }        /* keywords */
pre .f { color: #E3B02E00; }      /* unused */

/* palette chips */
.chips { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.2rem 0 1.6rem; padding: 0; list-style: none; }
.chips li {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .04em;
  border: 1px solid color-mix(in srgb, var(--haze) 14%, transparent);
  border-radius: 999px; padding: .35rem .9rem .35rem .45rem;
}
.chips i { width: 1.35rem; height: 1.35rem; border-radius: 50%; display: block; }

/* figure / diagrams */
figure { margin: 1.6rem 0 2rem; max-width: 46rem; }
figure svg { width: 100%; height: auto; display: block; border-radius: 6px; }
figcaption { font-size: .8rem; opacity: .65; margin-top: .7rem; max-width: 60ch; }

/* tables */
table { border-collapse: collapse; margin: 1.4rem 0 1.8rem; font-size: .9rem; width: 100%; max-width: 46rem; }
th, td { text-align: left; padding: .6rem .9rem; border-bottom: 1px solid color-mix(in srgb, var(--haze) 12%, transparent); font-weight: 330; }
th { font-weight: 640; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--rose); }
td:first-child { font-family: var(--mono); font-size: .8rem; white-space: nowrap; }

/* pass log */
.passlog { list-style: none; margin: 0; max-width: 62ch; }
.passlog > li {
  border-left: 3px solid var(--ember);
  padding: .2rem 0 .2rem 1.4rem; margin-bottom: 2rem;
}
.passlog h3 { margin-top: 0; }
.passlog ul { margin-top: .6rem; }

/* callout */
.note {
  border: 1px solid color-mix(in srgb, var(--rose) 45%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--ember) 12%, transparent);
  padding: 1.1rem 1.4rem;
  max-width: 58ch;
  margin: 1.6rem 0;
  font-weight: 340;
}
.note strong { color: var(--rose); }

/* footer */
.p-foot {
  border-top: 1px solid color-mix(in srgb, var(--haze) 12%, transparent);
  padding: 2.2rem clamp(1rem, 6vw, 4rem) 2.8rem;
  max-width: 76rem; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between;
  font-size: .84rem; font-weight: 340;
}
.p-foot p { opacity: .72; max-width: 44ch; }
.p-foot a { color: var(--haze); text-decoration-color: var(--rose); text-underline-offset: 3px; }
.p-foot a:hover { color: var(--rose); }
.p-foot nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }

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