@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Source+Sans+3:wght@400;600&display=swap');

:root {
  --bg: #f4efe5;
  --panel: #fffaf0;
  --text: #18211d;
  --muted: #5d6a63;
  --line: #d8ceb8;
  --primary: #1f7a58;
  --primary-strong: #165b41;
  --secondary: #1f4f8f;
  --shadow: 0 18px 48px rgba(18, 32, 26, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 18%, rgba(31, 122, 88, 0.16), transparent 46%),
    radial-gradient(circle at 88% 12%, rgba(31, 79, 143, 0.12), transparent 44%),
    linear-gradient(135deg, #f4efe5 0%, #efe9dd 42%, #e8e0d1 100%);
}

body.dialog-open {
  overflow: hidden;
}

.background-orb {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  z-index: 0;
  filter: blur(2px);
  opacity: 0.4;
}

.orb-left {
  top: -100px;
  left: -90px;
  background: linear-gradient(135deg, #56b28a, #24795a);
}

.orb-right {
  right: -120px;
  bottom: -120px;
  background: linear-gradient(135deg, #6fa6f4, #356fb8);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100% - 32px));
  margin: 24px auto 48px;
  display: grid;
  gap: 18px;
}

.hero-card,
.downloads-card,
.install-card,
.notes-card {
  background: color-mix(in srgb, var(--panel) 94%, white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 30px 30px 26px;
}

.brand-logo {
  width: min(280px, 72vw);
  display: block;
}

.hero-kicker {
  margin: 14px 0 6px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
}

h1 {
  margin: 0;
  font-family: 'Space Grotesk', 'Source Sans 3', sans-serif;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.05;
}

.hero-lead {
  margin: 14px 0 0;
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(17px, 2.2vw, 20px);
}

.hero-meta {
  margin: 10px 0 0;
  color: #355f51;
  font-weight: 600;
  font-size: 14px;
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.downloads-card {
  padding: 24px 24px 22px;
}

.install-card {
  padding: 24px 24px 22px;
}

h2 {
  margin: 0;
  font-family: 'Space Grotesk', 'Source Sans 3', sans-serif;
  font-size: clamp(23px, 3vw, 30px);
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.section-subtitle code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f0ebdf;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid #d6ccb6;
}

.download-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.download-item {
  border-radius: 14px;
  border: 1px solid #d8ccb5;
  background: linear-gradient(165deg, #fffdf6 0%, #f6f0e2 100%);
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.download-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(25, 42, 33, 0.12);
}

.download-item.recommended {
  border-color: #1f7a58;
  box-shadow: 0 0 0 2px rgba(31, 122, 88, 0.18);
}

.download-title {
  font-family: 'Space Grotesk', 'Source Sans 3', sans-serif;
  font-size: 20px;
}

.download-item p {
  margin: 0;
  color: var(--muted);
  min-height: 46px;
}

.download-meta {
  margin-top: 2px;
  color: #4b5851;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}

.install-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.install-item {
  border-radius: 14px;
  border: 1px solid #d8ccb5;
  background: linear-gradient(165deg, #fffdf6 0%, #f6f0e2 100%);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.install-title {
  font-family: 'Space Grotesk', 'Source Sans 3', sans-serif;
  font-size: 18px;
}

.install-item ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 7px;
  color: var(--muted);
}

.install-item li {
  overflow-wrap: anywhere;
}

.install-item code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f0ebdf;
  padding: 1px 5px;
  border-radius: 6px;
  border: 1px solid #d6ccb6;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.install-dialog {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.install-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, 0.45);
}

.install-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  margin: 14px auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fffdf7;
  box-shadow: 0 24px 56px rgba(18, 32, 26, 0.25);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.install-dialog__header {
  padding: 16px 18px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.install-dialog__header h4 {
  margin: 0;
  font-family: 'Space Grotesk', 'Source Sans 3', sans-serif;
  font-size: 22px;
}

.install-dialog__close {
  border: 0;
  background: transparent;
  color: #4d5b53;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.install-dialog__content {
  margin: 0 18px;
  border-radius: 12px;
  border: 1px solid #d6ccb6;
  background: #f6f2e8;
  padding: 14px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
}

.install-dialog__actions {
  padding: 12px 18px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  transition: transform 120ms ease, filter 120ms ease, background-color 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.btn-primary {
  background: var(--primary);
  color: #f7fff9;
}

.btn-primary:hover {
  background: var(--primary-strong);
}

.btn-secondary {
  background: var(--secondary);
  color: #f3f8ff;
}

.btn-ghost {
  border-color: #3e6b5a;
  color: #245444;
  background: #edf5f1;
}

.btn.is-disabled {
  background: #d9d9d9;
  border-color: #c8c8c8;
  color: #5e5e5e;
  pointer-events: none;
}

.notes-card {
  padding: 18px 20px;
}

h3 {
  margin: 0 0 8px;
  font-family: 'Space Grotesk', 'Source Sans 3', sans-serif;
  font-size: 22px;
}

.notes-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

@media (max-width: 940px) {
  .download-grid {
    grid-template-columns: 1fr;
  }

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