/* Apps for Independence — "Almanac" design.
   Fonts are served from this site, so no visitor request goes to a font service. */

@font-face { font-family: "Libre Caslon Display"; src: url("/fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("/fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("/fonts/libre-caslon-text-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Libre Caslon Text"; src: url("/fonts/libre-caslon-text-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/fonts/libre-franklin-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --paper: #F2F2EE;
  --ink: #16181A;
  --soft: #4A4F55;
  --display: "Libre Caslon Display", Georgia, "Times New Roman", serif;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}

a { color: inherit; }
a:hover { color: var(--soft); }
a:focus-visible { outline: 3px solid #276CB2; outline-offset: 3px; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.serif { font-family: var(--serif); font-size: 19px; line-height: 1.5; }
.meta { font-size: 14px; color: var(--soft); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--paper); padding: 12px 16px; z-index: 10; }

/* Header */
.top {
  display: flex; flex-wrap: wrap; gap: 8px 40px;
  justify-content: space-between; align-items: center;
  padding-top: 24px; padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
}
.mark { font-family: var(--serif); font-size: 22px; text-decoration: none; padding: 10px 0; }
.top nav { display: flex; flex-wrap: wrap; gap: 0 32px; font-size: 15px; font-weight: 500; }
.top nav a { padding: 12px 0; text-decoration: none; }
.top nav a:hover { text-decoration: underline; }

/* Hero */
.hero { padding-top: 96px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 32px; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); }
h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(44px, 7.4vw, 108px); line-height: 1.02; letter-spacing: -0.01em;
  max-width: 14ch;
}
.lede { font-family: var(--serif); font-size: 22px; line-height: 1.5; max-width: 620px; }

/* Section heads */
.rule-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px;
  border-top: 3px solid var(--ink); padding: 16px 0 24px;
}
.rule-head.second { margin-top: 88px; }
.rule-head h2 { font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.rule-head p { font-size: 14px; color: var(--soft); }

/* Featured app */
.feature {
  display: flex; flex-wrap: wrap;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.feature-text {
  flex: 1 1 420px; min-width: 0;
  padding: 48px 48px 48px 0;
  display: flex; flex-direction: column; gap: 20px; align-items: flex-start;
}
.feature h3 { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 6vw, 76px); line-height: 1.04; }
.feature .serif { max-width: 30em; }
.facts {
  width: 100%; margin-top: 8px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid var(--ink);
}
.facts div { padding: 14px 16px 14px 0; }
.facts dt { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); }
.facts dd { font-size: 16px; font-weight: 600; margin-top: 2px; }
.button {
  display: inline-block; padding: 14px 24px; min-height: 44px;
  background: var(--ink); color: var(--paper);
  font-weight: 600; text-decoration: none;
}
.button:hover { background: #33373C; color: var(--paper); }
.feature-shot {
  flex: 1 1 380px; min-width: 0;
  background: var(--app); padding: 40px 40px 0;
  display: flex; align-items: flex-end; justify-content: center;
}
.feature-shot img { width: 100%; max-width: 402px; }

/* Index rows */
.row {
  display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center;
  padding: 32px 0; border-top: 1px solid var(--ink);
}
.row.last { border-bottom: 1px solid var(--ink); }
.block {
  width: 128px; height: 96px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 56px; line-height: 1;
}
.row-name { flex: 1 1 260px; min-width: 0; }
.row h3 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 3.6vw, 46px); line-height: 1.1; }
.row-name .meta { margin-top: 6px; }
.row-say { flex: 2 1 340px; min-width: 0; }

/* Principles */
#apps { padding-bottom: 96px; }
.dark { background: var(--ink); color: var(--paper); }
.dark .wrap { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 56px; }
.dark h2 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4.6vw, 60px); line-height: 1.1; max-width: 820px; }
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px 56px; }
.three > div { border-top: 1px solid var(--paper); padding-top: 20px; }
.three h3 { font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 10px; }
.close { max-width: 640px; color: #D5D6D2; }

/* Footer */
.foot {
  padding-top: 44px; padding-bottom: 60px;
  display: flex; flex-wrap: wrap; gap: 8px 40px; justify-content: space-between; align-items: baseline;
}
.foot p { font-family: var(--serif); font-style: italic; font-size: 18px; }
.foot .small { font-family: var(--sans); font-style: normal; font-size: 14px; color: var(--soft); }

@media (max-width: 640px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 56px; padding-bottom: 56px; gap: 24px; }
  .lede { font-size: 20px; }
  .feature-text { padding: 36px 0; }
  .feature-shot { padding: 28px 28px 0; }
  .rule-head.second { margin-top: 64px; }
  .block { width: 96px; height: 72px; font-size: 42px; }
  #apps { padding-bottom: 64px; }
  .dark .wrap { padding-top: 64px; padding-bottom: 64px; gap: 40px; }
}
