/* The download page `/baixar` (apps/site/landing/download.ts, SHARE-1): always dark
   (`data-theme="dark"`), colours from the tokens, the brand's orange and green as glows.
   The phone fan's geometry is this page's own; one breakpoint, layout.wide-min (900px). */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.dl {
  position: relative;
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--color-text);
  background: var(--color-surface);
  font-family: var(--type-body-font);
  font-weight: var(--type-body-weight);
  font-size: var(--type-body-size);
  line-height: var(--type-body-line);
}

/* The orange and green glows behind the hero. */
.dl-glow {
  position: absolute;
  inset: 0 0 auto;
  height: 1100px;
  pointer-events: none;
  background:
    radial-gradient(
      560px 460px at 85% 22%,
      color-mix(in srgb, var(--color-brand-orange) 42%, transparent),
      transparent 70%
    ),
    radial-gradient(
      520px 420px at 10% 70%,
      color-mix(in srgb, var(--color-brand-green) 26%, transparent),
      transparent 70%
    ),
    radial-gradient(
      380px 300px at 55% 0%,
      color-mix(in srgb, var(--color-brand-yellow) 14%, transparent),
      transparent 70%
    );
}

h1,
h2,
p,
ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: var(--size-ring-strong) solid var(--color-focus);
  outline-offset: var(--size-ring-gap);
}

.column {
  position: relative;
  max-width: var(--layout-column-max-wide);
  margin: 0 auto;
  padding: 0 var(--layout-gutter);
}

/* Header */

.dl-top {
  display: flex;
  align-items: center;
  min-height: var(--size-header-height);
  padding-top: var(--space-3);
}

.dl-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--size-touch-min);
  font-family: var(--font-display);
  font-weight: var(--type-web-headline-weight);
  font-size: var(--type-web-card-title-size);
  text-decoration: none;
}

.dl-mark {
  width: 40px;
  height: 40px;
}

/* Hero */

.dl-hero {
  padding-top: var(--space-8);
}

.dl-kicker {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border: var(--size-ring) solid color-mix(in srgb, var(--color-brand-white) 22%, transparent);
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--color-brand-white) 8%, transparent);
  font-weight: var(--type-body-strong-weight);
  font-size: var(--type-callout-size);
  line-height: var(--type-callout-line);
}

.dl h1 {
  margin-top: var(--space-5);
  font-family: var(--type-web-headline-font);
  font-weight: var(--type-web-headline-weight);
  font-size: clamp(40px, 9vw, 52px);
  line-height: 1.06;
  letter-spacing: var(--type-web-headline-tracking);
  text-wrap: balance;
}

/* "holandês": the brand's orange → yellow, as the text's own fill. */
.dl .em {
  background: linear-gradient(
    100deg,
    var(--color-brand-orange-2),
    var(--color-brand-orange) 45%,
    var(--color-brand-yellow)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dl-lead {
  max-width: 34em;
  margin-top: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--type-web-lead-size);
  line-height: var(--type-web-lead-line);
}

.dl-perks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.dl-perk {
  padding: var(--space-1-5) var(--space-3-5);
  border: var(--size-ring) solid var(--color-border-subtle);
  border-radius: var(--radius-full);
  background: var(--color-surface-raised);
  font-weight: var(--type-body-strong-weight);
  font-size: var(--type-callout-size);
  line-height: var(--type-callout-line);
}

.dl-perk-no-ads {
  border-color: transparent;
  background: var(--gradient-brand);
  color: var(--color-brand-ink);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

/* The official artwork, unmodified, a little larger than the landing's. */
.store {
  display: block;
  border-radius: var(--radius-xs);
}

.badge {
  display: block;
  width: auto;
  height: 56px;
}

.dl-web {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--size-touch-min);
  margin-top: var(--space-4);
  color: var(--color-text);
  font-weight: var(--type-body-strong-weight);
  text-decoration: none;
}

.dl-web:hover span {
  text-decoration: underline;
}

.icon {
  width: var(--size-icon-nav);
  height: var(--size-icon-nav);
  fill: none;
  stroke: currentColor;
  stroke-width: var(--size-tab-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dl-android {
  max-width: 30em;
  margin-top: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--type-callout-size);
  line-height: var(--type-callout-line);
}

/* The QR card: for a computer only — a phone is already where the link leads. */
.dl-qr {
  display: none;
}

/* The phones: three screens fanned out, the illustrations floating by. */

/* Full bleed on a phone, clipped at the screen's edges: the fan must never widen the page. */
.dl-art {
  position: relative;
  height: 440px;
  margin: var(--space-12) calc(-1 * var(--layout-gutter)) 0;
  overflow-x: clip;
}

.dl-fan {
  position: absolute;
  inset: 0;
}

.dl-slot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 180px;
}

.dl-phone {
  padding: 7px;
  border-radius: 34px;
  background: var(--color-brand-ink);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--color-brand-white) 16%, transparent),
    0 30px 60px -20px color-mix(in srgb, var(--color-brand-ink) 90%, transparent),
    0 18px 50px -24px color-mix(in srgb, var(--color-brand-orange) 70%, transparent);
}

.dl-screen {
  width: 100%;
  border-radius: 27px;
}

.dl-front {
  z-index: 2;
  margin-left: -90px;
  animation: dl-bob 6s ease-in-out infinite;
}

.dl-left {
  top: 40px;
  margin-left: -196px;
  width: 150px;
  transform: rotate(-10deg);
}

.dl-right {
  top: 40px;
  margin-left: 46px;
  width: 150px;
  transform: rotate(10deg);
}

.dl-float {
  position: absolute;
  z-index: 3;
  width: 96px;
  filter: drop-shadow(0 14px 18px color-mix(in srgb, var(--color-brand-ink) 60%, transparent));
  animation: dl-bob 5s ease-in-out infinite;
}

.dl-float-chapter-falar {
  top: 230px;
  left: calc(50% - 190px);
  transform: rotate(-12deg);
}

.dl-float-exame {
  top: 170px;
  left: calc(50% + 100px);
  animation-delay: -2s;
}

.dl-float-nivel {
  display: none;
}

@keyframes dl-bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dl-front,
  .dl-float {
    animation: none;
  }
}

.dl-more-row {
  position: relative;
  z-index: 4;
  margin-top: var(--space-8);
  text-align: center;
}

.dl-more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  min-height: var(--size-touch-min);
  color: var(--color-accent-fg);
  font-weight: var(--type-body-strong-weight);
  text-decoration: none;
}

.dl-more:hover {
  text-decoration: underline;
}

/* Footer (the site's, as on the landing). */

.foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border-subtle);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: var(--size-touch-min);
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
}

.foot .credit {
  font-weight: var(--type-caption-weight);
  font-size: var(--type-caption-size);
  line-height: var(--type-caption-line);
}

/* layout.wide-min */
@media (min-width: 900px) {
  .dl-hero {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: var(--space-10);
    padding-top: var(--space-12);
  }

  .dl h1 {
    font-size: 58px;
  }

  .dl-lead {
    font-size: var(--type-web-lead-wide-size);
    line-height: var(--type-web-lead-wide-line);
  }

  .dl-qr {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    max-width: 460px;
    margin-top: var(--space-8);
    padding: var(--space-4);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-xl);
    background: var(--color-surface-raised);
    box-shadow: var(--shadow-card);
  }

  .dl-qr-code {
    flex: none;
    width: 132px;
    height: 132px;
    border-radius: var(--radius-lg);
  }

  .dl-qr h2 {
    font-family: var(--type-web-card-title-font);
    font-weight: var(--type-web-card-title-weight);
    font-size: var(--type-web-card-title-size);
    line-height: var(--type-web-card-title-line);
    letter-spacing: var(--type-web-card-title-tracking);
  }

  .dl-qr p {
    margin-top: var(--space-1);
    color: var(--color-text-muted);
    font-size: var(--type-callout-size);
    line-height: var(--type-callout-line);
  }

  .dl-qr .dl-url {
    margin-top: var(--space-2);
    color: var(--color-accent-fg);
    font-weight: var(--type-body-strong-weight);
  }

  .dl-art {
    height: 600px;
    margin: 0;
    overflow-x: visible;
  }

  .dl-slot {
    width: 250px;
  }

  .dl-front {
    margin-left: -125px;
  }

  .dl-left,
  .dl-right {
    top: 60px;
    width: 205px;
  }

  .dl-left {
    margin-left: -255px;
  }

  .dl-right {
    margin-left: 50px;
  }

  .dl-phone {
    padding: 9px;
    border-radius: 44px;
  }

  .dl-screen {
    border-radius: 35px;
  }

  .dl-float {
    width: 128px;
  }

  .dl-float-chapter-falar {
    top: 340px;
    left: calc(50% - 280px);
  }

  .dl-float-exame {
    top: 220px;
    left: calc(50% + 150px);
  }

  .dl-float-nivel {
    display: block;
    top: 0;
    left: calc(50% - 230px);
    width: 104px;
    transform: rotate(-14deg);
    animation-delay: -3.5s;
  }

  .foot {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
}
