:root {
  --canvas: #f3f4ed;
  --surface-soft: #e8eee5;
  --ink: #0a0a0a;
  --body: #313a34;
  --muted: #566158;
  --hairline: #d5ddd4;
  --green-soft: #a9d8b0;
  --green: #62bd77;
  --display: "Unbounded", sans-serif;
  --body-font: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--body);
  background: var(--canvas);
  font-family: var(--body-font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
  font: inherit;
}

.page {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: clip;
}

.display-font {
  font-family: var(--display);
}

.site-header,
.site-footer {
  width: min(1280px, calc(100% - 64px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.brand-icon {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  object-fit: cover;
  transform: rotate(-7deg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(10, 10, 10, 0.1);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.42);
}

.language-switch button {
  min-width: 31px;
  height: 25px;
  padding: 0 7px;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  transition: color 180ms ease, background-color 180ms ease;
}

.language-switch button:hover {
  color: var(--ink);
}

.language-switch button.is-active {
  background: var(--ink);
  color: #fff;
}

.github-link,
.site-footer {
  color: var(--muted);
  font-size: 12px;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border: 1px solid rgba(10, 10, 10, 0.1);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 4px 14px rgba(10, 10, 10, 0.04);
  transition: color 180ms ease;
}

.github-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.github-link:hover,
.site-footer a:hover {
  color: var(--ink);
}

main {
  flex: 1;
  min-width: 0;
}

.hero {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 625px;
  margin: 0 auto;
  padding: 88px 32px 105px;
  overflow: visible;
  text-align: center;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 48%, rgba(169, 216, 176, 0.3) 0%, rgba(98, 189, 119, 0.13) 24%, transparent 48%);
  pointer-events: none;
  animation: rotate-gradient 26s linear infinite;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(10, 10, 10, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(10, 10, 10, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  opacity: 0.38;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 69%);
}

@keyframes rotate-gradient {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  margin: 0 auto;
}

.hero-logo {
  display: block;
  width: 104px;
  height: 104px;
  margin: 0 auto 32px;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 20px 36px rgba(10, 10, 10, 0.12);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.logo-note {
  margin-right: 8px;
  color: var(--green);
  font-family: Georgia, serif;
  font-size: 53px;
  line-height: 1;
}

.logo-wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 42px;
}

.logo-wave i {
  display: block;
  width: 5px;
  border-radius: 8px;
  background: var(--green-soft);
}

.logo-wave i:nth-child(1) { height: 16px; }
.logo-wave i:nth-child(2) { height: 30px; }
.logo-wave i:nth-child(3) { height: 40px; }
.logo-wave i:nth-child(4) { height: 25px; }
.logo-wave i:nth-child(5) { height: 34px; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(47px, 7.5vw, 82px);
  font-weight: 500;
  letter-spacing: -3px;
  line-height: 1.02;
}

h1 em {
  color: var(--ink);
  font-style: normal;
}

.hero-description {
  max-width: 510px;
  margin: 25px auto 36px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  justify-content: center;
}

.desktop-download-wrap {
  position: relative;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-width: 210px;
  height: 58px;
  padding: 0 29px;
  border: 0;
  border-radius: 9999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 24px rgba(10, 10, 10, 0.13);
}

.button-primary:hover {
  background: #262626;
  box-shadow: 0 16px 29px rgba(10, 10, 10, 0.18);
  transform: translateY(-2px);
}

.button-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: var(--green);
  font-size: 14px;
}

.download-trigger[aria-expanded="true"] .button-arrow {
  transform: rotate(180deg);
}

.download-menu {
  position: absolute;
  top: calc(100% + 13px);
  left: 50%;
  z-index: 10;
  width: 300px;
  padding: 11px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 24px 48px rgba(10, 10, 10, 0.15);
  text-align: left;
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
  animation: menu-in 160ms ease both;
}

.download-menu::before {
  position: absolute;
  top: -6px;
  left: calc(50% - 6px);
  width: 11px;
  height: 11px;
  border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
  background: #fff;
  content: "";
  transform: rotate(45deg);
}

@keyframes menu-in {
  from { opacity: 0; transform: translate(-50%, -5px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.menu-title {
  margin: 4px 10px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.download-option {
  display: grid;
  grid-template-columns: 1fr auto 16px;
  align-items: center;
  gap: 12px;
  min-height: 45px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  transition: background-color 160ms ease;
}

.download-option:hover,
.download-option:focus-visible {
  outline: none;
  background: var(--surface-soft);
}

.download-option span small,
.download-option > small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.download-option span small {
  display: block;
  margin-top: 2px;
}

.download-option b {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.release-note {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.release-note > span {
  margin-right: 5px;
  color: var(--muted);
  font-size: inherit;
}

.release-note strong {
  color: var(--ink);
  font-weight: 500;
}

.support-callout {
  position: absolute;
  right: clamp(24px, 7vw, 108px);
  bottom: 32px;
  display: flex;
  align-items: flex-end;
  max-width: 285px;
  color: var(--ink);
  transition: transform 180ms ease;
}

.support-callout:hover {
  transform: translateY(-4px) rotate(-1deg);
}

.support-bubble {
  position: relative;
  display: block;
  width: 225px;
  padding: 16px 18px;
  border: 2px solid var(--ink);
  border-radius: 18px 18px 4px 18px;
  background: var(--canvas);
  box-shadow: 7px 7px 0 var(--green-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}

.support-bubble::after {
  position: absolute;
  right: -2px;
  bottom: -14px;
  width: 19px;
  height: 19px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: var(--canvas);
  content: "";
  transform: skewY(31deg) rotate(29deg);
}

.support-avatar {
  position: relative;
  z-index: 1;
  display: block;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  margin: 0 -10px -13px -14px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--green-soft);
  box-shadow: 4px 5px 0 rgba(10, 10, 10, 0.1);
  transform: rotate(5deg);
}

.support-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ticker {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-soft);
}

.ticker-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(900px, calc(100% - 64px));
  margin: 0 auto;
}

.ticker-item {
  min-height: 86px;
  padding: 20px 28px;
  border-right: 1px solid var(--hairline);
  text-align: center;
}

.ticker-item:last-child {
  border-right: 0;
}

.ticker-item strong,
.ticker-item small {
  display: block;
}

.ticker-item strong {
  margin-bottom: 5px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
}

.ticker-item small {
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  font-size: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-icon {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  object-fit: cover;
}

.footer-brand > span:nth-child(2) {
  color: var(--ink);
  font-size: 12px;
}

.footer-downloads {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.footer-dot {
  color: var(--green);
  font-size: 8px;
}

.footer-downloads .download-count {
  color: var(--ink);
  font-weight: 600;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  transition: color 180ms ease;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: 330px;
  padding: 13px 16px;
  border: 1px solid #343434;
  border-radius: 10px;
  background: #161616;
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.is-mobile .download-menu {
  display: none !important;
}

@media (max-width: 700px) {
  .site-header,
  .site-footer {
    width: calc(100% - 24px);
  }

  .site-header {
    min-height: 66px;
    gap: 8px;
  }

  .brand {
    min-width: 0;
    gap: 7px;
    font-size: 14px;
    white-space: nowrap;
  }

  .brand-icon {
    width: 27px;
    height: 27px;
    border-radius: 8px;
  }

  .header-actions {
    min-width: 0;
    gap: 7px;
  }

  .language-switch {
    padding: 2px;
  }

  .language-switch button {
    min-width: 28px;
    height: 24px;
    padding: 0 5px;
    font-size: 9px;
  }

  .github-link {
    gap: 5px;
    padding: 8px 10px;
    font-size: 10px;
  }

  .hero {
    min-height: 0;
    padding: 52px 20px 58px;
  }

  .hero-logo {
    width: 78px;
    height: 78px;
    margin-bottom: 22px;
    border-radius: 22px;
  }

  .logo-note {
    font-size: 44px;
  }

  .logo-wave {
    height: 34px;
    gap: 3px;
  }

  .logo-wave i {
    width: 4px;
  }

  .logo-wave i:nth-child(1) { height: 13px; }
  .logo-wave i:nth-child(2) { height: 25px; }
  .logo-wave i:nth-child(3) { height: 32px; }
  .logo-wave i:nth-child(4) { height: 21px; }
  .logo-wave i:nth-child(5) { height: 27px; }

  .eyebrow {
    font-size: 10px;
  }

  h1 {
    font-size: clamp(42px, 12vw, 65px);
    letter-spacing: -2px;
  }

  .hero-description {
    max-width: 320px;
    margin-top: 22px;
    margin-bottom: 28px;
    font-size: 14px;
  }

  .support-callout {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 285px);
    max-width: 100%;
    justify-content: center;
    margin: 28px auto 0;
  }

  .support-bubble {
    width: min(240px, calc(100vw - 96px));
    padding: 14px 16px;
  }

  .button {
    width: 215px;
  }

  .ticker-inner {
    grid-template-columns: 1fr;
    width: calc(100% - 36px);
  }

  .ticker-item {
    min-height: 67px;
    padding: 15px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }

  .ticker-item:last-child {
    border-bottom: 0;
  }

  .site-footer {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    min-height: 62px;
    font-size: 9px;
  }

  .site-footer > span:nth-child(2) {
    display: none;
  }

  .footer-brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 6px;
  }

  .footer-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
  }

  .footer-brand > span:nth-child(2) {
    min-width: 0;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .footer-downloads {
    min-width: 0;
    gap: 4px;
    font-size: 9px;
    white-space: nowrap;
  }

  .footer-links {
    flex: 0 0 auto;
    gap: 8px;
  }

  .download-menu {
    width: min(300px, calc(100vw - 42px));
  }
}

@media (max-width: 380px) {
  .github-link {
    gap: 4px;
    padding: 7px 8px;
    font-size: 9px;
  }

  .footer-downloads [data-i18n="downloads"] {
    display: none;
  }
}

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

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
