:root {
  color-scheme: light;
  --ink: #17130f;
  --muted: #62584c;
  --paper: #fff8e4;
  --card: #ffffff;
  --line: rgba(38, 28, 17, 0.14);
  --gold: #f4b325;
  --amber: #ff7a1a;
  --deep: #4a2307;
  --shadow: rgba(36, 24, 12, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #17130f 0 76px, transparent 76px),
    linear-gradient(180deg, #fff8e4 0%, #fff2cf 42%, #ffffff 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.content a:not(.button) {
  color: #9b3b00;
  font-weight: 900;
}

.topbar,
main {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  color: #ffffff;
}

.brand,
.back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 900;
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
}

.back {
  color: rgba(255, 255, 255, 0.72);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
  gap: 40px;
  align-items: center;
  margin-top: 28px;
  border-radius: 8px;
  padding: clamp(34px, 5vw, 58px);
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 255, 255, 0.42), transparent 19rem),
    linear-gradient(135deg, #ffd33d 0%, #ff8a00 44%, #d94300 100%);
  box-shadow: 0 30px 70px rgba(129, 52, 0, 0.22);
}

.hero::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.14), transparent 46%),
    radial-gradient(circle at 8% 88%, rgba(74, 35, 7, 0.24), transparent 18rem);
  content: "";
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 850;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(74, 35, 7, 0.28);
}

h1 {
  max-width: 720px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.55rem, 7vw, 5.4rem);
  line-height: 0.94;
  letter-spacing: 0;
  text-shadow:
    0 3px 4px rgba(74, 35, 7, 0.34),
    0 18px 34px rgba(74, 35, 7, 0.24);
}

.copy p:not(.eyebrow) {
  max-width: 640px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.14rem;
  line-height: 1.68;
  font-weight: 720;
  text-shadow: 0 2px 4px rgba(74, 35, 7, 0.26);
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  gap: 10px;
  width: 100%;
  aspect-ratio: 1024 / 500;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.62), transparent 12rem),
    linear-gradient(135deg, #fff4ce, #ffb31f 48%, #ff7a00);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 28px 70px rgba(74, 35, 7, 0.28);
  text-align: center;
}

.hero-art::before {
  position: absolute;
  color: rgba(74, 35, 7, 0.12);
  content: attr(data-suit);
  font-family: Georgia, serif;
  font-size: clamp(8rem, 18vw, 15rem);
  font-weight: 900;
  line-height: 1;
}

.hero-art img {
  position: relative;
  z-index: 1;
  width: min(92%, 660px);
  max-height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(74, 35, 7, 0.22));
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(36, 24, 12, 0.1);
}

.button.primary {
  border-color: #ffffff;
  background: #ffffff;
  color: #050505;
}

.store-button {
  justify-content: flex-start;
  gap: 10px;
  min-width: 190px;
}

.store-button svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
}

.store-button span {
  display: grid;
  gap: 1px;
  line-height: 1.05;
}

.store-button small {
  font-size: 0.68rem;
  font-weight: 850;
  opacity: 0.72;
}

.store-button strong {
  font-size: 0.94rem;
}

.store-button.disabled {
  cursor: default;
  opacity: 0.68;
}

.store-button.app-store {
  border-color: #050505;
  background: #050505;
  color: #ffffff;
  opacity: 1;
}

.store-button.app-store svg {
  width: 28px;
  height: 28px;
}

.download-cta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  border-color: rgba(74, 35, 7, 0.2);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 211, 61, 0.28), transparent 16rem),
    linear-gradient(135deg, #fff6d8, #ffffff);
}

.download-cta::before {
  content: none !important;
}

.download-cta h2 {
  margin-bottom: 8px;
}

.download-cta p {
  max-width: 680px;
  margin: 0;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.sticky-download {
  display: none;
}

.content {
  counter-reset: rule;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 48px;
  padding: 54px 0 72px;
}

.section-intro {
  grid-column: 1 / -1;
  max-width: none;
  border: 0;
  padding: 0 0 18px;
  background: transparent;
  box-shadow: none;
}

.section-intro h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.98;
}

.section-intro p {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.12rem;
  font-weight: 680;
}

.tutorial-heading {
  grid-column: 1 / -1;
  margin: 18px 0 0;
}

.tutorial-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.tutorial-heading p {
  max-width: 680px;
  margin: 10px 0 0;
}

article {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 18px 44px rgba(36, 24, 12, 0.09);
}

.content article:not(.section-intro) {
  counter-increment: rule;
}

.content article.tutorial-heading {
  counter-increment: none;
}

.content article.card-values {
  counter-increment: none;
}

.content article:not(.section-intro)::before {
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: #2b1600;
  content: counter(rule, decimal-leading-zero);
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: 0 10px 18px rgba(129, 52, 0, 0.18);
}

.content article.tutorial-heading::before {
  content: none;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.38rem;
  line-height: 1.08;
}

p,
li {
  color: var(--muted);
  line-height: 1.72;
  font-weight: 620;
}

ul {
  margin: 0;
  padding-left: 20px;
}

.wide {
  grid-column: span 2;
}

.card-values {
  grid-column: 1 / -1;
  overflow: hidden;
  padding: 0;
}

.card-values::before {
  content: none !important;
}

.card-values-header {
  padding: 26px 26px 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 211, 61, 0.26), transparent 14rem),
    linear-gradient(135deg, #fff7dc, #ffffff);
}

.card-values-header p {
  max-width: 760px;
  margin: 8px 0 0;
}

.value-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 26px 18px;
}

.value-tabs button {
  min-height: 38px;
  border: 1px solid rgba(255, 122, 26, 0.28);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff3ca;
  color: #703100;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
}

.value-tabs button.is-active {
  background: #17130f;
  color: #ffffff;
}

.value-panel {
  display: none;
  padding: 0 26px 26px;
}

.value-panel.is-active {
  display: block;
}

.value-mode {
  border: 1px solid rgba(232, 80, 0, 0.2);
  border-radius: 8px;
  padding: 18px;
  background: #fffbf3;
}

.value-mode + .value-mode {
  margin-top: 16px;
}

.value-mode h3 {
  margin: 0 0 14px;
  color: #5a2200;
  font-size: 1.1rem;
}

.value-group + .value-group {
  margin-top: 18px;
}

.value-group-title {
  margin: 0 0 10px;
  color: #7b3100;
  font-weight: 950;
  text-transform: uppercase;
}

.card-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 12px;
}

.value-card {
  display: grid;
  gap: 7px;
  justify-items: center;
  border-radius: 8px;
  padding: 8px 6px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(36, 24, 12, 0.08);
}

.value-card img {
  width: min(100%, 74px);
  aspect-ratio: 0.668;
  object-fit: contain;
  filter: drop-shadow(0 7px 8px rgba(36, 24, 12, 0.16));
}

.value-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-align: center;
}

@media (max-width: 820px) {
  .hero,
  .content {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 30px;
    margin-top: 18px;
  }

  .wide {
    grid-column: auto;
  }

  .download-cta {
    grid-template-columns: 1fr;
  }

  .download-actions {
    justify-content: flex-start;
  }

  .card-strip {
    grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  }
}

@media (max-width: 560px) {
  body {
    padding-bottom: 92px;
  }

  .topbar,
  main {
    width: min(100% - 22px, 1080px);
  }

  .topbar,
  .actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding: 26px;
  }

  .hero-art {
    aspect-ratio: 4 / 3;
  }

  .content {
    gap: 14px;
    margin-top: 30px;
    padding: 36px 0 56px;
  }

  article {
    padding: 22px;
  }

  .button {
    width: 100%;
  }

  .sticky-download {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(23, 19, 15, 0.96);
    box-shadow: 0 -18px 36px rgba(36, 24, 12, 0.22);
  }

  .sticky-download .button {
    width: auto;
    min-width: 0;
    min-height: 54px;
    padding: 0 10px;
  }

  .sticky-download .store-button {
    gap: 8px;
  }

  .sticky-download .store-button small {
    font-size: 0.62rem;
  }

  .sticky-download .store-button strong {
    font-size: 0.82rem;
  }
}
