/* Porstal Desk — editorial layout, no frameworks */

:root {
  --ink: #1a1a1a;
  --ink-soft: #3d3d3d;
  --muted: #5c5c5c;
  --rule: #c8c6c1;
  --rule-strong: #1a1a1a;
  --paper: rgba(255, 255, 255, 0.72);
  --paper-solid: #fafaf8;
  --accent: #8b2942;
  --accent-soft: rgba(139, 41, 66, 0.12);
  --max-read: 38rem;
  --max-site: 72rem;
  --font-head: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-ui: "IBM Plex Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  background-image:
    linear-gradient(rgba(248, 248, 246, 0.9), rgba(248, 248, 246, 0.9)),
    url("../../background_repair_soft.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
}

a {
  color: var(--ink);
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
}

/* ——— Top strip ——— */
.utility-strip {
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.55);
}

.utility-inner {
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 0.45rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ——— Header ——— */
.site-header {
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--rule-strong);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.masthead {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
}

.masthead a {
  text-decoration: none;
  color: var(--ink);
}

.masthead a:hover {
  color: var(--accent);
}

.masthead-tag {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 0.2rem;
}

.nav-toggle {
  display: none;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--rule-strong);
  background: transparent;
  cursor: pointer;
  color: var(--ink);
}

.nav-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  align-items: center;
}

.site-nav a {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    width: 100%;
    display: none;
    padding-top: 0.75rem;
    border-top: 1px solid var(--rule);
    margin-top: 0.5rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
}

/* ——— Layout shell ——— */
.wrap {
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

/* In-page anchors clear sticky header */
#journal,
#notes,
#archive,
#top {
  scroll-margin-top: 5.5rem;
}

.form-lede {
  margin-bottom: 1rem;
}

/* ——— Lead module ——— */
.lead-module {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--rule-strong);
  position: relative;
}

.lead-module::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  max-height: 8rem;
  background: var(--accent);
}

.lead-inner {
  padding-left: 1.25rem;
  max-width: 48rem;
}

.lead-kicker {
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.lead-module h1 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.75rem, 4.5vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: 0.01em;
  text-transform: none;
  margin: 0 0 0.65rem;
  color: var(--ink);
}

.lead-dek {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
  max-width: 40rem;
}

.lead-meta {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule);
}

.lead-intro {
  margin: 0;
  font-size: 1.08rem;
  max-width: var(--max-read);
}

/* ——— Two-column grid ——— */
.editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  gap: 2.5rem 2.25rem;
  align-items: start;
}

@media (max-width: 900px) {
  .editorial-grid {
    grid-template-columns: 1fr;
  }
}

.col-primary {
  min-width: 0;
}

.col-rail {
  min-width: 0;
  padding-top: 0.25rem;
  border-left: 1px solid var(--rule);
  padding-left: 1.75rem;
}

@media (max-width: 900px) {
  .col-rail {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--rule);
    padding-top: 2rem;
  }
}

/* ——— Sections ——— */
.section-label {
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0 0 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--rule);
}

.prose-block {
  margin-bottom: 2.5rem;
}

.prose-block p {
  margin: 0 0 1rem;
  max-width: var(--max-read);
}

.prose-block p:last-child {
  margin-bottom: 0;
}

/* ——— Rail modules ——— */
.rail-block {
  margin-bottom: 2.25rem;
}

.rail-block:last-child {
  margin-bottom: 0;
}

.rail-title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--rule-strong);
}

.note-fragments {
  margin: 0;
  padding: 0;
  list-style: none;
}

.note-fragments li {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}

.note-fragments li:first-child {
  padding-top: 0;
}

.rail-prose {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
}

.house-lines {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
}

.house-lines li {
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--rule);
}

.archive-glimpses {
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-glimpses li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 0.84rem;
}

.archive-glimpses a {
  font-weight: 500;
  text-decoration: none;
}

.archive-glimpses span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.2rem;
}

/* ——— Full-width feature strip ——— */
.feature-strip {
  grid-column: 1 / -1;
  margin: 0.5rem 0 2.5rem;
  padding: 1.75rem 0 2rem;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
  background: linear-gradient(
    90deg,
    var(--accent-soft) 0%,
    transparent 35%,
    transparent 100%
  );
  position: relative;
}

.feature-strip::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 6rem;
  height: 3px;
  background: var(--accent);
}

.feature-strip .section-title {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.75rem;
}

.feature-strip p {
  max-width: 42rem;
  margin: 0 0 1rem;
}

.feature-strip p:last-child {
  margin-bottom: 0;
}

/* ——— Editorial list block ——— */
.list-block {
  grid-column: 1 / -1;
  margin-bottom: 2.5rem;
}

.list-block .section-title {
  margin-bottom: 1rem;
}

.editorial-lines {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 44rem;
}

.editorial-lines li {
  font-size: 1rem;
  line-height: 1.55;
  padding: 0.55rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
}

.editorial-lines li:hover {
  border-left-color: var(--accent);
}

/* ——— Quiet contact ——— */
.quiet-contact {
  grid-column: 1 / -1;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink-soft);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.5);
  max-width: 32rem;
}

.quiet-contact strong {
  font-weight: 600;
  color: var(--ink);
}

/* ——— Footer ——— */
.site-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--rule-strong);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.5rem 2rem;
  max-width: var(--max-site);
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
}

.footer-grid h2 {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.65rem;
  color: var(--ink);
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 0.4rem;
}

.footer-grid a {
  text-decoration: none;
  color: var(--muted);
}

.footer-grid a:hover {
  color: var(--accent);
}

.copyright {
  text-align: center;
  padding: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

/* ——— Article pages ——— */
.article-wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule-strong);
}

.article-header h1 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  line-height: 1.12;
  margin: 0 0 0.85rem;
}

.article-dek {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
  line-height: 1.5;
}

.article-meta {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.article-body p {
  margin: 0 0 1.15rem;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-divider {
  border: none;
  height: 1px;
  background: var(--rule);
  margin: 2.5rem 0;
}

.related-rail {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-strong);
}

.related-rail h2 {
  font-family: var(--font-head);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.related-rail ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-rail li {
  margin-bottom: 0.65rem;
  font-family: var(--font-ui);
  font-size: 0.88rem;
}

/* ——— Contact / Privacy pages ——— */
.page-header {
  max-width: 40rem;
  margin: 0 auto 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-strong);
}

.page-header h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
}

.page-intro {
  margin: 0;
  color: var(--ink-soft);
}

.page-body {
  max-width: 40rem;
  margin: 0 auto;
}

.page-body section {
  margin-bottom: 2rem;
}

.page-body h2 {
  font-family: var(--font-head);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--rule);
}

.contact-details {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 1rem 0;
}

.simple-form {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.simple-form label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: var(--muted);
}

.simple-form input,
.simple-form textarea {
  width: 100%;
  max-width: 28rem;
  padding: 0.55rem 0.65rem;
  margin-bottom: 1rem;
  border: 1px solid var(--rule);
  font-family: var(--font-body);
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.85);
}

.simple-form button {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}

.simple-form button:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.form-note {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.75rem;
}
