/* Shorterday site styles. Shared by every static page under apps/shorterday.
   Two faces, both served same-origin: Libre Baskerville for large headlines,
   Geist for navigation, body and interface. */
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/libre-baskerville-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/libre-baskerville-italic-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-variable.ttf') format('truetype');
}

:root {
  color-scheme: light;
  --paper: #faf9f6;
  --ink: #191917;
  --secondary: #62625e;
  --white: #ffffff;
  --rule: #d9d8d2;
  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --content-max: 1320px;
  --gutter: 24px;
  --section-space: 64px;
  --body-size: 15px;
  --copy-measure: 52ch;

  --h1-size: clamp(44px, 6.5vw, 88px);
  --h2-size: clamp(32px, 4vw, 54px);
  --h3-size: clamp(22px, 2vw, 26px);
  --hero-size: clamp(58px, 7.8vw, 112px);
}
@media (min-width: 768px) {
  :root {
    --gutter: 5vw;
    --section-space: 100px;
    --body-size: 16px;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { margin: 0; padding: 0; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--body-size);
  font-weight: 400;
  line-height: 1.6;
  text-wrap: pretty;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-wrap: balance;
  -webkit-hyphens: none;
  hyphens: none;
}
h1 { font-size: var(--h1-size); line-height: 1.12; letter-spacing: -0.02em; }
h2 { font-size: var(--h2-size); line-height: 1.15; }
h3 { font-size: var(--h3-size); line-height: 1.3; }
p { max-width: var(--copy-measure); }
p + p { margin-top: 1em; }
/* Supporting copy in main is secondary; sample UI and the hero keep their own colours. */
main p:not(.sample-window p, .hero p) { color: var(--secondary); }
ul, ol { padding-left: 1.2em; }
li + li { margin-top: 0.35em; }
strong { font-weight: 600; }
em { font-style: italic; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--secondary);
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-color: var(--ink); }
a, button, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }
main:focus { outline: none; }

/* Layout primitives */
.container {
  width: 100%;
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
/* .section, .page-intro and .closing supply their own container width and
   gutters. Declaring them on the same element as .container does not double
   anything; a nested .container child drops its own gutters. */
.section, .page-intro, .closing {
  width: 100%;
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section > .container, .page-intro > .container, .closing > .container { max-width: none; padding-inline: 0; }
.section { padding-block: var(--section-space); }
.section + .section { padding-top: 0; }
.section-heading { max-width: 740px; margin-bottom: 48px; }
.section-heading h2 + p { margin-top: 20px; }
.copy { max-width: 680px; }
.copy h2 + p, .copy h3 + p { margin-top: 20px; }
.prose { max-width: 740px; }
.prose h2 { margin-top: 56px; margin-bottom: 20px; font-size: clamp(28px, 3vw, 40px); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 40px; margin-bottom: 12px; }
.prose p, .prose li { max-width: var(--copy-measure); }
.prose ul, .prose ol { margin-top: 16px; max-width: var(--copy-measure); }
.prose p + p { margin-top: 1.1em; }

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px var(--gutter); }
.split > * { min-width: 0; }
.split h2 + p, .split h3 + p { margin-top: 20px; }
@media (min-width: 900px) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.three-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px var(--gutter); }
.three-columns > * { min-width: 0; }
.three-columns h3 { font-family: var(--sans); font-size: 18px; font-weight: 500; letter-spacing: 0; line-height: 1.4; }
.three-columns h3 + p { margin-top: 12px; }
@media (min-width: 768px) { .three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px var(--gutter); } }

.method-step { max-width: 740px; padding-block: 48px; }
.method-step + .method-step { border-top: 1px solid var(--rule); }
.method-step:first-child { padding-top: 0; }
.method-step h2 { font-size: clamp(28px, 3vw, 40px); }
.method-step h2 + p { margin-top: 16px; }

/* Page opening on interior pages */
.page-intro { margin-top: 96px; margin-bottom: 80px; }
.page-intro .kicker {
  display: block;
  max-width: none;
  margin-bottom: 24px;
  color: var(--secondary);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}
.page-intro h1 { max-width: 16ch; font-size: var(--h1-size); line-height: 1.12; }
.page-intro h1 + .lede, .page-intro h1 + p { margin-top: 32px; }
.lede {
  max-width: 560px;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.5;
  color: var(--secondary);
}
.lede + .text-link, .lede + .button, .lede + p { margin-top: 28px; }
@media (max-width: 767px) {
  .page-intro { margin-top: 64px; margin-bottom: 56px; }
}

/* Links and buttons */
.text-link {
  display: inline-block;
  max-width: 100%;
  padding-block: 4px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--ink);
  text-underline-offset: 0.3em;
  transition: text-decoration-thickness 120ms ease, text-underline-offset 120ms ease;
}
.text-link:hover { text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  padding: 16px 24px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.button:hover { background: #000; border-color: #000; }
.button:focus-visible { outline-offset: 3px; }
.button + .text-link, .text-link + .button { margin-left: 24px; }

/* Skip control: a button that moves focus to main. */
.skip-link {
  position: absolute;
  top: 12px;
  left: var(--gutter);
  z-index: 50;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
  transform: translateY(-300%);
}
.skip-link:focus { transform: translateY(0); outline-offset: 2px; }

/* Header. Same markup on every page; the home hero recolours it to white. */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  width: 100%;
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 24px var(--gutter);
  color: var(--ink);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: inherit;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
}
.brand-mark { width: 40px; height: auto; flex: none; color: inherit; overflow: visible; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 28px;
  margin-left: auto;
  font-family: var(--sans);
  font-size: 16px;
}
.site-nav a, .site-nav span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}
.site-nav a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.3em; transition: text-decoration-color 120ms ease; }
.site-nav a:hover { text-decoration-color: currentColor; }
.site-nav [aria-current='page'] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
.site-nav .nav-contact { font-weight: 500; }
@media (max-width: 640px) {
  .site-header { padding-block: 16px 8px; }
  .site-nav { flex-basis: 100%; margin-left: 0; gap: 0 20px; font-size: 15px; }
  .site-nav a, .site-nav span { min-height: 40px; }
}

/* Home hero: one full-bleed photograph, white copy on its dark side. */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 660px;
  height: min(880px, 100svh);
  color: var(--white);
  background: #2a2723;
  overflow: hidden;
}
@media (min-width: 768px) { .hero { min-height: 680px; } }
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 50%;
  transform: scale(1.015);
  transform-origin: 50% 50%;
  animation: hero-settle 4.5s cubic-bezier(0.16, 0.6, 0.2, 1) forwards;
}
@media (min-width: 900px) { .hero-media img { object-position: 50% 50%; } }
@keyframes hero-settle {
  from { transform: scale(1.015); }
  to { transform: scale(1); }
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0px, rgba(0, 0, 0, 0) 160px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.58) 0%, rgba(0, 0, 0, 0.34) 46%, rgba(0, 0, 0, 0.08) 100%);
}
.hero .site-header { color: var(--white); }
.hero-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: calc(var(--content-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 40px var(--gutter) 96px;
}
.hero h1 {
  max-width: none;
  color: var(--white);
  font-size: var(--hero-size);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: unset;
}
.hero h1 span { display: block; }
.hero-lede {
  max-width: 400px;
  margin-top: 32px;
  color: var(--white);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
}
.hero .text-link {
  margin-top: 36px;
  color: var(--white);
  font-size: 17px;
  text-decoration-color: var(--white);
}
.hero-caption {
  position: absolute;
  right: var(--gutter);
  bottom: 24px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  letter-spacing: 0.01em;
  line-height: 1.4;
}
@media (max-width: 767px) {
  .hero-copy { padding-bottom: 88px; }
  .hero-lede { margin-top: 24px; }
}
/* Phones: smaller display size so each headline line stays on one row at 360px and up. */
@media (max-width: 640px) {
  :root { --hero-size: clamp(40px, 11.5vw, 58px); }
}

/* Projects: two flat work entries, the first a little wider on desktop. */
.project-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 72px var(--gutter);
  align-items: start;
}
@media (min-width: 900px) {
  .project-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 80px 48px; }
  .project-grid > .project:nth-child(2) { margin-top: 96px; }
}
.project { display: block; min-width: 0; color: inherit; text-decoration: none; }
.project-visual {
  display: flex;
  align-items: stretch;
  min-height: 320px;
  padding: clamp(20px, 3vw, 40px);
  background: #eeece6;
}
.project-title { margin-top: 28px; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.2; }
a.project:hover .project-title, .project h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.project-summary { margin-top: 14px; color: var(--secondary); }
.project .text-link { margin-top: 18px; }
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin-top: 24px;
  color: var(--secondary);
  font-size: 14px;
}
.project-meta dt { font-weight: 500; color: var(--ink); }
.project-meta dd { margin: 0; }
.project-meta > div { display: flex; flex-direction: column; gap: 2px; }

/* Sample UI inside a project visual. Everything is synthetic and labelled. */
.sample-window {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: 0 1px 0 rgba(25, 25, 23, 0.06), 0 12px 32px rgba(25, 25, 23, 0.08);
}
.sample-label {
  display: block;
  max-width: none;
  margin-bottom: 12px;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.4;
}
.project-visual > div { display: flex; flex-direction: column; width: 100%; min-width: 0; }
.sample-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
  color: var(--secondary);
}
.sample-toolbar strong { color: var(--ink); font-weight: 500; }
.sample-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: baseline;
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
}
.sample-row:last-child { border-bottom: 0; }
.sample-row p { max-width: none; }
.sample-row .sample-status { grid-column: 2; grid-row: 1; justify-self: end; }
.sample-table { width: 100%; border-collapse: collapse; }
.sample-table th, .sample-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.sample-table th { color: var(--secondary); font-weight: 500; }
.sample-table tr:last-child td { border-bottom: 0; }
.sample-table td.num, .sample-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.sample-table .sample-source { color: var(--secondary); white-space: normal; }
.sample-status {
  display: inline-block;
  color: var(--secondary);
  font-size: 12.5px;
  white-space: nowrap;
}
.sample-status.is-ready { color: var(--ink); }
.sample-body { padding: 14px 16px; color: var(--ink); }
.sample-body p { max-width: none; }
.sample-body p + p { margin-top: 8px; }
.sample-muted { color: var(--secondary); }
@media (max-width: 480px) {
  .sample-table th, .sample-table td { padding: 8px 12px; white-space: normal; }
  .sample-row, .sample-toolbar, .sample-body { padding-inline: 12px; }
  .sample-window { font-size: 13px; }
}

/* People */
.people-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px var(--gutter); }
@media (min-width: 640px) { .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Portraits are 128px source files: shown at their native size, never upscaled. */
.person { min-width: 0; }
.person img {
  width: 128px;
  height: 128px;
  max-width: 100%;
  object-fit: cover;
  background: #e9e7e1;
}
.person h3 { margin-top: 24px; font-family: var(--serif); font-size: clamp(24px, 2.2vw, 30px); font-weight: 400; letter-spacing: -0.01em; }
.person p { margin-top: 10px; color: var(--secondary); max-width: 44ch; }
.person p + p { margin-top: 12px; }
.person .text-link { margin-top: 12px; color: var(--ink); }

/* Industry and contact lists */
.industry-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px var(--gutter); padding: 0; list-style: none; margin: 0; }
.industry-list > * { min-width: 0; margin: 0; }
.industry-list h2 { font-size: clamp(26px, 2.6vw, 36px); }
.industry-list h2 + p { margin-top: 14px; }
.industry-list .text-link { margin-top: 14px; }
@media (min-width: 768px) { .industry-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px var(--gutter); } }

.contact-options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px var(--gutter); }
.contact-options > * { min-width: 0; }
.contact-options h2 { font-size: clamp(26px, 2.6vw, 36px); }
.contact-options h2 + p { margin-top: 14px; }
.contact-options .button, .contact-options .text-link { margin-top: 20px; }
@media (min-width: 768px) { .contact-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Closing statement */
.closing { padding-block: 96px; }
.closing h2 { max-width: 18ch; font-size: clamp(36px, 5vw, 72px); line-height: 1.08; }
.closing p { margin-top: 24px; }
.closing .button, .closing .text-link { margin-top: 36px; }
.closing .button + .text-link { margin-left: 24px; }

/* Source reveal: plain <details> preferred. The button pair is the scripted fallback. */
.source-detail { max-width: 740px; margin-top: 24px; }
.source-detail[hidden] { display: none; }
details.source-detail > summary,
.source-trigger {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  cursor: pointer;
  list-style: none;
}
details.source-detail > summary::-webkit-details-marker { display: none; }
details.source-detail > summary::before,
.source-trigger::before {
  content: '';
  width: 8px;
  height: 8px;
  margin-right: 12px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}
details.source-detail[open] > summary::before,
.source-trigger[aria-expanded='true']::before { transform: translateY(2px) rotate(225deg); }
details.source-detail > summary:hover, .source-trigger:hover { text-decoration-thickness: 2px; }
.source-body, details.source-detail > :not(summary) { margin-top: 16px; }
.source-body, .source-page {
  max-width: 740px;
  padding: 20px 24px;
  border: 1px solid var(--rule);
  background: var(--white);
  font-size: 14.5px;
  line-height: 1.6;
}
.source-page pre, .source-body pre {
  margin: 0;
  font-family: var(--sans);
  font-size: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.source-page p + p, .source-body p + p { margin-top: 10px; }
.source-page .sample-muted { color: var(--secondary); }

/* Optional example tabs */
[data-example-tabs] { margin-top: 24px; }
[data-example-tabs] [role='tablist'] { display: flex; flex-wrap: wrap; gap: 0 24px; border-bottom: 1px solid var(--rule); }
[data-example-tab] {
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  background: none;
  color: var(--secondary);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
[data-example-tab][aria-selected='true'] { color: var(--ink); border-bottom-color: var(--ink); }
[data-example-panel] { padding-top: 20px; }
[data-example-panel][hidden] { display: none; }

/* Privacy and 404 */
.privacy-content { max-width: 740px; padding-bottom: var(--section-space); }
.privacy-content h2 { margin-top: 48px; margin-bottom: 16px; font-size: clamp(24px, 2.6vw, 32px); }
.privacy-content p, .privacy-content li { max-width: var(--copy-measure); }
.privacy-content ul { margin-top: 12px; }
.not-found { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.not-found main { flex: 1 0 auto; }
.not-found .site-footer { margin-top: auto; }

/* Footer: oversized wordmark, plain links, plain copyright. */
.site-footer {
  margin-top: var(--section-space);
  padding-block: 64px 40px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
}
.site-footer > .container,
.site-footer:not(:has(> .container)) {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.site-footer:not(:has(> .container)) { padding-inline: var(--gutter); max-width: calc(var(--content-max) + var(--gutter) * 2); margin-inline: auto; }
.footer-wordmark {
  font-family: var(--serif);
  font-size: clamp(40px, 11vw, 160px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--ink);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  font-size: 15px;
}
.site-footer nav a, .site-footer nav span { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink); text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.site-footer nav [aria-current='page'] { color: var(--secondary); }
.site-footer small, .footer-copyright { display: block; max-width: none; color: var(--secondary); font-size: 14px; }

/* Motion preferences: everything is static under reduced motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-media img { transform: none; }
}
