/*
Theme Name: IWS Base
Theme URI: https://irishwebsolutions.com
Author: Irish Web Solutions
Author URI: https://irishwebsolutions.com
Description: The Irish Web Solutions parent block theme. Holds the layout, the band rhythm, the card rule and the type scale once, so every client site is a small child theme of colours and fonts on top. Values translated from the tested design layer (iws-design-layer-2026.css). Never activate this theme directly — activate a child of it.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iws-base
*/

/* ------------------------------------------------------------------
   Everything theme.json has a field for lives in theme.json.
   This file holds only what it does not: the heading rhythm inside a
   band, the card rule, the numbered card, the placeholder box, the
   dark-band inversions and two small responsive adjustments.
   Rule of the house: fix it here or in theme.json, never on a page.
   ------------------------------------------------------------------ */

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- Bands: a top-level group is a band ------------------------- */
/* Root padding-aware alignments give full-width bands their gutter;
   the band's inner column is wideSize (1160px) by setting the group
   to Wide in the editor. Vertical rhythm: 96px, 56px on phones.     */

.wp-site-blocks > .wp-block-group.alignfull,
.wp-site-blocks > main > .wp-block-group.alignfull,
.entry-content > .wp-block-group.alignfull {
  padding-top: var(--wp--preset--spacing--100);
  padding-bottom: var(--wp--preset--spacing--100);
}

.iws-band--tall { padding-top: var(--wp--preset--spacing--110) !important; padding-bottom: var(--wp--preset--spacing--110) !important; }
.iws-band--short { padding-top: var(--wp--preset--spacing--90) !important; padding-bottom: var(--wp--preset--spacing--90) !important; }
.iws-band--tight { padding-top: var(--wp--preset--spacing--80) !important; padding-bottom: var(--wp--preset--spacing--80) !important; }

/* ---- Heading rhythm inside a band ------------------------------- */
.wp-block-group > h2 { margin-top: var(--wp--preset--spacing--80); }
.wp-block-group > h3 { margin-top: var(--wp--preset--spacing--60); }
.wp-block-group > :first-child { margin-top: 0; }

h1, h2, h3, h4 { text-wrap: balance; margin-bottom: 0; }
h1 { max-width: 920px; }
h2, h3, h4 { max-width: 680px; }

/* The lead paragraph straight after an H1 */
h1 + p {
  font-size: var(--wp--preset--font-size--lead);
  line-height: 1.55;
  max-width: 640px;
}

/* Centred text blocks get a wider measure */
.has-text-align-center { max-width: 880px; margin-left: auto; margin-right: auto; }

/* Lists */
li { margin: 0 0 10px; }
li::marker { color: var(--wp--preset--color--green); }
strong { font-weight: 600; color: var(--wp--preset--color--ink); }
a:not(.wp-block-button__link) { text-underline-offset: 3px; }

/* Buttons: no lift, just a soft fade on hover */
.wp-block-button__link:hover { opacity: .88; }
.wp-block-buttons + p { margin-top: var(--wp--preset--spacing--30); }

/* Small print */
.has-small-font-size { line-height: 1.6; color: var(--wp--preset--color--muted); }

/* Quote cite */
.wp-block-quote cite {
  display: block;
  margin-top: 14px;
  font-family: var(--wp--preset--font-family--sans);
  font-size: var(--wp--preset--font-size--small);
  font-style: normal;
  color: var(--wp--preset--color--muted);
}
.wp-block-quote p { max-width: none; }

/* Tables */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th, .wp-block-table td {
  border: 0;
  border-bottom: 1px solid var(--wp--preset--color--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}
.wp-block-table th { font-weight: 600; color: var(--wp--preset--color--ink); }

/* Images */
.wp-block-image img { border-radius: 4px; height: auto; }

/* ---- Cards ------------------------------------------------------- */
/* Block style "Card (green rule)" on core/column */
.wp-block-column.is-style-iws-card {
  border-top: 2px solid var(--wp--preset--color--green);
  padding-top: 20px;
}
.wp-block-column.is-style-iws-card > * + * { margin-top: 12px; }
.wp-block-column.is-style-iws-card :is(p, h3, h4, ul, ol) { max-width: none; }

/* Block style "Numbered card" on core/column — the serif numeral is a
   CSS counter, so cards renumber themselves when one is added or removed */
.wp-block-columns:has(.is-style-iws-numbered-card) { counter-reset: iws-step; }
.wp-block-column.is-style-iws-numbered-card {
  border-top: 2px solid var(--wp--preset--color--green);
  padding-top: 20px;
}
.wp-block-column.is-style-iws-numbered-card::before {
  counter-increment: iws-step;
  content: counter(iws-step, decimal-leading-zero);
  display: block;
  font-family: var(--wp--preset--font-family--serif);
  font-weight: 500;
  font-size: 48px;
  line-height: 1;
  color: var(--wp--preset--color--green);
  margin-bottom: 16px;
}
.wp-block-column.is-style-iws-numbered-card > * + * { margin-top: 12px; }
.wp-block-column.is-style-iws-numbered-card :is(p, h3, h4, ul, ol) { max-width: none; }

/* ---- Placeholder slot -------------------------------------------- */
/* The only raw HTML block the house allows. A marker, not content.
   Delete every one before handover.                                  */
.iws-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 40px 24px;
  box-sizing: border-box;
  min-height: 200px;
  border: 1px dashed #C3CBCE;
  background: var(--wp--preset--color--mist);
  color: var(--wp--preset--color--muted);
  border-radius: 4px;
  margin-top: var(--wp--preset--spacing--50);
}
.iws-ph b { font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.iws-ph span { font-size: 14px; line-height: 1.55; max-width: 380px; }
.has-mist-background-color .iws-ph { background: var(--wp--preset--color--paper); border-color: #D6DCDE; }

/* ---- Dark band inversions ---------------------------------------- */
/* Anything inside a slate band: white headings, bright green accents */
.has-slate-background-color { color: rgba(255, 255, 255, .78); }
.has-slate-background-color :is(h1, h2, h3, h4, strong, .wp-block-post-title) { color: #fff; }
.has-slate-background-color a:not(.wp-block-button__link) { color: #fff; }
.has-slate-background-color .wp-block-button__link { background-color: var(--wp--preset--color--green-bright); color: #fff; }
.has-slate-background-color .wp-block-quote { border-left-color: var(--wp--preset--color--green-bright); }
.has-slate-background-color .wp-block-quote p { color: #fff; }
.has-slate-background-color .wp-block-quote cite { color: rgba(255, 255, 255, .6); }
.has-slate-background-color li::marker { color: var(--wp--preset--color--green-bright); }
.has-slate-background-color .has-small-font-size { color: rgba(255, 255, 255, .6); }
.has-slate-background-color .is-style-iws-card,
.has-slate-background-color .is-style-iws-numbered-card { border-top-color: var(--wp--preset--color--green-bright); }
.has-slate-background-color .is-style-iws-numbered-card::before { color: var(--wp--preset--color--green-bright); }
.has-slate-background-color .wp-block-table :is(th, td) { border-bottom-color: rgba(255, 255, 255, .18); }
.has-slate-background-color .wp-block-table th { color: #fff; }
.has-slate-background-color .wp-block-separator { border-color: rgba(255, 255, 255, .18); }
.has-slate-background-color .iws-ph { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .62); }

/* ---- Header and footer ------------------------------------------- */
.iws-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.iws-header .wp-block-site-title a { text-decoration: none; }
.iws-footer { border-top: 1px solid var(--wp--preset--color--line); }
.iws-footer p { max-width: none; }

/* ---- Separator --------------------------------------------------- */
.wp-block-separator { border: 0; border-top: 1px solid var(--wp--preset--color--line); opacity: 1; }
.wp-block-separator:not(.is-style-wide):not(.is-style-dots) { width: 100%; max-width: none; }

/* ---- Phones ------------------------------------------------------ */
@media (max-width: 900px) {
  .wp-site-blocks > .wp-block-group.alignfull,
  .wp-site-blocks > main > .wp-block-group.alignfull,
  .entry-content > .wp-block-group.alignfull,
  .iws-band--tall, .iws-band--short, .iws-band--tight {
    padding-top: var(--wp--preset--spacing--70) !important;
    padding-bottom: var(--wp--preset--spacing--70) !important;
  }
  .wp-block-group > h2 { margin-top: var(--wp--preset--spacing--70); }
  .wp-block-quote { padding-left: 20px; }
  .wp-block-quote p { font-size: 21px; }
  .wp-block-column.is-style-iws-numbered-card::before { font-size: 40px; }
}
@media (max-width: 781px) {
  .wp-block-columns:not(.is-not-stacked-on-mobile) { gap: var(--wp--preset--spacing--50); }
}
