@import url("./fonts-tildasans.css");

:root {
  --ink: #000;
  --muted: #777;
  --line: #eee;
  --line-active: #222;
  --bg: #fff;
  --max: 1200px;
  --col: 560px;
  --gap: 40px;
  --header-h: 115px;
  --font: "TildaSans", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

ul,
ol {
  margin: 0;
  padding-left: 1.2rem;
}

li + li {
  margin-top: 0.4rem;
}

.container {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
}

/* ========== HEADER: logo center, nav split ========== */
.site-header {
  position: relative;
  z-index: 50;
  background: #fff;
  min-height: var(--header-h);
  padding-top: 15px;
}

.site-header__inner {
  position: relative;
  min-height: 100px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0;
}

.header-side {
  display: flex;
  align-items: center;
}

.header-side--left {
  justify-content: flex-end;
}

.header-side--right {
  justify-content: flex-start;
}

.nav--left,
.nav--right {
  display: flex;
  gap: 34px;
}

.nav--left {
  padding-right: 100px;
}

.nav--right {
  padding-left: 100px;
}

.nav a {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  white-space: nowrap;
}

.nav a[aria-current="page"] {
  position: relative;
}

.nav a[aria-current="page"]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #000;
  margin-right: 8px;
  vertical-align: middle;
  transform: translateY(-1px);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand__logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  justify-self: start;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #000;
}

/* ========== PAGE HERO TITLE (dev) ========== */
.page-hero {
  padding: 60px 0 0;
  text-align: center;
}

.page-hero--compact {
  padding: 30px 0 60px;
}

.page-hero h1 {
  margin: 0 auto 40px;
  max-width: 960px;
  font-size: 42px;
  font-weight: 600;
  line-height: 1.23;
}

.page-hero--compact h1 {
  margin-bottom: 0;
  font-size: 30px;
}

.page-hero__descr {
  margin: 0 auto 40px;
  max-width: 560px;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.5;
}

/* ========== SERVICE TABS ========== */
.service-tabs {
  background: #fff;
  padding-bottom: 45px;
}

.service-tabs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0;
}

.service-tabs__list button {
  appearance: none;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  padding: 0 10px 18px;
  min-height: 62px;
}

.service-tabs__list button[aria-selected="true"] {
  color: var(--line-active);
  font-weight: 600;
  border-bottom-color: var(--line-active);
}

/* ========== SERVICE PANEL: 2 columns ========== */
.service-panel {
  display: none;
  padding: 90px 0;
}

.service-panel.is-active {
  display: block;
}

.service-tabs .container {
  padding-inline: 20px;
  box-sizing: border-box;
}

.service-panel__grid {
  display: grid;
  grid-template-columns: var(--col) var(--col);
  gap: var(--gap);
  justify-content: start;
  padding-inline: 20px;
  box-sizing: border-box;
}

.service-panel__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.23;
}

.service-panel__text {
  margin: 40px 0 0;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.5;
}

.service-panel__accent {
  margin: 33px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
}

/* ========== ACCORDION ========== */
.accordion details {
  border-top: 1px solid var(--line);
}

.accordion details:last-child {
  border-bottom: 1px solid var(--line);
}

.accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 27px 50px 27px 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  position: relative;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    linear-gradient(#222, #222) center / 16px 2px no-repeat,
    linear-gradient(#222, #222) center / 2px 16px no-repeat;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.accordion details[open] summary::after {
  background: linear-gradient(#222, #222) center / 16px 2px no-repeat;
  transform: translateY(-50%);
  margin-top: 0;
}

.accordion__body {
  padding: 0 0 40px;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.55;
  color: #000;
}

/* ========== ABOUT ========== */
.about-hero {
  padding: 60px 0 75px;
  text-align: center;
}

.about-hero__uptitle {
  margin: 0 auto;
  max-width: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  line-height: normal;
  padding: 10px 0 40px;
}

.about-hero__title {
  margin: 0 auto;
  max-width: none;
  /* class t-title_lg is 64px, but Tilda customstyle overrides to 30px */
  font-size: 30px;
  font-weight: 600;
  line-height: 1.23;
  padding: 8px 0 3px;
}

.about-hero__descr {
  margin: 0 auto;
  max-width: none;
  /* class t-descr_xl is 24px, customstyle overrides to 20px */
  font-size: 20px;
  font-weight: 300;
  line-height: 1.5;
  padding-top: 41px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 360px);
  gap: 40px;
  justify-content: center;
  width: min(1160px, 100%);
  margin-inline: auto;
  padding: 0;
}

.card {
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 30px 30px 40px;
  min-height: 244px;
  width: 360px;
  box-sizing: border-box;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.card p {
  margin: 0;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.55;
}

.about-strength {
  padding: 75px 0;
  text-align: center;
}

.about-strength p {
  margin: 0 auto;
  max-width: none;
  width: min(1160px, 100%);
  font-size: 20px;
  font-weight: 300;
  line-height: 1.55;
}

/* ========== COMPETENCIES ========== */
.section {
  padding: 60px 0 165px;
}

.section__title {
  margin: 0 auto 40px;
  max-width: 900px;
  font-size: 42px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
}

.section__lead {
  margin: 0 auto 90px;
  max-width: 560px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
}

.expertise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  row-gap: 90px;
}

.expertise-card {
  border-top: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 70px 1fr;
  column-gap: 20px;
  align-items: start;
}

.expertise-card__icon {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}

.expertise-card__body {
  min-width: 0;
}

.expertise-card h3 {
  margin: 0;
  padding-bottom: 8px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}

.expertise-card h4,
.expertise-card p strong {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
}

.expertise-card h4 {
  margin: 28px 0 0;
}

.expertise-card p,
.expertise-card li,
.expertise-card ul {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.55;
}

.expertise-card p {
  margin: 0 0 1em;
}

.expertise-card p:last-child {
  margin-bottom: 0;
}

.expertise-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

.expertise-card strong {
  font-weight: 700;
}

/* Sticky tech side nav (competencies) */
.tech-side-nav {
  position: fixed;
  left: 0;
  top: 140px;
  z-index: 30;
  width: 50px;
}

.tech-side-nav.is-open {
  width: 255px;
}

.tech-side-nav__toggle {
  width: 50px;
  height: 50px;
  border: 0;
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
}

.tech-side-nav__toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #111;
}

.tech-side-nav__panel {
  width: 255px;
  max-height: calc(100vh - 180px);
  overflow: auto;
  background: #fff;
  padding: 10px 12px 16px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
}

.tech-side-nav__panel summary {
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.3;
  padding: 10px 0;
}

.tech-side-nav__panel summary::-webkit-details-marker {
  display: none;
}

.tech-side-nav__links {
  display: flex;
  flex-direction: column;
  padding-left: 15px;
}

.tech-side-nav__links a {
  font-size: 13px;
  font-weight: 400;
  padding: 5px 0;
  color: #111;
}

.tech-side-nav__links a:last-child {
  padding-bottom: 15px;
}

/* ========== CONTACTS ========== */
.contact-layout {
  display: block;
  max-width: 560px;
  margin: 0 auto;
  padding: 0 0 105px;
}

.contact-meta {
  text-align: center;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.55;
  margin: 0 auto 60px;
  max-width: 560px;
}

.contact-meta p {
  margin: 0 0 8px;
}

.contact-meta a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-form {
  display: grid;
  gap: 25px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-size: 16px;
  font-weight: 400;
  height: 60px;
  padding: 0 20px;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  box-sizing: border-box;
}

.contact-form textarea {
  height: 102px;
  min-height: 102px;
  padding: 17px 20px 0;
  resize: vertical;
}

.contact-form .btn {
  padding: 19px 60px;
  height: 60px;
  justify-self: center;
  border-radius: 30px;
}

.contact-note {
  margin: 5px 0 0;
  font-size: 15px;
  font-weight: 300;
  color: #000;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  background: #000;
  color: #fff;
  padding: 14px 28px;
  font-weight: 600;
  width: fit-content;
  border-radius: 30px;
}

.placeholder-box {
  border: 1px solid var(--line);
  padding: 40px;
  text-align: center;
  font-weight: 300;
  font-size: 18px;
}

/* ========== FOOTER ========== */
.site-footer {
  background: #000;
  color: #fff;
  padding: 30px 0;
  margin-top: 0;
}

.site-footer__grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  text-align: center;
}

.site-footer .brand__logo {
  filter: invert(1);
  width: 100px;
  height: 100px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

.footer-nav a {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 0 15px;
}

.site-footer__bottom {
  margin-top: 0;
  padding-top: 40px;
  padding-bottom: 10px;
  text-align: center;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  opacity: 1;
}

.site-footer__bottom a {
  color: #fff;
}

.site-footer__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.site-footer__meta a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.contact-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.45;
  text-align: left;
}

.contact-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}

.contact-consent a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

#form-status[data-state="success"] {
  color: #0a7a32;
}

#form-status[data-state="error"] {
  color: #b00020;
}

#form-status[data-state="pending"] {
  color: #444;
}

.service-panel__cta {
  margin-top: 28px;
}

.section--portfolio {
  padding-top: 20px;
}

.portfolio-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr);
  gap: 40px;
  align-items: start;
  margin-bottom: 80px;
}

.portfolio-card:last-child {
  margin-bottom: 0;
}

.portfolio-card__media {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #ececec;
  display: block;
}

.portfolio-card__media--empty {
  min-height: 220px;
}

.portfolio-card__industry {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #555;
}

.portfolio-card__title {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
}

.portfolio-card__summary {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.5;
}

.portfolio-card__meta {
  margin: 0 0 24px;
  display: grid;
  gap: 16px;
}

.portfolio-card__meta dt {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
}

.portfolio-card__meta dd {
  margin: 0;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.5;
}

.portfolio-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portfolio-tag {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #111;
  font-size: 13px;
  font-weight: 500;
}

.section--cta {
  padding: 40px 0 100px;
  text-align: center;
}

.section--cta__inner h2 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 700;
}

.section--cta__inner p {
  margin: 0 auto 28px;
  max-width: 520px;
  font-size: 18px;
  font-weight: 300;
}

.section--cta .btn {
  margin: 0 auto;
}

.section--legal {
  padding-top: 10px;
  padding-bottom: 100px;
}

.legal-content {
  max-width: 760px;
  margin: 0 auto;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
}

.legal-content h2 {
  margin: 36px 0 12px;
  font-size: 22px;
  font-weight: 700;
}

.legal-content ul {
  padding-left: 1.2rem;
}

.legal-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ========== MOBILE ========== */
@media (max-width: 1200px) {
  .page-hero h1 {
    font-size: 38px;
  }

  .page-hero--compact h1 {
    font-size: 32px;
  }

  .section__title {
    font-size: 38px;
  }

  .section__lead {
    font-size: 22px;
  }

  .service-panel__title {
    font-size: 22px;
  }

  .service-panel__text,
  .service-panel__accent {
    font-size: 16px;
  }

  .accordion summary {
    font-size: 22px;
  }

  .accordion__body {
    font-size: 16px;
  }

  .about-hero__title {
    font-size: 28px;
  }

  .about-hero__descr {
    font-size: 18px;
  }
}

@media (max-width: 1100px) {
  .service-tabs__list {
    grid-template-columns: repeat(4, 1fr);
  }

  .service-panel__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .card-grid {
    grid-template-columns: 1fr;
    width: min(360px, 100%);
  }

  .card {
    width: 100%;
  }

  .expertise-grid {
    grid-template-columns: 1fr;
    row-gap: 48px;
  }

  .tech-side-nav {
    display: none;
  }

  .nav--left {
    padding-right: 24px;
  }

  .nav--right {
    padding-left: 24px;
  }
}

@media (max-width: 900px) {
  .site-header__inner {
    grid-template-columns: 44px 1fr 44px;
  }

  .nav-toggle {
    display: inline-block;
  }

  .header-side--left {
    justify-content: flex-start;
  }

  .header-side--right {
    visibility: hidden;
  }

  .brand {
    justify-self: center;
  }

  .nav--left,
  .nav--right {
    display: none;
  }

  .nav-mobile {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    gap: 14px;
  }

  .nav-mobile.is-open {
    display: flex;
  }

  .service-tabs__list {
    display: none;
  }

  .service-tabs__select {
    display: block;
    width: 100%;
    margin: 0 auto;
    padding: 14px 16px;
    border: 1px solid #222;
    color: #222;
    background: #fff;
    font-size: 16px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 36px;
    max-width: 560px;
  }

  .portfolio-card {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 56px;
  }

  .portfolio-card__title {
    font-size: 24px;
  }

  .footer-nav a {
    font-size: 14px;
  }
}

@media (min-width: 901px) {
  .nav-mobile,
  .service-tabs__select {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .page-hero h1 {
    font-size: 28px;
  }

  .service-panel__title {
    font-size: 20px;
  }

  .service-panel__text,
  .service-panel__accent {
    font-size: 16px;
    margin-top: 20px;
  }

  .accordion summary {
    font-size: 20px;
    padding-top: 15px;
    padding-bottom: 14px;
  }

  .accordion__body {
    font-size: 14px;
    padding-bottom: 25px;
  }

  .about-hero__title {
    font-size: 26px;
  }

  .about-hero__descr {
    font-size: 16px;
  }

  .brand__logo {
    width: 72px;
    height: 72px;
  }

  .site-header,
  .site-header__inner {
    min-height: 88px;
  }
}
