:root {
  color-scheme: light;

  /* Neutral palette */
  --ink: #1d1d1f;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --muted-strong: #48484a;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.88);
  --surface-hover: rgba(255, 255, 255, 0.95);
  --line: rgba(0, 0, 0, 0.06);
  --line-strong: rgba(0, 0, 0, 0.1);

  /* Accent */
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-light: rgba(0, 113, 227, 0.08);
  --violet: #5856d6;
  --violet-light: #af52de;
  --gradient-accent: linear-gradient(135deg, #007aff 0%, #5856d6 50%, #af52de 100%);
  --gradient-btn: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
  --gradient-btn-hover: linear-gradient(135deg, #0066d6 0%, #4a48c4 100%);

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px -10px rgba(0, 0, 0, 0.1), 0 2px 10px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 60px -15px rgba(0, 0, 0, 0.12), 0 8px 20px -6px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 40px rgba(0, 113, 227, 0.15);

  font-family: "SF Pro Display", "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

html {
  width: 100%;
  min-width: 320px;
  background: #fbfbfd;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: #fbfbfd;
  position: relative;
}

/* Ambient background blobs — Apple-style */
body::before {
  content: "";
  position: fixed;
  top: -20%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 800px;
  max-height: 800px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 122, 255, 0.07) 0%,
    rgba(88, 86, 214, 0.04) 40%,
    transparent 70%
  );
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
  animation: floatBlob 25s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  bottom: -15%;
  right: -10%;
  width: 55vw;
  height: 55vw;
  max-width: 700px;
  max-height: 700px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(175, 82, 222, 0.06) 0%,
    rgba(0, 199, 190, 0.03) 40%,
    transparent 70%
  );
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
  animation: floatBlob 30s ease-in-out infinite reverse;
}

@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.97); }
}

/* ─── Fade-in on load ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

button,
input {
  font: inherit;
}

/* ─── Layout ─── */

.landing {
  width: 100%;
  min-height: 100vh;
  padding: 40px 24px 80px;
  display: flex;
  justify-content: center;
}

.shell {
  width: min(980px, 100%);
  margin: 0 auto;
  text-align: center;
}

/* ─── Logo ─── */

.logo {
  width: min(160px, 35vw);
  height: auto;
  display: block;
  margin: 0 auto 32px;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.6s ease-out both;
}

/* ─── Hero ─── */

.hero {
  max-width: 760px;
  margin: 0 auto;
  animation: fadeInUp 0.7s ease-out 0.1s both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  margin: 0 auto 20px;
  padding: 6px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted-strong);
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

h1, h2, h3, p {
  letter-spacing: -0.01em;
}

h1 {
  max-width: 700px;
  margin: 0 auto;
  color: var(--ink);
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.description {
  max-width: 620px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: 0;
}

/* ─── Trial Form (CTA) ─── */

.trial-form {
  width: min(520px, 100%);
  margin: 36px auto 0;
  padding: 6px 6px 6px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  background: var(--surface-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-lg);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.trial-form:hover {
  box-shadow: var(--shadow-xl);
  border-color: rgba(0, 113, 227, 0.15);
}

.trial-form span {
  min-width: 0;
  padding: 4px 0;
  color: var(--muted);
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Buttons ─── */

.primary,
.secondary {
  min-height: 48px;
  border-radius: 12px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0;
  transition: all 0.2s ease;
  user-select: none;
}

.primary {
  padding: 0 28px;
  color: #ffffff;
  background: var(--gradient-btn);
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.25), var(--shadow-sm);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--gradient-btn-hover);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.primary:hover::after {
  opacity: 1;
}

.primary span,
.primary {
  position: relative;
  z-index: 1;
}

.primary:active {
  transform: scale(0.97);
}

.primary:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.primary:disabled::after {
  display: none;
}

.secondary {
  padding: 0 22px;
  color: var(--muted-strong);
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  white-space: nowrap;
  min-height: 44px;
}

.secondary:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.secondary:active {
  transform: scale(0.97);
}

/* ─── Status ─── */

.status {
  min-height: 24px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.status--error {
  color: #ff3b30;
}

/* ─── Trust Row ─── */

.trust-row {
  max-width: 640px;
  margin: 28px auto 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  color: var(--muted);
  list-style: none;
  font-size: 14px;
  font-weight: 500;
}

.trust-row li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-row li::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
  background: var(--gradient-accent);
  flex-shrink: 0;
}

/* ─── Link Panel ─── */

.link-panel {
  width: min(600px, 100%);
  margin: 36px auto 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  text-align: left;
  animation: fadeInUp 0.5s ease-out both;
}

.link-panel[hidden] {
  display: none;
}

.link-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.link-panel__head strong {
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.link-panel__note {
  margin: 14px 0 18px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
  font-weight: 400;
}

.link-panel input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  text-overflow: ellipsis;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.link-panel input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.link-panel__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 14px;
}

/* ─── Apps Section ─── */

.apps {
  margin-top: 72px;
  padding-bottom: 16px;
  animation: fadeInUp 0.7s ease-out 0.3s both;
}

.section-title {
  max-width: 600px;
  margin: 0 auto;
}

.section-title h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.section-title p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 16px;
  font-weight: 400;
}

/* ─── Device Card ─── */

.device-card {
  width: min(600px, 100%);
  margin: 32px auto 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  text-align: left;
  transition: box-shadow 0.3s ease;
}

.device-card:hover {
  box-shadow: var(--shadow-xl);
}

.device-card__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.device-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.device-card p:not(.device-card__label) {
  margin: 10px 0 20px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
  font-weight: 400;
}

.device-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.device-card__actions a {
  min-height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--gradient-btn);
  text-decoration: none;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.device-card__actions a:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: #ffffff;
}

.device-card__actions a:active {
  transform: scale(0.97);
}

.device-card__actions a:nth-child(2) {
  color: var(--muted-strong);
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.device-card__actions a:nth-child(2):hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-hover);
}

.device-card__bot {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 12px 18px;
  border-radius: 12px;
  color: #ffffff !important;
  background: linear-gradient(135deg, #5856d6 0%, #af52de 100%);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(88, 86, 214, 0.2);
  min-height: 46px;
}

.device-card__bot:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(88, 86, 214, 0.3);
  color: #ffffff !important;
}

/* ─── App Grid ─── */

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.app-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: left;
  transition: all 0.3s ease;
}

.app-card:hover {
  box-shadow: var(--shadow-xl);
  border-color: rgba(0, 113, 227, 0.12);
  transform: translateY(-2px);
}

.app-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.app-card p {
  margin: 8px 0 20px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
  font-weight: 400;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.download-row a {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--muted-strong);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.download-row a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* ─── Responsive: Tablet ─── */

@media (max-width: 760px) {
  .landing {
    padding: 24px 16px 56px;
  }

  .logo {
    width: min(120px, 30vw);
    border-radius: 22px;
    margin-bottom: 24px;
  }

  .eyebrow {
    min-height: 30px;
    margin-bottom: 16px;
    padding: 5px 14px;
    font-size: 12px;
  }

  .description {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.6;
  }

  .trial-form {
    margin-top: 28px;
    border-radius: 14px;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px;
  }

  .trial-form span {
    padding: 8px 8px 4px;
    text-align: center;
    white-space: normal;
  }

  .primary,
  .secondary {
    width: 100%;
    white-space: normal;
    text-align: center;
    border-radius: 10px;
  }

  .trust-row {
    gap: 6px 16px;
    font-size: 13px;
  }

  .device-card__actions,
  .app-grid {
    grid-template-columns: 1fr;
  }

  .apps {
    margin-top: 56px;
  }

  .link-panel,
  .device-card {
    border-radius: 16px;
    padding: 20px;
  }

  .app-card {
    border-radius: 16px;
    padding: 22px;
  }
}

/* ─── Responsive: Phone ─── */

@media (max-width: 420px) {
  .landing {
    padding-left: 12px;
    padding-right: 12px;
  }

  .logo {
    width: min(100px, 28vw);
    border-radius: 20px;
  }

  .description {
    font-size: 14px;
  }

  .link-panel,
  .app-card {
    padding: 16px;
  }

  .link-panel__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .device-card {
    padding: 18px;
  }
}