/* Colours from Garfio/Assets.xcassets and LinearGradient.hooks in the app. */
:root {
  --red-top: #fe3e3e; --red: #e42f2f;
  --bg: #f3f1f6; --card: #ffffff; --card-border: #f2f2f7; --card-soft: rgba(235, 235, 235, .5);
  --shadow: rgba(0, 0, 0, .15); --title: #212121; --text: #5e5e5e; --rule-dash: rgba(0, 0, 0, .22);
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #43444a; --card: #171717; --card-border: #000000; --card-soft: #222224; --shadow: rgba(0, 0, 0, .4); --title: #eaeaea; --text: #929292; --rule-dash: rgba(255, 255, 255, .26); }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 var(--font); }
a { color: var(--red); font-weight: 600; }
b, strong { color: var(--title); }

/* Red wave banner, same curve as BannerShape(simetry: true). */
.banner { --wave: 160px; position: relative; z-index: 1; color: #fff; background: linear-gradient(180deg, var(--red-top), var(--red)); padding: 20px 16px calc(var(--wave) + 8px); text-align: center;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--wave) + 1px) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0C20 140 56 -60 100 70V0Z'/%3E%3C/svg%3E") bottom / 100% var(--wave) no-repeat;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--wave) + 1px) no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0C20 140 56 -60 100 70V0Z'/%3E%3C/svg%3E") bottom / 100% var(--wave) no-repeat; }
.topbar { max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.langs { display: flex; gap: 4px; background: rgba(255, 255, 255, .18); border-radius: 999px; padding: 3px; }
.langs a { color: #fff; text-decoration: none; font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
html[data-lang="es"] .langs a[href="#es"], html[data-lang="en"] .langs a[href="#en"] { background: #fff; color: var(--red); }
.hero { max-width: 640px; margin: 36px auto 0; }
.hero .icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.banner h1 { color: #fff; font-size: 34px; line-height: 1.12; font-weight: 800; margin: 18px 0 8px; text-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.banner p { color: rgba(255, 255, 255, .92); font-size: 18px; margin: 16px auto 0; max-width: 520px; }
.banner.compact { --wave: 116px; padding-bottom: 128px; }
.banner.compact h1 { font-size: 28px; margin-top: 22px; }

main { max-width: 760px; margin: 0 auto; padding: 0 16px 48px; }
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: 22px; box-shadow: 0 6px 20px var(--shadow); padding: 22px 22px 18px; margin: 0 0 20px; }
h2 { color: var(--title); font-size: 22px; line-height: 1.2; font-weight: 800; margin: 0 0 10px; }
h3 { color: var(--title); font-size: 17px; font-weight: 800; margin: 0 0 2px; }
.card h2:not(:first-child) { margin-top: 26px; }
p, li { margin: 8px 0; }
ul, ol { padding-left: 22px; }
ol li::marker { color: var(--red); font-weight: 800; }
.updated { font-size: 15px; }

.cta { --cta-top: -28px; display: flex; justify-content: center; margin: var(--cta-top) 0 60px; position: relative; }
/* Same 28px gap above (to the deepest point of the wave over the button) and below. */
:root { --cta-top: -28px; }
@media (min-width: 720px) { :root, .cta { --cta-top: -45px; } }
.button { display: inline-block; color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; padding: 15px 34px; border-radius: 999px;
  background: linear-gradient(180deg, var(--red-top), var(--red)); box-shadow: 0 8px 20px rgba(228, 47, 47, .35); }
.store-badge { display: inline-block; line-height: 0; border-radius: 14px; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); transition: transform .25s ease, box-shadow .25s ease; }
.store-badge img { height: 66px; width: auto; }

.features { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0 0 20px; }
.feature { display: flex; align-items: center; gap: 14px; margin: 0; padding: 14px 18px; }
.feature .anim { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 50%; background: var(--card-soft); }
.feature p { margin: 0; font-size: 16px; }
.extras-wrap { position: relative; min-width: 0; background: linear-gradient(90deg, var(--rule-dash) 12px, transparent 0) left bottom / 20px 1px repeat-x; padding: 18px 0 30px; margin: 10px 0 18px; }
.extras { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 8px; list-style: none; margin: 0; padding: 4px 0 8px; }
.extras li { flex: 0 0 auto; margin: 0; display: inline-block; white-space: nowrap; color: #fff; background: linear-gradient(180deg, var(--red-top), var(--red)); box-shadow: 0 4px 12px rgba(228, 47, 47, .35); font-size: 14px; font-weight: 800; padding: 7px 13px; border-radius: 999px; }
/* Circle and tick are one SVG; its centre sits on the middle of the capitals (0.35em above the baseline) in any font. */
.extras .tick { width: 1.15em; height: 1.15em; vertical-align: -0.225em; margin-right: 6px; }
.extras .tick circle { fill: #fff; }
.extras .tick path { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 10; stroke-dashoffset: 0; }
@media (hover: hover) { .extras li:hover .tick path { animation: draw-tick .45s ease-out; } }
@keyframes draw-tick { from { stroke-dashoffset: 10; } to { stroke-dashoffset: 0; } }

@media (min-width: 720px) {
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature { flex-direction: column; text-align: center; padding: 22px 18px; }
  .feature .anim { flex-basis: 96px; width: 96px; height: 96px; }
  .extras-wrap { grid-column: 1 / -1; }
}

.howto { display: flex; gap: 16px; align-items: center; }
.howto .anim { flex: 0 0 110px; width: 110px; height: 110px; }
@media (max-width: 520px) { .howto { flex-direction: column; align-items: stretch; } .howto .anim { align-self: center; } }

footer { text-align: center; font-size: 14px; padding: 8px 16px 40px; }
footer nav { display: flex; justify-content: center; gap: 18px; margin-bottom: 8px; }

/* One language at a time once site.js has run; both without JavaScript. */
html[data-lang="es"] [lang="en"]:not(html), html[data-lang="en"] [lang="es"]:not(html) { display: none; }

/* Compact bar that slides in once the banner title scrolls away. */
.stickybar { position: fixed; top: 0; left: 0; right: 0; z-index: 10; color: #fff; background: linear-gradient(180deg, var(--red-top), var(--red));
  box-shadow: 0 4px 16px rgba(0, 0, 0, .18); padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  transform: translateY(-110%); transition: transform .25s ease; }
.stickybar.shown { transform: none; }
.stickybar .inner { max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stickybar .name { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; }
.stickybar .name img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
@media (prefers-reduced-motion: reduce) { .stickybar, .outline, .store-badge, .hero .icon { transition: none; } }

/* Dashed card from the hero down to the middle of the App Store badge. The white copy lives in the
   banner (clipped by its wave); the grey copy sits behind the banner and shows below the wave. */
.top { position: relative; }
.outline { display: none; position: absolute; top: var(--o-top); left: var(--o-left); width: var(--o-width); bottom: calc(-1 * (var(--cta-top) + 33px));
  border-radius: 30px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' rx='30' ry='30' fill='none' stroke='white' stroke-opacity='.55' stroke-width='2' stroke-dasharray='12 8'/%3E%3C/svg%3E"); transition: box-shadow .25s ease, background-color .25s ease, transform .25s ease; pointer-events: none; }
.outline-under { z-index: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' rx='30' ry='30' fill='none' stroke='black' stroke-opacity='.18' stroke-width='2' stroke-dasharray='12 8'/%3E%3C/svg%3E"); }
html.has-outline .outline { display: block; }
.hero, .cta { position: relative; z-index: 2; }
.hero .icon { transition: box-shadow .25s ease; }
@media (hover: hover) {
  body:has(.store-badge:hover) .outline { background-color: rgba(255, 255, 255, .08); box-shadow: 0 22px 44px rgba(120, 0, 0, .22); transform: translateY(-3px); }
  body:has(.store-badge:hover) .outline-under { background-color: rgba(255, 255, 255, .6); }
  /* The badge rides with the card and settles onto it, like the icon. */
  .store-badge:hover { transform: translateY(-3px); box-shadow: 0 3px 8px rgba(0, 0, 0, .14); }
  body:has(.store-badge:hover) .hero .icon { box-shadow: none; }
}
@media (hover: hover) and (prefers-color-scheme: dark) { body:has(.store-badge:hover) .outline-under { background-color: rgba(255, 255, 255, .06); } }
