/*

GLOBAL RESET

*/
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  user-select: none;
}

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

*:focus {
  outline: none;
}

p {
  padding: 0;
  margin: 0;
}

a {
  text-decoration: none;
  color: inherit;
  font-size: inherit;
  border-bottom: none;
  cursor: pointer;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

body,
h1,
h2,
h3,
h4,
h5,
p,
figure,
blockquote,
dl,
dd {
  margin-block-start: 0;
  margin-block-end: 0;
}

label {
  display: inline-block;
  margin-bottom: 0;
}

button,
input,
optgroup,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  border-style: none;
  line-height: normal;
}

optgroup {
  font-weight: 700;
}

button,
input {
  overflow: visible;
  background: transparent;
  width: auto;
}

button,
select {
  text-transform: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

[type="reset"],
[type="submit"],
button,
html [type="button"] {
  -webkit-appearance: none; /* button */
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner,
button::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring,
button:-moz-focusring {
  outline: 1px dotted ButtonText;
}

fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

progress {
  vertical-align: baseline;
}

legend {
  box-sizing: border-box;
  color: inherit;
  line-height: inherit;
  display: table;
  max-width: 100%;
  padding: 0;
  white-space: normal;
}

textarea {
  overflow: auto;
}

[type="checkbox"],
[type="radio"] {
  box-sizing: border-box;
  padding: 0;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

[type="search"] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

[type="search"]::-webkit-search-cancel-button,
∏ [type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-input-placeholder {
  color: inherit;
  opacity: 0.54;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

:root {
  touch-action: pan-x pan-y;

  --colors-white: #ffffff;
  --colors-text-light: #000000;
  --colors-text-dark: #ffffff;
  --colors-text-inactive: #8c9aab;
  --colors-text-active: #3478f6;
  --colors-text-disabled: #86b7f0;

  --colors-bg-light: #f6f7f8;
  --colors-bg-dark: #000000;

  --colors-flat-light: #ffffff;
  --colors-flat-dark: #2c2c2e;

  --colors-on-flat-light: #f0f4f9;
  --colors-on-flat-dark: #373e48;

  --colors-bgg-light: rgba(255, 255, 255, 1);
  --colors-bgg-dark: rgba(0, 0, 0, 1);

  /* Typography */
  --font-size-tabbar: 0.625rem;
  --font-size-footnote: 0.75rem;
  --font-size-caption: 0.875rem;
  --font-size-body: 1rem;
  --font-size-headline: 1.25rem;
  --font-size-title: 1.375rem;
  --font-size-largetitle: 1.5rem;
  --font-size-extratitle: 2rem;

  /* --view-root-width: 26rem;
  --view-root-padding: 1rem; */
}

@media screen and (prefers-color-scheme: light) {
  body {
    --colors-bg-main: var(--colors-bgg-light);
    --colors-text-main: var(--colors-text-light);
    --colors-flat-main: var(--colors-flat-light);
    --colors-on-flat-main: var(--colors-on-flat-dark);

    background-color: var(--colors-bg-main);
    color: var(--colors-text-main);

    --background-gradient: var(--colors-bgg-light);
  }
}

@media screen and (prefers-color-scheme: dark) {
  body {
    --colors-bg-main: var(--colors-bgg-dark);
    --colors-text-main: var(--colors-text-dark);
    --colors-flat-main: var(--colors-flat-dark);
    --colors-on-flat-main: var(--colors-on-flat-light);

    background-color: var(--colors-bg-main);
    color: var(--colors-text-main);

    --background-gradient: var(--colors-bgg-dark);
  }
}

@media screen {
  html {
    display: block;
    --view-root-width: 70rem;
    --view-root-padding: 1rem;
    --font-size-root: 18px;
    --view-width-main: 100%;
    --text-block-width: 30rem;
    --background-img-width: 100%;
  }

  footer.root-view {
    overflow: none;
  }
}

@media screen and (max-width: 1024px) {
  html {
    display: block;
    --view-root-width: 45rem;
    --view-root-padding: 1rem;
    --font-size-root: 18px;
    --view-width-main: 100%;
    --text-block-width: 30rem;
    --background-img-width: 120%;
  }

  footer.root-view {
    overflow: hidden;
  }
}

@media screen and (max-width: 430px) {
  html {
    display: block;
    --view-root-width: 26rem;
    --view-root-padding: 1rem;
    --font-size-root: 17px;
    --view-width-main: 100%;
    --text-block-width: 20rem;
    --background-img-width: 200%;
  }

  footer.root-view {
    overflow: hidden;
  }
}

html {
  font-size: var(--font-size-root);
}

body {
  padding: 0;
  margin: 0;
  font-family: -apple-system, Roboto, BlinkMacSystemFont, Helvetica Neue, sans-serif;
}

main.root-view {
  max-width: var(--view-root-width);
  padding: var(--view-root-padding);
  margin: 0 auto;
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: flex-start;
  width: auto;
  gap: 1rem;
}

main.root-view.app {
  align-items: center;
  gap: 4rem;
}

main.root-view.payment-form {
  align-items: center;
  height: 100vh;
}

h1,
h2,
h3,
h4,
h5 {
  line-height: 0.95;
  padding-bottom: 1rem;
}

h1 {
  padding-top: 1rem;
}

em {
  padding: 1rem 0;
}

p.caption {
  align-self: end;
  font-size: var(--font-size-caption);
}

section {
  font-weight: 1.1rem;
}

section p {
  padding: 0 0 1rem 0;
}

.link {
  color: var(--colors-text-active);
  padding-bottom: 1rem;
}

form input {
  display: block;
}

/* APP */

header.root-view {
  max-width: var(--view-root-width);
  padding: var(--view-root-padding);
  margin: 0 auto;
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: stretch;
  height: 4rem;
  width: auto;
}

section.title {
  z-index: 1;
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  width: 100%;
}

section.title h1 {
  font-size: 2.8rem;
  font-weight: 600;
  max-width: 40rem;
  text-align: center;
  line-height: 1.1;
}

a.appstore-link {
  border: 1px solid white;
  border-radius: 10px;
}

section.featured {
  z-index: 1;
  display: flex;
  flex-flow: row wrap;
  align-items: baseline;
  width: 100%;
  justify-content: space-around;
}

section.featured div.item {
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  max-width: 320px;
  margin-bottom: 1rem;
  gap: 1rem;
}

section.featured div.item img {
  max-width: 320px;
}

section.featured div.item h3 {
  text-align: center;
  font-weight: 600;
  line-height: 1.1;
  padding: 0;
}

section.featured div.item p {
  text-align: center;
  line-height: 1.1;
}

section.payment-form-msg {
  background-color: var(--colors-flat-main);
  border-radius: 1.5rem;
  padding: 1.25rem;
  font-weight: 600;
  font-size: 1.0625rem;
  display: flex;
  align-items: center;
  flex-flow: column nowrap;
  gap: 1rem;
}

section.payment-form-msg p {
  padding: 0;
  color: var(--colors-on-flat-main);
  text-align: center;
}

section.payment-form-msg span {
  display: block;
  text-align: center;
  font-weight: normal;
  font-size: 0.825rem;
  padding-top: 0.25rem;
  padding-bottom: 0.5rem;
  line-height: 1.35rem;
}

section.debug {
  position: fixed;
  top: 0;
  font-size: 0.825rem;
  margin-top: 1.8rem;
}

footer.root-view {
  max-width: 100%;
  padding: var(--view-root-padding);
  margin: 0 auto;
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
  width: auto;
  position: relative;
}

footer.root-view .advert {
  z-index: 2;
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  width: auto;
  justify-content: center;
}

footer.root-view .advert .device img {
  max-width: 30rem;
}

footer.root-view .advert .text {
  max-width: var(--text-block-width);
}

.background {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(180deg, var(--background-gradient) 0%, var(--background-gradient) 10%, rgba(0, 0, 0, 0) 100%);
}

.background img {
  width: var(--background-img-width);
  position: relative;
  z-index: -1;
  object-fit: cover;
  object-position: top center;
}

footer.root-view .qr-code {
  display: flex;
  flex-flow: row nowrap;
  align-items: flex-start;
  width: auto;
  justify-content: flex-start;
  gap: 0 1rem;
  margin-top: 2rem;
}

footer.root-view .qr-code img {
  width: 8rem;
  height: 8rem;
  border: 4px solid white;
  border-radius: 1rem;
}

footer.root-view .links {
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: flex-start;
  margin-top: 2.6rem;
  gap: 0.6rem;
}

footer.root-view .links a {
  display: block;
  font-size: 0.85rem;
}

footer.root-view .links a:hover {
  text-decoration: underline;
}
