/* Shared visual rules for the public pages. Values match the editable Figma layout. */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-section: clamp(64px, 7vw, 96px);
  --card-radius: 24px;
  --card-border: var(--line, #2a2938);
  --card-surface: var(--panel, #14141e);
  --type-label: 11px;
  --type-body: 15px;
  --type-card-title: 24px;
}

/* Keep editorial and cabinet controls independent; apply the system to public pages. */
body:not(:has(.editor-page)) h1,
body:not(:has(.editor-page)) h2,
body:not(:has(.editor-page)) h3 {
  text-wrap: balance;
}

body:not(:has(.editor-page)) h1 {
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.08;
  letter-spacing: -.05em;
}

body:not(:has(.editor-page)) h2 {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: -.045em;
}

body:not(:has(.editor-page)) .section-pad {
  padding-block: var(--space-section);
}

body:not(:has(.editor-page)) .hero.section-pad {
  padding-top: clamp(72px, 8vw, 108px);
  padding-bottom: clamp(48px, 6vw, 72px);
}

body:not(:has(.editor-page)) .eyebrow {
  margin-bottom: 16px !important;
  font-size: var(--type-label);
  line-height: 1.35;
  letter-spacing: .14em;
}

body:not(:has(.editor-page)) .section-heading {
  margin-bottom: var(--space-6);
}

body:not(:has(.editor-page)) .section-heading > p:not(.eyebrow),
body:not(:has(.editor-page)) .split-heading > p:not(.eyebrow),
body:not(:has(.editor-page)) .work-heading > p:not(.eyebrow),
body:not(:has(.editor-page)) .visual-heading-copy > p:not(.eyebrow) {
  max-width: 650px;
  font-size: var(--type-body);
  line-height: 1.65;
}

body:not(:has(.editor-page)) .hero h1 {
  max-width: 680px;
  margin-bottom: var(--space-5);
}

body:not(:has(.editor-page)) .hero-lead,
body:not(:has(.editor-page)) .body-large,
body:not(:has(.editor-page)) .contact-section > .wrap > div > p:not(.eyebrow) {
  font-size: 17px;
  line-height: 1.65;
}

body:not(:has(.editor-page)) .solution-grid,
body:not(:has(.editor-page)) .project-grid,
body:not(:has(.editor-page)) .blog-card-grid {
  gap: 20px;
}

body:not(:has(.editor-page)) .solution-card,
body:not(:has(.editor-page)) .project-card,
body:not(:has(.editor-page)) .blog-card,
body:not(:has(.editor-page)) .reviews-section,
body:not(:has(.editor-page)) .contact-panel,
body:not(:has(.editor-page)) .case-point,
body:not(:has(.editor-page)) .role-card,
body:not(:has(.editor-page)) .scenario-map,
body:not(:has(.editor-page)) .gallery-item {
  border-radius: var(--card-radius);
  border-color: var(--card-border);
}

body:not(:has(.editor-page)) .solution-card {
  min-height: 350px;
  padding: 28px;
}

body:not(:has(.editor-page)) .service-grid .solution-card {
  min-height: 320px;
}

body:not(:has(.editor-page)) .card-num,
body:not(:has(.editor-page)) .price-type,
body:not(:has(.editor-page)) .project-tag,
body:not(:has(.editor-page)) .blog-card-index {
  font-size: var(--type-label);
  line-height: 1.4;
  letter-spacing: .12em;
}

body:not(:has(.editor-page)) .solution-card h3,
body:not(:has(.editor-page)) .project-content h3,
body:not(:has(.editor-page)) .blog-card h3,
body:not(:has(.editor-page)) .price-row h3,
body:not(:has(.editor-page)) .contact-panel h3,
body:not(:has(.editor-page)) .case-point h3,
body:not(:has(.editor-page)) .reviews-section .section-heading h3 {
  font-size: var(--type-card-title);
  line-height: 1.22;
  letter-spacing: -.035em;
}

body:not(:has(.editor-page)) .solution-card p,
body:not(:has(.editor-page)) .project-content p,
body:not(:has(.editor-page)) .blog-card p,
body:not(:has(.editor-page)) .price-row p,
body:not(:has(.editor-page)) .case-point p {
  font-size: var(--type-body);
  line-height: 1.65;
}

body:not(:has(.editor-page)) .project-image,
body:not(:has(.editor-page)) .self-art {
  height: auto;
  aspect-ratio: 16 / 9;
}

body:not(:has(.editor-page)) .project-content,
body:not(:has(.editor-page)) .blog-card {
  padding: 28px;
}

body:not(:has(.editor-page)) .blog-card-cover {
  height: clamp(150px, 17vw, 205px);
}

body:not(:has(.editor-page)) .price-row {
  gap: 40px;
  padding-block: 25px;
}

body:not(:has(.editor-page)) .price-value strong {
  font-size: 23px;
  line-height: 1.25;
}

body:not(:has(.editor-page)) .button,
body:not(:has(.editor-page)) .header-cta,
body:not(:has(.editor-page)) .blog-card-link,
body:not(:has(.editor-page)) .project-link,
body:not(:has(.editor-page)) .text-link,
body:not(:has(.editor-page)) .blog-all-link {
  font-size: 14px;
}

body:not(:has(.editor-page)) .button {
  min-height: 50px;
  padding: 14px 22px;
  line-height: 1.25;
}

body:not(:has(.editor-page)) .contact-form {
  gap: 16px;
}

body:not(:has(.editor-page)) .contact-form label {
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
}

body:not(:has(.editor-page)) .contact-form input:not([type="hidden"]),
body:not(:has(.editor-page)) .contact-form textarea {
  min-height: 50px;
  border-radius: 12px;
  padding: 13px 15px;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
}

body:not(:has(.editor-page)) a,
body:not(:has(.editor-page)) button {
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 800px) {
  body:not(:has(.editor-page)) h1 {
    font-size: clamp(36px, 10vw, 44px);
    line-height: 1.08;
  }

  body:not(:has(.editor-page)) h2 {
    font-size: clamp(30px, 8.2vw, 36px);
    line-height: 1.14;
  }

  body:not(:has(.editor-page)) .section-pad {
    padding-block: 58px;
  }

  body:not(:has(.editor-page)) .hero.section-pad {
    padding-top: 56px;
    padding-bottom: 44px;
  }

  body:not(:has(.editor-page)) .solution-grid,
  body:not(:has(.editor-page)) .project-grid,
  body:not(:has(.editor-page)) .blog-card-grid {
    gap: 14px;
  }

  body:not(:has(.editor-page)) .solution-card,
  body:not(:has(.editor-page)) .service-grid .solution-card,
  body:not(:has(.editor-page)) .project-content,
  body:not(:has(.editor-page)) .blog-card {
    min-height: 0;
    padding: 22px;
  }

  body:not(:has(.editor-page)) .solution-card h3,
  body:not(:has(.editor-page)) .project-content h3,
  body:not(:has(.editor-page)) .blog-card h3,
  body:not(:has(.editor-page)) .price-row h3,
  body:not(:has(.editor-page)) .contact-panel h3,
  body:not(:has(.editor-page)) .case-point h3,
  body:not(:has(.editor-page)) .reviews-section .section-heading h3 {
    font-size: 21px;
  }

  body:not(:has(.editor-page)) .solution-card p,
  body:not(:has(.editor-page)) .project-content p,
  body:not(:has(.editor-page)) .blog-card p,
  body:not(:has(.editor-page)) .price-row p,
  body:not(:has(.editor-page)) .case-point p {
    font-size: 14px;
  }

  body:not(:has(.editor-page)) .price-row {
    gap: 12px;
    padding-block: 20px;
  }

  body:not(:has(.editor-page)) .price-value strong {
    font-size: 20px;
  }
}

/* Final overrides for the updated copy and the image-free Nafanya case. */
body:not(:has(.editor-page)) .client-problems-grid,
body:not(:has(.editor-page)) .service-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body:not(:has(.editor-page)) .client-problems-grid .solution-card,
body:not(:has(.editor-page)) .service-grid .solution-card {
  min-height: 0;
}

body:not(:has(.editor-page)) .project-hero-grid.project-hero-no-image { grid-template-columns: 1fr; }
body:not(:has(.editor-page)) .project-hero-grid.project-hero-no-image #case-image { display: none; }
body:not(:has(.editor-page)) #case-gallery-section[hidden] { display: none !important; }

@media (max-width: 800px) {
  body:not(:has(.editor-page)) .client-problems-grid,
  body:not(:has(.editor-page)) .service-grid,
  body:not(:has(.editor-page)) .process-steps,
  body:not(:has(.editor-page)) .case-fit { grid-template-columns: 1fr; }
}
