/* Hanken Grotesk, self-hosted (SIL Open Font License, see /assets/fonts/OFL.txt) */
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/hanken-grotesk-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/hanken-grotesk-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --paper: #FAFBFA;
  --ink: #1E2A2F;
  --muted: #55625F;
  --line: #DCE2E0;
  --teal: #0F6B66;
  --amber: #F2A93B;
  --cap-top: #FFFFFF;
  --cap-side: #C9D1CF;
  --cap-edge: #B4BDBB;
  --surface: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #151C1F;
    --ink: #E8EDEC;
    --muted: #A3B0AD;
    --line: #2C383C;
    --teal: #5FB8B1;
    --amber: #F2A93B;
    --cap-top: #2A3539;
    --cap-side: #1A2226;
    --cap-edge: #0F1416;
    --surface: #1C2427;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #151C1F;
  --ink: #E8EDEC;
  --muted: #A3B0AD;
  --line: #2C383C;
  --teal: #5FB8B1;
  --amber: #F2A93B;
  --cap-top: #2A3539;
  --cap-side: #1A2226;
  --cap-edge: #0F1416;
  --surface: #1C2427;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(24px, 4vw, 56px); }

header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.mark {
  display: block; flex: none;
  background-color: currentColor;
  -webkit-mask: url(/assets/emukey-mark.png) center / contain no-repeat;
  mask: url(/assets/emukey-mark.png) center / contain no-repeat;
}
.brand .mark { width: 34px; height: 34px; }
nav.site a { color: var(--muted); text-decoration: none; margin-left: 24px; font-weight: 500; }
nav.site a:hover { color: var(--ink); }
nav.site { margin-left: auto; }

/* Theme toggle, styled as a small keycap */
.theme-toggle {
  flex: none;
  margin-left: 24px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  padding: 0;
  color: var(--ink);
  background: var(--cap-top);
  border: 1px solid var(--cap-edge);
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--cap-edge);
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.theme-toggle:hover { color: var(--teal); }
.theme-toggle:active { transform: translateY(3px); box-shadow: 0 0 0 var(--cap-edge); }
.theme-toggle:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-reduced-motion: reduce) { .theme-toggle { transition: none; } }

/* Hero: the one memorable element, a row of keycaps */
.hero { padding-top: clamp(16px, 2vw, 32px); padding-bottom: clamp(32px, 3vw, 48px); }
.keys { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, 1vw, 16px); margin: 0 0 clamp(24px, 2.5vw, 36px); padding: 0; list-style: none; }
.keys .break { display: none; }
@media (max-width: 600px) {
  .keys { row-gap: 20px; }
  .keys .break { display: block; flex-basis: 100%; height: 0; }
  .keys .cap { width: min(24vw, 96px); font-size: min(9vw, 2.6rem); }
}
.cap {
  width: clamp(52px, 9vw, 124px);
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--cap-top) 0%, var(--cap-top) 70%, var(--cap-side) 100%);
  border: 1px solid var(--cap-edge);
  border-radius: 16px;
  box-shadow: 0 6px 0 var(--cap-edge), 0 10px 18px rgba(30, 42, 47, 0.12);
  font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 3.4rem);
  color: var(--ink);
  transform: translateY(0);
}
.cap.pressed {
  background: var(--ink);
  color: var(--amber);
  border-color: var(--ink);
  box-shadow: 0 6px 0 #0E1517, 0 10px 18px rgba(30, 42, 47, 0.12);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cap.pressed { background: var(--amber); color: #1E2A2F; border-color: var(--amber); box-shadow: 0 6px 0 #B97C1F, 0 10px 18px rgba(0, 0, 0, 0.25); }
}
:root[data-theme="dark"] .cap.pressed { background: var(--amber); color: #1E2A2F; border-color: var(--amber); box-shadow: 0 6px 0 #B97C1F, 0 10px 18px rgba(0, 0, 0, 0.25); }
h1 {
  font-size: clamp(2.2rem, 2.4vw + 1.4rem, 4.4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 20px;
  max-width: none;
  text-align: center;
}
.lede { font-size: clamp(1.25rem, 0.5vw + 1rem, 1.5rem); color: var(--muted); max-width: none; margin: 0; text-align: center; }

section { padding: 36px 0; border-top: 1px solid var(--line); }
h2 { font-size: 1.5rem; letter-spacing: -0.015em; margin: 0 0 24px; font-weight: 800; }
p { max-width: none; }

.product {
  display: grid; grid-template-columns: 96px 1fr; gap: 28px; align-items: start;
}
.product .icon { width: 77px; height: 77px; display: block; }
.product .icon-link { display: block; width: 77px; border-radius: 20px; transition: transform 80ms ease; }
.product .icon-link:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .product .icon-link { transition: none; } .product .icon-link:hover { transform: none; } }
.product h3 { font-size: 1.375rem; margin: 0 0 4px; font-weight: 800; letter-spacing: -0.01em; }
.status { display: inline-block; font-size: 0.9375rem; font-weight: 600; color: var(--teal); margin-bottom: 12px; }
.product p { margin: 0 0 12px; }
.product + .product { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--line); }

.history { display: grid; grid-template-columns: 7rem 1fr; gap: 12px 28px; }
.history dt { font-weight: 800; font-size: 1.25rem; }
.history dd { margin: 0 0 20px; color: var(--ink); }

.company { display: flex; align-items: center; gap: clamp(24px, 3vw, 48px); flex-wrap: wrap; }
.company .logo { flex: none; width: 80px; height: 80px; color: var(--ink); }
.company .facts { flex: 1; min-width: 260px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.facts > div { border-left: 3px solid var(--teal); padding-left: 16px; }
.facts .k { font-size: 0.9375rem; color: var(--muted); }
.facts .v { font-weight: 600; }

@media (min-width: 1000px) {
  section > .wrap { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
  section h2 { margin: 4px 0 0; }
  section { padding: 44px 0; }
}

footer.site { padding: 28px 0 40px; color: var(--muted); font-size: 0.9375rem; border-top: 1px solid var(--line); }

@media (max-width: 600px) {
  nav.site a { margin-left: 16px; }
  .theme-toggle { margin-left: 16px; }
  .product { grid-template-columns: 1fr; }
  .history { grid-template-columns: 1fr; }
  .history dt { margin-top: 8px; }
}
@media (max-width: 440px) {
  .brand-name { display: none; }
  nav.site { white-space: nowrap; }
}
@media (max-width: 360px) {
  nav.site a { margin-left: 12px; font-size: 0.9375rem; }
  .theme-toggle { margin-left: 12px; }
}

/* Inner pages: privacy, terms, 404 */
.page { padding-top: clamp(20px, 3vw, 40px); padding-bottom: clamp(40px, 5vw, 72px); }
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; text-align: left; max-width: none; }
.not-found .prose h1 { text-align: center; }
.prose .updated { color: var(--muted); margin: 0 0 40px; }
.prose h2 { font-size: 1.25rem; margin: 40px 0 8px; }
.prose p, .prose ul { margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.not-found { text-align: center; max-width: 560px; margin: 0 auto; }
.not-found .keys { margin-bottom: 32px; }

footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer.site nav a { color: var(--muted); margin-right: 20px; }
footer.site nav a:last-child { margin-right: 0; }
footer.site nav a:hover { color: var(--ink); }
