/*
 * GRYX design system: one type scale and colour set for every page.
 * Loaded last on each page. Selectors are wrapped in body.editorial-page :is(...)
 * so these sizes win over the older per-page rules and their breakpoints.
 * Change sizes here, not in the individual page stylesheets.
 */
:root {
  --fs-title: clamp(2.1rem, 1.35rem + 2.5vw, 3.6rem);
  --fs-section: clamp(1.65rem, 1.1rem + 1.5vw, 2.4rem);
  --fs-sub: clamp(1.3rem, 1rem + .75vw, 1.6rem);
  --fs-card: clamp(1.05rem, .95rem + .25vw, 1.2rem);
  --fs-lead: 17px;
  --fs-body: 15px;
  --fs-small: 14px;
  --fs-caption: 12px;
  --fs-link: 13px;
  --weight-heading: 550;
  --on-dark: #edf2f4;
  --on-dark-muted: #a9bbc7;
  --dark-surface: #0d2331;
}
@media (max-width: 760px) {
  :root { --fs-lead: 16px; }
}

/* Page titles */
body.editorial-page :is(.home-page .hero-v3 h1, .page-intro__copy h1, .page-intro--type h1, .contact-intro h1, .sitemap-intro h1) {
  font-size: var(--fs-title);
  font-weight: var(--weight-heading);
  line-height: 1.04;
  letter-spacing: -.055em;
}

/* Section headings */
body.editorial-page :is(.section-head h2, .section-heading h2, .visual-feature__copy h2, .why-choose__header h2, .phase-two-story .rock-showcase__header h2, .home-partnership__heading h2, .company-head h2, .company-split__copy h2, .site-footer__intro h2) {
  font-size: var(--fs-section);
  font-weight: var(--weight-heading);
  line-height: 1.1;
  letter-spacing: -.045em;
}

/* Sub-headings: solution, sector, panel and group titles */
body.editorial-page :is(.solution-card__copy h2, .sector-card h2, .contact-details-panel h2, .contact-form-heading h2, .sitemap-group h2) {
  font-size: var(--fs-sub);
  font-weight: var(--weight-heading);
  line-height: 1.2;
  letter-spacing: -.035em;
}

/* Card and item titles */
body.editorial-page :is(.expertise-strip h2, .home-page .video-service-body h3, .why-choice h3, .delivery-line h3, .service-grid h3, .home-partnership__services li) {
  font-size: var(--fs-card);
  font-weight: var(--weight-heading);
  line-height: 1.3;
  letter-spacing: -.02em;
}

/* Lead paragraphs under titles and section headings */
body.editorial-page :is(.home-page .hero-v3 p, .home-page .capabilities-section .capabilities-intro, .page-intro__copy > p, .contact-intro p, .sitemap-intro p, .company-head p, .company-split__copy > p, .home-page .visual-feature__copy > p, .partnership-section .home-partnership__content > p, .home-page .why-choose__header > p) {
  font-size: var(--fs-lead);
  font-weight: 400;
  line-height: 1.65;
}

/* Body copy */
body.editorial-page :is(.solution-card__copy > p) {
  font-size: var(--fs-body);
  line-height: 1.7;
}

/* Card copy */
body.editorial-page :is(.expertise-strip p, .home-page .video-service-body p, .sector-card p, .delivery-line p, .service-grid p, .contact-locations p) {
  font-size: var(--fs-small);
  line-height: 1.65;
}

/* Text links and buttons */
body.editorial-page :is(.editorial-text-link, .card-link, .btn) {
  font-size: var(--fs-link);
  font-weight: 600;
}

/* Colour: muted copy on dark panels uses one tone everywhere */
body.editorial-page :is(.partnership-section .home-partnership__content > p, .contact-locations p, .home-partnership__heading h2 span, .home-partnership__services li > span) {
  color: var(--on-dark-muted);
}

/* Industries: closing link sits on the right now that its sentence is gone */
.context-link { justify-content: flex-end; }

/* Contact form: hidden spam trap and send status */
.form-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.form-status { font-size: var(--fs-small); }
.form-status[data-state="success"] { color: #1f7a4d; }
.form-status[data-state="error"] { color: #b3261e; }
html[data-site-theme="dark"] .form-status[data-state="success"] { color: #7fd6a6; }
html[data-site-theme="dark"] .form-status[data-state="error"] { color: #ffb4ab; }
.form-submit .btn:disabled { opacity: .6; cursor: progress; }

/* Videos never show browser controls */
video::-webkit-media-controls { display: none !important; }
video::-webkit-media-controls-enclosure { display: none !important; }
