/*
 * Kelly Creative standard page foundation.
 *
 * Used by the default page template, legal pages, Help Centre and retained
 * legacy pages until a bespoke full-page package is approved. It deliberately
 * supplies readable structure rather than pretending every page has a custom
 * service-page design.
 */

.standard-page-shell,
.kc-standard-page,
.kc-help-centre-page,
.kc-terms-page,
.kc-website-performance-page,
.kc-local-seo-page,
.kc-web-design-page {
  color: var(--oa-color-text, #f5f7f5);
  background: var(--oa-color-canvas, #181a1b);
}

.standard-page-shell {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
}

.kc-standard-page,
.kc-help-centre-page,
.kc-terms-page {
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
}

.standard-page-shell .kc-prose,
.kc-standard-page__wrap,
.kc-standard-page__inner,
.kc-help-centre-page .kc-standard-page__wrap,
.kc-help-centre-page .kc-standard-page__inner,
.kc-terms-page .kc-standard-page__wrap,
.kc-terms-page .kc-standard-page__inner {
  width: min(calc(100% - (2 * var(--kc-page-gutter, 1.25rem))), 52rem);
  margin-inline: auto;
}

.kc-standard-page__hero {
  padding-block: clamp(3.75rem, 8vw, 6.75rem);
  border-bottom: 1px solid rgb(255 255 255 / 0.16);
  background:
    radial-gradient(circle at 80% 25%, rgb(217 250 0 / 0.055), transparent 31%),
    #1b1e1d;
}

.kc-standard-page__body {
  padding-block: clamp(3rem, 6vw, 5.5rem);
}

.standard-page-shell .entry-header,
.kc-standard-page .kc-standard-page__header,
.kc-help-centre-page .kc-standard-page__header,
.kc-terms-page .kc-standard-page__header {
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid rgb(255 255 255 / 0.16);
}

.kc-standard-page__eyebrow {
  margin: 0 0 1rem;
  color: var(--oa-color-accent, #8ae100) !important;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.35;
  text-transform: uppercase;
}

.standard-page-shell .entry-title,
.kc-standard-page h1,
.kc-help-centre-page h1,
.kc-terms-page h1 {
  max-width: 18ch;
  margin: 0;
  color: #fff;
  font-size: clamp(2.5rem, 7vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-wrap: balance;
}

.kc-standard-page__lead {
  max-width: 44rem;
  margin: 1.5rem 0 0;
  color: #d9dcda !important;
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.28rem);
  line-height: 1.65;
}

.standard-page-shell .entry-content,
.kc-standard-page,
.kc-help-centre-page,
.kc-terms-page {
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.1rem);
  line-height: 1.75;
}

.standard-page-shell .entry-content > * + *,
.kc-standard-page__wrap > * + *,
.kc-standard-page__inner > * + * {
  margin-top: 1.35em;
}

.standard-page-shell :is(h2, h3, h4),
.kc-standard-page :is(h2, h3, h4),
.kc-help-centre-page :is(h2, h3, h4),
.kc-terms-page :is(h2, h3, h4) {
  color: #fff;
  line-height: 1.18;
}

.standard-page-shell h2,
.kc-standard-page h2,
.kc-help-centre-page h2,
.kc-terms-page h2 {
  margin-top: clamp(2.75rem, 6vw, 4.5rem) !important;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  letter-spacing: -0.035em;
}

.standard-page-shell h3,
.kc-standard-page h3,
.kc-help-centre-page h3,
.kc-terms-page h3 {
  margin-top: 2.25rem !important;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.standard-page-shell :is(p, li),
.kc-standard-page :is(p, li),
.kc-help-centre-page :is(p, li),
.kc-terms-page :is(p, li) {
  color: #c9cdca;
}

.standard-page-shell a,
.kc-standard-page a,
.kc-help-centre-page a,
.kc-terms-page a {
  color: var(--oa-color-accent, #8ae100);
  text-underline-offset: 0.18em;
}

.standard-page-shell :is(blockquote, .wp-block-quote),
.kc-standard-page :is(blockquote, .wp-block-quote),
.kc-help-centre-page :is(blockquote, .wp-block-quote),
.kc-terms-page :is(blockquote, .wp-block-quote),
.kc-standard-page__notice {
  margin-inline: 0;
  padding: 1.25rem 1.4rem;
  border-left: 3px solid var(--oa-color-accent, #8ae100);
  background: rgb(255 255 255 / 0.035);
}

.standard-page-shell :is(table, .wp-block-table table),
.kc-standard-page :is(table, .wp-block-table table),
.kc-help-centre-page :is(table, .wp-block-table table),
.kc-terms-page :is(table, .wp-block-table table) {
  width: 100%;
  border-collapse: collapse;
}

.standard-page-shell :is(th, td),
.kc-standard-page :is(th, td),
.kc-help-centre-page :is(th, td),
.kc-terms-page :is(th, td) {
  padding: 0.85rem;
  border: 1px solid rgb(255 255 255 / 0.16);
  text-align: left;
  vertical-align: top;
}

.kc-help-centre-grid,
.kc-help-centre-grid > .wp-block-group__inner-container,
.kc-help-centre-page .kc-help-grid,
.kc-help-centre-page .kc-help-grid > .wp-block-group__inner-container {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.kc-help-centre-card,
.kc-help-centre-page .kc-help-card {
  min-width: 0;
  padding: 1.4rem;
  border: 1px solid rgb(255 255 255 / 0.17);
  background: #222524;
}

.kc-help-centre-card h2,
.kc-help-centre-card h3,
.kc-help-centre-page .kc-help-card h2,
.kc-help-centre-page .kc-help-card h3 {
  margin-top: 0 !important;
}

.kc-standard-page .wp-block-buttons,
.kc-help-centre-page .wp-block-buttons,
.kc-terms-page .wp-block-buttons {
  margin-top: 2rem;
}

.kc-standard-page .wp-block-button__link,
.kc-help-centre-page .wp-block-button__link,
.kc-terms-page .wp-block-button__link {
  padding: 0.9rem 1.2rem;
  color: #151715;
  background: var(--oa-color-accent, #8ae100);
  border: 1px solid var(--oa-color-accent, #8ae100);
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

@media (max-width: 43.75rem) {
  .kc-help-centre-grid,
  .kc-help-centre-grid > .wp-block-group__inner-container,
  .kc-help-centre-page .kc-help-grid,
  .kc-help-centre-page .kc-help-grid > .wp-block-group__inner-container {
    grid-template-columns: 1fr;
  }
}

/* Legal-page aliases retained by the approved Privacy / Terms content. */
.kc-legal-page,
.kc-privacy-page,
.kc-privacy-policy-page {
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
  color: var(--oa-color-text, #f5f7f5);
  background: var(--oa-color-canvas, #181a1b);
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.1rem);
  line-height: 1.75;
}

:is(.kc-legal-page, .kc-privacy-page, .kc-privacy-policy-page) :is(.kc-standard-page__wrap, .kc-standard-page__inner, .kc-legal-page__wrap, .kc-legal-page__inner) {
  width: min(calc(100% - (2 * var(--kc-page-gutter, 1.25rem))), 52rem);
  margin-inline: auto;
}

/* Prevent Gutenberg flow margins from offsetting grid cards. */
.kc-help-centre-grid,
.kc-help-centre-grid > .wp-block-group__inner-container,
.kc-help-centre-page .kc-help-grid,
.kc-help-centre-page .kc-help-grid > .wp-block-group__inner-container {
  align-items: stretch !important;
}

.kc-help-centre-grid > .kc-help-centre-card,
.kc-help-centre-grid > .wp-block-group__inner-container > .kc-help-centre-card,
.kc-help-centre-page .kc-help-grid > .kc-help-card,
.kc-help-centre-page .kc-help-grid > .wp-block-group__inner-container > .kc-help-card {
  height: 100%;
  margin-block: 0 !important;
}

.kc-help-centre-card,
.kc-help-centre-page .kc-help-card {
  display: flex;
  flex-direction: column;
}

.kc-help-centre-card > :last-child,
.kc-help-centre-page .kc-help-card > :last-child {
  margin-top: auto !important;
  padding-top: 1.25rem;
}

/* Summary cards shared by Terms and Privacy pages.
 * Keep the existing Gutenberg column/grid choice; only remove flow offsets and
 * make sibling cards stretch evenly.
 */
:is(.kc-legal-page, .kc-terms-page, .kc-privacy-page, .kc-privacy-policy-page) :is(.kc-legal-page__summary-grid, .kc-legal-page__summary, .kc-legal-summary-grid),
:is(.kc-legal-page, .kc-terms-page, .kc-privacy-page, .kc-privacy-policy-page) :is(.wp-block-group, .wp-block-columns):has(> .kc-legal-page__summary-card),
:is(.kc-legal-page, .kc-terms-page, .kc-privacy-page, .kc-privacy-policy-page) :is(.wp-block-group, .wp-block-columns):has(> .wp-block-group__inner-container > .kc-legal-page__summary-card) > .wp-block-group__inner-container {
  align-items: stretch !important;
}

:is(.kc-legal-page, .kc-terms-page, .kc-privacy-page, .kc-privacy-policy-page) .kc-legal-page__summary-card {
  height: 100%;
  min-width: 0;
  margin-block: 0 !important;
  align-self: stretch;
}

:is(.kc-legal-page, .kc-terms-page, .kc-privacy-page, .kc-privacy-policy-page) .kc-legal-page__summary-card :is(h2, h3):first-child {
  margin-top: 0 !important;
}

