:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #08080d;
  color: #f6f3fb;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  min-width: 320px;
  background-color: #0d0b0c;
  background-image:
    linear-gradient(180deg, rgba(7, 6, 8, 0.08) 0%, rgba(7, 5, 7, 0.16) 42%, rgba(7, 5, 7, 0.8) 100%),
    linear-gradient(90deg, rgba(5, 5, 7, 0.28) 0%, rgba(5, 5, 7, 0.04) 50%, rgba(5, 5, 7, 0.34) 100%),
    url("assets/dmg-background.png");
  background-position: center, center, center 18%;
  background-repeat: no-repeat;
  background-size: cover, cover, cover;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  opacity: 0.14;
  background: radial-gradient(circle at 36% 34%, rgba(255, 255, 255, 0.08), transparent 0.7px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
}

button, a, input { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.landing-page {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 32px;
}

.privacy-link {
  position: absolute;
  right: 32px;
  bottom: 24px;
  color: rgba(255, 246, 237, 0.82);
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-underline-offset: 4px;
}

.privacy-link:hover { text-decoration: underline; }

.privacy-link:focus-visible {
  outline: 3px solid rgba(206, 183, 255, 0.82);
  outline-offset: 4px;
}

.welcome-card {
  display: flex;
  width: min(100%, 690px);
  flex-direction: column;
  align-items: center;
  gap: 42px;
  border: 1px solid rgba(242, 198, 152, 0.18);
  border-radius: 28px;
  padding: 42px;
  background: linear-gradient(145deg, rgba(21, 15, 14, 0.73), rgba(10, 9, 10, 0.5));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 226, 192, 0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transform: translateY(-3vh);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 19px;
}

.brand-mark-frame {
  display: grid;
  width: 82px;
  height: 82px;
  flex: 0 0 82px;
  place-items: center;
  border: 1px solid rgba(255, 199, 138, 0.28);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(31, 27, 25, 0.94), rgba(7, 8, 9, 0.84));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 230, 202, 0.12);
}

.brand-mark {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.52));
}

h1, h2, p { margin: 0; }

h1 {
  color: #fbf9ff;
  font-size: clamp(2.65rem, 7vw, 4.55rem);
  font-weight: 520;
  letter-spacing: -0.065em;
  line-height: 0.98;
  text-shadow: 0 3px 28px rgba(0, 0, 0, 0.24);
}

.download-actions {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.download-note {
  max-width: 52rem;
  color: rgba(236, 226, 250, 0.68);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

.download-note a {
  color: #f8ddbf;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 17px;
  cursor: pointer;
  font-size: 0.89rem;
  font-weight: 680;
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button:hover { transform: translateY(-2px); }
.button:disabled { cursor: wait; opacity: 0.68; transform: none; }

.button:focus-visible, .dialog-close:focus-visible, input:focus-visible {
  outline: 3px solid rgba(206, 183, 255, 0.82);
  outline-offset: 3px;
}

.button-primary {
  color: #2d180d;
  background: linear-gradient(180deg, #f8ddbf 0%, #c48151 100%);
  box-shadow: 0 13px 28px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.button-primary:hover {
  background: linear-gradient(180deg, #ffe8d0 0%, #d8935e 100%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.31), 0 0 24px rgba(210, 184, 255, 0.13);
}

.button-secondary {
  color: rgba(255, 246, 237, 0.93);
  border-color: rgba(242, 198, 152, 0.22);
  background: rgba(19, 15, 14, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 25px rgba(0, 0, 0, 0.12);
}

.button-secondary:hover {
  border-color: rgba(255, 213, 170, 0.46);
  background: rgba(39, 25, 19, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 16px 31px rgba(0, 0, 0, 0.2);
}

.button-icon {
  position: relative;
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
}

.mac-icon {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
}

.windows-icon {
  display: block;
  width: 18px;
  height: 18px;
}

.windows-icon::before {
  display: block;
  width: 8px;
  height: 8px;
  background: currentColor;
  box-shadow: 10px 0 currentColor, 0 10px currentColor, 10px 10px currentColor;
  content: "";
}

.windows-icon-large {
  width: 28px;
  height: 28px;
  color: #f0c18f;
}

.windows-icon-large::before {
  width: 12px;
  height: 12px;
  box-shadow: 16px 0 currentColor, 0 16px currentColor, 16px 16px currentColor;
}

.phone-icon {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 21px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  background: linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
}

.phone-icon::before {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 6px;
  height: 1px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transform: translateX(-50%);
}

.phone-icon::after {
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  transform: translateX(-50%);
}

.dialog-backdrop[hidden] { display: none; }

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(4, 3, 9, 0.68);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.dialog {
  position: relative;
  width: min(100%, 420px);
  border: 1px solid rgba(242, 198, 152, 0.22);
  border-radius: 22px;
  padding: 36px;
  background: linear-gradient(160deg, rgba(49, 29, 20, 0.98), rgba(17, 13, 12, 0.99));
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: rgba(247, 241, 255, 0.74);
  background: rgba(255, 255, 255, 0.09);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.dialog-icon { margin-bottom: 22px; color: #f0c18f; }
.phone-icon-large { width: 20px; height: 28px; border-width: 2px; border-radius: 5px; }
.phone-icon-large::before { top: 4px; width: 8px; height: 1.5px; }
.phone-icon-large::after { bottom: 3px; width: 3px; height: 3px; }

.dialog h2 {
  margin-bottom: 10px;
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.dialog p { color: rgba(237, 229, 248, 0.7); line-height: 1.55; }

.install-steps {
  display: grid;
  gap: 10px;
  margin: 20px 0 14px;
  padding-left: 22px;
  color: rgba(237, 229, 248, 0.82);
  line-height: 1.5;
}

.install-steps code,
.install-command {
  color: #ffe0bd;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.install-command {
  margin: 0 0 18px;
  overflow-x: auto;
  border: 1px solid rgba(242, 198, 152, 0.2);
  border-radius: 10px;
  padding: 13px 14px;
  background: rgba(0, 0, 0, 0.24);
  font-size: 0.86rem;
}

.install-help {
  font-size: 0.82rem;
}

form { margin-top: 24px; }

label {
  display: block;
  margin-bottom: 8px;
  color: rgba(246, 240, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 650;
}

input {
  width: 100%;
  border: 1px solid rgba(227, 212, 250, 0.2);
  border-radius: 10px;
  padding: 13px 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.24);
}

input::placeholder { color: rgba(236, 226, 250, 0.38); }

.form-submit { width: 100%; margin-top: 14px; }
.form-error { margin-top: 8px; color: #ffc5ce !important; font-size: 0.78rem; }
.form-success { margin-top: 24px; color: #eee2ff !important; }

.dialog-open { overflow: hidden; }

@media (max-width: 700px) {
  .landing-page { padding: 24px 18px; }
  .privacy-link { right: 18px; bottom: 16px; }
  .welcome-card { gap: 34px; padding: 30px 20px; transform: translateY(-2vh); }
  .brand-lockup { gap: 13px; }
  .brand-mark-frame { width: 66px; height: 66px; flex-basis: 66px; border-radius: 19px; }
  .brand-mark { width: 55px; height: 55px; }
  h1 { font-size: clamp(2.35rem, 11vw, 3.5rem); }
  .download-actions { grid-template-columns: 1fr; width: min(100%, 330px); }
  .button { min-height: 50px; }
  .dialog { padding: 32px 24px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
