:root{
    --bg:#FFFFFF;
    --ink:#141414;
    --ink-soft:#5A5A56;
    --accent:#1F3FD6;
    --accent-soft:#E8ECFC;
    --line:#141414;
    --line-soft:#E4E4E0;
    --highlight-bg:#FFF4CC;
    --highlight-ink:#9C6B00;
    --gap:24px;
    --r-lg:28px;
    --r-md:18px;
    --r-sm:10px;
    --display: 'Inter', sans-serif;
    --body: 'Inter', sans-serif;
    --mono: 'Inter', sans-serif;
  }

  *{box-sizing:border-box; margin:0; padding:0;}

  html{scroll-behavior:smooth;}
  @media (prefers-reduced-motion: reduce){
    html{scroll-behavior:auto;}
    *{animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important;}
  }

  body{
    background:var(--bg);
    color:var(--ink);
    font-family:var(--body);
    line-height:1.5;
    -webkit-font-smoothing:antialiased;
  }

  a{color:inherit;}
  a:focus-visible, button:focus-visible{
    outline:2px solid var(--accent);
    outline-offset:3px;
    border-radius:4px;
  }

  .wrap{
    max-width:1200px;
    margin:0 auto;
    padding:0 32px;
  }

  .mono-label{
    font-family:var(--mono);
    font-size:12px;
    letter-spacing:0.01em;
    color:var(--ink-soft);
  }

  /* ---------- HEADER ---------- */
  header{
    position:sticky;
    top:0;
    z-index:50;
    background:rgba(255,255,255,0.85);
    backdrop-filter:blur(6px);
    border-bottom:1px solid var(--line-soft);
  }
  .nav{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:20px 32px;
    max-width:1200px;
    margin:0 auto;
  }
  .nav-logo{
    font-family:var(--display);
    font-weight:600;
    font-size:18px;
    letter-spacing:-0.01em;
    text-decoration:none;
    color:var(--ink);
  }
  .nav-links{
    display:flex;
    gap:8px;
    list-style:none;
  }
  .nav-links a{
    font-family:var(--body);
    font-weight:500;
    font-size:14px;
    letter-spacing:0;
    text-transform:none;
    text-decoration:none;
    color:var(--ink);
    padding:8px 16px;
    border-radius:999px;
    transition:background 0.2s ease, color 0.2s ease;
  }
  .nav-links a:hover{ background:var(--accent-soft); color:var(--accent); }

  .nav-toggle{ display:none; }

  /* ---------- HERO — portrait ---------- */
  .hero{
    position:relative;
    padding:72px 32px 0;
  }
  .hero-inner{
    max-width:1200px;
    margin:0 auto;
    display:flex;
    align-items:center;
    gap:56px;
    flex-wrap:wrap;
  }
  .hero-copy{ flex:1 1 420px; }
  .hero-inner--text-only{ justify-content:center; padding:24px 0 88px; }
  .hero-copy--wide{ flex:none; max-width:720px; text-align:center; }
  .hero-copy--wide .hero-role{ margin-left:auto; margin-right:auto; }
  .hero-copy--wide .hero-tagline{ margin-left:auto; margin-right:auto; }
  .hero-copy--wide .hero-actions{ justify-content:center; }
  .hero-greeting{
    font-size:16px;
    font-weight:500;
    color:var(--ink-soft);
    margin-bottom:12px;
  }
  .hero-role{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 16px;
    border:1px solid var(--line-soft);
    border-radius:999px;
    margin-bottom:20px;
  }
  .hero-role .dot{
    width:7px; height:7px;
    border-radius:50%;
    background:var(--accent);
  }
  .hero-name{
    font-family:var(--display);
    font-weight:700;
    letter-spacing:-0.03em;
    line-height:0.98;
    font-size:clamp(40px, 6.5vw, 76px);
    margin-bottom:20px;
  }
  .hero-name em{
    font-style:normal;
    color:var(--accent);
  }
  .hero-tagline{
    font-size:18px;
    max-width:440px;
    color:var(--ink-soft);
    margin-bottom:28px;
  }
  .hero-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
  }
  .btn{
    font-family:var(--body);
    font-weight:600;
    font-size:15px;
    text-transform:none;
    letter-spacing:0;
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:14px 26px;
    border-radius:999px;
    text-decoration:none;
    transition:background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  }
  .btn-primary{ background:var(--accent); color:#fff; }
  .btn-primary:hover{ background:var(--ink); transform:translateY(-2px); }
  .btn-outline{ border:1.5px solid var(--line); color:var(--ink); }
  .btn-outline:hover{ background:var(--ink); color:#fff; border-color:var(--ink); }

  .hero-photo{
    flex:0 0 320px;
    width:320px;
    aspect-ratio:4/5;
    border-radius:var(--r-lg);
    overflow:hidden;
    position:relative;
    background:#fff;
    border:1px solid var(--line-soft);
  }
  .hero-photo .frame{
    position:absolute; inset:0;
    display:flex;
    align-items:flex-end;
    justify-content:center;
    padding-bottom:24px;
  }
  .hero-photo svg{ width:62%; height:auto; color:var(--accent); }
  .hero-photo .cap{
    position:absolute;
    bottom:16px; left:16px; right:16px;
    font-family:var(--mono);
    font-size:11px;
    letter-spacing:0.01em;
    color:var(--ink-soft);
    text-align:center;
  }

  /* ---------- SECTION HEADINGS ---------- */
  .section{
    padding:96px 0;
  }
  .section-head{
    display:flex;
    justify-content:space-between;
    align-items:baseline;
    margin-bottom:28px;
    flex-wrap:wrap;
    gap:12px;
  }
  .section-title{
    font-family:var(--display);
    font-weight:700;
    font-size:clamp(28px, 3.6vw, 40px);
    letter-spacing:-0.01em;
  }

  /* ---------- WORK GRID ---------- */
  .work-grid{
    display:grid;
    grid-template-columns:repeat(12, 1fr);
    gap:var(--gap);
  }
  .project{
    grid-column:span 6;
    display:block;
    text-decoration:none;
    color:var(--ink);
    opacity:0;
    transform:translateY(16px);
    transition:opacity 0.6s ease, transform 0.6s ease;
  }
  .project.in-view{ opacity:1; transform:translateY(0); }

  .project-thumb{
    aspect-ratio:16/10.5;
    position:relative;
    overflow:hidden;
    margin-bottom:16px;
    border-radius:var(--r-lg);
  }

  .project-thumb .plate{
    position:absolute; inset:0;
    transition:transform 0.5s ease;
  }
  .project:hover .plate{ transform:scale(1.04); }

  .project-thumb .num{
    position:absolute;
    top:14px; left:14px;
    font-family:var(--mono);
    font-size:12px;
    background:#fff;
    padding:4px 10px;
    border-radius:999px;
  }

  .project-info{
    display:flex;
    justify-content:space-between;
    align-items:baseline;
    gap:12px;
    padding:0 4px;
  }
  .project-name{
    font-family:var(--display);
    font-weight:600;
    font-size:20px;
  }
  .project-tags{
    font-family:var(--mono);
    font-size:14px;
    color:var(--ink-soft);
    text-align:right;
  }

  /* project plate patterns — no images, generated fields */
  .plate-1{ background:
    repeating-linear-gradient(90deg, var(--accent) 0 2px, transparent 2px 34px), var(--accent-soft); }
  .plate-2{ background:
    radial-gradient(circle at 30% 30%, var(--accent) 0 8px, transparent 9px) 0 0/40px 40px, var(--accent-soft); }
  .plate-3{ background: linear-gradient(135deg, var(--ink) 0 25%, var(--accent-soft) 25%); }
  .plate-4{ background:
    repeating-linear-gradient(0deg, var(--ink) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 24px), var(--accent-soft); }
  .plate-5{ background: linear-gradient(90deg, var(--accent) 50%, var(--accent-soft) 50%); }
  .plate-6{ background:
    conic-gradient(from 45deg, var(--accent) 0 25%, var(--accent-soft) 0 50%, var(--accent) 0 75%, var(--accent-soft) 0); }

  /* ---------- ABOUT ---------- */
  .about-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:64px;
    align-items:start;
  }
  .about-text p{
    font-size:17px;
    color:var(--ink-soft);
    max-width:52ch;
    margin-bottom:16px;
  }
  .about-list{
    list-style:none;
    background:#F2F2F0;
    border-radius:var(--r-md);
    padding:8px 22px;
  }
  .about-list li{
    display:flex;
    justify-content:space-between;
    padding:14px 0;
    border-bottom:1px solid rgba(20,20,20,0.08);
    font-family:var(--body);
    font-weight:500;
    font-size:15px;
    text-transform:none;
    letter-spacing:0;
  }
  .about-list li:last-child{ border-bottom:none; }
  .about-list li span:last-child{ color:var(--ink-soft); text-transform:none; letter-spacing:0; }

  /* ---------- CONTACT ---------- */
  .contact{
    padding:96px 0 64px;
  }
  .contact-inner{
    background:var(--ink);
    color:#fff;
    border-radius:var(--r-lg);
    padding:56px 48px;
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    flex-wrap:wrap;
    gap:32px;
  }
  .contact-title{
    font-family:var(--display);
    font-weight:700;
    font-size:clamp(24px, 4vw, 40px);
    letter-spacing:-0.02em;
    max-width:640px;
  }
  .contact-email{
    color:#fff;
    text-decoration:none;
    border-bottom:1px solid var(--accent);
  }
  .contact-links{
    display:flex;
    flex-direction:column;
    gap:8px;
    align-items:flex-end;
  }
  .contact-links a{
    font-family:var(--mono);
    font-size:13px;
    text-decoration:none;
    letter-spacing:0.01em;
    color:rgba(255,255,255,0.7);
  }
  .contact-links a:hover{ color:#fff; }

  footer{
    padding:24px 0 48px;
    display:flex;
    justify-content:space-between;
    font-family:var(--mono);
    font-size:11px;
    color:var(--ink-soft);
    letter-spacing:0.01em;
    flex-wrap:wrap;
    gap:8px;
  }

  /* ---------- RESPONSIVE ---------- */
  @media (max-width:860px){
    .nav-links{ display:none; }
    .about-grid{ grid-template-columns:1fr; gap:32px; }
    .project{ grid-column:span 12; }
    .hero{ padding:48px 20px 0; }
    .hero-inner{ flex-direction:column-reverse; gap:32px; }
    .contact-inner{ padding:36px 24px; border-radius:var(--r-md); }
    .wrap{ padding:0 20px; }
    .section{ padding:64px 0; }
  }

/* ============ CASE STUDY PAGES ============ */
.case-hero{
  padding:56px 32px 0;
}
.case-hero-inner{
  max-width:1040px;
  margin:0 auto;
}
.back-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:14px;
  font-weight:500;
  text-decoration:none;
  color:var(--ink-soft);
  margin-bottom:32px;
  transition:color 0.2s ease;
}
.back-link:hover{ color:var(--accent); }

.case-tags{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:20px;
}
.case-tag{
  font-size:12px;
  font-weight:500;
  padding:6px 14px;
  border:1px solid var(--line-soft);
  border-radius:999px;
  color:var(--ink-soft);
}

.case-title{
  font-family:var(--display);
  font-weight:700;
  letter-spacing:-0.02em;
  line-height:1.05;
  font-size:clamp(32px, 5.5vw, 56px);
  margin-bottom:24px;
}

.case-meta{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(140px, 1fr));
  gap:24px;
  padding:28px 0;
  border-top:1px solid var(--line-soft);
  border-bottom:1px solid var(--line-soft);
  margin-bottom:64px;
}
.case-meta div{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding-left:20px;
  border-left:1px solid var(--line-soft);
}
.case-meta div:first-child{ padding-left:0; border-left:none; }
.case-meta .mono-label{ font-size:14px; }
.case-meta .val{ font-size:15px; font-weight:600; }

.case-cover{
  max-width:1040px;
  margin:0 auto 72px;
  padding:0 32px;
}
.case-cover .plate-cover{
  aspect-ratio:16/9;
  border-radius:var(--r-lg);
}
.case-cover .cover-cap{
  font-size:13px;
  color:var(--ink-soft);
  margin-top:14px;
  text-align:center;
}

.case-body{
  max-width:1040px;
  margin:0 auto;
  padding:0 32px 96px;
}
.case-body h2{
  font-family:var(--display);
  font-weight:700;
  font-size:clamp(22px, 3vw, 30px);
  letter-spacing:-0.01em;
  margin:56px 0 20px;
}
.case-body h2:first-child{ margin-top:0; }
.case-body h3{
  font-family:var(--display);
  font-weight:600;
  font-size:18px;
  margin:28px 0 10px;
}
.case-body p{
  font-size:17px;
  line-height:1.7;
  color:var(--ink);
  margin-bottom:18px;
}
.case-body p:has(+ ul),
.case-body p:has(+ ol){
  margin-bottom:8px;
}
.case-body li strong,
.case-body p strong{
  color:var(--ink);
  font-weight:500;
}
.case-body ul{
  list-style:none;
  margin:0 0 36px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.case-body li{
  position:relative;
  padding-left:26px;
  font-size:17px;
  line-height:1.7;
  color:var(--ink);
}
.case-body li::before{
  content:'';
  position:absolute;
  left:0; top:11px;
  width:12px; height:2px;
  background:var(--ink-soft);
  border-radius:1px;
}
.case-body blockquote{
  position:relative;
  background:var(--highlight-bg);
  border-radius:var(--r-md);
  padding:24px 28px;
  margin:32px 0;
  font-family:var(--display);
  font-size:20px;
  font-weight:600;
  letter-spacing:-0.01em;
  line-height:1.4;
  color:var(--ink);
}
.case-image{
  aspect-ratio:16/10;
  border-radius:var(--r-md);
  margin:32px 0;
}
.case-image-cap{
  font-size:13px;
  color:var(--ink-soft);
  margin:-20px 0 32px;
}

.case-figure{
  margin:36px 0;
}
.case-figure img{
  width:100%;
  height:auto;
  display:block;
  border-radius:var(--r-md);
}
.case-figure figcaption{
  font-size:15px;
  line-height:1.6;
  color:var(--ink-soft);
  margin-top:14px;
}
.case-figure figcaption strong{ color:var(--ink); font-weight:600; }

.case-callout{
  position:relative;
  background:var(--highlight-bg);
  border-radius:var(--r-md);
  padding:26px 30px;
  margin:32px 0;
  font-size:17px;
  font-weight:600;
  color:var(--ink);
  line-height:1.55;
}
.case-callout-label{
  display:flex;
  align-items:center;
  gap:8px;
  font-family:var(--body);
  font-size:14px;
  font-weight:700;
  letter-spacing:0.02em;
  color:var(--ink);
  margin-bottom:10px;
}
.case-callout--role{ font-weight:400; font-size:17px; color:var(--ink); }
.case-callout--role strong{ color:var(--ink); font-weight:700; }
.case-callout--insight{ font-weight:400; font-size:17px; color:var(--ink); }

/* ---- Highlight stats row (used for hero-level stat callouts) ---- */
.case-highlight-stats{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(140px, 1fr));
  gap:20px;
  background:var(--highlight-bg);
  border-radius:var(--r-md);
  padding:28px 30px;
  margin:32px 0;
}
.case-highlight-stat{ display:flex; flex-direction:column; gap:4px; }
.case-highlight-num{
  font-family:var(--display);
  font-weight:500;
  font-size:clamp(28px, 4vw, 38px);
  color:var(--ink);
  line-height:1;
}
.case-highlight-label{
  font-size:13px;
  font-weight:500;
  color:var(--ink);
  line-height:1.4;
}

/* ---- Before/After two-column comparison ---- */
.case-compare{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:28px;
  margin:24px 0 32px;
}
.case-compare-col h3{ margin:0 0 10px; }
.case-compare-col ul{ margin:0; }
.case-compare-col li{ margin-bottom:4px; line-height:1.5; }

@media (max-width:640px){
  .case-compare{ grid-template-columns:1fr; gap:28px; }
}

/* ---- Expandable list for subsections (editorial style, not FAQ boxes) ---- */
.case-expand-list{
  border-top:1px solid var(--line-soft);
  margin:28px 0;
}
.case-expand-item{
  border-bottom:1px solid var(--line-soft);
}
.case-expand-item summary{
  cursor:pointer;
  list-style:none;
  padding:22px 0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
}
.case-expand-item summary::-webkit-details-marker{ display:none; }
.case-expand-item summary::marker{ content:''; }
.case-expand-title{
  font-family:var(--display);
  font-weight:500;
  font-size:18px;
  color:var(--ink);
}
.case-expand-toggle{
  flex-shrink:0;
  position:relative;
  width:22px;
  height:22px;
  font-size:0;
  color:var(--ink-soft);
  transition:transform 0.25s ease, color 0.2s ease;
}
.case-expand-toggle::before,
.case-expand-toggle::after{
  content:"";
  position:absolute;
  left:50%; top:50%;
  background:currentColor;
  border-radius:2px;
}
.case-expand-toggle::before{ width:20px; height:1.5px; transform:translate(-50%,-50%); }
.case-expand-toggle::after{ width:1.5px; height:20px; transform:translate(-50%,-50%); }
.case-expand-item[open] .case-expand-toggle{ transform:rotate(45deg); color:var(--ink); }
.case-expand-content{
  padding:0 0 28px;
}
.case-expand-content p:last-child,
.case-expand-content blockquote:last-child{ margin-bottom:0; }


.case-result{
  background:#E8F5EC;
  border-radius:var(--r-lg);
  padding:40px;
  margin-top:56px;
}
.case-result h2{ margin-top:0; }
.case-stats{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
  gap:24px;
  margin:24px 0 8px;
}
.case-stat-num{
  font-family:var(--display);
  font-weight:500;
  font-size:32px;
  color:var(--ink);
  margin-bottom:4px;
}
.case-stat-label{
  font-size:13px;
  color:var(--ink-soft);
}

.case-nav{
  max-width:1000px;
  margin:0 auto;
  padding:0 32px 96px;
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}
.case-nav a{
  font-size:14px;
  font-weight:500;
  text-decoration:none;
  padding:12px 22px;
  border:1px solid var(--line);
  border-radius:999px;
  transition:background 0.2s ease, color 0.2s ease;
}
.case-nav a:hover{ background:var(--ink); color:#fff; }

@media (max-width:600px){
  .case-hero{ padding:40px 20px 0; }
  .case-cover, .case-body, .case-nav{ padding-left:20px; padding-right:20px; }
  .case-result{ padding:28px 22px; }
}

/* ---------- TESTIMONIALS ---------- */
.testimonials{
  background:#F2F2F0;
  color:var(--ink);
  border-radius:var(--r-lg);
  padding:56px 48px;
}
.testimonials .section-head{ margin-bottom:40px; }
.testimonials .section-title{ color:var(--ink); }
.testimonials .mono-label{ color:var(--ink-soft); }

.testimonial-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(280px, 1fr));
  gap:32px;
}
.testimonial-card{
  display:flex;
  flex-direction:column;
  gap:20px;
}
.testimonial-quote{
  font-size:17px;
  line-height:1.6;
  color:var(--ink);
}
.testimonial-quote::before{ content:'\201C'; color:var(--accent); font-weight:800; }
.testimonial-quote::after{ content:'\201D'; color:var(--accent); font-weight:800; }
.testimonial-person{
  display:flex;
  align-items:center;
  gap:12px;
}
.testimonial-avatar{
  width:44px; height:44px;
  border-radius:50%;
  background:var(--accent-soft);
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--display);
  font-weight:700;
  font-size:15px;
  color:var(--accent);
  flex-shrink:0;
}
.testimonial-name{ font-size:14px; font-weight:600; }
.testimonial-role{ font-size:12px; color:var(--ink-soft); }
.testimonial-more{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:32px;
  font-size:14px;
  font-weight:500;
  color:var(--accent);
  text-decoration:none;
}
.testimonial-more:hover{ text-decoration:underline; }

@media (max-width:860px){
  .testimonials{ padding:36px 24px; border-radius:var(--r-md); }
}

.case-intro{
  margin:28px 0;
}
.case-intro p{ margin-bottom:12px; }
.case-intro p:last-child{ margin-bottom:0; }

.arr{ width:1.4em; height:0.7em; vertical-align:-0.02em; margin:0 0.35em; }
.arr-l{ transform:scaleX(-1); }
.case-nav .arr, .back-link .arr{ margin:0 0.5em; }
.case-expand-item summary:hover .case-expand-toggle{ color:var(--accent); }

footer.wrap{ padding-top:24px; padding-bottom:20px; }

/* hover на карточках кейсов */
.project-thumb img{ transition:transform 0.6s ease; }
.project:hover .project-thumb img{ transform:scale(1.05); }
.project-name{ transition:color 0.2s ease; }
.project:hover .project-name{ color:var(--accent); }
