/* IBS SIGNATURE THEME 3.0 — palette and native block treatments.
 * This is the theme foundation. The IBS Website Update plugin retains its own
 * page layouts, imagery, forms and identity.css; keep that plugin active.
 * All legacy rules are scoped to .ibs-theme-page. The three Group styles only
 * apply when the owner explicitly selects them in the block editor.
 */
.ibs-theme-page {
  --paper:#f7f1e7;
  --ink:#24231f;
  --navy:#24231f;
  --orange:#785a39;
  --muted:#635d56;
  --line:#cfc3b1;
  --white:#faf6ef;
  --serif:'Manrope',Arial,sans-serif;
  --body:'Inter',Arial,sans-serif;
  background:var(--paper);
  color:var(--ink);
}
.ibs-theme-page :where(h1,h2,h3,h4),
.ibs-theme-page .spc-site :where(h1,h2,h3,h4) {
  font-family:var(--serif);
  font-weight:400;
  line-height:1.12;
  letter-spacing:-.025em;
}
html[dir=rtl] .ibs-theme-page,
.ibs-theme-page[dir=rtl] { --serif:'IBM Plex Sans Arabic',Arial,sans-serif; --body:'Noto Sans Arabic',Arial,sans-serif; }
html[dir=rtl] .ibs-theme-page :where(h1,h2,h3,h4),
.ibs-theme-page [dir=rtl] :where(h1,h2,h3,h4),
.ibs-theme-page[dir=rtl] :where(h1,h2,h3,h4) {
  font-family:var(--serif);
  font-weight:500;
  line-height:1.5;
  letter-spacing:0;
}
.ibs-theme-page>div.wp-site-blocks>header,
.ibs-theme-page .wp-site-blocks>header { background:#f7f1e7; border-color:#cfc3b1; }
.ibs-theme-page .brand { flex-basis:112px; }
.ibs-theme-page .brand img { width:112px; height:76px; mix-blend-mode:normal; }
.ibs-theme-page .button.orange,
.ibs-theme-page .spc-hero .spc-button { background:#24231f; border-color:#24231f; color:#f7f1e7!important; }
.ibs-theme-page .button.orange:hover { background:#4a4137; border-color:#4a4137; }

/* Existing layouts keep their structure while their surfaces join the identity. */
.ibs-theme-page .hero,
.ibs-theme-page .welcome-hero,
.ibs-theme-page .welcome-story,
.ibs-theme-page .page-heading,
.ibs-theme-page .spc-heritage {
  background-color:#f7f1e7;
  background-image:url("identity/background.svg");
  background-repeat:no-repeat;
  background-size:max(880px,100%) auto;
  background-position:center 28%;
}
.ibs-theme-page .story-proof,
.ibs-theme-page .story-systems,
.ibs-theme-page .brand-directory,
.ibs-theme-page .business-section,
.ibs-theme-page .category-card { background:#efe6d8; }
.ibs-theme-page .spc-site { --navy:#24231f; --orange:#785a39; --paper:#f7f1e7; --ink:#24231f; }
.ibs-theme-page .story-hero,
.ibs-theme-page .company-hero,
.ibs-theme-page .company-people,
.ibs-theme-page .home-heritage,
.ibs-theme-page .navy,
.ibs-theme-page footer {
  --orange:#b9956b;
  --muted:#bcb4a8;
  background:#24231f;
  color:#f7f1e7;
}
.ibs-theme-page .company-hero .eyebrow,
.ibs-theme-page .company-people .eyebrow,
.ibs-theme-page .people-principle { color:#d2b48a; }
.ibs-theme-page footer .footer-top p { color:#d6cec2; }
.ibs-theme-page footer .footer-bottom { border-color:#6f675c; }
.ibs-theme-page .business-form :is(input:not([type=checkbox]),textarea) { background:#faf6ef; border-color:#897c6b; }
.ibs-theme-page .business-status,
.ibs-theme-page .contact-choices>a { background:#faf6ef; }
.ibs-theme-page :is(a,button,input,select,textarea,summary):focus-visible { outline-color:#785a39; }
.ibs-theme-page :is(.navy,.company-hero,.company-people,.home-heritage,footer) :is(a,button,input,select,textarea,summary):focus-visible { outline-color:#b9956b; }

/* Ordinary WordPress text pages have a comfortable line length without changing
 * any saved blocks, templates or explicit alignment/colour selections.
 */
.ibs-theme-page .wp-block-post-content>:where(p,h1,h2,h3,h4,ul,ol):not(.alignfull) {
  max-width:min(900px,calc(100% - 48px));
  margin-inline:auto;
  margin-bottom:24px;
}
.ibs-theme-page .wp-block-post-content>:where(h1,h2,h3,h4):first-child { margin-top:54px; }

/* Native Group > Styles: reusable, editable IBS surfaces for future sections.
 * No scripts, extra plugins or externally hosted fonts are required.
 */
.wp-block-group.is-style-ibs-identity,
.wp-block-group.is-style-ibs-stone,
.wp-block-group.is-style-ibs-charcoal { padding:clamp(28px,5vw,72px); }
.wp-block-group.is-style-ibs-identity {
  position:relative;
  isolation:isolate;
  background:#f7f1e7;
  color:#24231f;
}
.wp-block-group.is-style-ibs-identity::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:url("identity/background.svg") no-repeat center 28% / max(880px,100%) auto;
}
.wp-block-group.is-style-ibs-stone { background:#e8e0d2; color:#24231f; }
.wp-block-group.is-style-ibs-charcoal { background:#24231f; color:#f7f1e7; }
.wp-block-group.is-style-ibs-charcoal a:not(.wp-element-button) { color:inherit; }
.wp-block-group.is-style-ibs-charcoal .wp-element-button { background:#f7f1e7; color:#24231f; }
.wp-block-group:is(.is-style-ibs-identity,.is-style-ibs-stone,.is-style-ibs-charcoal) a:not(.wp-element-button) { text-decoration:underline; text-underline-offset:.25em; }
[dir=rtl] .wp-block-group.is-style-ibs-identity::before { transform:scaleX(-1); }
@media(max-width:700px) {
  .ibs-theme-page .brand { flex-basis:90px; }
  .ibs-theme-page .brand img { width:90px; height:62px; }
  .wp-block-group.is-style-ibs-identity::before { background-size:100% auto; background-position:center bottom; opacity:.65; }
}
@media print { .wp-block-group.is-style-ibs-identity::before { display:none; } }

/* Native editorial headings follow the same bilingual type system. Explicit
 * owner font selections/inline styles keep WordPress's normal precedence. */
:where(.wp-block-group.is-style-ibs-identity,.wp-block-group.is-style-ibs-stone,.wp-block-group.is-style-ibs-charcoal) :where(h1,h2,h3,h4) { font-family:var(--serif); font-weight:400; }
[dir=rtl] :where(.wp-block-group.is-style-ibs-identity,.wp-block-group.is-style-ibs-stone,.wp-block-group.is-style-ibs-charcoal) :where(h1,h2,h3,h4) { font-family:var(--serif); font-weight:500; letter-spacing:0; line-height:1.5; }

/* Approved typography for native future pages; ordinary block controls remain editable. */
.ibs-theme-page { font-family:var(--body); }
.ibs-theme-page :is(h1,h2,h3,h4,h5,h6) { font-family:var(--serif); font-weight:500; }
.editor-styles-wrapper { font-family:'Inter',Arial,sans-serif; }
.editor-styles-wrapper :is(h1,h2,h3,h4) { font-family:'Manrope',Arial,sans-serif; }
.editor-styles-wrapper [lang=ar] { font-family:'Noto Sans Arabic',Arial,sans-serif; }
.editor-styles-wrapper [lang=ar] :is(h1,h2,h3,h4) { font-family:'IBM Plex Sans Arabic',Arial,sans-serif; }
