/* Mopatu — asymmetric ledger */
:root {
  --bg: #f7f3ea;
  --bg-alt: #ece6d8;
  --bg-dark: #1c2a22;
  --ink: #221f19;
  --muted: #786f60;
  --on-dark: #f7f3ea;
  --accent: #2f5c44;
  --accent-2: #a8722c;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --h1: clamp(2.5rem, 6.2vw, 5.5rem);
  --gap: 24px;
  --pad: 32px;
  --rhythm: 96px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}
h1 { font-size: var(--h1); line-height: .98; letter-spacing: -.035em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.05; letter-spacing: -.025em; margin-bottom: 28px; }
h3 { font-size: 1.15rem; line-height: 1.25; letter-spacing: -.01em; margin: 32px 0 8px; }

p { margin: 0 0 1.1em; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--on-dark); padding: 8px 14px;
}
.skip:focus { left: 12px; top: 12px; z-index: 10; }

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

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

/* Header */
.site-header { border-bottom: 1px solid var(--accent); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 12px 32px;
  padding-top: 22px; padding-bottom: 18px;
}
.brand {
  font-family: var(--sans); font-weight: 900; font-size: 1.35rem;
  letter-spacing: -.03em; color: var(--ink); text-decoration: none;
}
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  font-family: var(--sans); font-size: .92rem; font-weight: 600;
}
.site-nav a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--accent); }

/* Hero */
.hero { padding: 72px 0 var(--rhythm); }
.hero .grid { align-items: start; }
.hero .kicker {
  grid-column: 1 / 9;
  font-family: var(--sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 20px;
}
.hero h1 { grid-column: 1 / 9; grid-row: 2; }
.hero .lead {
  grid-column: 1 / 5; grid-row: 3;
  margin-top: 36px; font-size: 1.05rem;
}
.hero-figure {
  grid-column: 9 / 13; grid-row: 2 / 5;
  justify-self: end; width: 100%; max-width: 480px;
  margin: calc(var(--h1) * .98 * 2) 0 0;
}
.hero-meta {
  grid-column: 5 / 9; grid-row: 3;
  margin-top: 36px; padding-left: var(--gap);
  font-family: var(--sans); font-size: .88rem; line-height: 1.5; color: var(--muted);
}
.hero-meta ol { margin: 0; padding: 0; list-style: none; }
.hero-meta li { padding: 7px 0; border-top: 1px solid var(--accent); }
.hero-meta li:last-child { border-bottom: 1px solid var(--accent); }
.hero-meta span { color: var(--accent-2); margin-right: 10px; font-variant-numeric: tabular-nums; }

figcaption {
  font-style: italic; font-size: .85rem; line-height: 1.5;
  color: var(--muted); margin-top: 10px;
}

/* Sections */
.sec { padding: var(--rhythm) 0; }
.sec--alt { background: var(--bg-alt); }
.rule { border: 0; border-top: 1px solid var(--accent); margin: 0; }
.sec .num {
  grid-column: 1 / 3;
  font-family: var(--sans); font-size: .82rem; font-weight: 700;
  letter-spacing: .12em; color: var(--accent-2);
  padding-top: .55em;
}
.sec .body { grid-column: 3 / 9; }
.sec--wide .body { grid-column: 3 / 11; }

.list-2 {
  grid-column: 3 / 13;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
  list-style: none; margin: 12px 0 0; padding: 0;
}
.sec--wide .list-2 { grid-column: 3 / 11; }
.list-2 li {
  padding: 12px 0 12px 26px; position: relative;
  border-top: 1px solid rgba(47, 92, 68, .35);
  font-size: 1rem; line-height: 1.6;
}
.list-2 li::before {
  content: ""; position: absolute; left: 2px; top: 1.3em;
  width: 10px; height: 1px; background: var(--accent);
}
.list-2 strong { font-family: var(--sans); font-size: .95rem; }

.note {
  font-family: var(--sans); font-size: .92rem; line-height: 1.55;
  color: var(--muted); border-left: 2px solid var(--accent-2);
  padding-left: 16px; margin-top: 28px;
}

/* Contrast section */
.sec--dark { background: var(--bg-dark); color: var(--on-dark); }
.sec--dark h2, .sec--dark h3 { color: var(--on-dark); }
.sec--dark .num { color: var(--accent-2); }
.sec--dark .detail { grid-column: 1 / 6; grid-row: 1 / 3; margin: 0; }
.sec--dark .detail figcaption { color: rgba(247, 243, 234, .72); }
.sec--dark .num { grid-column: 7 / 13; grid-row: 1; padding-top: 0; margin-bottom: 20px; }
.sec--dark .body { grid-column: 7 / 13; grid-row: 2; }
.sec--dark a { color: var(--on-dark); }

/* Page head (inner pages) */
.page-head { padding: 72px 0 56px; }
.page-head h1 { grid-column: 1 / 10; font-size: clamp(2.3rem, 5vw, 4.4rem); }
.page-head .lead { grid-column: 1 / 7; margin-top: 28px; }

/* About composition */
.about { padding: 0 0 var(--rhythm); }
.about-meta {
  grid-column: 1 / 5;
  list-style: none; margin: 0; padding: 0;
  font-family: var(--sans); font-size: .9rem; line-height: 1.45;
  align-self: start; position: sticky; top: 24px;
}
.about-meta li { padding: 12px 0; border-top: 1px solid var(--accent); }
.about-meta li:last-child { border-bottom: 1px solid var(--accent); }
.about-meta b {
  display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-2); font-weight: 700; margin-bottom: 2px;
}
.about-text { grid-column: 6 / 13; }
.about-text h2 { margin-top: 56px; }
.about-text h2:first-child { margin-top: 0; }

/* Legal pages */
.legal { padding: 0 0 var(--rhythm); }
.legal .body { grid-column: 3 / 10; }
.legal h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin: 48px 0 16px; padding-top: 20px; border-top: 1px solid var(--accent); }
.legal h2:first-child { margin-top: 0; }
.legal .updated {
  grid-column: 1 / 3; font-family: var(--sans); font-size: .82rem;
  color: var(--muted); line-height: 1.45;
}

/* Footer */
.site-footer { background: var(--bg-dark); color: var(--on-dark); padding: 72px 0 40px; }
.site-footer .grid { row-gap: 32px; }
.foot-name {
  grid-column: 1 / 6;
  font-family: var(--sans); font-weight: 900; font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: .95; letter-spacing: -.045em; margin: 0;
}
.foot-name small {
  display: block; margin-top: 16px;
  font-family: var(--serif); font-weight: 400; font-size: .95rem; letter-spacing: 0;
  line-height: 1.55; color: rgba(247, 243, 234, .75); max-width: 30ch;
}
.foot-nav { grid-column: 7 / 9; }
.foot-nav ul { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: .95rem; }
.foot-nav li { padding: 5px 0; }
.foot-contact { grid-column: 10 / 13; font-family: var(--sans); font-size: .95rem; }
.foot-label {
  display: block; font-family: var(--sans); font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 12px;
}
.site-footer a { color: var(--on-dark); text-decoration-color: var(--accent-2); }
.site-footer :focus-visible { outline-color: var(--accent-2); }
.foot-base {
  grid-column: 1 / 13; border-top: 1px solid var(--accent-2);
  padding-top: 18px; font-size: .85rem; color: rgba(247, 243, 234, .7);
}

/* Tablet */
@media (max-width: 960px) {
  :root { --rhythm: 72px; --pad: 24px; }
  .hero h1, .hero .kicker { grid-column: 1 / 13; }
  .hero .lead { grid-column: 1 / 8; }
  .hero-meta { grid-column: 1 / 8; grid-row: 4; padding-left: 0; margin-top: 8px; }
  .hero-figure { grid-column: 8 / 13; grid-row: 3 / 5; margin-top: 36px; }
  .sec .num { grid-column: 1 / 13; margin-bottom: 12px; padding-top: 0; }
  .sec .body, .sec--wide .body { grid-column: 1 / 11; }
  .list-2, .sec--wide .list-2 { grid-column: 1 / 13; }
  .sec--dark .detail { grid-column: 1 / 7; grid-row: 1 / 3; }
  .sec--dark .num, .sec--dark .body { grid-column: 7 / 13; }
  .about-meta { grid-column: 1 / 5; }
  .about-text { grid-column: 5 / 13; }
  .legal .updated { grid-column: 1 / 13; margin-bottom: 24px; }
  .legal .body { grid-column: 1 / 11; }
  .foot-name { grid-column: 1 / 13; }
  .foot-nav { grid-column: 1 / 7; }
  .foot-contact { grid-column: 7 / 13; }
}

/* Mobile */
@media (max-width: 640px) {
  :root { --rhythm: 56px; --pad: 16px; --gap: 16px; }
  body { font-size: 17px; }
  .hero { padding-top: 44px; }
  .hero .lead, .hero-meta, .hero-figure { grid-column: 1 / 13; }
  .hero-figure { grid-row: 4; justify-self: start; max-width: 420px; margin-top: 32px; }
  .hero-meta { grid-row: 5; margin-top: 32px; }
  .sec .body, .sec--wide .body { grid-column: 1 / 13; }
  .list-2 { grid-template-columns: minmax(0, 1fr); }
  .sec--dark .detail, .sec--dark .num, .sec--dark .body { grid-column: 1 / 13; grid-row: auto; }
  .sec--dark .detail { max-width: 380px; margin-bottom: 36px; }
  .page-head { padding: 44px 0 36px; }
  .page-head h1, .page-head .lead { grid-column: 1 / 13; }
  .about-meta { grid-column: 1 / 13; position: static; margin-bottom: 40px; }
  .about-text, .legal .body { grid-column: 1 / 13; }
  .foot-nav, .foot-contact { grid-column: 1 / 13; }
  .site-nav ul { gap: 4px 16px; }
  .foot-contact a { overflow-wrap: anywhere; }
}
