/*
Theme Name: StrongOrigin
Theme URI: https://strongorigin.co.uk/
Author: StrongOrigin
Description: Lightweight block-editor-ready theme for the StrongOrigin parent technology company, StrongOrigin Labs, CivicOrigin and Journal.
Version: 1.3.3
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: strongorigin
*/

:root {
  --so-cream: #f5f1e8;
  --so-navy: #122837;
  --so-yellow: #fbfc09;
  --so-white: #fffef9;
  --so-muted: #5d696f;
  --so-line: rgba(18, 40, 55, .18);
  --so-radius: 1.1rem;
  --so-wrap: 1240px;
  --so-pad: clamp(1.15rem, 4vw, 3rem);
  --so-space: clamp(4rem, 9vw, 8rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--so-cream); color: var(--so-navy); font: 400 1rem/1.65 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--so-yellow); outline-offset: 4px; }
.skip-link { position: fixed; left: 1rem; top: -8rem; z-index: 9999; padding: .8rem 1rem; background: var(--so-yellow); color: var(--so-navy); font-weight: 800; }
.skip-link:focus { top: 1rem; }
.wrap { width: min(100% - (2 * var(--so-pad)), var(--so-wrap)); margin-inline: auto; }
.narrow { width: min(100% - (2 * var(--so-pad)), 760px); margin-inline: auto; }
.eyebrow { margin: 0 0 1rem; font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.lead { max-width: 760px; font-size: clamp(1.08rem, 2vw, 1.38rem); color: var(--so-muted); }
.dark .lead { color: rgba(255,255,255,.78); }
h1, h2, h3 { margin: 0 0 .8em; line-height: .98; letter-spacing: -.045em; }
h1 { max-width: 1050px; font-size: clamp(3rem, 8.5vw, 7.7rem); }
h2 { font-size: clamp(2.15rem, 5vw, 4.8rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 2rem); }
p, ul, ol { margin-top: 0; }

.site-header { position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid var(--so-line); background: rgba(245,241,232,.96); backdrop-filter: blur(14px); }
.site-nav { min-height: 96px; display: flex; align-items: center; gap: 1.4rem; }
.brand { display: inline-flex; margin-right: auto; line-height: 0; }
.brand img { width: auto; height: 63px; }
.nav-menu, .nav-menu ul { margin: 0; padding: 0; list-style: none; }
.nav-menu { display: flex; align-items: center; gap: 1.4rem; }
.nav-menu a { text-decoration: none; font-weight: 700; }
.nav-menu .menu-item-has-children { position: relative; }
.nav-menu .sub-menu { display: none; position: absolute; top: 100%; left: -.9rem; min-width: 230px; padding: .7rem; border: 1px solid var(--so-line); border-radius: .6rem; background: var(--so-white); box-shadow: 0 18px 45px rgba(18,40,55,.12); }
.nav-menu .menu-item-has-children:hover > .sub-menu,
.nav-menu .menu-item-has-children:focus-within > .sub-menu { display: grid; gap: .2rem; }
.nav-menu .menu-item-has-children.submenu-escape-closed > .sub-menu { display: none; }
.sub-menu a { display: block; padding: .6rem .7rem; }
.menu-toggle { display: none; border: 1px solid var(--so-navy); background: transparent; color: var(--so-navy); padding: .65rem .8rem; font: inherit; font-weight: 800; }
.submenu-toggle { display: none; }
.button, .wp-block-button__link { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: .78rem 1.1rem; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font-weight: 800; line-height: 1.1; text-decoration: none; }
.button.primary, .wp-block-button__link { border-color: var(--so-yellow); background: var(--so-yellow); color: var(--so-navy); }
.button:hover, .wp-block-button__link:hover { transform: translateY(-1px); }

.hero, .page-hero { padding-block: clamp(5rem, 12vw, 10rem); }
.hero-copy { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: clamp(2rem, 6vw, 6rem); align-items: end; }
.home-web-hero { padding-block: clamp(3.5rem, 7vw, 6.5rem); overflow: hidden; }
.hero-web-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(420px, .98fr); gap: clamp(2.5rem, 5vw, 5.5rem); align-items: center; }
.hero-web-copy h1 { max-width: 820px; font-size: clamp(3.35rem, 6.2vw, 6.35rem); }
.hero-web-copy .lead { max-width: 690px; }
.hero-route { margin-top: 1.4rem; color: var(--so-muted); font-size: .95rem; }
.hero-route a { font-weight: 800; }
.hero-showcase { position: relative; min-height: 520px; }
.browser-shot { position: absolute; overflow: hidden; margin: 0; border: 1px solid rgba(18,40,55,.26); border-radius: .85rem; background: var(--so-white); box-shadow: 0 24px 60px rgba(18,40,55,.17); }
.browser-shot::before { content: "•••"; display: block; height: 24px; padding-left: 10px; border-bottom: 1px solid var(--so-line); background: #f3efe6; color: var(--so-navy); font-size: .8rem; line-height: 22px; letter-spacing: .22em; opacity: .78; }
.browser-shot img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: top; }
.browser-shot figcaption { padding: .6rem .8rem; font-size: .78rem; font-weight: 800; }
.browser-shot.featured { z-index: 2; top: 1.5rem; right: 0; width: 82%; transform: rotate(1.4deg); }
.browser-shot.supporting-a { z-index: 3; bottom: 1.1rem; left: 0; width: 51%; transform: rotate(-2.5deg); }
.browser-shot.supporting-b { z-index: 1; top: 0; left: 1.2rem; width: 48%; transform: rotate(-4deg); }
.value-grid .card { border-top: 4px solid var(--so-yellow); }
.home-portfolio article { display: flex; flex-direction: column; }
.home-portfolio img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: top; border-radius: .7rem; border: 1px solid var(--so-line); box-shadow: 0 14px 34px rgba(18,40,55,.1); }
.home-portfolio h3 { margin: 1.1rem 0 .35rem; }
.home-portfolio p { color: var(--so-muted); }
.section-intro { max-width: 760px; margin-bottom: 2.5rem; }
.compact-products .card .status { margin-bottom: 1.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.section { padding-block: var(--so-space); border-top: 1px solid var(--so-line); }
.dark { background: var(--so-navy); color: var(--so-white); }
.yellow-rule { width: 4.5rem; height: .45rem; margin-bottom: 1.4rem; background: var(--so-yellow); }
.section-head { display: grid; grid-template-columns: .42fr 1.58fr; gap: 2rem; margin-bottom: clamp(2.5rem, 6vw, 5rem); }
.section-head h2 { max-width: 900px; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1.2rem; }
.grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.card { min-width: 0; min-height: 100%; padding: clamp(1.35rem, 3vw, 2.4rem); border: 1px solid var(--so-line); border-radius: var(--so-radius); background: rgba(255,255,255,.34); }
.dark .card { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.04); }
.card .status { display: inline-block; margin-bottom: 2.8rem; padding: .35rem .55rem; border: 1px solid currentColor; border-radius: 99px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.card-link { display: block; height: 100%; text-decoration: none; }
.card-link:hover .text-link { text-decoration: underline; }
.text-link { font-weight: 800; }
.offer-card { display: flex; flex-direction: column; gap: .8rem; }
.offer-card p { margin: 0; }
.offer-card .text-link { margin-top: auto; padding-top: .8rem; }
.trust-grid { margin-top: 2.5rem; }
.solutions-grid .solution-card,
.page-id-9 .grid-3 .card { display: flex; flex-direction: column; align-items: flex-start; }
.solutions-grid .solution-card h2,
.page-id-9 .grid-3 .card h2 { max-width: 100%; font-size: clamp(1.75rem, 2.8vw, 2.8rem); line-height: 1.02; overflow-wrap: break-word; }
.solutions-grid .solution-card .button,
.page-id-9 .grid-3 .card .button { margin-top: auto; }
.workflow { counter-reset: step; }
.workflow .card { counter-increment: step; }
.workflow .card::before { content: "0" counter(step); display: block; margin-bottom: 2rem; color: var(--so-yellow); font-weight: 900; font-size: 1.2rem; }
.market-card { position: relative; overflow: hidden; min-height: 330px; display: flex; flex-direction: column; justify-content: flex-end; }
.market-card::before { content: ""; position: absolute; width: 7rem; height: 7rem; top: 1.5rem; right: 1.5rem; border: 1rem solid var(--so-yellow); border-radius: 50%; opacity: .85; }
.market-card > * { position: relative; }
.portfolio img { aspect-ratio: 3 / 2; object-fit: cover; border-radius: .7rem; margin-bottom: 1rem; }
.range-grid { display: grid; grid-template-columns: 1.4fr repeat(2,minmax(0,.8fr)); gap: 1.2rem; margin-top: 2.5rem; }
.range-grid article { min-width: 0; }
.range-grid img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: top; border: 1px solid rgba(255,255,255,.2); border-radius: .7rem; }
.range-grid h3 { margin: 1rem 0 .25rem; color: var(--so-white); font-size: clamp(1.25rem,2vw,1.75rem); }
.range-grid p { margin: 0; color: rgba(255,255,255,.72); }

.journal-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.4rem; }
.post-card { display: flex; flex-direction: column; min-height: 100%; padding: 1.4rem; border-top: 4px solid var(--so-yellow); background: var(--so-white); }
.post-card h2, .post-card h3 { font-size: clamp(1.45rem, 2.6vw, 2.2rem); }
.post-card a { text-decoration: none; }
.post-meta { color: var(--so-muted); font-size: .9rem; }
.article-header { padding-block: clamp(4.5rem, 10vw, 8rem); }
.article-header h1 { font-size: clamp(2.8rem, 7vw, 6.2rem); }
.article-body { padding-bottom: var(--so-space); font-size: 1.1rem; }
.article-body > * + * { margin-top: 1.4em; }
.article-body h2 { margin-top: 1.5em; font-size: clamp(2rem,4vw,3.4rem); }
.pagination { margin-top: 3rem; }
.nav-links.pagination-links { display: flex; justify-content: space-between; gap: 1rem; }

.contact-grid { display: grid; grid-template-columns: .65fr 1.35fr; gap: clamp(2rem, 7vw, 7rem); }
.contact-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field.wide { grid-column: 1 / -1; }
label { font-weight: 800; }
input, select, textarea { width: 100%; border: 1px solid var(--so-line); border-radius: .4rem; background: var(--so-white); color: var(--so-navy); padding: .85rem; font: inherit; }
textarea { min-height: 170px; resize: vertical; }
.honeypot { position: absolute; left: -10000px; }
.notice { padding: 1rem; border-left: 5px solid var(--so-yellow); background: var(--so-white); }
.field-error { margin: 0; color: #8b1e1e; font-size: .92rem; font-weight: 700; }
[aria-invalid="true"] { border-color: #8b1e1e; box-shadow: 0 0 0 1px #8b1e1e; }
.contact-form button[disabled] { cursor: wait; opacity: .7; }
.legal h2 { margin-top: 1.6em; font-size: clamp(1.7rem,3vw,2.7rem); }

.site-footer { padding-block: 4rem 2rem; background: #0b1d28; color: var(--so-white); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3,1fr); gap: 2rem; }
.footer-grid h2 { font-size: 2.2rem; }
.footer-grid h3 { font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.footer-grid a { display: block; margin-block: .45rem; color: rgba(255,255,255,.78); text-decoration: none; }
.footer-end { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.65); font-size: .9rem; }
.cookie-settings { appearance: none; padding: 0; border: 0; background: transparent; color: rgba(255,255,255,.78); font: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.cookie-banner[hidden] { display: none; }
.cookie-banner { position: fixed; z-index: 2000; right: clamp(1rem,3vw,2rem); bottom: clamp(1rem,3vw,2rem); width: min(560px,calc(100% - 2rem)); padding: clamp(1.35rem,3vw,2rem); border: 1px solid rgba(255,255,255,.22); border-top: 6px solid var(--so-yellow); border-radius: .65rem; background: #0b1d28; color: var(--so-white); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.cookie-banner h2 { margin: 0 0 .65rem; color: var(--so-white); font-size: clamp(1.5rem,4vw,2.1rem); }
.cookie-banner p { margin: 0; color: rgba(255,255,255,.82); }
.cookie-banner a { color: var(--so-yellow); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.cookie-actions .button { flex: 1 1 190px; min-height: 48px; }
.cookie-actions .button.secondary { border-color: rgba(255,255,255,.58); color: var(--so-white); }
.cookie-actions .button.secondary:hover, .cookie-actions .button.secondary:focus-visible { border-color: var(--so-yellow); background: rgba(255,255,255,.08); }
.alignwide { width: min(100% - (2 * var(--so-pad)), var(--so-wrap)); max-width: none; margin-inline: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1100px) {
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .nav-menu { display: none; position: absolute; z-index: 1001; top: 100%; right: 0; left: 0; min-height: calc(100vh - 96px); max-height: calc(100vh - 96px); padding: 2rem var(--so-pad); align-items: stretch; flex-direction: column; background: var(--so-cream); overflow-y: auto; }
  .nav-menu.open { display: flex; }
  .nav-menu .menu-item-has-children { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; column-gap: .75rem; }
  .submenu-toggle { display: inline-flex; justify-content: center; align-items: center; width: 44px; height: 44px; border: 1px solid var(--so-line); border-radius: .35rem; background: transparent; color: var(--so-navy); font: inherit; font-weight: 900; }
  .submenu-toggle::before { content: "+"; font-size: 1.35rem; line-height: 1; }
  .submenu-toggle[aria-expanded="true"]::before { content: "−"; }
  .nav-menu .sub-menu { display: none; position: static; grid-column: 1 / -1; padding: .4rem 0 .2rem 1rem; border: 0; background: transparent; box-shadow: none; }
  .nav-menu .submenu-open > .sub-menu { display: grid; gap: .2rem; }
  .hero-copy, .hero-web-grid, .section-head, .contact-grid { grid-template-columns: 1fr; }
  .hero-showcase { min-height: 500px; max-width: 720px; }
  .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .journal-grid, .grid-3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .range-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .range-grid .wide { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .solutions-grid,
  .page-id-9 .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  h1 { font-size: clamp(2.65rem, 11vw, 3.8rem); line-height: 1.02; }
  .hero, .page-hero { padding-block: clamp(4rem, 18vw, 6rem); }
  .home-web-hero { padding-block: 3.5rem 4.5rem; }
  .hero-web-copy h1 { font-size: clamp(2.7rem, 12.5vw, 4rem); }
  .hero-showcase { min-height: 370px; margin-top: .5rem; }
  .browser-shot.featured { width: 88%; }
  .browser-shot.supporting-a { width: 58%; }
  .browser-shot.supporting-b { left: 0; width: 54%; }
  .browser-shot figcaption { font-size: .7rem; }
  .grid-2, .grid-3, .grid-4, .journal-grid, .contact-form, .footer-grid { grid-template-columns: 1fr; }
  .range-grid { grid-template-columns: 1fr; }
  .range-grid .wide { grid-column: auto; }
  .footer-end { flex-direction: column; }
  .cookie-banner { right: 1rem; bottom: 1rem; }
  .cookie-actions { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
