/* 00 Intro (v12.9) – his photo first and big, his words as the headline (black line, green line, no marker), one
   button. Phone: the photo full-bleed, a short fade into the page, the headline right under it (never over his
   hands). Laptop: the photo the whole left half of the first screen, flush with the window's left edge – he stands at
   the edge and points across the wall of shorts at the words on the right.
   --vh is the screen height measured once in <head> (it does not move with Telegram's or Safari's bars). Phones skip
   the page's short-screen classes, so the photo scales with --vh itself. */
.intro { --pt: 0px; --pb: var(--s5); }
.in { display: grid; grid-template-columns: minmax(0, 1fr); }

/* ~380 px on an 844 screen, ~210 in Telegram's 664: the button stays on the first screen either way */
.in-photo { position: relative; margin: 0; height: clamp(196px, calc(var(--vh, 100svh) * .95 - 420px), 440px); overflow: hidden; background: var(--soft-2); }
.in-photo picture, .in-photo img { display: block; width: 100%; height: 100%; }
.in-photo img { object-fit: cover; object-position: 40% 28%; }
/* A short fade at the foot only, finished before the words start */
.in-photo::after { content: ""; position: absolute; inset: auto 0 0; height: 44px; pointer-events: none; background: linear-gradient(180deg, rgba(251, 250, 247, 0), rgba(251, 250, 247, .7) 60%, var(--bg)); }

/* The one line on the photo: what the wall behind him is, with the number */
.in-tag { position: absolute; top: var(--s3); right: var(--s3); z-index: 1; display: flex; align-items: flex-start; gap: 8px; max-width: calc(100% - 32px); margin: 0; padding: 10px 14px 11px 12px; border-radius: 14px; background: rgba(251, 250, 247, .88); -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2); box-shadow: 0 10px 30px -14px rgba(22, 21, 18, .45), 0 0 0 1px rgba(22, 21, 18, .06); font: 600 16px/1.3 var(--font); color: var(--ink); }
.in-tag > span { min-width: 0; }
.in-tag .nw { display: block; }
.in-tag .ico { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--green-3); }

.in-text { position: relative; z-index: 1; margin-top: -6px; padding: 0 var(--gutter); }
.in-h { margin: 0; font-size: min(11.2vw, 60px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 800; }
.in-l { display: block; }
.in-lead { margin: var(--s3) 0 0; max-width: 29em; }
.in-cta { margin-top: var(--s4); }
.in .cta-fine { color: var(--ink-2); }
.in .cta-fine b { color: var(--ink); font-weight: 700; }
.in-proof { margin: var(--s3) 0 0; max-width: 32em; font-size: 16px; line-height: 1.45; font-weight: 500; color: var(--ink-2); }

/* Arrival: the photo settles, then the two lines, then the rest – once, quick, so the screen is still in a second */
@keyframes in-photo { from { opacity: 0; transform: scale(1.045); } to { opacity: 1; transform: none; } }
@keyframes in-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.in-photo img { animation: in-photo 1.1s var(--ease) both; }
.in-tag { animation: in-rise .6s var(--ease) .55s both; }
.in-h .in-l { animation: in-rise .7s var(--ease) both; }
.in-h .in-l + .in-l { animation-delay: .12s; }
.in-lead { animation: in-rise .7s var(--ease) .24s both; }
.in-cta, .in-proof { animation: in-rise .7s var(--ease) .34s both; }
@media (prefers-reduced-motion: reduce) { .in-photo img, .in-tag, .in-h .in-l, .in-lead, .in-cta, .in-proof { animation: none; } }

/* ---------- Phone ---------- */
@media (max-width: 719px) {
  .in-lead { font-size: 18px; line-height: 1.45; }
  .in-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .in-cta .btn { white-space: nowrap; }
  .in-tag { top: 12px; right: 12px; max-width: 80%; padding: 8px 12px 9px 10px; font-size: 15px; }
  .in-tag .ico { width: 16px; height: 16px; }
}

/* ---------- Tablet ---------- */
@media (min-width: 720px) and (max-width: 999px) {
  .in-photo { height: min(calc(var(--vh, 100svh) * .55), 560px); }
  .in-text { padding: 0 var(--gutter); max-width: calc(720px + 2 * var(--gutter)); }
  .in-cta { flex-direction: row; align-items: center; gap: var(--s4); }
}

/* ---------- Laptop ---------- */
@media (min-width: 1000px) {
  .intro { --pb: var(--s5); }
  .in {
    --inset: max(var(--gutter), (100vw - var(--wrap)) / 2);
    grid-template-columns: minmax(0, 46%) minmax(0, 1fr);
    grid-template-areas: "photo text";
    min-height: calc(var(--vh, 100svh) - var(--head));
  }
  .in-photo { grid-area: photo; height: auto; min-height: 560px; border-radius: 0 var(--r-card) var(--r-card) 0; }
  .in-photo img { position: absolute; inset: 0; object-position: 0% 34%; }
  .in-photo::after { display: none; }
  .in-tag { top: auto; bottom: var(--s4); right: var(--s4); max-width: none; padding: 12px 16px 13px 14px; font-size: 17px; }
  .in-text { grid-area: text; align-self: center; margin: 0; padding: var(--s5) var(--inset) var(--s5) clamp(48px, 5.5vw, 104px); }
  .in-h { font-size: clamp(60px, 5.8vw, 96px); line-height: 1; }
  .in-lead { margin-top: var(--s4); max-width: 25em; }
  .in-cta { margin-top: var(--s5); flex-direction: column; align-items: flex-start; gap: 12px; }
  .in-cta .btn { white-space: nowrap; }
  .in-cta .cta-fine { font-size: 18px; }
  .in-proof { margin-top: var(--s4); }
}
/* Russian is wider (measured at 100 px: «Пусть монтирует ИИ.» 984 px against "I hate editing." 595): a smaller size,
   so each line stays one line – two lines on every screen from 360 px up */
html[lang="ru"] .in-h .in-l { white-space: nowrap; }
@media (min-width: 1000px) { html[lang="ru"] .in-h { font-size: clamp(44px, 4vw, 58px); } }

@media (max-width: 719px) { html[lang="ru"] .in-h { font-size: min(8.9vw, 54px); } }

/* The header's button waits while the intro's own button is on screen: one "reserve" at a time (js/00 sets the
   class). It folds to nothing and the language switch slides to the right edge, so no gap is left in the header. */
.top .btn.small { max-width: 320px; overflow: hidden; transition: opacity .2s, visibility .2s, max-width .35s var(--ease), padding .35s var(--ease), margin .35s var(--ease); }
.in-cta-on .top .btn.small { opacity: 0; visibility: hidden; max-width: 0; padding-left: 0; padding-right: 0; margin-left: calc(-1 * var(--top-gap, 28px)); }
