/* IPAHub download page, following the mock in docs/design/site.
   Native CSS, no external fonts or runtime. Buttons are pills, cards 24px. */
/* Dark only: two soft greys on #141414, no pure white. Colours pass APCA (Bronze):
   body text Lc 75, secondary labels and the subtitle Lc 60, headings Lc 45. */
:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --bg: #141414;
  --glow: #202022;
  --glow-2: #181819;
  --text: #cfd0d2;
  --body: #cfd0d2;
  --muted: #b5b6b9;
  --soft: #5c5d60;
  --line: #ffffff14;
  --card: #1a1a1bcc;
  --card-solid: #1e1e1f;
  --inner: #101010;
  --button: #cbccce;
  --on-button: #141414;
  --accent: #c4d0ff;
  color: var(--text);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
html,
body {
  overflow-x: clip;
}
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 70% 55% at 22% 18%, var(--glow), transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 60%, var(--glow-2), transparent 70%), var(--bg);
  background-attachment: fixed;
  line-height: 1.5;
}
a {
  color: inherit;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1240px;
  min-height: 88px;
  margin: 0 auto;
  padding: 0 40px;
}
.brand {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 52px;
  font-size: 16px;
}
.header-actions a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.88;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
}
.preview {
  width: fit-content;
  margin: 0 auto 12px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #ffd76a;
  color: #3b2a00;
  font-size: 13px;
  font-weight: 600;
}

/* Hero: headline and download on the left, the app tiles on the right */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  min-height: min(760px, calc(100dvh - 88px));
  padding: clamp(24px, 5vh, 56px) 0 clamp(40px, 7vh, 80px);
}
.hero-copy {
  display: grid;
  justify-items: start;
  min-width: 0;
}
h1 {
  max-width: 19ch;
  margin: 0;
  font-size: clamp(34px, 4.3vw, 60px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.02em;
}
.lead {
  max-width: 24ch;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(19px, 1.9vw, 25px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: normal;
}
.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 290px;
  min-height: 76px;
  margin-top: 46px;
  padding: 0 40px;
  border-radius: 999px;
  background: var(--button);
  color: var(--on-button);
  font-size: 23px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.download svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}
.download:active {
  transform: scale(0.98);
}
.download.disabled {
  opacity: 0.55;
}
.pending {
  margin: 46px 0 0;
  color: var(--muted);
}
.hero-art {
  display: block;
  justify-self: end;
  width: min(100%, 520px);
  height: auto;
}

/* Release notes and installation */
.release,
.installation {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
}
/* Both cards share one width and one two-column grid. */
.release,
.installation {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  gap: 40px;
  margin-top: 24px;
  padding: 40px;
}
.release .notes {
  margin-top: 0;
  padding: 22px 24px;
  border-radius: 14px;
  background: var(--card-solid);
}
.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}
.release-label {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--inner);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}
h2 {
  margin: 14px 0 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.release-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.notes {
  margin-top: 18px;
  color: var(--body);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.installation-intro p,
.installation li p {
  color: var(--body);
}
.installation ol {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.installation li {
  position: relative;
  padding: 20px 22px 20px 66px;
  border-radius: 14px;
  background: var(--card-solid);
  counter-increment: step;
}
.installation li::before {
  position: absolute;
  top: 18px;
  left: 20px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--button);
  color: var(--on-button);
  content: counter(step);
  font-size: 14px;
  font-weight: 700;
}
.installation li p {
  margin: 6px 0 0;
}
.installation h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}
.command {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 10px 10px 14px;
  border-radius: 14px;
  background: var(--inner);
}
.command code {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font:
    13px/1.45 ui-monospace,
    'SF Mono',
    Menlo,
    monospace;
}
.command button {
  flex: none;
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--button);
  color: var(--on-button);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.hint {
  font-size: 13px;
}
#copy-status {
  display: block;
  min-height: 1.2em;
  margin-top: 6px;
  color: var(--accent);
  font-size: 13px;
}
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 40px 52px;
  color: var(--muted);
  font-size: 13px;
}
footer span:first-child {
  color: var(--text);
  font-weight: 700;
}

/* Accessibility */
.skip {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 2;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--button);
  color: var(--on-button);
}
.skip:focus {
  top: 16px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
@media (hover: hover) {
  .header-actions a:hover {
    opacity: 1;
  }
  .download:hover {
    transform: translateY(-2px);
  }
  .command button:hover {
    opacity: 0.85;
  }
}
/* One entrance for the first screen; nothing moves after that. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .hero-art {
    animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .hero-art {
    animation-delay: 0.12s;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .download {
    transition: none;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
  .hero-art {
    justify-self: center;
    width: min(80%, 420px);
  }
  .release,
  .installation {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 28px 22px;
  }
}
@media (max-width: 640px) {
  .site-header,
  main,
  footer {
    padding-inline: 18px;
  }
  .site-header {
    min-height: 72px;
  }
  .brand {
    font-size: 24px;
  }
  .header-actions {
    gap: 20px;
    font-size: 15px;
  }
  .download {
    min-width: 0;
    width: 100%;
    min-height: 64px;
    font-size: 20px;
  }
  .installation li {
    padding: 18px 16px 18px 58px;
  }
  .installation li::before {
    left: 14px;
  }
  .command {
    flex-direction: column;
    align-items: stretch;
  }
}
@media (forced-colors: active) {
  .download,
  .command button {
    border: 1px solid ButtonText;
  }
}
