/* Kay Software Works — static stylesheet. System fonts only. No build step. */

:root {
  color-scheme: light;
  --bg: #f3f0e8;
  --surface: #fffcf7;
  --band: #e7e2d6;
  --ink: #1c1915;
  --muted: #3f3b34;
  --line: #d9d2c4;
  --accent: #1a4336;
  --accent-fg: #f3f0e8;
  --accent-text: #14382d;
  --focus: #14382d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #131311;
    --surface: #1c1b18;
    --band: #23221e;
    --ink: #f4f0e7;
    --muted: #d0c9bc;
    --line: #3a3832;
    --accent: #c5e4d8;
    --accent-fg: #10211b;
    --accent-text: #d7f3e8;
    --focus: #d7f3e8;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
  z-index: 20;
}

main {
  flex: 1;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

::selection {
  background: var(--accent);
  color: var(--accent-fg);
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: 0.4rem;
  transform: translateY(-150%);
  background: var(--ink);
  color: var(--bg);
  padding: 0.55rem 0.8rem;
  z-index: 30;
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

.wrap {
  width: min(68rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1rem;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 5px;
  font-size: 1.15rem;
  line-height: 1;
}

.brand-legal {
  margin: 0;
  padding-left: calc(2rem + 0.7rem);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 1.15rem;
}

.nav a,
.nav a:visited {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line);
  text-underline-offset: 0.35em;
  padding: 0.55rem 0.05rem;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.hero {
  padding-block: 2.75rem 2.25rem;
}

.eyebrow {
  margin: 0;
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
.card h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h1 {
  margin: 0.4rem 0 0;
  font-size: clamp(2.6rem, 5.4vw, 4.25rem);
  line-height: 1.02;
}

.lede {
  max-width: 40rem;
  margin: 1.15rem 0 0;
  font-size: 1.2rem;
  line-height: 1.55;
  text-wrap: pretty;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
  gap: 1rem 1.5rem;
  max-width: 44rem;
  margin: 2rem 0 0;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.facts dt {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  font-size: 1.05rem;
}

.section {
  padding-block: 2.6rem 3.1rem;
}

#products {
  border-top: 1px solid var(--line);
}

h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.section-intro {
  max-width: 36rem;
  margin: 0.55rem 0 0;
  color: var(--muted);
  text-wrap: pretty;
}

.catalog,
.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  display: grid;
  gap: 0.85rem;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.25rem 1.3rem 1.2rem;
}

.card h3 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.15;
}

.card-note {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.card p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  line-height: 1.5;
  text-wrap: pretty;
}

.card-action {
  margin-top: auto;
  padding-top: 0.95rem;
}

.card-action a,
.card-action a:visited {
  color: var(--accent-text);
  font-weight: 600;
}

.section-contact {
  background: var(--band);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

address {
  font-style: normal;
}

.contact-card a,
.contact-card a:visited {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-height: 4.25rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.15s ease;
}

.contact-card a:hover {
  border-color: var(--accent);
}

.contact-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-address {
  color: var(--accent-text);
  font-size: 1.05rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  overflow-wrap: break-word;
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.45rem 1.5rem;
  padding-block: 1.15rem 1.45rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a,
.footer-inner a:visited {
  color: var(--ink);
}

.prose {
  padding-block: 2.75rem 3.5rem;
}

.prose h1,
.prose .lede,
.prose p,
.prose h2,
.prose ul {
  max-width: 40rem;
}

.prose h2 {
  margin: 2rem 0 0;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.prose p,
.prose li {
  margin: 0.65rem 0 0;
  text-wrap: pretty;
}

.prose ul {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
}

.prose a,
.prose a:visited,
.page-link,
.page-link:visited {
  color: var(--accent-text);
}

.updated {
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (min-width: 720px) {
  .hero {
    padding-block: 5rem 3.25rem;
  }

  .catalog {
    grid-template-columns: 1fr 1fr;
  }

  .contact-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 380px) {
  .wrap {
    width: min(68rem, calc(100% - 2rem));
  }

  h1 {
    font-size: 2.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .contact-card a {
    transition: none;
  }
}

@media print {
  body::before {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card,
  .contact-card a,
  .site-header,
  .site-footer,
  #products,
  .section-contact {
    border-color: #bbb;
    background: #fff;
  }

  a {
    text-decoration: underline;
  }
}
