/* Wordsmith site styles. One file for every page. */

@font-face { font-family: "Lexend"; src: url("/assets/fonts/lexend-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("/assets/fonts/barlow-semi-condensed-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("/assets/fonts/barlow-semi-condensed-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("/assets/fonts/caveat-latin-wght-normal.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --ground: #d9d9d6;
  --ink: #111111;
  --muted: #3a3a37;
  --card: #c6c6c2;
  --rule: #a9a9a5;
  --hl: #eef28a;
  --paper: #f8f7f2;
  --pen: #a8241a;
  --display: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --body: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 18px/1.55 var(--body); }
img, svg { max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; background: var(--hl); padding: 8px 14px; z-index: 10; }

.wrap { max-width: 900px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }

/* Header */
.site-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 24px; padding-top: 24px; padding-bottom: 24px; }
.brand { font-weight: 700; font-size: 24px; letter-spacing: 0.02em; text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 16px; }
.nav a { text-decoration: none; padding: 6px 2px; }
.nav a:hover { text-decoration: underline; }
.nav a[aria-current="page"] { background: var(--hl); padding: 6px 8px; }

/* Type */
h1, h2, .display { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(44px, 7vw, 68px); line-height: 1.08; }
h2 { font-size: clamp(34px, 5vw, 42px); line-height: 1.1; }
h3 { font-size: 20px; line-height: 1.3; margin: 0; font-weight: 700; }
.hl { background: linear-gradient(to bottom, transparent 0.2em, var(--hl) 0.2em); padding: 0 0.16em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.lead { max-width: 640px; }
.small { font-size: 15px; }
.source, .tag { font-size: 13px; color: var(--muted); }

/* Layout */
main { display: flex; flex-direction: column; gap: 112px; padding-top: 32px; padding-bottom: 120px; }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; }
.hero--left { align-items: flex-start; text-align: left; }
.split { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.split--rev { flex-wrap: wrap-reverse; }
.split > * { flex: 1 1 340px; min-width: 0; }
.text { display: flex; flex-direction: column; gap: 20px; }
.section { display: flex; flex-direction: column; gap: 32px; }
.section > header { display: flex; flex-direction: column; gap: 16px; }
.three { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; width: 100%; }
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 56px; padding: 0 28px; border-radius: 999px; font: 700 17px/1.2 var(--body); text-decoration: none; border: 0; cursor: pointer; }
.btn--hl { background: var(--hl); color: var(--ink); }
.btn--dark { background: var(--ink); color: #ffffff; }
.btn--small { min-height: 50px; font-size: 16px; }
.btn:hover { filter: brightness(0.94); }
.actions .btn { flex: 1 1 260px; max-width: 380px; }
.card .btn { width: 100%; }

/* Cards, metrics, tables */
.card { background: var(--card); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.label { font-size: 14px; font-weight: 700; }
.metric { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--ink); padding-top: 12px; }
.metric span { font-size: 14px; }
.metric strong { font-family: var(--display); font-weight: 400; font-size: 44px; line-height: 1; }
.before { font-size: 17px; color: var(--muted); text-decoration: line-through; }
.after { font-size: 20px; line-height: 1.45; }
.table { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); font-size: 15px; }
.table > * { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--rule); }
.table .th { font-weight: 700; border-bottom-color: var(--ink); }
.table > :nth-last-child(-n+2) { border-bottom: 0; }
.facts { border-top: 2px solid var(--ink); }
.facts > :nth-child(even) { font-weight: 700; }
.list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.list--tight { gap: 4px; font-size: 16px; }

/* Pilot box */
.pilot { align-self: center; width: 100%; max-width: 580px; background: var(--hl); padding: 32px; text-align: center; display: flex; flex-direction: column; gap: 20px; align-items: center; box-shadow: 0 2px 0 #b5b5b0; }
.pilot .btn { width: 100%; max-width: 360px; }

/* Client tiles */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { min-height: 88px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; border: 2px solid #4a4a47; font-family: var(--display); font-size: 19px; line-height: 1.1; text-transform: uppercase; color: #2f2f2d; }
.tile:nth-child(4n+2), .tile:nth-child(4n+3) { background: #4a4a47; color: #ffffff; }

/* Work page */
.jump { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.jump a { background: var(--card); padding: 10px 16px; border-radius: 999px; text-decoration: none; font-size: 15px; }
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.case { background: var(--card); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.case .result { font-weight: 700; }
.crumbs { font-size: 15px; }
.crumbs a { text-decoration: underline; }

/* About timeline */
.timeline { display: grid; grid-template-columns: 96px minmax(0, 1fr); border-top: 2px solid var(--ink); }
.timeline > * { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.timeline .year { font-family: var(--display); font-size: 30px; line-height: 1; }
address { font-style: normal; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .legend { font-weight: 700; font-size: 15px; }
.field .hint { font-size: 14px; color: var(--muted); }
input[type="text"], input[type="email"], input[type="url"], textarea { font: 400 17px/1.4 var(--body); padding: 12px 14px; border: 1px solid #7c7c78; border-radius: 8px; background: #ffffff; color: var(--ink); min-height: 50px; width: 100%; }
textarea { min-height: 150px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; }
.choice input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--ink); flex: 0 0 auto; }
.hidden { display: none; }

/* Method page: the edited draft */
.key { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; font-size: 15px; }
.key span { display: inline-flex; align-items: center; gap: 8px; }
.sheet { background: var(--paper); padding: 48px 44px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 14px 36px rgba(0, 0, 0, 0.10); display: flex; flex-direction: column; gap: 36px; }
.sheet-head { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid #dedcd3; padding-bottom: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.edit { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 28px; align-items: start; }
.draft { font-size: 18px; line-height: 1.8; }
.draft del { color: #5d5d5a; text-decoration-color: var(--pen); text-decoration-thickness: 2px; }
.draft mark { background: var(--hl); color: inherit; padding: 0 2px; }
.draft ins, .rewrite { text-decoration: none; font-family: var(--hand); color: var(--pen); font-size: 25px; line-height: 1.25; }
.rewrite { display: block; margin-top: 10px; }
.notes { display: flex; flex-direction: column; gap: 14px; }
.note { font-family: var(--hand); color: var(--pen); font-size: 22px; line-height: 1.2; }
.note b { display: block; font: 700 11px/1.4 var(--body); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2px; }
.note b.stamp, .stamp { display: inline-block; width: auto; border: 2px solid var(--pen); padding: 1px 6px; transform: rotate(-2deg); }
.clean { background: var(--paper); padding: 48px 44px; display: flex; flex-direction: column; gap: 18px; font-size: 18px; line-height: 1.7; }
.clean ol { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 6px; }

.prose h2 { font-size: 30px; margin-top: 12px; }

/* Closing band and footer */
.band { background: var(--ink); color: #ffffff; padding-top: 96px; padding-bottom: 8px; }
.band .wrap { display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.band h2 { font-size: clamp(38px, 5vw, 56px); }
.band .btn { width: 100%; max-width: 380px; }
.site-footer { background: var(--ink); color: #e6e6e3; padding-top: 56px; padding-bottom: 40px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px; border-top: 1px solid #3a3a3a; padding-top: 32px; }
.footer-grid a { color: #e6e6e3; }
.flabel { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #bdbdb9; margin-bottom: 8px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.legal { margin-top: 32px; font-size: 13px; color: #bdbdb9; }
.legal a { color: #bdbdb9; }

@media (max-width: 760px) {
  main { gap: 88px; }
  .edit { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .notes { border-top: 1px dashed var(--pen); padding-top: 12px; }
  .sheet, .clean { padding: 28px 20px; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile:nth-child(n) { background: transparent; color: #2f2f2d; }
  .tile:nth-child(odd) { background: #4a4a47; color: #ffffff; }
}
