/* src/pages/Demo.css */
/* Demo page (layout spec §4 "Первый экран демо-страницы" + §7 "Формы и
   данные", DemoMobile/Demo1024/Demo.dc.html). `main` carries no padding of
   its own (../../styles/base.css) — each section below owns its own inset,
   the same "content-box, max-width: 1320px, side padding" shape
   Header/Footer/DemoBlock use. The mockup's third "Сообщения формы" section
   is a design annotation showing both message states side by side, not a
   real page section — `FormCard` already renders both, hidden, inline. */
.oj-demo-hero {
  /* This section is a flex item of `main` (base.css, column direction), not
     a sibling of it like Header/Footer — two consequences, unlike
     Header.css's own container:
     1. An auto cross-axis margin on a flex item wins over `align-items:
        normal`'s implicit stretch, so `margin: 0 auto` would shrink the box
        to its content's width instead of filling out to `max-width` —
        `align-self: center` instead, which only matters once `max-width`
        caps growth past 1440px viewport.
     2. `width: 100%` together with `box-sizing: content-box` sets the
        *content* to 100% of the flex container and adds padding on top,
        overflowing it — so this box is `border-box` and the cap is
        `1320 + 2 * 60`, not Header's content-box `1320`. */
  box-sizing: border-box;
  width: 100%;
  max-width: 1440px;
  align-self: center;
  padding: 88px var(--oj-page-pad-desktop) 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 64px;
}

.oj-demo-hero h1 {
  margin: 0;
  max-width: 680px;
  font-size: 84px;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.oj-demo-hero__line {
  display: block;
}

.oj-demo-hero__minutes {
  margin: 0;
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--oj-font-display);
  font-weight: 600;
  color: var(--oj-navy);
}

.oj-demo-hero__value {
  font-size: 220px;
  line-height: 0.8;
  letter-spacing: -0.07em;
}

.oj-demo-hero__label {
  font-size: 30px;
  letter-spacing: -0.03em;
}

.oj-demo-main {
  /* border-box + width/align-self, not content-box + margin: auto — see
     `.oj-demo-hero` above, same flex-item-of-`main` issue. */
  box-sizing: border-box;
  width: 100%;
  max-width: 1440px;
  align-self: center;
  padding: 0 var(--oj-page-pad-desktop) 96px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.oj-demo-steps {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.oj-demo-steps h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.04em;
}

.oj-demo-steps__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.oj-demo-steps__item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.oj-demo-steps__number {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: var(--oj-r-md);
  background: var(--oj-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--oj-font-display);
  font-weight: 700;
  font-size: 20px;
}

.oj-demo-steps__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.oj-demo-steps__title {
  font-family: var(--oj-font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--oj-navy);
}

.oj-demo-steps__text {
  margin: 0;
  max-width: 460px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--oj-text-2);
}

.oj-demo-form-card {
  box-sizing: border-box;
  padding: 40px;
  border-radius: var(--oj-r-xl);
  background: var(--oj-surface);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.oj-demo-form-card__hours {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--oj-navy);
  font-size: 16px;
  font-weight: 600;
}

.oj-demo-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* `client/demoForm.ts` sets `form.hidden = true` on submit success/error —
   without this, `.oj-demo-form`'s own `display: flex` (equal specificity to
   the UA's `[hidden]`, this stylesheet loading later) would keep the form
   visible. Same fix as `.oj-demo-form-result[hidden]` above. */
.oj-demo-form[hidden] {
  display: none;
}

.oj-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.oj-field label {
  font-size: 16px;
  font-weight: 600;
  color: var(--oj-navy);
}

.oj-field input,
.oj-field textarea {
  box-sizing: border-box;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border-radius: var(--oj-r-lg);
  border: 1px solid var(--oj-border);
  background: var(--oj-bg);
  font-family: var(--oj-font-body);
  font-size: 17px;
  color: var(--oj-text);
}

.oj-field textarea {
  height: 110px;
  padding: 12px 16px;
  resize: none;
}

.oj-field__error {
  font-size: 14px;
  line-height: 1.4;
  color: var(--oj-error);
}

.oj-field--honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.oj-demo-form__submit {
  width: 100%;
}

/* `.oj-field` in front outranks `.oj-field label`/`.oj-field input` (the text
   fields' look) */
.oj-field .oj-demo-consent__label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--oj-text);
  cursor: pointer;
}

.oj-demo-consent__label a {
  color: inherit;
  text-decoration: underline;
}

.oj-field .oj-demo-consent__box {
  flex: none;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--oj-navy);
  cursor: pointer;
}

.oj-field .oj-demo-consent__box:focus-visible {
  outline: 2px solid var(--oj-ink);
  outline-offset: 2px;
}

.oj-demo-form-consent {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--oj-muted);
}

.oj-demo-form-consent a {
  color: inherit;
  text-decoration: underline;
}

.oj-demo-form-result {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 14px;
}

.oj-demo-form-result p {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  color: inherit;
}

/* `[hidden]` and `.oj-demo-form-result` are equal specificity, and this
   stylesheet loads after the UA one — without this rule, `display: flex`
   above would win over the UA's `[hidden] { display: none }` and the
   success/error block would render expanded even while `hidden`. The
   attribute selector combined with the class outranks the class alone, so
   this wins regardless of source order. */
.oj-demo-form-result[hidden] {
  display: none;
}

.oj-demo-form-result--success {
  background: var(--oj-success-bg);
  border: 1px solid var(--oj-success-line);
  color: var(--oj-success);
}

.oj-demo-form-result--error {
  background: var(--oj-error-bg);
  border: 1px solid var(--oj-error-line);
  color: var(--oj-error);
}

@media (max-width: 1279px) {
  .oj-demo-hero {
    gap: 40px;
  }

  .oj-demo-hero h1 {
    max-width: 620px;
    font-size: 76px;
  }

  .oj-demo-hero__minutes {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .oj-demo-hero__value {
    font-size: 160px;
    letter-spacing: -0.06em;
  }

  .oj-demo-hero__label {
    font-size: 24px;
  }
}

@media (max-width: 767px) {
  .oj-demo-hero {
    padding: 40px 20px 32px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .oj-demo-hero h1 {
    max-width: none;
    font-size: 44px;
    line-height: 1.05;
    letter-spacing: -0.045em;
  }

  .oj-demo-hero__minutes {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }

  .oj-demo-hero__value {
    font-size: 96px;
    letter-spacing: -0.06em;
  }

  .oj-demo-hero__label {
    font-size: 18px;
  }

  .oj-demo-main {
    /* DemoMobile.dc.html splits steps and the form card into two sibling
       sections (steps: `0 20px 32px`; form: `0 20px 40px`) rather than one
       grid reflowing — `.oj-demo-main` keeps them as one flex column, so
       its own gap (32) and bottom padding (40, the form section's own)
       reproduce the same total spacing. */
    padding: 0 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  .oj-demo-form-card {
    padding: 24px;
    border-radius: 24px;
    gap: 20px;
  }

  .oj-demo-form {
    gap: 16px;
  }
}

/* The page's top space: one value for every inner page (`--oj-page-top`,
   base.css; owner's call, 09.11). Last in the file so it outranks the
   breakpoint rules above. */
.oj-demo-hero {
  padding-top: var(--oj-page-top);
}


/* the page's own style attributes, moved here by scripts/build/inlineStyles.mjs */

