:root {
  --cream: #f4f0e6;
  --paper: #fbf9f4;
  --ink: #17382e;
  --orange: #e3652a;
  --orange-dark: #c84f18;
  --green-soft: #e1ebe4;
  --red: #a93628;
  --red-soft: #f4dfda;
  --line: rgba(23, 56, 46, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--cream);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(
      circle at 85% 5%,
      rgba(227, 101, 42, 0.08),
      transparent 28rem
    ),
    var(--cream);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

.site-shell {
  width: min(100%, 1480px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 4.5rem);
}

.site-header {
  display: flex;
  min-height: 6.5rem;
  align-items: center;
  gap: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  color: var(--orange);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 850;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.divider {
  width: 1px;
  height: 1.4rem;
  background: var(--line);
}

.partner {
  font-size: 0.9rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(3rem, 7vh, 6.25rem) 0;
}

.intro {
  max-width: 56rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--orange);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.7rem, 6.5vw, 6.5rem);
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 0.93;
}

.lede {
  max-width: 42rem;
  margin: 1.35rem 0 0;
  color: rgba(23, 56, 46, 0.78);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.55;
}

.video-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: clamp(0.8rem, 2vw, 1.5rem);
  background: #10231d;
  box-shadow:
    0 2px 3px rgba(15, 45, 35, 0.08),
    0 28px 70px rgba(15, 45, 35, 0.18);
}

.video-frame::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  background: #10231d;
  object-fit: contain;
}

.getting-started {
  padding: clamp(3rem, 8vw, 7rem) 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  max-width: 42rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 680;
  letter-spacing: -0.045em;
  line-height: 1;
}

.steps {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 1rem;
  list-style: none;
}

.step-card {
  display: grid;
  min-width: 0;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgba(251, 249, 244, 0.72);
}

.step-number {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-weight: 850;
}

.step-content {
  min-width: 0;
}

h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  letter-spacing: -0.025em;
}

.step-description {
  margin: 0.5rem 0 1.25rem;
  color: rgba(23, 56, 46, 0.72);
  line-height: 1.5;
}

.login-note {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 0.8rem;
  background: var(--green-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.login-note svg {
  width: 1.25rem;
  min-width: 1.25rem;
  fill: currentColor;
}

.login-note p {
  margin: 0;
}

.login-form {
  display: grid;
  gap: 0.5rem;
}

.login-form label {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 750;
}

.login-form input {
  width: 100%;
  min-height: 3rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(23, 56, 46, 0.3);
  border-radius: 0.65rem;
  background: white;
  color: var(--ink);
  font: inherit;
}

.login-form input:focus {
  border-color: var(--orange);
  outline: 3px solid rgba(227, 101, 42, 0.2);
}

.login-form button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding: 0.75rem 1.15rem;
  border: 0;
  border-radius: 0.65rem;
  background: var(--orange);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.login-form button:hover:not(:disabled) {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.login-form button:focus-visible,
.store-badge:focus-visible {
  outline: 3px solid rgba(227, 101, 42, 0.5);
  outline-offset: 3px;
}

.login-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.is-loading .button-spinner {
  display: block;
}

.login-status {
  margin: 1rem 0 0;
  padding: 0.8rem 0.9rem;
  border-radius: 0.65rem;
  background: var(--green-soft);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

.login-status.is-error {
  background: var(--red-soft);
  color: var(--red);
}

.privacy-note {
  margin: 0.8rem 0 0;
  color: rgba(23, 56, 46, 0.62);
  font-size: 0.76rem;
  line-height: 1.4;
}

.recent-orders {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(23, 56, 46, 0.17);
  border-radius: 0.8rem;
  background: white;
}

.recent-orders.has-warning {
  border-color: rgba(169, 54, 40, 0.22);
  background: #fffaf8;
}

.recent-orders-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.recent-orders-heading h4 {
  margin: 0;
  font-size: 0.98rem;
  letter-spacing: -0.015em;
}

.recent-orders-heading span {
  color: rgba(23, 56, 46, 0.55);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recent-orders-summary {
  margin: 0.35rem 0 0;
  color: rgba(23, 56, 46, 0.66);
  font-size: 0.75rem;
  line-height: 1.4;
}

.recent-orders-list {
  display: grid;
  margin: 0.85rem 0 0;
  padding: 0;
  gap: 0.6rem;
  list-style: none;
}

.recent-order {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(23, 56, 46, 0.11);
}

.recent-order:first-child {
  padding-top: 0;
  border-top: 0;
}

.recent-order-details {
  min-width: 0;
}

.recent-order-title {
  overflow: hidden;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-order-meta {
  overflow: hidden;
  margin: 0.2rem 0 0;
  color: rgba(23, 56, 46, 0.63);
  font-size: 0.7rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-status {
  flex: 0 0 auto;
  max-width: 10rem;
  padding: 0.33rem 0.52rem;
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.order-status-ready {
  background: rgba(227, 101, 42, 0.13);
  color: var(--orange-dark);
}

.order-status-complete {
  background: var(--green-soft);
  color: var(--ink);
}

.download-step {
  position: relative;
  overflow: hidden;
  transition:
    border-color 200ms ease,
    background-color 200ms ease;
}

.download-step.is-ready {
  border-color: rgba(23, 56, 46, 0.35);
  background: var(--green-soft);
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.store-badge {
  display: flex;
  min-width: 11.9rem;
  min-height: 3.75rem;
  align-items: center;
  gap: 0.72rem;
  padding: 0.52rem 0.88rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0.62rem;
  background: #080808;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 2px 6px rgba(0, 0, 0, 0.18);
  color: white;
  line-height: 1;
  text-decoration: none;
  transition:
    opacity 180ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.store-badge[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.34;
  filter: saturate(0.4);
}

.store-badge:not([aria-disabled="true"]):hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 6px 18px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.store-badge svg {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
}

.apple-mark {
  fill: white;
}

.store-kicker {
  display: block;
  margin-bottom: 0.23rem;
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.store-name {
  display: block;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue",
    sans-serif;
  font-size: 1.22rem;
  font-weight: 540;
  letter-spacing: -0.03em;
}

.google-name {
  font-family: "Product Sans", "Google Sans", Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

footer {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  color: rgba(23, 56, 46, 0.7);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

footer a {
  text-underline-offset: 0.25rem;
}
footer a:hover {
  color: var(--orange);
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .hero {
    grid-template-columns: minmax(16rem, 0.75fr) minmax(34rem, 1.55fr);
  }
  h1 {
    max-width: 7ch;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 5rem;
  }

  .hero {
    padding: 2.5rem 0 3.5rem;
  }

  .video-frame {
    width: calc(100% + 1rem);
    margin-left: -0.5rem;
    border-radius: 0.75rem;
  }

  .step-card {
    grid-template-columns: 1fr;
  }

  .store-links,
  .store-badge {
    width: 100%;
  }

  .recent-order {
    align-items: flex-start;
    flex-direction: column;
  }

  .recent-order-details {
    width: 100%;
  }

  footer {
    align-items: flex-start;
    padding: 1.5rem 0;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .intro,
  .video-frame,
  .getting-started {
    animation: reveal 700ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
  }

  .video-frame {
    animation-delay: 120ms;
  }
  .getting-started {
    animation-delay: 220ms;
  }
}

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

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
