/* Cloud AI website.
   One dark theme with the app's own colours: near-black page, flat grey
   surfaces, white text, one orange accent for the main buttons.
   Shape rule, used everywhere: buttons are pills, cards are 24px, inputs are
   16px, the phone frame is 40px. */

@font-face {
  font-family: "Lato";
  src: url("fonts/lato-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("fonts/lato-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --line: #282828;
  --text: #f5f5f5;
  --muted: #a6a6a6;
  --faint: #8c8c8c;
  --accent: #f05a28;
  --accent-press: #d94c1e;
  --danger: #ff9482;
  --card: 24px;
  --input: 16px;
  --wrap: 1120px;
  --gutter: 20px;
  --font: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: currentColor;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  /* Large bold text keeps white on orange readable. */
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.16s ease, transform 0.12s ease, border-color 0.16s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-press);
}

.btn-quiet {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn-quiet:hover {
  background: #242424;
}

.btn-small {
  min-height: 44px;
  padding: 0 20px;
  font-size: 0.9375rem;
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: default;
  transform: none;
}

.text-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: #5a5a5a;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.16s ease;
}

.text-link:hover {
  text-decoration-color: var(--text);
}

/* ----------------------------------------------------------------- header */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(10 10 10 / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand img {
  width: 30px;
  height: 30px;
}

.nav {
  display: none;
  align-items: center;
  gap: 30px;
  font-size: 1rem;
  color: var(--muted);
}

.nav a:hover {
  color: var(--text);
}

.header .btn {
  display: none;
}

/* ------------------------------------------------------------------- hero */

.hero {
  padding-top: 44px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: 40px;
}

.hero h1 {
  font-size: clamp(2.375rem, 9.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 700;
  text-wrap: balance;
}

.hero-sub {
  margin-top: 18px;
  max-width: 34ch;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 26px;
  margin-top: 28px;
}

/* The phone shows a real screenshot of the app. */
.phone {
  width: min(300px, 76vw);
  margin-inline: auto;
  padding: 9px;
  border-radius: 40px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px #343434;
}

.phone img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 20;
  border-radius: 32px;
}

.hero-visual {
  /* On a phone the frame peeks in from the bottom of the first screen. */
  height: 340px;
}

/* --------------------------------------------------------------- sections */

.section {
  padding-block: 72px;
}

.section-title {
  font-size: clamp(1.875rem, 6.4vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

.section-lead {
  margin-top: 14px;
  max-width: 52ch;
  color: var(--muted);
}

/* ------------------------------------------------- what the app does (tiles) */

.tiles {
  display: grid;
  gap: 16px;
  margin-top: 36px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border-radius: var(--card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.tile .icon {
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 8px;
  color: var(--text);
}

.tile h3 {
  font-size: 1.3125rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.tile p {
  color: var(--muted);
  max-width: 44ch;
}

/* Tiles with a real screenshot: the shot rises from the bottom edge. */
.tile-shot {
  padding-bottom: 0;
}

.tile-shot figure {
  position: relative;
  margin: 18px -2px 0;
  height: 250px;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  box-shadow: 0 0 0 1px #343434;
}

/* The shot fills its window and never sets the tile's height. */
.tile-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% var(--shot-y, 12%);
}

/* ------------------------------------------------------------------ plans */

.plans-grid {
  display: grid;
  gap: 32px;
}

.included {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.included li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1.125rem;
}

.included .icon {
  margin-top: 2px;
  color: var(--accent);
}

.plan-list {
  display: grid;
  gap: 14px;
}

.plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px;
  border-radius: var(--card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.plan-name {
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.2;
}

.plan-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9375rem;
}

.plan-price {
  text-align: right;
  white-space: nowrap;
}

.plan-price strong {
  display: block;
  font-size: 1.75rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.plan-price span {
  color: var(--muted);
  font-size: 0.9375rem;
}

.plans-terms {
  margin-top: 22px;
  color: var(--faint);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* ------------------------------------------------------------------ steps */

.steps {
  display: grid;
  margin-top: 36px;
  border-radius: var(--card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.step {
  padding: 26px;
}

.step + .step {
  border-top: 1px solid var(--line);
}

.step-number {
  display: block;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.step h3 {
  font-size: 1.1875rem;
  line-height: 1.25;
}

.step p {
  margin-top: 8px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- support */

.support {
  display: grid;
  gap: 22px;
  padding: 30px 26px;
  border-radius: var(--card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.support p {
  margin-top: 10px;
  max-width: 40ch;
  color: var(--muted);
}

.mail {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.0625rem, 4.4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.mail .icon {
  color: var(--accent);
}

.mail:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* ----------------------------------------------------------------- footer */

.footer {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.9375rem;
}

.footer-row {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-block: 30px 40px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

/* ------------------------------------------------- documents and contacts */

.doc {
  max-width: 760px;
  padding-block: 44px 72px;
}

.doc h1 {
  font-size: clamp(2rem, 7vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.doc-date {
  margin-top: 14px;
  color: var(--muted);
}

.doc h2 {
  margin-top: 40px;
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.doc p,
.doc li {
  color: #d2d2d2;
}

.doc p {
  margin-top: 12px;
}

.doc ul {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-left: 22px;
  list-style: disc;
}

.doc li::marker {
  color: var(--faint);
}

.doc a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: #5a5a5a;
  text-underline-offset: 4px;
}

.doc a:hover {
  text-decoration-color: var(--text);
}

.contact-list {
  display: grid;
  gap: 14px;
  margin-top: 30px;
}

.contact-item {
  padding: 22px 24px;
  border-radius: var(--card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.contact-item h2 {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0;
}

.contact-item p {
  margin-top: 6px;
  color: var(--text);
  font-size: 1.1875rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.contact-item small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* -------------------------------------- pay, payment result, subscription */

.flow {
  display: grid;
  /* The column can shrink, so long words never push the page sideways. */
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: start;
  padding-block: 28px 64px;
}

.panel {
  width: 100%;
  max-width: 480px;
  min-width: 0;
}

.panel h1 {
  font-size: clamp(1.75rem, 7.4vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.panel-lead {
  margin-top: 10px;
  color: var(--muted);
}

.summary {
  margin-top: 24px;
  padding: 22px 24px;
  border-radius: var(--card);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.summary-name {
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.25;
}

.summary-price {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.summary-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.facts {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.facts dt {
  color: var(--muted);
}

.facts dt {
  flex: none;
}

.facts dd {
  margin: 0;
  min-width: 0;
  font-weight: 700;
  text-align: right;
}

/* A date such as "16 сентября 2027 г." stays on one line. */
.facts .date {
  white-space: nowrap;
}

.facts div:has(.date) dt {
  flex: 0 1 auto;
}

.form {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--input);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px #3a3a3a;
  color: var(--text);
  font: inherit;
  font-size: 1.0625rem;
}

.field input::placeholder {
  color: var(--faint);
}

.field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--input);
}

.field input[aria-invalid="true"] {
  box-shadow: inset 0 0 0 1.5px var(--danger);
}

.hint {
  color: var(--faint);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.error {
  color: var(--danger);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.error:empty {
  display: none;
}

.check {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
  color: #d2d2d2;
  font-size: 0.9375rem;
  line-height: 1.5;
  cursor: pointer;
}

.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin: 0;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px #5a5a5a;
  cursor: pointer;
}

.check input:checked {
  /* The tick is the Phosphor "check" icon, the same one as in icons.svg. */
  background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23fff'%3E%3Cpath d='m229.66 77.66-128 128a8 8 0 0 1-11.32 0l-56-56a8 8 0 0 1 11.32-11.32L96 188.69 218.34 66.34a8 8 0 0 1 11.32 11.32'/%3E%3C/svg%3E")
    center / 18px no-repeat;
  box-shadow: none;
}

.check a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.secure {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  color: var(--faint);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.secure .icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 2px;
}

.actions {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.state {
  display: block;
}

.state-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  color: var(--accent);
}

.state-icon.is-quiet {
  color: var(--muted);
}

.notice {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--input);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: #d2d2d2;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.notice:empty {
  display: none;
}

.notice.is-error {
  box-shadow: inset 0 0 0 1px #6b3a31;
  color: var(--danger);
}

/* Loading placeholders keep the final shape of the content. */
.skeleton {
  border-radius: 12px;
  background: var(--surface-2);
}

.skeleton-title {
  width: 70%;
  height: 34px;
}

.skeleton-card {
  height: 150px;
  margin-top: 24px;
  border-radius: var(--card);
}

.skeleton-line {
  width: 100%;
  height: 56px;
  margin-top: 24px;
  border-radius: var(--input);
}

@media (prefers-reduced-motion: no-preference) {
  .skeleton {
    animation: breathe 1.4s ease-in-out infinite;
  }
  @keyframes breathe {
    50% {
      opacity: 0.55;
    }
  }
}

[hidden] {
  display: none !important;
}

/* --------------------------------------------------------- wider screens */

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }

  .nav {
    display: flex;
  }

  .section {
    padding-block: 96px;
  }

  .tiles {
    grid-template-columns: repeat(12, 1fr);
  }

  .tile {
    padding: 30px;
  }

  .tile-documents {
    grid-column: 1 / span 7;
    grid-row: span 2;
  }

  .tile-video {
    grid-column: 8 / span 5;
  }

  .tile-explain {
    grid-column: 8 / span 5;
  }

  .tile-text {
    grid-column: 1 / span 6;
  }

  .tile-search {
    grid-column: 7 / span 6;
  }

  .tile-documents figure {
    height: auto;
    min-height: 320px;
    flex: 1;
  }

  .tile-video figure {
    height: 210px;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .step + .step {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .support {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 40px;
  }

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

  .flow {
    padding-block: 56px 96px;
  }
}

@media (min-width: 960px) {
  /* The header button joins only when the links and the button both fit. */
  .header .btn {
    display: inline-flex;
  }

  .hero {
    padding-top: 64px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: 48px;
  }

  .hero-sub {
    font-size: 1.25rem;
  }

  .hero-visual {
    height: min(600px, calc(100dvh - 190px));
    min-height: 420px;
  }

  .phone {
    width: auto;
    height: 100%;
    aspect-ratio: 9 / 19.2;
    margin-inline: auto 0;
  }

  .phone img {
    height: 100%;
    width: auto;
  }

  .plans-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 64px;
  }
}
