/* Inner pages. Builds on the tokens and components from styles.css. */

/* Page hero ---------------------------------------------------------- */

.page-hero,
.main > .page-hero {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px var(--gutter) clamp(72px, 8vw, 112px);
  color: var(--white);
}

.page-hero__bg,
.page-hero::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0 0 var(--round-bottom) var(--round-bottom);
  pointer-events: none;
}

.page-hero__bg {
  object-fit: cover;
  object-position: center 30%;
  background: #030214;
}

.page-hero--services .page-hero__bg { object-position: center 40%; }
.page-hero--products .page-hero__bg { object-position: 30% 20%; }

.page-hero::before {
  content: "";
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(3, 2, 20, 0.82) 0%, rgba(3, 2, 20, 0.45) 55%, rgba(3, 2, 20, 0.25) 100%),
    linear-gradient(180deg, rgba(3, 2, 20, 0) 50%, rgba(3, 2, 20, 0.55) 100%);
}

.page-hero > :not(.page-hero__bg) {
  position: relative;
  z-index: 1;
}

.page-hero .header-wrap {
  z-index: 10;
}

.page-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: var(--content);
  margin-top: clamp(48px, 6.5vw, 96px);
  padding-inline: 30px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--agray);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: rgba(255, 255, 255, 0.35);
}

.breadcrumb a {
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb [aria-current] {
  color: var(--white);
}

.page-hero__kicker {
  margin-bottom: 6px;
  font-family: var(--f-pen);
  font-size: 32px;
  line-height: 1;
  color: var(--orange);
}

.page-hero__title {
  max-width: 1000px;
  font-weight: 600;
  font-size: clamp(36px, 4.45vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.page-hero__lead {
  max-width: 720px;
  margin-top: 20px;
  font-family: var(--f-metro);
  font-size: 20px;
  line-height: 28px;
  color: var(--agray);
}

.page-hero__content > .p-actions,
.page-hero__content > .p-stats,
.page-hero__badges {
  margin-top: 36px;
}

.page-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.page-hero__badges li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: var(--glass-border);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 15px;
}

.page-hero__badges li::before {
  content: "✓";
  color: var(--orange);
  font-weight: 600;
}

.js .page-hero .header-wrap,
.js .page-hero__content > * {
  animation: rise 0.9s var(--ease-out) both;
}

.js .page-hero__content > :nth-child(2) { animation-delay: 0.06s; }
.js .page-hero__content > :nth-child(3) { animation-delay: 0.12s; }
.js .page-hero__content > :nth-child(4) { animation-delay: 0.18s; }
.js .page-hero__content > :nth-child(5) { animation-delay: 0.26s; }
.js .page-hero__content > :nth-child(6) { animation-delay: 0.34s; }

/* Sections ----------------------------------------------------------- */

.psec {
  padding-inline: var(--gutter);
}

.psec__inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
}

.psec__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.psec__head .h-section {
  max-width: 1000px;
  line-height: 1.15;
  white-space: normal;
  text-wrap: balance;
}

.psec__kicker {
  font-family: var(--f-pen);
  font-size: 32px;
  line-height: 1;
  color: var(--textblack2);
}

.psec__head .subline {
  max-width: 820px;
}

.p-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.p-actions--center {
  justify-content: center;
}

.p-actions .btn--outline {
  width: auto;
  padding-inline: 28px;
}

.btn--outline-light {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.btn--outline-light:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--textblack);
}

/* Grids & cards ------------------------------------------------------ */

.p-grid {
  display: grid;
  gap: 30px;
}

.p-grid--1 { grid-template-columns: 1fr; }
.p-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.p-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 30px;
  border: 1px solid rgba(207, 207, 207, 0.5);
  border-radius: 30px;
  background: var(--white);
  color: var(--textblack);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.3s ease;
}

.p-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 40px -26px rgba(22, 24, 39, 0.35);
}

a.p-card:hover {
  border-color: rgba(240, 145, 52, 0.55);
}

.p-card__tag {
  padding: 6px 12px;
  border-radius: 30px;
  background: var(--textblack2);
  font-family: var(--f-metro);
  font-size: 12px;
  color: var(--white);
}

.p-card__value {
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  color: var(--blue);
}

.p-card__title {
  font-weight: 600;
  font-size: 24px;
  line-height: 29px;
  color: var(--orange);
}

.p-card__text {
  font-family: var(--f-lora);
  font-size: 18px;
  line-height: 25px;
}

.p-card__text--sm {
  font-family: var(--f-metro);
  font-size: 16px;
  line-height: 21px;
  color: var(--textblack2);
}

.p-card__foot {
  margin-top: auto;
  padding: 8px 14px;
  border-radius: 30px;
  background: rgba(240, 145, 52, 0.14);
  font-weight: 600;
  font-size: 14px;
  color: #c4660f;
}

.p-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-weight: 500;
  font-size: 16px;
  color: var(--blue);
}

.p-card__link span,
.p-chip span,
.p-case__link span,
.p-cs__link span {
  transition: transform 0.3s var(--ease-out);
}

a:hover > .p-card__link span,
a.p-card:hover .p-card__link span,
.p-chip:hover span,
.p-case__link:hover span,
.p-cs__link:hover span {
  transform: translateX(4px);
}

.p-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.p-list li {
  position: relative;
  padding-left: 20px;
  font-family: var(--f-metro);
  font-size: 16px;
  line-height: 21px;
}

.p-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}

.p-list--light li {
  color: var(--back);
}

/* Dark card */
.p-card--dark {
  border-color: transparent;
  background: var(--back-blue);
  color: var(--back);
}

.p-card--dark .p-card__text { color: var(--back); }
.p-card--dark .p-list li { color: var(--back); }
.p-card--dark .p-card__tag { background: rgba(255, 255, 255, 0.14); }
.p-card--dark .p-card__value { color: var(--orange); }

.p-card--dark .p-card__foot {
  background: rgba(240, 145, 52, 0.2);
  color: var(--orange);
}

.p-card--dark:hover {
  box-shadow: 0 22px 40px -22px rgba(18, 35, 60, 0.6);
}

.p-card--compact {
  gap: 12px;
  padding: 24px;
}

.p-card--compact .p-card__title {
  font-size: 20px;
  line-height: 25px;
  color: var(--textblack);
}

.p-card--contact {
  padding: 36px;
}

.p-card--contact .p-card__title {
  font-size: 30px;
  line-height: 36px;
  color: var(--textblack);
}

/* Stats */

.p-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
}

.p-stat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 30px;
  border: 1px solid var(--agray);
  border-radius: 16px;
  background: var(--violet);
  color: var(--white);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

a.p-stat:hover,
.p-stats:not(.p-stats--glass) .p-stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px -14px rgba(10, 4, 69, 0.6);
}

.p-stat__value {
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  color: var(--orange);
}

.p-stat__label {
  font-size: 16px;
  color: var(--agray);
}

.p-stat__note {
  font-family: var(--f-metro);
  font-size: 14px;
  line-height: 18px;
  color: rgba(207, 207, 207, 0.62);
}

.p-stats--glass {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1000px;
}

.p-stats--glass .p-stat {
  padding: 22px 24px;
  border: var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.p-stats--glass .p-stat__value {
  font-size: 34px;
}

.p-stats--glass .p-stat__label {
  color: var(--white);
}

.p-stats--glass .p-stat__note {
  color: var(--agray);
}

.p-stats--glass a.p-stat:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Steps (stage cards from the landing) ------------------------------- */

.p-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.p-steps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-steps--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.p-steps--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.p-steps .stage {
  gap: 20px;
  padding: 26px;
}

.p-steps .stage__head {
  gap: 16px;
}

.p-steps .stage__num {
  width: 64px;
  height: 56px;
}

.p-steps .stage__num span {
  font-size: 30px;
}

.stage__titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.p-steps .stage__title {
  font-size: 21px;
  line-height: 26px;
}

.stage__sub {
  font-family: var(--f-pen);
  font-size: 20px;
  line-height: 1;
  color: var(--agray);
}

.p-steps .stage__text {
  font-size: 17px;
  line-height: 24px;
}

.p-steps .p-list li {
  font-size: 15px;
}

/* Challenges reuse the landing .problem layout */
.problem__solution--static,
.problem__solution--static:hover {
  filter: none;
}

/* Case cards --------------------------------------------------------- */

.p-case {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 30px;
  border-radius: 30px;
  background: var(--amaintext);
  color: var(--back);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.p-case:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 40px -22px rgba(22, 24, 39, 0.55);
}

.p-case__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.p-case .tag {
  background: var(--text3);
  color: var(--back);
}

.p-case__metric {
  padding: 6px 12px;
  border-radius: 30px;
  background: rgba(240, 145, 52, 0.2);
  font-weight: 600;
  font-size: 13px;
  color: var(--orange);
}

.p-case__title {
  font-weight: 600;
  font-size: 24px;
  line-height: 29px;
  color: var(--orange);
}

.p-case__rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

.p-case__row dt {
  font-family: var(--f-pen);
  font-size: 20px;
  line-height: 1;
  color: var(--agray);
}

.p-case__row dd {
  margin: 4px 0 0;
  font-family: var(--f-metro);
  font-size: 16px;
  line-height: 21px;
  color: var(--back);
}

.p-case__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
  font-weight: 500;
  font-size: 16px;
  color: var(--white);
}

.p-case--light {
  border: 1px solid rgba(207, 207, 207, 0.5);
  background: var(--white);
  color: var(--textblack);
}

.p-case--light .tag { background: var(--textblack2); color: var(--white); }
.p-case--light .p-case__row dt { color: var(--textblack2); }
.p-case--light .p-case__row dd { color: var(--textblack); }
.p-case--light .p-case__link { color: var(--blue); }

.p-case--light:hover {
  box-shadow: 0 22px 40px -26px rgba(22, 24, 39, 0.35);
}

.p-case__rows--dark .p-case__row dt { color: var(--agray); }
.p-case__rows--dark .p-case__row dd { color: var(--back); }

/* Chips -------------------------------------------------------------- */

.p-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.p-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid rgba(29, 29, 27, 0.2);
  border-radius: 30px;
  background: var(--white);
  font-weight: 500;
  font-size: 16px;
  color: var(--textblack);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.3s var(--ease-out);
}

a.p-chip:hover {
  border-color: var(--textblack);
  background: var(--textblack);
  color: var(--white);
  transform: translateY(-2px);
}

.p-chip--static {
  font-family: var(--f-metro);
  font-weight: 400;
}

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

.p-explore__group {
  padding: 30px;
  border: 1px solid rgba(207, 207, 207, 0.5);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.6);
}

.p-explore__title {
  margin-bottom: 18px;
  font-family: var(--f-pen);
  font-size: 28px;
  line-height: 1;
  color: var(--textblack2);
}

.p-explore .p-chips {
  justify-content: flex-start;
}

/* Link cards (orange corner like the landing service cards) ---------- */

.p-link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 80px 30px 30px;
  overflow: hidden;
  border: 1px solid rgba(207, 207, 207, 0.5);
  border-radius: 30px;
  background: var(--white);
  color: var(--textblack);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.3s ease;
}

.p-link-card:hover {
  transform: translateY(-5px);
  border-color: rgba(240, 145, 52, 0.55);
  box-shadow: 0 22px 40px -26px rgba(22, 24, 39, 0.35);
}

.p-link-card__corner {
  position: absolute;
  left: 0;
  top: 0;
  width: 50px;
  height: 50px;
  border-bottom-right-radius: 6.667px;
  background: var(--orange);
  transition: width 0.35s var(--ease), height 0.35s var(--ease);
}

.p-link-card__corner img {
  position: absolute;
  left: 13.165px;
  top: 13.165px;
  transform: rotate(-135deg) scaleY(-1);
  transition: transform 0.35s var(--ease);
}

.p-link-card:hover .p-link-card__corner {
  width: 58px;
  height: 58px;
}

.p-link-card:hover .p-link-card__corner img {
  transform: translate(4px, 4px) rotate(-135deg) scaleY(-1);
}

.p-link-card__title {
  font-weight: 600;
  font-size: 26px;
  line-height: 31px;
  color: var(--textblack);
}

.p-link-card .p-list li {
  color: var(--textblack2);
}

/* Tags --------------------------------------------------------------- */

.p-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.p-tag {
  padding: 7px 12px;
  border-radius: 30px;
  background: var(--back);
  font-family: var(--f-metro);
  font-size: 14px;
  color: var(--textblack);
}

.p-card--dark .p-tag {
  background: rgba(255, 255, 255, 0.1);
  color: var(--back);
}

/* Panels, statements, flow, feature ---------------------------------- */

.p-panel {
  padding: clamp(28px, 4vw, 56px);
  border: 1px solid rgba(207, 207, 207, 0.5);
  border-radius: 30px;
  background: var(--white);
}

.p-statement {
  max-width: 980px;
  margin: 0 auto;
  font-family: var(--f-lora);
  font-weight: 600;
  font-size: clamp(21px, 2.1vw, 30px);
  line-height: 1.4;
  text-align: center;
  color: var(--amaintext);
}

.p-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.p-flow__step {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 200px;
  padding: 26px 32px;
  border: 1px solid var(--agray);
  border-radius: 20px;
  background: var(--violet);
  text-align: center;
}

.p-flow__title {
  font-weight: 600;
  font-size: 28px;
  color: var(--orange);
}

.p-flow__sub {
  font-size: 16px;
  color: var(--agray);
}

.p-flow__arrow {
  font-size: 32px;
  color: var(--blue);
}

.p-feature {
  display: grid;
  grid-template-columns: minmax(220px, auto) 1fr;
  align-items: center;
  gap: 48px;
  padding: clamp(28px, 4vw, 56px);
  border-radius: 30px;
  background: var(--back-blue);
  color: var(--back);
}

.p-feature__metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.p-feature__value {
  font-weight: 600;
  font-size: clamp(72px, 8vw, 120px);
  line-height: 0.9;
  color: var(--orange);
}

.p-feature__label {
  font-size: 20px;
  color: var(--white);
}

.p-feature__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.p-feature .btn--sm {
  width: auto;
  padding-inline: 28px;
}

/* Team --------------------------------------------------------------- */

.p-member {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 30px;
  border: 1px solid rgba(207, 207, 207, 0.5);
  border-radius: 30px;
  background: var(--white);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.p-member:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 40px -26px rgba(22, 24, 39, 0.35);
}

.p-member__photo {
  width: 96px;
  height: 96px;
  margin-bottom: 8px;
  border-radius: 50%;
  object-fit: cover;
}

.p-member__photo--initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue) 0%, #6d4dff 55%, var(--orange) 100%);
  font-weight: 600;
  font-size: 32px;
  color: var(--white);
}

.p-member__name {
  font-weight: 600;
  font-size: 22px;
  line-height: 27px;
  color: var(--textblack);
}

.p-member__role {
  margin-bottom: 6px;
  font-family: var(--f-metro);
  font-size: 16px;
  color: var(--orange);
}

.p-member__links {
  display: flex;
  gap: 16px;
  margin-top: 6px;
}

.p-member__links a {
  font-weight: 500;
  font-size: 15px;
  color: var(--blue);
}

.p-member__links a:hover {
  text-decoration: underline;
}

/* Publications */

.p-papers {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.p-paper .pub__panel {
  width: 360px;
}

.p-paper .pub__text {
  font-size: 19px;
  line-height: 27px;
}

/* Contact: founder */

.p-founder {
  margin-inline: auto;
}

.p-founder .p-actions .btn {
  width: auto;
  padding-inline: 28px;
}

/* Booking ------------------------------------------------------------ */

.p-booking {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 30px;
}

.p-booking__embed {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: clamp(28px, 4vw, 56px);
  border-radius: 30px;
  background: var(--back-blue);
}

.p-booking__kicker {
  font-family: var(--f-pen);
  font-size: 30px;
  line-height: 1;
  color: var(--agray);
}

.p-booking__title {
  font-weight: 600;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.15;
  color: var(--white);
}

.p-booking__text {
  max-width: 560px;
  margin-bottom: 12px;
  font-family: var(--f-metro);
  font-size: 18px;
  line-height: 25px;
  color: var(--back);
}

.p-booking__details {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 10px 30px;
  border: 1px solid rgba(207, 207, 207, 0.5);
  border-radius: 30px;
  background: var(--white);
}

.p-booking__details > div {
  padding: 20px 0;
  border-bottom: 1px solid rgba(207, 207, 207, 0.5);
}

.p-booking__details > div:last-child {
  border-bottom: 0;
}

.p-booking__details dt {
  margin-bottom: 6px;
  font-family: var(--f-pen);
  font-size: 22px;
  line-height: 1;
  color: var(--textblack2);
}

.p-booking__details dd {
  margin: 0;
  font-weight: 500;
  font-size: 20px;
  color: var(--textblack);
}

.p-booking__details a {
  color: var(--blue);
}

/* Case studies: filter, cards, modal --------------------------------- */

.p-filter {
  display: flex;
  justify-content: center;
}

.tabs--light {
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(207, 207, 207, 0.6);
  border-radius: 40px;
  background: var(--white);
}

.tabs--light .tabs__ind {
  top: 8px;
  height: calc(100% - 16px);
}

.tabs--light .tab {
  padding: 10px 22px;
  font-size: 17px;
  color: var(--asecondtext);
}

.tabs--light .tab.is-active {
  color: var(--white);
}

.p-cs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 30px;
  border: 1px solid rgba(207, 207, 207, 0.5);
  border-radius: 30px;
  background: var(--white);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), opacity 0.25s ease;
}

.p-cs:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 40px -26px rgba(22, 24, 39, 0.35);
}

.p-cs[hidden] {
  display: none;
}

.p-cs.is-leaving {
  opacity: 0;
  transform: scale(0.97);
}

.p-cs.is-entering {
  animation: pop 0.45s var(--ease-out) both;
}

.p-cs__top {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.p-cs__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.p-cs .tag {
  background: var(--textblack2);
}

.p-cs .tag + .tag {
  background: var(--blue);
}

.p-cs__metric {
  font-weight: 600;
  font-size: 52px;
  line-height: 1;
  color: var(--orange);
}

.p-cs__title {
  font-weight: 600;
  font-size: 22px;
  line-height: 27px;
  color: var(--textblack);
}

.p-cs__text {
  font-family: var(--f-metro);
  font-size: 16px;
  line-height: 21px;
  color: var(--textblack2);
}

.p-cs__tech {
  font-family: var(--f-metro);
  font-size: 14px;
  line-height: 18px;
  color: var(--asecondtext);
}

.p-cs__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: auto;
  padding-top: 8px;
}

.p-cs__quick {
  width: auto;
  padding-inline: 24px;
}

.p-cs__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 15px;
  color: var(--blue);
}

.p-cs--more {
  justify-content: center;
  align-items: center;
  min-height: 300px;
  border: 1.5px dashed rgba(124, 125, 126, 0.45);
  background: transparent;
  text-align: center;
}

.p-cs--more:hover {
  transform: none;
  box-shadow: none;
}

.p-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
  padding: 0;
  border: 0;
  border-radius: 30px;
  background: var(--white);
  color: var(--textblack);
  box-shadow: 0 40px 80px -30px rgba(3, 2, 20, 0.6);
}

.p-modal[open] {
  animation: modal-in 0.4s var(--ease-out) both;
}

.p-modal.is-closing {
  animation: modal-out 0.2s ease both;
}

.p-modal::backdrop {
  background: rgba(3, 2, 20, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

@keyframes modal-out {
  to { opacity: 0; transform: translateY(12px) scale(0.98); }
}

.modal-open,
.modal-open body {
  overflow: hidden;
}

.p-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--back);
  font-size: 24px;
  line-height: 1;
  text-align: center;
  color: var(--textblack);
  transition: background-color 0.2s ease, transform 0.3s var(--ease-out);
}

.p-modal__close:hover {
  background: var(--agray);
  transform: rotate(90deg);
}

.p-modal__content {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 44px 40px 40px;
}

.p-modal__title {
  padding-right: 48px;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.2;
  color: var(--textblack);
}

.p-modal__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.p-modal__metrics .p-stat {
  padding: 20px;
}

.p-modal__metrics .p-stat__value {
  font-size: 32px;
}

.p-modal__rows {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
}

.p-modal__rows dt {
  margin-bottom: 6px;
  font-family: var(--f-pen);
  font-size: 24px;
  line-height: 1;
  color: var(--blue);
}

.p-modal__rows dd {
  margin: 0;
  font-family: var(--f-lora);
  font-size: 17px;
  line-height: 25px;
}

.p-modal__tech {
  padding-top: 18px;
  border-top: 1px solid rgba(207, 207, 207, 0.6);
  font-family: var(--f-metro);
  font-size: 14px;
  color: var(--textblack2);
}

.p-modal .btn--sm {
  width: auto;
  padding-inline: 24px;
}

.p-modal .btn--outline {
  width: auto;
  padding-inline: 28px;
}

/* Closing CTA -------------------------------------------------------- */

.p-cta {
  gap: 24px;
}

.p-cta__title {
  max-width: 900px;
  text-align: center;
  line-height: 1.15;
  white-space: normal;
  text-wrap: balance;
}

.p-cta__text {
  max-width: 720px;
  font-family: var(--f-metro);
  font-size: 20px;
  line-height: 26px;
  text-align: center;
  color: rgba(255, 255, 255, 0.88);
}

.p-cta .contacts__row {
  margin-top: 8px;
}

.p-cta .pill--write {
  width: auto;
  min-width: 330px;
  padding-inline: 36px;
}

/* Responsive --------------------------------------------------------- */

@media (max-width: 1180px) {
  .p-grid--4,
  .p-steps--4,
  .p-steps--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .p-booking,
  .p-explore {
    grid-template-columns: 1fr;
  }

  .p-feature {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .p-stats--glass {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .page-hero__content {
    padding-inline: 0;
  }

  .p-grid--3,
  .p-steps--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .p-grid--2 {
    grid-template-columns: 1fr;
  }

  .p-paper .pub__panel {
    width: 300px;
  }
}

@media (max-width: 700px) {
  .page-hero__kicker,
  .psec__kicker {
    font-size: 26px;
  }

  .page-hero__lead {
    font-size: 17px;
    line-height: 24px;
  }

  .psec__inner {
    gap: 28px;
  }

  .p-grid,
  .p-grid--2,
  .p-grid--3,
  .p-grid--4,
  .p-steps,
  .p-steps--3,
  .p-steps--4,
  .p-steps--5,
  .p-stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .p-stats--glass {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .p-stats--glass .p-stat {
    padding: 16px;
  }

  .p-stats--glass .p-stat__value {
    font-size: 26px;
  }

  .p-card,
  .p-case,
  .p-cs,
  .p-member,
  .p-explore__group {
    padding: 24px;
    border-radius: 24px;
  }

  .p-link-card {
    padding: 72px 24px 24px;
    border-radius: 24px;
  }

  .p-card__title,
  .p-case__title {
    font-size: 21px;
    line-height: 26px;
  }

  .p-card__value {
    font-size: 36px;
  }

  .p-card__text {
    font-size: 17px;
    line-height: 24px;
  }

  .p-card--contact .p-card__title {
    font-size: 24px;
  }

  .p-chips {
    justify-content: flex-start;
  }

  .p-flow {
    flex-direction: column;
  }

  .p-flow__arrow {
    transform: rotate(90deg);
  }

  .p-paper .pub__panel {
    width: 100%;
  }

  .p-booking__details {
    padding: 4px 22px;
  }

  .tabs--light .tab {
    padding: 9px 16px;
    font-size: 15px;
  }

  .p-filter .tabs {
    width: calc(100% + var(--gutter) * 2);
    max-width: none;
    margin-inline: calc(var(--gutter) * -1);
    border-radius: 0;
    border-inline: 0;
  }

  .p-cs__metric {
    font-size: 42px;
  }

  .p-modal__content {
    padding: 36px 22px 24px;
  }

  .p-modal__title {
    font-size: 22px;
  }

  .p-modal__metrics {
    gap: 8px;
  }

  .p-modal__metrics .p-stat {
    padding: 14px;
  }

  .p-modal__metrics .p-stat__value {
    font-size: 24px;
  }

  .p-cta__text {
    font-size: 17px;
    line-height: 23px;
  }

  .p-cta .pill--write {
    min-width: 0;
  }
}

/* Challenges sit on the light page background here, not inside a white box */
.psec .problem {
  border: 1px solid rgba(207, 207, 207, 0.5);
  background: var(--white);
}
