/* Positivus — built from the Positivus-Design Figma file
   Desktop: 1440 frame · Tablet (≤1199px): 768 frame · Mobile (≤699px): 390 frame */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
}

:root {
  --dark: #191a23;
  --green: #b9ff66;
  --grey: #f3f3f3;
  --ink: #000;
  --field-dark: #292a32;
  --placeholder: #898989;
  --shadow: 0 5px 0 var(--dark);
  --gutter: 60px;
  interpolate-size: allow-keywords;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.28;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
ul { list-style: none; padding: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 500; }

:focus-visible { outline: 3px solid var(--dark); outline-offset: 3px; border-radius: 4px; }
.cases :focus-visible,
.testimonials :focus-visible,
.card--dark :focus-visible,
.site-footer :focus-visible { outline-color: var(--green); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--dark); color: #fff; padding: 12px 20px; border-radius: 14px;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

.container {
  width: min(1240px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 19px 34px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 20px;
  line-height: 28px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  background: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--green); color: var(--dark); border-color: var(--dark); }
.btn-outline { border-color: var(--dark); color: var(--ink); }
.btn-outline:hover { background: var(--dark); color: #fff; }
.btn-green { background: var(--green); color: var(--ink); }
.btn-green:hover { background: #fff; }
.btn-block { width: 100%; }

/* ---------- Highlight labels ---------- */
.label { flex: none; font-size: 40px; line-height: 51px; }
.label span,
.service-title span {
  background: var(--green);
  border-radius: 7px;
  padding: 0 7px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.label.label--small { font-size: 20px; line-height: 26px; color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 60px;
}
.logo { flex: none; display: block; }
.site-header .logo img { width: 220px; height: 36px; }

.site-nav { display: flex; align-items: center; gap: 40px; }
.site-nav ul { display: flex; align-items: center; gap: 40px; }
.site-nav ul a {
  font-size: 20px;
  line-height: 28px;
  text-decoration: none;
  background-image: linear-gradient(var(--green), var(--green));
  background-size: 0 100%;
  background-repeat: no-repeat;
  border-radius: 4px;
  transition: background-size .25s ease;
}
.site-nav ul a:hover { background-size: 100% 100%; }

.menu-btn {
  display: none;
  width: 36px;
  height: 44px;
  padding: 8px 0 8px 8px;
  border: 0;
  background: none;
  cursor: pointer;
}

/* ---------- Main ---------- */
main { padding: 70px 0 140px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 531px) minmax(0, 601px);
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "title art"
    "lead  art"
    "cta   art";
  justify-content: space-between;
  column-gap: 40px;
}
.hero h1 { grid-area: title; font-size: 60px; line-height: 77px; margin-bottom: 35px; }
.hero-art { grid-area: art; width: 100%; height: auto; align-self: start; }
.hero-lead { grid-area: lead; max-width: 498px; font-size: 20px; line-height: 28px; margin-bottom: 35px; }
.hero-btn { grid-area: cta; justify-self: start; align-self: start; }

/* Logos */
.logos ul {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-top: 70px;
}
.logos img { width: auto; height: 48px; filter: grayscale(1); }

/* Section scaffold */
.section { padding-top: 140px; }
.section--testimonials { padding-top: 100px; }
.section-head {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 80px;
}
.section-head p { flex: 0 1 var(--w, 580px); font-size: 18px; line-height: 23px; }

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}
.service-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 310px;
  padding: 49px; /* 50px in Figma; strokes are inside there */
  border: 1px solid var(--dark);
  border-radius: 45px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card--grey { background: var(--grey); }
.card--green { background: var(--green); }
.card--dark { background: var(--dark); color: #fff; }

.service-text { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 93px; }
.service-title { font-size: 30px; line-height: 38px; color: var(--ink); }
.card--green .service-title span,
.card--dark .service-title span { background: #fff; }
.card--dark.card--green-label .service-title span { background: var(--green); }

.learn-more {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  font-size: 20px;
  line-height: 28px;
  text-decoration: none;
}
.learn-more img { flex: none; transition: transform .25s ease; }
.learn-more:hover img { transform: rotate(45deg); }
.learn-more:hover > span { text-decoration: underline; text-underline-offset: 4px; }

.service-img { flex: 0 1 210px; min-width: 0; width: 210px; height: auto; }

/* ---------- CTA ---------- */
.cta { padding: 124px 0 24px; }
.cta-card {
  position: relative;
  background: var(--grey);
  border-radius: 45px;
  padding: 60px;
}
.cta-copy {
  position: relative;
  z-index: 1;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}
.cta-copy h2 { font-size: 30px; line-height: 38px; }
.cta-copy p { font-size: 18px; line-height: 23px; }
.cta-art { position: absolute; top: -23px; right: 136px; width: 358px; height: auto; }

/* ---------- Case studies ---------- */
.cases {
  display: grid;
  grid-template-columns: minmax(0, 286fr) minmax(0, 351fr) minmax(0, 351fr);
  column-gap: 66px;
  padding: 70px 60px;
  background: var(--dark);
  color: #fff;
  border-radius: 45px;
}
.case { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.case + .case { border-left: 1px solid #fff; padding-left: 64px; }
.case p { font-size: 18px; line-height: 23px; }
.case-link {
  display: inline-flex;
  align-items: center;
  gap: 13.5px;
  color: var(--green);
  font-size: 20px;
  line-height: 28px;
  text-decoration: none;
}
.case-link img { transition: transform .25s ease; }
.case-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.case-link:hover img { transform: translate(3px, -3px); }

/* ---------- Working process ---------- */
.steps { display: flex; flex-direction: column; gap: 30px; }
.step {
  padding: 40px 59px;
  background: var(--grey);
  border: 1px solid var(--dark);
  border-radius: 45px;
  box-shadow: var(--shadow);
  transition: background-color .25s ease;
}
.step[open] { background: var(--green); }
.step summary {
  display: flex;
  align-items: center;
  gap: 25px;
  list-style: none;
  cursor: pointer;
}
.step summary::-webkit-details-marker { display: none; }
.step-num { flex: none; font-size: 60px; line-height: 77px; font-weight: 500; }
.step-title { flex: 1; min-width: 0; font-size: 30px; line-height: 38px; font-weight: 500; }
.step-toggle {
  flex: none;
  width: 58px;
  height: 58px;
  background: url("img/icons/plus.svg") center / contain no-repeat;
  transition: transform .25s ease;
}
.step summary:hover .step-toggle { transform: rotate(90deg); }
.step[open] .step-toggle { background-image: url("img/icons/minus.svg"); }
.step[open] summary:hover .step-toggle { transform: none; }
.step-body { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--ink); }
.step-body p { font-size: 18px; line-height: 23px; padding-bottom: 13px; }

@supports selector(::details-content) {
  .step::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size .3s ease, content-visibility .3s allow-discrete;
  }
  .step[open]::details-content { block-size: auto; }
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.member {
  display: flex;
  flex-direction: column;
  gap: 27.5px;
  padding: 39px 34px;
  background: #fff;
  border: 1px solid var(--dark);
  border-radius: 45px;
  box-shadow: var(--shadow);
}
.member-head { position: relative; display: flex; align-items: flex-end; gap: 20px; }
.member-photo { flex: none; width: auto; height: 103px; }
.member-name { min-width: 0; padding-top: 30px; }
.member-name h3 { font-size: 20px; line-height: 26px; }
.member-name p { font-size: 18px; line-height: 23px; }
.member-linkedin { position: absolute; top: 0; right: 0; border-radius: 50%; }
.member-linkedin img { transition: transform .2s ease; }
.member-linkedin:hover img { transform: scale(1.1); }
.member-bio { padding-top: 27.5px; border-top: 1px solid var(--ink); font-size: 18px; line-height: 23px; }
.team-actions { display: flex; justify-content: flex-end; margin-top: 40px; }

/* ---------- Testimonials ---------- */
.testimonials {
  --sw: 606px;
  --gap: 50px;
  padding: 84px 0 68px;
  background: var(--dark);
  border-radius: 45px;
  overflow: hidden;
}
.slider-viewport { touch-action: pan-y; }
.slider-track {
  --pos: 0;
  display: flex;
  gap: var(--gap);
  transform: translateX(calc(50% - var(--sw) / 2 - var(--pos) * (var(--sw) + var(--gap))));
  transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}
.testimonial {
  flex: 0 0 var(--sw);
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin: 0;
}
.bubble {
  position: relative;
  margin: 0;
  padding: 47px 51px 51px;
  border: 1px solid var(--green);
  border-radius: 45px;
  color: #fff;
}
.bubble p { font-size: 18px; line-height: 23px; }
.bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 55px;
  width: 54px;
  height: 30px;
  background: url("img/icons/bubble-tail.svg") no-repeat;
}
.author { padding-left: 80px; color: #fff; }
.author strong { display: block; font-size: 20px; line-height: 26px; font-weight: 500; color: var(--green); }
.author span { display: block; font-size: 18px; line-height: 23px; }

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(567px, 100% - 60px);
  height: 14px; /* arrows overflow this row, as in Figma */
  margin: 124px auto 0;
}
.slider-arrow {
  width: 23px;
  height: 23px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}
.slider-arrow:hover { opacity: .6; }
.slider-dots { display: flex; gap: 19px; }
.slider-dot {
  position: relative;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  background: url("img/icons/dot.svg") center / contain no-repeat;
  cursor: pointer;
  transition: transform .2s ease;
}
.slider-dot::after { content: ""; position: absolute; inset: -6px; }
.slider-dot:hover { transform: scale(1.2); }
.slider-dot[aria-current="true"] { background-image: url("img/icons/dot-active.svg"); }

/* ---------- Contact ---------- */
.contact-card {
  position: relative;
  padding: 60px 100px 80px;
  background: var(--grey);
  border-radius: 45px;
  overflow: hidden;
}
.contact-form {
  position: relative;
  z-index: 1;
  max-width: 556px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.radio-group { display: flex; gap: 35px; padding: 0; border: 0; }
.radio {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 18px;
  line-height: 23px;
  cursor: pointer;
}
.radio input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.radio-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px var(--ink);
}
.radio-mark::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green);
  transform: scale(0);
  transition: transform .15s ease;
}
.radio input:checked + .radio-mark::after { transform: scale(1); }
.radio input:focus-visible + .radio-mark { outline: 3px solid var(--dark); outline-offset: 3px; }

.fields { display: flex; flex-direction: column; gap: 25px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 16px; line-height: 28px; }
.field input,
.field textarea {
  width: 100%;
  padding: 17px 29px;
  border: 1px solid var(--ink);
  border-radius: 14px;
  background: #fff;
  font-size: 18px;
  line-height: 23px;
}
.field textarea { height: 190px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--placeholder); opacity: 1; }
.field input:focus-visible,
.field textarea:focus-visible { outline-offset: 0; }
[aria-invalid="true"] { border-color: #c4002f !important; }

.form-status { font-size: 16px; line-height: 22px; }
.form-status:empty { display: none; }

.contact-art { position: absolute; top: 62px; right: 0; width: 367px; height: auto; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 55px 60px 50px;
  background: var(--dark);
  color: #fff;
  border-radius: 45px 45px 0 0;
}
.site-footer .logo img { width: 180px; height: 29px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.footer-nav { display: flex; gap: 40px; }
.footer-nav a { display: block; font-size: 18px; line-height: 23px; text-underline-offset: 3px; }
.footer-nav a:hover,
.footer-bottom a:hover { color: var(--green); }
.social { display: flex; gap: 20px; }
.social a { display: block; border-radius: 50%; }
.social img { transition: transform .2s ease; }
.social a:hover img { transform: translateY(-2px); }

.footer-middle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding: 66px 0 50px;
}
.footer-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 27px; }
.footer-contact address { display: flex; flex-direction: column; gap: 20px; font-style: normal; font-size: 18px; line-height: 23px; }

.subscribe {
  flex: 0 1 634px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 58px 40px;
  background: var(--field-dark);
  border-radius: 14px;
}
.subscribe input {
  flex: 1 1 200px;
  min-width: 0;
  padding: 21px 34px;
  border: 1px solid #fff;
  border-radius: 14px;
  background: transparent;
  color: #fff;
  font-size: 18px;
  line-height: 23px;
}
.subscribe input::placeholder { color: #fff; opacity: 1; }
.subscribe .btn { flex: none; }
.subscribe .form-status { flex-basis: 100%; }

.footer-bottom {
  display: flex;
  gap: 40px;
  padding-top: 49px;
  border-top: 1px solid #fff;
  font-size: 18px;
  line-height: 28px;
}
.footer-bottom a { text-underline-offset: 3px; }

/* ======================================================
   Tablet — 768 frame
   ====================================================== */
@media (max-width: 1199px) {
  :root { --gutter: 53px; }

  .site-header { padding-top: 30px; min-height: 78px; }
  .menu-btn { display: block; }
  .site-nav {
    position: absolute;
    top: calc(100% + 16px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 30px;
    background: #fff;
    border: 1px solid var(--dark);
    border-radius: 30px;
    box-shadow: var(--shadow);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .site-header.is-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .site-nav ul { flex-direction: column; align-items: flex-start; gap: 16px; }

  main { padding: 40px 0 110px; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "title" "art" "lead" "cta";
  }
  .hero h1 { margin-bottom: 10px; }
  .hero-art { justify-self: center; width: min(520px, 100%); margin-bottom: 20px; }
  .hero-lead { max-width: none; margin-bottom: 40px; }

  .logos ul {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
    gap: 24px 32px;
    padding-top: 50px;
  }
  .logos img { height: 40px; }

  .section,
  .section--testimonials { padding-top: 110px; }
  .section-head { margin-bottom: 60px; }

  .service-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }

  .cta { padding: 80px 0 0; }
  .cta-card { padding: 50px; }
  .cta-copy { max-width: none; }
  .cta-art { display: none; }

  .cases { grid-template-columns: minmax(0, 1fr); row-gap: 40px; padding: 50px; }
  .case + .case { border-left: 0; padding-left: 0; border-top: 1px solid #fff; padding-top: 39px; }

  .step { padding: 31px 39px; }
  .step-num { font-size: 48px; line-height: 60px; }
  .step-title { font-size: 24px; line-height: 31px; }
  .step-body p { padding-bottom: 0; }

  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }

  .testimonials { --sw: min(601px, 100% - 60px); }

  .contact-card { padding: 60px; }
  .contact-form { max-width: none; }
  .contact-art { display: none; }

  .site-footer { display: flex; flex-direction: column; gap: 50px; padding: 50px 40px; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 30px; }
  .footer-nav { gap: 26px; }
  .footer-middle { flex-direction: column; align-items: stretch; gap: 40px; padding: 0; }
  .subscribe { flex-basis: auto; }
}

/* ======================================================
   Mobile — 390 frame
   ====================================================== */
@media (max-width: 699px) {
  :root { --gutter: 27px; }

  .site-header .logo img { width: 180px; height: 29px; }
  .btn { padding-inline: 19px; }
  .site-nav { padding: 24px; }

  main { padding: 40px 0 70px; }

  .hero h1 { font-size: 43px; line-height: 55px; }
  .hero-art { width: 100%; }
  .hero-lead { font-size: 16px; line-height: 24px; }
  .hero-btn { justify-self: stretch; }

  .logos img { height: 30px; }

  .section,
  .section--testimonials { padding-top: 70px; }
  .section-head {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    text-align: center;
  }
  .section-head p { flex: none; font-size: 16px; line-height: 20px; }
  .label { font-size: 36px; line-height: 46px; }

  .service-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "title title" "link img";
    align-items: end;
    gap: 12px 20px;
    min-height: 0;
    padding: 39px 29px;
  }
  .service-text { display: contents; }
  .service-title { grid-area: title; align-self: start; font-size: 26px; line-height: 33px; }
  .learn-more { grid-area: link; }
  .learn-more > span {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .service-img { grid-area: img; justify-self: end; width: 165px; }

  .cta-card { padding: 50px 30px; }
  .cta-copy h2 { font-size: 26px; line-height: 33px; }
  .cta-copy p { font-size: 16px; line-height: 20px; }
  .cta-copy .btn { align-self: stretch; }

  .cases { padding: 42px 30px; }
  .case p { font-size: 16px; line-height: 20px; }
  .case-link { font-size: 16px; line-height: 24px; }

  .steps { gap: 20px; }
  .step { padding: 29px; border-radius: 35px; }
  .step summary { gap: 14px; }
  .step-num { font-size: 30px; line-height: 38px; }
  .step-title { font-size: 18px; line-height: 23px; }
  .step-toggle { width: 30px; height: 30px; }
  .step-body { margin-top: 20px; padding-top: 20px; }
  .step-body p { font-size: 16px; line-height: 20px; }

  .team-grid { grid-template-columns: minmax(0, 1fr); }
  .member { padding: 35px 25px; }
  .member-head { gap: 14px; }
  .member-name p,
  .member-bio { font-size: 16px; line-height: 20px; }
  .team-actions { margin-top: 30px; }
  .team-actions .btn { width: 100%; }

  .testimonials { --sw: calc(100% - 60px); --gap: 20px; padding: 60px 0 50px; }
  .testimonial { gap: 42px; }
  .bubble { padding: 30px 30px 34px; }
  .bubble p { font-size: 16px; line-height: 20px; }
  .author { padding-left: 64px; }
  .author span { font-size: 16px; line-height: 20px; }
  .slider-controls { margin-top: 60px; }
  .slider-dots { gap: 12px; }

  .contact-card { padding: 40px 30px; }
  .contact-form { gap: 30px; }
  .radio { font-size: 16px; line-height: 20px; }

  .site-footer { gap: 37px; padding: 30px 20px; text-align: center; }
  .footer-top { align-items: center; gap: 37px; }
  .footer-nav { flex-direction: column; align-items: center; gap: 15px; }
  .footer-nav a { font-size: 16px; line-height: 20px; }
  .footer-contact { align-items: center; }
  .footer-contact address { font-size: 16px; line-height: 20px; }
  .subscribe { flex-direction: column; padding: 30px 20px; }
  .subscribe input { flex: none; width: 100%; }
  .subscribe .btn { padding: 19px; }
  .footer-bottom { flex-direction: column; align-items: center; gap: 10px; padding-top: 37px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
