/* ==========================================================
   ashfall.systems — minimal essayistic style
   Source Serif 4 (display) + IBM Plex Sans (body)
   Warm cream palette, clean reading experience
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  --paper: #F5F2EA;
  --paper-raised: #FBF9F3;
  --ink: #1A1714;
  --ink-muted: #5C564D;
  --ink-faint: #6F6960;  /* 4.86:1 on paper, AA */
  --rule: #D2CAB8;
  --accent: #8B6914;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #232323;
    --paper-raised: #2C2C2C;
    --ink: #EAEAEA;
    --ink-muted: #A8A8A8;
    --ink-faint: #90908C;  /* 4.91:1 on dark paper, AA */
    --rule: #424242;
    --accent: #C89A4A;
  }
}

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

html {
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-color: var(--paper);
  min-height: 100%;
}

body {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  min-height: 100vh;
}

/* --- Navigation --- */

header {
  border-bottom: 1px solid var(--rule);
}

nav {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.wordmark {
  font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 150ms ease-out;
  /* expand touch target without shifting layout */
  padding: 0.75rem 0.25rem;
  margin: -0.75rem -0.25rem;
}

.nav-links a:hover {
  color: var(--ink);
}

/* --- Main content --- */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

/* --- Homepage sections --- */

.hero {
  margin-bottom: 4rem;
}

.hero h1 {
  font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: 2.25rem;
  }
}

.hero-thesis {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-muted);
  max-width: 60ch;
}

.grid-legend {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 68ch;
}

/* Products */

.products {
  margin-bottom: 4rem;
}

.products h2,
.infrastructure h2,
.writing-callout h2 {
  font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink-faint);
  margin-bottom: 1.5rem;
}

/* Product rows: full-width list with hairline separators — no equal-height
   boxes, no dead space, adapts to any product count. */
.product-row-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.product-row {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.product-name {
  font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  font-size: 1.125rem;
  font-weight: 600;
}

.product-status {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.125rem 0.5rem;
  border-radius: 2px;
  border: 1px solid var(--rule);
  color: var(--ink-faint);
  white-space: nowrap;
}

.product-status.launching {
  color: var(--accent);
  border-color: var(--accent);
}

.product-positioning {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.product-description {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.product-price {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.product-link {
  font-size: 0.8125rem;
  color: var(--accent);
  text-decoration: none;
}

.product-link:hover {
  text-decoration: underline;
}

/* Infrastructure */

.infrastructure {
  margin-bottom: 4rem;
}

.infra-intro {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
  max-width: 55ch;
}

.infra-specs {
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1.25rem 1.5rem;
  background-color: var(--paper-raised);
}

.infra-specs p {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.infra-specs p:last-child {
  margin-bottom: 0;
}

.spec-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.125rem;
}

/* Writing callout */

.writing-callout {
  margin-bottom: 4rem;
}

.writing-callout p {
  font-size: 1rem;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.writing-link {
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
}

.writing-link:hover {
  text-decoration: underline;
}

/* Signed section */

.signed {
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
  margin-bottom: 2rem;
}

.signed p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.signature {
  font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  font-style: italic;
  color: var(--ink);
}

.contact a {
  font-size: 0.8125rem;
  color: var(--accent);
  text-decoration: none;
}

.contact a:hover {
  text-decoration: underline;
}

/* --- Essay page --- */

.essay-header {
  margin-bottom: 2.5rem;
}

.essay-header h1 {
  font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.essay-header time {
  font-size: 0.875rem;
  color: var(--ink-faint);
}

.essay-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.essay-footer a {
  font-size: 0.875rem;
  color: var(--ink-muted);
  text-decoration: none;
}

.essay-footer a:hover {
  color: var(--accent);
}

/* --- Writing index --- */

.writing-index h1 {
  font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section-description {
  color: var(--ink-muted);
  margin-bottom: 2rem;
}

.essay-list {
  list-style: none;
}

.essay-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.essay-list a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  text-decoration: none;
}

.essay-title {
  font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
}

.essay-list a:hover .essay-title {
  color: var(--accent);
}

.essay-list time {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

.essay-description {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* --- Prose --- */

.prose {
  font-size: 1.0625rem;
  line-height: 1.7;
}

.prose p {
  margin-bottom: 1.25rem;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
}

.prose a:hover {
  text-decoration-style: solid;
}

.prose em {
  font-style: italic;
}

.prose strong {
  font-weight: 600;
}

.prose blockquote {
  border-left: 2px solid var(--rule);
  padding-left: 1.25rem;
  color: var(--ink-muted);
  margin: 1.5rem 0;
}

.prose code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.875em;
  background-color: var(--paper-raised);
  padding: 0.125rem 0.375rem;
  border-radius: 2px;
}

.prose pre {
  background-color: var(--paper-raised);
  padding: 1rem 1.25rem;
  border-radius: 2px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.prose pre code {
  background: none;
  padding: 0;
}

/* --- Footer --- */

footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

/* --- Legal pages --- */

.legal h1 {
  font-family: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.legal-line {
  margin-top: 0.375rem;
}

.legal-line a {
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0.75rem 0.25rem;
  margin: -0.75rem -0.25rem;
}

/* --- Accessibility --- */

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background-color: #F0E7C9;
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  ::selection {
    background-color: #3D3D3D;
  }
}

/* --- Reduced motion --- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
