/* Shared theme for inner pages (cases, articles, blog, vacancies, legal/partner).
   Mirrors the homepage: white page, light-grey rounded panels, dark panels, orange primary actions. */
:root{--paper:#fff;--signal:#ff9252;--signal-soft:#fff1e8;--orange:#ff9252;--mist:#f6f6f7;--panel:#f6f6f7}
body{background:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}

/* Display type: tracking depends on size (see homepage-type.css) */
.case-hero h1,.article-hero h1,.content-hero h1,.hero h1{letter-spacing:-.04em;line-height:1.06}
.case-section h2,.case-cta h2,.article-body h2,.article-cta h2,.content-shell h2,.partner-grid h2,.terms-panel h2,.partner-cta h2,.legal-document h2,.job h2,.contact h2{letter-spacing:-.03em}
.article-body h3,.case-section h3{letter-spacing:-.02em}

/* ---------- Cases ---------- */
/* Panels alternate with plain white sections, as on the homepage: only three sections are grey, one is dark. */
.case-section>.case-wrap{background:transparent}
.case-insight>.case-wrap,.case-flow>.case-wrap,.case-recognition>.case-wrap{background:var(--panel)}
.case-section.case-context>.case-wrap{background:var(--dark,#1d1d1d)}
/* cards inside plain white sections need their own tint */
.case-solution-grid article,.case-fit-card:not(.accent),.case-metrics article,.case-before-after article{background:var(--panel)}
.case-before-after article:last-child{background:var(--dark,#1d1d1d)}
.case-solution-grid article:first-child{background:#ff9252}
.case-button:not(.secondary){background:#ff9252;color:#151515;box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 10px 24px rgba(255,146,82,.28)}
.case-button:not(.secondary):hover{background:#ffa468;color:#151515}
.case-quote,.case-solution-grid article:first-child,.case-fit-card.accent{background:#ff9252}

/* ---------- Articles ---------- */
.article-body blockquote,.article-callout{background:var(--panel)}
.article-cta a{background:#ff9252;color:#151515}

/* ---------- Blog ---------- */
.hero{margin:24px 24px 0;border-radius:40px}
.articles{padding-top:72px}
body .grid article{box-shadow:0 1px 2px rgba(15,15,15,.04),0 10px 28px rgba(15,15,15,.06)}

/* ---------- Vacancies ---------- */
.perks{margin-top:40px}
.contact{border-radius:28px}
.job{border-top-color:rgba(21,21,21,.08);border-right-color:rgba(21,21,21,.08);border-bottom-color:rgba(21,21,21,.08);box-shadow:0 1px 2px rgba(15,15,15,.04),0 10px 28px rgba(15,15,15,.06)}
.empty-card{border:1px solid rgba(21,21,21,.08);box-shadow:0 1px 2px rgba(15,15,15,.04),0 10px 28px rgba(15,15,15,.06)}
.chips span{background:var(--panel)}
.empty-primary{background:#ff9252;color:#151515}
.empty-primary:hover{background:#ffa468}

/* ---------- Legal and partner pages ---------- */
.content-kicker{background:var(--panel);box-shadow:none}
.content-button.primary{background:#ff9252;color:#151515;box-shadow:inset 0 1px 0 rgba(255,255,255,.35),0 10px 24px rgba(255,146,82,.28)}
.content-button.primary:hover{background:#ffa468;color:#151515}
.content-button.secondary{background:var(--panel);border-color:transparent}
.partner-grid article,.partner-cta,.legal-aside,.legal-document{background:var(--panel)}
.legal-note{background:#fff}

@media(max-width:800px){
  .hero{margin:12px 12px 0;border-radius:28px}
}

/* ---------- Case contact form: three fields, compact ---------- */
.case-cta-copy h2{font-size:clamp(32px,3.5vw,50px);line-height:1.12;letter-spacing:-.03em}
.case-cta-copy>p{font-size:18px;line-height:1.55}
@media(min-width:901px){
  .case-cta-panel{min-height:0;padding:80px}
  .case-lead-form{grid-template-rows:62px 140px auto 60px auto;align-content:start;align-self:center}
  .case-lead-form textarea{height:140px;min-height:140px}
}

/* ---------- Case: how a mechanic transfers to a company ---------- */
.case-transfer-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:32px;align-items:start;margin-top:40px}
.case-transfer-table{overflow:hidden;border:1px solid rgba(21,21,21,.08);border-radius:22px;background:#fff}
.case-transfer-row{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:20px;padding:18px 24px;border-top:1px solid rgba(21,21,21,.08)}
.case-transfer-row:first-child{border-top:0}
.case-transfer-row span{color:#6b7280;font-size:15px;line-height:1.4}
.case-transfer-row b{font-weight:600;line-height:1.4}
.case-transfer-side{padding:28px;border-radius:22px;background:var(--panel)}
.case-transfer-side h3{margin:0 0 16px;font-size:20px;line-height:1.2}
.case-transfer-side ul{display:grid;gap:10px;margin:0;padding-left:20px;color:#4b5160;line-height:1.5}
.case-transfer-ai{margin:20px 0 0;padding:14px 16px;border-radius:14px;background:#fff;color:#151515;font-weight:500;line-height:1.5}
@media(max-width:900px){.case-transfer-grid{grid-template-columns:1fr;gap:20px}.case-transfer-row{grid-template-columns:1fr;gap:6px;padding:16px 18px}}

/* ---------- Articles: reading-width cover and calmer title ---------- */
.article-hero h1{font-size:clamp(32px,4.2vw,52px);line-height:1.1}
.article-cover.article-shell{width:min(760px,calc(100% - 48px));max-width:760px;margin:40px auto 8px;border-radius:20px}
.article-cover img{width:100%;height:auto;aspect-ratio:2/1;object-fit:cover}
@media(max-width:800px){.article-cover.article-shell{margin-top:28px;border-radius:16px}}
/* Width/height attributes on case images must not fix the rendered height */
.case-gallery-grid img,.case-hero-visual img,.case-solution img,.case-transfer img,.case-landing img{height:auto}
.case-gallery-grid img{aspect-ratio:auto;object-fit:cover;background:#ededed}
.case-gallery-grid{align-items:start}
/* Case hero collage: admin interface with the mobile app in front */
.case-hero-visual.case-hero-collage{min-height:0;aspect-ratio:1/1;border-radius:32px 32px 0 0;background:#f6f6f7;box-shadow:none;overflow:hidden}
.case-hero-collage .collage-main{position:absolute;top:8%;left:5%;width:90%;height:auto;min-height:0;aspect-ratio:auto;padding:0;object-fit:contain;border-radius:14px;background:#fff;box-shadow:0 18px 50px rgba(21,21,21,.16)}
.case-hero-collage .collage-phone{position:absolute;right:4%;bottom:0;width:38%;height:auto;min-height:0;aspect-ratio:auto;padding:0;object-fit:contain;background:transparent;filter:drop-shadow(0 18px 30px rgba(21,21,21,.28))}
.case-hero-collage.is-single .collage-main{top:50%;left:50%;width:88%;transform:translate(-50%,-50%)}
body[data-case] .case-hero-collage img{padding:0;background:transparent}
body[data-case] .case-hero-collage .collage-main{background:#fff}
@media(max-width:900px){.case-hero-visual.case-hero-collage{aspect-ratio:1.1/1}}
.case-hero-visual.case-hero-collage{background:transparent}
.case-hero-collage .collage-main{border-radius:0;background:transparent;box-shadow:none}
body[data-case="mining"] .case-hero-collage .collage-main,body[data-case="atradi"] .case-hero-collage .collage-main{border-radius:14px;background:#fff;box-shadow:0 18px 50px rgba(21,21,21,.16)}
body[data-case="mining"] .case-hero-visual.case-hero-collage,body[data-case="atradi"] .case-hero-visual.case-hero-collage{background:#f6f6f7}
/* Case hero v2: larger visual, calmer headline, light panel for every case */
body[data-case] .case-hero-grid{grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);gap:56px}
body[data-case] .case-title{max-width:620px;font-size:clamp(34px,3.7vw,54px);line-height:1.04;letter-spacing:-.05em}
body[data-case] .case-hero-visual.case-hero-collage{aspect-ratio:1.18/1;background:#f6f6f7;box-shadow:none}
body[data-case="mining"] .case-hero-visual.case-hero-collage,body[data-case="ps-store"] .case-hero-visual.case-hero-collage{aspect-ratio:1.42/1}
body[data-case] .case-hero-collage .collage-main{top:7%;left:4%;width:92%;border-radius:16px;background:#fff;box-shadow:0 20px 56px rgba(21,21,21,.16)}
body[data-case] .case-hero-collage .collage-phone{right:3%;bottom:0;width:31%}
body[data-case] .case-hero-collage.is-single .collage-main{top:50%;left:50%;width:92%;transform:translate(-50%,-50%)}
@media(max-width:900px){
  body[data-case] .case-hero-grid{grid-template-columns:minmax(0,1fr);gap:34px}
  body[data-case] .case-title{font-size:clamp(30px,8.5vw,40px)}
  body[data-case] .case-hero-visual.case-hero-collage,body[data-case="mining"] .case-hero-visual.case-hero-collage,body[data-case="ps-store"] .case-hero-visual.case-hero-collage{aspect-ratio:1.1/1}
}
/* Button inside the orange "Форматы работы" card must contrast with the card */
.case-fit-card.accent .case-button{border-color:#151515;background:#151515;color:#fff}
.case-fit-card.accent .case-button:hover,.case-fit-card.accent .case-button:focus-visible{background:#2a2a2a;border-color:#2a2a2a;color:#fff}
/* Case CTA: form fills the column so the submit and telegram buttons share one baseline */
.case-lead-form{position:relative;display:flex!important;flex-direction:column;align-self:stretch;gap:14px}
.case-lead-form>label:has(textarea){flex:1 1 auto;display:flex;flex-direction:column}
.case-lead-form>label:has(textarea) textarea{flex:1 1 auto;height:auto;min-height:110px}
.case-lead-form .case-form-status{position:absolute;left:0;right:0;top:calc(100% + 12px);margin:0}
.case-lead-form button[type=submit]{min-height:60px}
.case-fit-card.accent .case-button{justify-content:center;white-space:nowrap;text-align:center}
.case-lead-form>.consent{align-self:flex-start;justify-content:flex-start}
/* One content width across the site: 1280px */
:root{--site-width:1280px}
.case-wrap,.content-shell,.article-shell,.vacancies-empty,.jobs.vacancies-empty,.blog .grid,.articles>.grid,.grid{width:min(var(--site-width),calc(100% - 48px))}
.article-cover.article-shell{width:min(760px,calc(100% - 48px))}
.perks{display:none}
@media(max-width:780px){.case-wrap,.content-shell,.article-shell,.vacancies-empty,.jobs.vacancies-empty,.grid{width:calc(100% - 32px)}.article-cover.article-shell{width:calc(100% - 32px)}}
