:root {
  --orange: #ff9008;
  --orange-dark: #d96f00;
  --orange-soft: #fff3e3;
  --ink: #171717;
  --text: #4f4f4f;
  --muted: #737373;
  --line: #e5e5e5;
  --surface: #ffffff;
  --surface-muted: #f6f6f6;
  --dark: #181818;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.07);
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body.modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

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

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

h1 {
  font-size: 52px;
}

h2 {
  font-size: 34px;
}

h3 {
  font-size: 21px;
}

.content-width,
.site-header__inner {
  width: min(var(--content-width), calc(100% - 48px));
  margin-inline: auto;
}

.narrow-content {
  max-width: 850px;
}

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

.site-header {
  position: relative;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  flex: 0 0 auto;
}

.brand img {
  width: 300px;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
}

.site-nav a {
  color: #282828;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--orange-dark);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow--light {
  color: #ffd7a4;
}

.case-hero {
  padding: 74px 0 62px;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
}

.case-hero h1 {
  max-width: 760px;
  margin-bottom: 18px;
}

.case-hero h1::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin-top: 20px;
  background: var(--orange);
}

.case-hero p {
  max-width: 780px;
  margin-bottom: 0;
  color: var(--text);
  font-size: 18px;
}

.projects-section {
  padding: 72px 0 90px;
}

.projects-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 12px;
}

.projects-toolbar h2 {
  margin-bottom: 0;
}

.project-search {
  width: min(100%, 330px);
}

.project-search input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.project-search input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 144, 8, 0.14);
}

.project-count {
  min-height: 24px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

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

.project-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 144, 8, 0.65);
  box-shadow: var(--shadow);
}

.project-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #202020;
  text-decoration: none;
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.project-card:hover .project-card__media img {
  transform: scale(1.025);
}

.project-card__media--fallback {
  display: grid;
  place-items: center;
  color: var(--orange);
  font-size: 54px;
  font-weight: 800;
  background: #191919;
}

.project-card__content {
  min-height: 335px;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 26px;
}

.project-card__category {
  margin-bottom: 10px;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card h3 {
  margin-bottom: 12px;
}

.project-card h3 a {
  text-decoration: none;
}

.project-card h3 a:hover,
.project-card h3 a:focus-visible {
  color: var(--orange-dark);
}

.project-card__content > p {
  display: -webkit-box;
  margin-bottom: 24px;
  overflow: hidden;
  color: #646464;
  font-size: 15px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.project-card__footer {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-card__tags span,
.technology-list span {
  border: 1px solid #f0d4b0;
  border-radius: 999px;
  background: #fff8ef;
  color: #4c4c4c;
  font-size: 12px;
  font-weight: 600;
}

.project-card__tags span {
  padding: 4px 8px;
}

.text-link {
  flex: 0 0 auto;
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.text-link span,
.button span {
  display: inline-block;
  transition: transform 0.2s ease;
}

.text-link:hover span,
.button:hover span {
  transform: translateX(3px);
}

.page-state {
  padding: 36px 20px;
  border: 1px dashed #cccccc;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.page-state--large {
  width: min(760px, calc(100% - 48px));
  margin: 100px auto;
}

.case-cta,
.detail-section--dark {
  background: var(--dark);
  color: #fff;
}

.case-cta {
  padding: 62px 0;
}

.case-cta__inner,
.documentation-section__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.case-cta h2,
.detail-section--dark h2 {
  color: #fff;
}

.case-cta h2 {
  max-width: 700px;
  margin-bottom: 12px;
}

.case-cta p {
  max-width: 720px;
  margin-bottom: 0;
  color: #d7d7d7;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--orange);
  border-radius: 6px;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  border-color: var(--orange-dark);
  background: var(--orange-dark);
}

.button--light {
  border-color: #fff;
  background: #fff;
  color: var(--ink);
}

.button--light:hover,
.button--light:focus-visible {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

.button--secondary {
  background: #fff;
  color: var(--orange-dark);
}

.button--full {
  width: 100%;
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.site-footer {
  padding: 24px 0;
  background: #0f0f0f;
  color: #bdbdbd;
  font-size: 13px;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a {
  color: #d8d8d8;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--orange);
}

/* Project detail */
.project-error {
  min-height: 520px;
  display: grid;
  align-items: center;
  padding: 80px 0;
  text-align: center;
}

.project-error h2 {
  margin-bottom: 16px;
}

.project-error p {
  margin: 0 auto 26px;
  max-width: 620px;
}

.detail-hero {
  padding: 72px 0;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
}

.detail-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  align-items: center;
  gap: 60px;
}

.back-link {
  display: table;
  margin-bottom: 42px;
  color: #555;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.back-link:hover {
  color: var(--orange-dark);
}

.detail-hero h1 {
  margin-bottom: 20px;
}

.detail-lead {
  max-width: 700px;
  margin-bottom: 28px;
  color: #555;
  font-size: 18px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-hero__media {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid #dedede;
  background: #191919;
  box-shadow: var(--shadow);
}

.detail-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-hero__fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--orange);
  font-size: 92px;
  font-weight: 800;
}

.goal-band {
  padding: 32px 0;
  background: var(--orange-soft);
  border-bottom: 1px solid #f5d6ae;
}

.goal-band__inner {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: start;
  gap: 30px;
}

.goal-band span {
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.goal-band p {
  margin-bottom: 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.detail-section {
  padding: 82px 0;
}

.detail-section--muted {
  background: var(--surface-muted);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 38px;
}

.section-heading h2,
.narrow-content h2,
.two-column-copy h2 {
  margin-bottom: 0;
}

.section-heading--light p {
  color: #ccc;
}

.section-heading--split {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.long-copy {
  margin-bottom: 0;
  color: #555;
  font-size: 17px;
  line-height: 1.85;
}

.objective-grid,
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.objective-card,
.benefit-card {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.objective-card p,
.benefit-card p {
  margin-bottom: 0;
  color: #5d5d5d;
  font-size: 15px;
}

.check-marker {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 15px;
  font-weight: 800;
}

.technology-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.technology-list span {
  padding: 9px 14px;
  font-size: 14px;
}

.two-column-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 70px;
}

.two-column-copy h2 {
  margin-bottom: 20px;
}

.benefit-card h3 {
  margin-bottom: 7px;
  font-size: 17px;
}

.demo-frame {
  min-height: 400px;
  overflow: hidden;
  border: 1px solid #3b3b3b;
  border-radius: 8px;
  background: #090909;
}

.demo-frame iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
}

.external-demo {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 24px;
  text-align: center;
}

.external-demo h3 {
  color: #fff;
  font-size: 28px;
}

.external-demo p {
  max-width: 560px;
  margin-bottom: 24px;
  color: #c8c8c8;
}

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

.gallery-item {
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eee;
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.gallery-item:hover img {
  transform: scale(1.025);
}

.text-button {
  padding: 6px 0;
  border: 0;
  border-bottom: 2px solid var(--orange);
  background: transparent;
  color: var(--orange-dark);
  font-weight: 700;
  cursor: pointer;
}

.documentation-section {
  padding: 62px 0;
  border-top: 1px solid var(--line);
  background: #fafafa;
}

.documentation-section h2 {
  margin-bottom: 10px;
}

.documentation-section p {
  margin-bottom: 0;
}

.image-modal,
.form-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.88);
}

.image-modal {
  display: grid;
  place-items: center;
  padding: 40px;
}

.image-modal img {
  max-width: min(1200px, 94vw);
  max-height: 88vh;
  object-fit: contain;
}

.modal-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #555;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.modal-close--image {
  position: absolute;
  top: 18px;
  right: 18px;
  color: #fff;
}

.form-modal {
  display: grid;
  place-items: center;
  padding: 24px;
}

.form-modal__dialog {
  width: min(500px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.form-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.form-modal__header h2 {
  margin-bottom: 0;
  font-size: 24px;
}

.form-modal__body {
  padding: 26px 28px 30px;
}

.lead-gate-modal {
  padding: 10px;
}

.lead-gate-modal .form-modal__dialog {
  width: min(420px, 100%);
  max-height: none;
  overflow-y: visible;
}

.lead-gate-modal .form-modal__header {
  padding: 14px 20px 10px;
}

.lead-gate-modal .form-modal__header h2 {
  font-size: 19px;
}

.lead-gate-modal .form-modal__body {
  padding: 14px 20px 16px;
}

.gate-intro {
  margin-bottom: 20px;
  color: #626262;
  font-size: 14px;
}

.lead-gate-modal .gate-intro {
  margin-bottom: 10px;
  font-size: 12.5px;
  line-height: 1.42;
}

.lead-gate-modal label {
  margin-bottom: 4px;
  font-size: 13px;
}

.form-modal label {
  display: block;
  margin-bottom: 6px;
  color: #333;
  font-size: 14px;
  font-weight: 700;
}

.form-modal input {
  width: 100%;
  min-height: 46px;
  margin-bottom: 18px;
  padding: 10px 5px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
}

.lead-gate-modal input {
  min-height: 34px;
  margin-bottom: 9px;
  padding: 8px 10px;
}

.form-modal input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 144, 8, 0.14);
}

.form-modal .consent-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  color: #555;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.lead-gate-modal .consent-field {
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.38;
}

.lead-gate-modal .recaptcha-field {
  display: flex;
  justify-content: center;
  height: 72px;
  margin: 2px 0 10px;
  overflow: hidden;
}

.lead-gate-modal .g-recaptcha {
  transform: scale(0.9);
  transform-origin: top center;
}

.form-modal .consent-field input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin: 2px 0 0;
  accent-color: var(--orange);
}

.form-message {
  min-height: 24px;
  margin: -6px 0 12px;
  color: #b42318;
  font-size: 13px;
}

.lead-gate-modal .form-message {
  min-height: 14px;
  margin: -2px 0 6px;
}

.download-success-alert {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.45);
}

.download-success-alert__dialog {
  width: min(430px, 100%);
  padding: 34px 30px 30px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.download-success-alert__icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border: 4px solid #25b46b;
  border-radius: 50%;
  color: #25b46b;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}

.download-success-alert h2 {
  margin-bottom: 10px;
  color: var(--black);
  font-size: 27px;
}

.download-success-alert p {
  margin-bottom: 24px;
  color: #5d5d5d;
  font-size: 15px;
  line-height: 1.6;
}

.download-success-alert__button {
  min-width: 110px;
  border: 0;
  cursor: pointer;
}

.privacy-note {
  margin: 12px 0 0;
  color: #777;
  font-size: 12px;
  text-align: center;
}

.lead-gate-modal .privacy-note {
  margin-top: 8px;
  font-size: 10.5px;
  line-height: 1.35;
}

.lead-gate-modal .button--full {
  min-height: 38px;
  padding: 9px 18px;
}

@media (max-width: 1020px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.85fr);
    gap: 36px;
  }

  .objective-grid,
  .benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .case-studies-page #cssmenu #menu-button {
    right: -20px;
  }

  h1 {
    font-size: 38px;
  }

  h2 {
    font-size: 28px;
  }

  .content-width,
  .site-header__inner {
    width: min(var(--content-width), calc(100% - 36px));
  }

  .site-header__inner {
    min-height: 76px;
  }

  .brand img {
    width: 230px;
  }

  .site-nav {
    gap: 16px;
  }

  .site-nav a:nth-child(n+3) {
    display: none;
  }

  .case-hero,
  .detail-hero {
    padding: 56px 0;
  }

  .projects-section,
  .detail-section {
    padding: 60px 0;
  }

  .projects-toolbar,
  .case-cta__inner,
  .documentation-section__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-search {
    width: 100%;
  }

  .detail-hero__grid,
  .two-column-copy {
    grid-template-columns: 1fr;
  }

  .detail-hero__media {
    aspect-ratio: 16 / 10;
  }

  .back-link {
    margin-bottom: 30px;
  }

  .goal-band__inner {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .two-column-copy {
    gap: 50px;
  }

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

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 25px;
  }

  .site-header__inner {
    min-height: 70px;
    gap: 14px;
  }

  .brand img {
    width: 190px;
  }

  .site-nav a {
    font-size: 13px;
  }

  .site-nav a:not(:first-child) {
    display: none;
  }

  .case-hero p,
  .detail-lead,
  .goal-band p {
    font-size: 16px;
  }

  .project-grid,
  .objective-grid,
  .benefit-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .project-card__content {
    min-height: 0;
  }

  .project-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-actions,
  .detail-actions .button,
  .documentation-section .button,
  .case-cta .button {
    width: 100%;
  }

  .detail-hero__media {
    width: 100%;
    min-height: 0;
  }

  .section-heading--split {
    align-items: flex-start;
    flex-direction: column;
  }

  .demo-frame,
  .external-demo {
    min-height: 260px;
  }

  .image-modal {
    padding: 20px;
  }

  .form-modal__header,
  .form-modal__body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .form-modal {
    align-items: start;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .form-modal__dialog {
    max-height: calc(100vh - 28px);
  }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
