/* ==========================================================================
   RestAI — главная страница (заглушка). Десктопный макет из Figma,
   адаптив для планшетов и мобильных.
   ========================================================================== */

:root {
  --bg-1: #3C4FCF;
  --bg-2: #3343AB;
  --bg-3: #030D4D;

  --orange: #EB651A;
  --blue: #4A7DFF;

  --pill-bg: #030A36;
  --pill-border: #98AAF0;

  --strip-a: #3748BA;
  --strip-b: #0E1A63;

  --demo-bg: #030D4D;
  --demo-border: #14206F;

  --sticker-bg: rgba(255, 237, 38, 0.63);
  --sticker-ink: #0022FF;

  --watermark: rgba(116, 137, 188, 0.31);

  /* Century Gothic отсутствует в Google Fonts: Jost — ближайшая
     геометрическая замена, у пользователей Windows/Office подхватится
     оригинал. Cygre Book в макете меню заменён на Manrope. */
  --font-geo: "Century Gothic", "Jost", "Questrial", system-ui, sans-serif;
  --font-ui: "Manrope", system-ui, sans-serif;
  --font-brand: "Agbalumo", "Gabarito", cursive;
  --font-display: "Gabarito", "Manrope", sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1440px;

  /* Левый край контентной колонки в координатах страницы: на макете 1920px
     это ровно 240px, как в Figma. Нужен для «плашки» и наклейки,
     которые по дизайну уходят за левый край колонки. */
  --content-left: calc(var(--gutter) + max(0px, (100vw - 2 * var(--gutter) - var(--maxw)) / 2));
  --bleed: calc(var(--content-left) + 24px);
}

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

html {
  background: var(--bg-3);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-geo);
  color: #fff;
}

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

a { color: inherit; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid #FFD400;
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: #fff;
  color: var(--bg-3);
  font: 600 15px/1 var(--font-ui);
}
.skip:focus { left: 8px; top: 8px; }

/* --------------------------------------------------------------- страница */

.page {
  position: relative;
  isolation: isolate;
  overflow: clip;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding:
    calc(clamp(18px, 3.4vw, 64px) + env(safe-area-inset-top))
    calc(var(--gutter) + env(safe-area-inset-right))
    0
    calc(var(--gutter) + env(safe-area-inset-left));
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(74, 125, 255, 0.18), transparent 60%),
    linear-gradient(306deg, var(--bg-1) 0%, var(--bg-2) 30%, var(--bg-3) 100%);
}

.watermark {
  position: absolute;
  top: 0;
  right: -0.04em;
  z-index: -1;
  transform: rotate(180deg);
  writing-mode: vertical-rl;
  font: 500 clamp(104px, 18vw, 293px)/0.82 var(--font-display);
  letter-spacing: 0.01em;
  color: var(--watermark);
  user-select: none;
  pointer-events: none;
}

/* ------------------------------------------------------------------ меню */

.nav {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

.nav__pill {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 28px);
  padding: 3px;
  min-height: 54px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  border-radius: 48px;
}

.nav__logo {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
}
.nav__logo img { width: 48px; height: 48px; }

.nav__menu {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 56px);
  margin: 0;
  padding: 0 0 0 clamp(4px, 1.5vw, 28px);
  list-style: none;
}

.nav__item {
  font: 400 clamp(14px, 1.45vw, 24px)/1.2 var(--font-ui);
  color: #fff;
  white-space: nowrap;
  text-decoration: none;
  cursor: default;
}
.nav__item--link { cursor: pointer; }
.nav__item--link:hover { color: #CBD8FF; }

.nav__login {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(120px, 12.6vw, 182px);
  height: 48px;
  background: var(--blue);
  border-radius: 29px;
  font: 700 clamp(15px, 1.45vw, 24px)/1 var(--font-geo);
  color: #fff;
  cursor: default;
}

.burger {
  display: none;
  flex: 0 0 auto;
  margin-left: auto;
  width: 48px;
  height: 48px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
}
.nav__pill.is-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__pill.is-open .burger span:nth-child(2) { opacity: 0; }
.nav__pill.is-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------------ герой */

.hero {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: clamp(20px, 2.2vw, 28px);
  display: grid;
  grid-template-columns: minmax(0, 735fr) minmax(0, 730fr);
  gap: clamp(16px, 2vw, 24px);
  align-items: start;
}

.hero__text { max-width: 735px; }

.eyebrow {
  margin: 0 0 clamp(6px, 0.8vw, 12px);
  font: 800 clamp(12px, 1.05vw, 18px)/1.2 var(--font-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

.wordmark {
  display: flex;
  align-items: baseline;
  margin: 0 0 clamp(10px, 1.4vw, 20px);
  line-height: 0.92;
}
.wordmark__a {
  font-family: var(--font-brand);
  font-size: clamp(56px, 8.4vw, 128px);
  color: var(--orange);
}
.wordmark__b {
  font-family: var(--font-geo);
  font-weight: 400;
  font-size: clamp(22px, 3.15vw, 48px);
  color: #fff;
}

.title {
  margin: 0 0 clamp(14px, 1.6vw, 24px);
  font: 800 clamp(27px, 4.2vw, 64px)/1.12 var(--font-ui);
  color: #fff;
  text-wrap: balance;
}

.lede {
  margin: 0;
  max-width: 62ch;
  font: 400 clamp(15px, 1.33vw, 20px)/1.58 var(--font-geo);
  color: #fff;
  text-wrap: pretty;
}

/* ------------------------------------------- интеграция, кнопка, наклейка */

.cta {
  position: relative;
  margin-top: clamp(26px, 3.4vw, 50px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(20px, 3.9vw, 57px);
}

.strip {
  display: flex;
  align-items: center;
  width: fit-content;
  min-width: calc(var(--bleed) + 52%);
  max-width: calc(var(--bleed) + 100%);
  min-height: 70px;
  margin: 0 0 0 calc(-1 * var(--bleed));
  padding: 14px 20px 14px calc(var(--bleed) + 3px);
  background: linear-gradient(90deg, var(--strip-a) 0%, var(--strip-b) 100%);
  font: 400 clamp(14px, 1.33vw, 20px)/1.4 var(--font-ui);
  color: #fff;
}

.demo {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 405px;
  min-height: 58px;
  padding: 10px 24px;
  background: var(--demo-bg);
  border: 1px solid var(--demo-border);
  border-radius: 29px;
  box-shadow:
    -6px -6px 9.1px rgba(255, 255, 255, 0.25),
     6px  6px 9.2px rgba(20, 20, 20, 0.43);
  font: 700 clamp(20px, 2.1vw, 32px)/1 var(--font-geo);
  letter-spacing: 0.04em;
  color: var(--orange);
  text-decoration: none;
  transition: box-shadow .2s ease, transform .2s ease;
}
.demo:hover {
  box-shadow:
    -3px -3px 7px rgba(255, 255, 255, 0.3),
     3px  3px 7px rgba(20, 20, 20, 0.5);
  transform: translateY(1px);
}

.sticker {
  position: absolute;
  /* Банер начинается в 24px от левого края страницы и уходит вправо
     поверх «плашки» и кнопки ДЕМО — как в исходном макете. */
  left: calc(24px - var(--content-left));
  top: 80%;
  z-index: 2;
  /* Ширина по тексту, но не короче, чем нужно, чтобы накрыть кнопку ДЕМО,
     и не длиннее макетных 1013px. */
  width: fit-content;
  min-width: calc(var(--content-left) - 24px + min(430px, 100%));
  max-width: min(1013px, calc(var(--content-left) - 24px + 110%));
  margin: 0;
  padding: clamp(14px, 1.9vw, 28px) clamp(18px, 2.4vw, 34px);
  transform: translateY(-50%) rotate(-12deg);
  background: var(--sticker-bg);
  font: 700 clamp(15px, 1.78vw, 32px)/1.26 var(--font-geo);
  color: var(--sticker-ink);
  pointer-events: none;
}
.sticker a {
  pointer-events: auto;
  color: inherit;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
  transition: text-decoration-color .2s ease, opacity .2s ease;
}
.sticker a:hover { text-decoration-color: #EB651A; opacity: .85; }

/* ---------------------------------------------------------------- шеф-повар */

.hero__art {
  display: flex;
  justify-content: flex-end;
  /* Страница ровно во всю высоту экрана, а колонка с шефом тянется до
     самого низа — иначе картинка «висит в воздухе» над нижней кромкой. */
  align-self: end;
}

.hero__art img {
  width: auto;
  height: auto;
  max-width: 100%;
  display: block;
  /* 146px — это отступ страницы сверху + меню + отступ героя. */
  max-height: calc(100dvh - 146px);
  filter: drop-shadow(0 24px 48px rgba(3, 13, 77, 0.45));
}

/* На десктопе наклейка повёрнута и её нижний левый угол уходит ниже
   колонки с текстом — резервируем под него место, иначе он обрежется. */
@media (min-width: 901px) {
  .hero__text { padding-bottom: clamp(44px, 6.4vw, 124px); }
}

/* ======================================================= планшеты (<1200) */

@media (max-width: 1199px) {
  .hero__art img { max-height: calc(100dvh - 130px); }
}

/* ====================================================== мобильные (<=900) */

@media (max-width: 900px) {
  .watermark { display: none; }

  .nav__pill {
    flex-wrap: wrap;
    row-gap: 0;
    border-radius: 28px;
  }
  .burger { display: block; }

  .nav__menu {
    display: none;
    flex: 1 0 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    padding: 6px 8px 14px;
    border-top: 1px solid rgba(152, 170, 240, 0.35);
    margin-top: 10px;
  }
  .nav__pill.is-open .nav__menu { display: flex; }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }
  .nav__item {
    display: block;
    padding: 13px 10px;
    font-size: 17px;
  }
  .nav__list li + li .nav__item { border-top: 1px solid rgba(152, 170, 240, 0.18); }

  .nav__login {
    width: 100%;
    margin-top: 12px;
    height: 46px;
    font-size: 17px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: clamp(24px, 7vw, 40px);
  }

  .hero__text { max-width: none; }

  .wordmark { margin-bottom: 14px; }

  .cta { align-items: stretch; }

  .strip {
    width: calc(var(--bleed) + 100%);
    min-width: 0;
    min-height: 0;
    padding: 14px 18px 14px calc(var(--bleed) + 2px);
    border-radius: 0 10px 10px 0;
  }

  .demo { max-width: none; }

  /* Наклейка встаёт в поток — поворот ослаблен, чтобы не ломать сетку. */
  .sticker {
    position: static;
    left: auto;
    width: auto;
    min-width: 0;
    margin: clamp(10px, 3vw, 18px) 0 0;
    padding: 18px 20px;
    transform: rotate(-3deg);
    text-align: center;
    border-radius: 6px;
    pointer-events: auto;
  }
  .sticker a { white-space: normal; }
  .sticker__br { display: none; }

  .hero__art {
    justify-content: center;
    align-self: auto;
    margin-top: clamp(28px, 8vw, 52px);
  }
  .hero__art img {
    width: 100%;
    max-width: clamp(280px, 60vw, 460px);
    max-height: none;
  }
}

@media (max-width: 480px) {
  .nav__pill { min-height: 50px; }
  .nav__logo, .nav__logo img { width: 42px; height: 42px; }
  .burger { width: 42px; height: 42px; }
  .sticker { transform: rotate(-2deg); font-size: 16px; }
}

/* ======================================================= прочие настройки */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Очень низкие окна (ландшафт на телефоне) — не растягиваем шефа. */
@media (min-width: 901px) and (max-height: 700px) {
  .hero__art img { max-height: calc(100dvh - 120px); }
}
