/* latin-ext */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/instrument-sans-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/instrument-sans-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 {
  --bg: #f8f4ec;
  --surface: #fdfbf6;
  --ink: #232019;
  --ink-soft: #6e6759;
  --ink-faint: #8a8375;
  --rule: #e6dfd0;
  --accent: #8a6d3b;
  --accent-strong: #6b5223;
}

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

/* A stable gutter keeps the centred column from shifting when expanding the
   apps section makes the page tall enough to need a scrollbar. */
html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Instrument Sans', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); text-decoration: underline; }

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

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* Content is anchored to the top on purpose: vertically centring it would slide
   the whole page upward when the apps section expands. */
main { flex: 1; }

/* Home hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(72px, 14vh, 140px) 24px clamp(56px, 9vh, 96px);
}

.hero .eyebrow { margin-bottom: 28px; }

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  max-width: 14ch;
  text-wrap: balance;
}

.hero p {
  margin: 0;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 42ch;
  text-wrap: pretty;
}

/* Apps */

.apps {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px clamp(72px, 12vh, 120px);
}

/* Left aligned to sit over the app row, now that the row has no card to centre it in. */
.apps > .eyebrow {
  display: block;
  margin-bottom: 14px;
}

/* No card: the row hugs its own content, so expanding cannot move the icon. */
.app summary {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  margin-left: -14px;
  border-radius: 16px;
  cursor: pointer;
  list-style: none;
  transition: background 140ms ease;
}

.app summary::-webkit-details-marker { display: none; }
.app summary:hover { background: #f1eade; }

.app-icon {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 15px;
  box-shadow: 0 1px 3px rgba(35, 32, 25, 0.18);
}

.app-title {
  min-width: 0;
  text-align: left;
}

.app-name {
  display: block;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.app-tagline {
  display: block;
  font-size: 15px;
  color: var(--ink-faint);
}

.chevron {
  flex: none;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  color: var(--ink-faint);
  transition: transform 200ms ease;
}

.app[open] .chevron { transform: rotate(90deg); }

.app-detail {
  padding: 8px 0 4px;
  max-width: 58ch;
}

.app-detail p {
  margin: 20px 0 0;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.app-detail ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.app-detail li {
  position: relative;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 16px;
}

.app-detail li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

.app-links {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: baseline;
  font-size: 15px;
}

.app-status { color: var(--ink-faint); font-size: 15px; }

/* Expand animation where the browser supports it, an instant open where it does not. */
@supports selector(::details-content) {
  .app::details-content {
    block-size: 0;
    overflow: hidden;
    opacity: 0;
    transition: block-size 260ms ease, content-visibility 260ms allow-discrete, opacity 200ms ease;
    transition-behavior: allow-discrete;
  }
  .app[open]::details-content {
    block-size: auto;
    opacity: 1;
  }
}

@media (max-width: 520px) {
  .app summary { gap: 14px; }
  .app-icon { width: 56px; height: 56px; border-radius: 13px; }
  .app-links { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Document pages */

.doc {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 88px) 24px clamp(64px, 10vh, 104px);
}

.doc .eyebrow { display: block; margin-bottom: 18px; }

.doc h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.doc .updated {
  color: var(--ink-faint);
  font-size: 15px;
  margin-bottom: 36px;
}

.doc h2 {
  margin: 38px 0 10px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.doc p { margin: 0 0 14px; color: var(--ink-soft); text-wrap: pretty; }
.doc p:last-child { margin-bottom: 0; }

.doc ul { margin: 0 0 14px; padding-left: 22px; color: var(--ink-soft); }
.doc li { margin-bottom: 8px; }

.doc .lede { font-size: 19px; color: var(--ink); }

.back {
  display: inline-block;
  margin-top: 44px;
  font-size: 15px;
}

/* Footer */

footer {
  padding: 24px 40px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: center;
}

footer div { font-size: 12px; color: var(--ink-faint); }
