/*
Theme Name: Compliance Infrastructure
Theme URI: https://complianceinfrastructure.co.uk
Author: Compliance Infrastructure
Description: Group hub theme for Compliance Infrastructure. The I-beam from the CI logo runs the system: hero, picture masks, buttons. Bottle green and yellow, Jost only. Hand-built, plugin-light.
Version: 2.0.2
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: compinfra
*/

:root {
  --bg: #f7f7f7; --surface: #ebebeb; --ink: #0d2a1c; --muted: #4c5a52;
  --accent: #f6e016; --deep: #0d2a1c; --pale: #f7f7f7;
  --small: 0.9375rem;
  --body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --head: clamp(2.375rem, 1.3rem + 3vw, 4rem);
  --m: clamp(16px, 2vw, 28px);
  --gap: clamp(96px, 12vw, 180px);
  --ease: cubic-bezier(.2,.7,.1,1);
  /* the logo's I-beam: 88 wide, 164 tall, flanges 34, web 32 */
  --ibeam: polygon(0 0, 100% 0, 100% 21%, 68% 21%, 68% 79%, 100% 79%, 100% 100%, 0 100%, 0 79%, 32% 79%, 32% 21%, 0 21%);
  --flanged: polygon(0 0, 100% 0, 100% 20%, calc(100% - 8px) 20%, calc(100% - 8px) 80%, 100% 80%, 100% 100%, 0 100%, 0 80%, 8px 80%, 8px 20%, 0 20%);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--body)/1.5 'Jost', system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
figure { margin: 0; overflow: hidden; }
h1, h2, h3, p, ul, fieldset, legend { margin: 0; padding: 0; border: 0; }
ul { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip-link { position: absolute; left: -999px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 9; }
.skip-link:focus { left: 8px; top: 8px; }
h1, h2 { font-weight: 700; text-transform: uppercase; letter-spacing: -0.03em; line-height: .95; }
h2 { font-size: var(--head); }
/* The beam's flange, seen on its own: a short heavy bar above each point. */
.flange::before { content: ''; display: block; width: 56px; height: 12px; background: var(--ink); margin-bottom: 16px; }

.btn { display: inline-flex; align-items: center; min-height: 54px; padding: 0 30px; background: var(--accent); color: var(--ink); font-weight: 500; font-size: var(--body); text-decoration: none; clip-path: var(--flanged); transition: transform .18s var(--ease), background-color .18s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--ink { background: var(--ink); color: var(--pale); }

/* Hero */
.hero { position: relative; padding-top: 80px; min-height: 100svh; background: var(--deep); color: var(--pale); overflow: hidden; display: flex; flex-direction: column; }
.bar { position: absolute; top: 0; left: 0; right: 0; z-index: 3; color: var(--pale); display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); padding: 18px var(--m); }
.bar__name { display: flex; align-items: center; gap: 10px; font-weight: 500; text-decoration: none; font-size: 1.125rem; }
.bar ul { display: flex; gap: clamp(16px, 2vw, 28px); margin: 0; padding: 0; list-style: none; }
.bar nav a { text-decoration: none; position: relative; }
.bar nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease); }
.bar nav a:hover::after { transform: scaleX(1); }
.bar__tel { margin-left: auto; }
.bar__toggle { display: none; }
.beam { position: absolute; z-index: 1; top: -9vh; right: -3vw; height: min(124vh, 74vw); aspect-ratio: 88 / 164; background: var(--accent); clip-path: var(--ibeam); }
.beam img { mix-blend-mode: multiply; filter: grayscale(1) contrast(1.25); object-position: 50% 30%; }
.hero__copy { position: relative; z-index: 2; margin-top: auto; padding: 0 var(--m) clamp(40px, 8vh, 88px); }
h1 { font-size: clamp(3rem, 7.4vw, 8rem); }
.line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.line [data-line] { display: block; }
.hero__copy p { max-width: 38ch; font-size: var(--lead); line-height: 1.3; margin: 28px 0 30px; }
@media (prefers-reduced-motion: no-preference) {
  .js .line [data-line] { transform: translateY(105%); animation: up .9s var(--ease) forwards; animation-delay: calc(var(--i) * 110ms + 150ms); }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .beam img { animation: slow 16s ease-out both; }
}
@keyframes up { to { transform: none; } }
@keyframes slow { from { transform: scale(1.08); } to { transform: scale(1); } }

/* Yellow statement */
.law { background: var(--accent); padding: clamp(72px, 9vw, 130px) var(--m); display: grid; grid-template-columns: 7fr 5fr; gap: 32px 48px; align-items: end; }
.law h2 { grid-row: 1; }
.law__s { grid-column: 2; font-size: var(--lead); line-height: 1.3; }
.law__l { grid-column: 1 / -1; display: grid; grid-template-columns: 7fr 5fr; gap: 12px 48px; margin-top: 28px; font-weight: 500; font-size: var(--lead); line-height: 1.2; }

/* Inset panel */
.panel { margin: 20px; background: var(--deep); color: var(--pale); display: grid; grid-template-columns: 54fr 46fr; gap: 48px; padding: clamp(40px, 5vw, 64px) clamp(24px, 4vw, 56px); position: relative; overflow: hidden; min-height: 110svh; }
.panel__l h2 { font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.75rem); }
.panel__l > p { max-width: 40ch; margin-top: 20px; }
.panel__beam { width: min(38vw, 92svh * .54); aspect-ratio: 88 / 164; clip-path: var(--ibeam); margin-top: 48px; margin-bottom: -28%; background: var(--accent); }
.panel__beam img { filter: grayscale(1) contrast(1.2); mix-blend-mode: multiply; }
.panel__r { display: grid; gap: 56px; align-content: start; }
.panel__f { color: var(--accent); font-weight: 500; }
.panel h3 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.02; margin: 4px 0 6px; text-transform: uppercase; }
.panel__role { font-weight: 500; font-size: var(--lead); line-height: 1.2; margin-bottom: 12px; }
.panel__reg { margin: 12px 0 18px; opacity: .85; }

/* Standards */
.std { display: grid; grid-template-columns: 5fr 7fr; gap: 40px; padding: var(--gap) var(--m) var(--gap) 0; align-items: center; overflow: hidden; }
.std__beam { height: 88svh; aspect-ratio: 88 / 164; clip-path: var(--ibeam); margin-left: -9vw; background: var(--accent); justify-self: start; }
.std__beam img { filter: grayscale(1) contrast(1.2); mix-blend-mode: multiply; transform: scale(1.14); }
.std__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px 40px; margin-top: 56px; }
.std h3 { font-weight: 500; font-size: var(--lead); line-height: 1.15; margin-bottom: 10px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: 1.4fr 9.2fr 1.4fr; gap: 12px; margin-inline: -1px; }
.tile { min-height: 420px; }
.tile--main { background: var(--accent); padding: clamp(32px, 4vw, 52px); display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.tile--main h2 { font-size: clamp(2rem, 1.4rem + 1.8vw, 3rem); }
.tile__tel { display: block; margin-top: 24px; font-weight: 700; font-size: clamp(2rem, 1.4rem + 1.8vw, 3rem); letter-spacing: -0.02em; line-height: 1; text-decoration: none; }
.tile__tel:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.tile--pic img { filter: grayscale(1) contrast(1.1); }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick legend { font-weight: 500; margin-bottom: 12px; font-size: var(--lead); }
.pick label { display: block; padding: 12px 22px; margin-bottom: 6px; background: var(--pale); font-weight: 500; cursor: pointer; clip-path: var(--flanged); transition: transform .18s var(--ease), background-color .15s, color .15s; }
.pick label:hover { transform: translateX(4px); }
#p1:checked ~ fieldset label[for=p1], #p2:checked ~ fieldset label[for=p2], #p3:checked ~ fieldset label[for=p3] { background: var(--ink); color: var(--pale); }
#p1:focus-visible ~ fieldset, #p2:focus-visible ~ fieldset, #p3:focus-visible ~ fieldset { outline: 3px solid var(--ink); outline-offset: 2px; }
.pick__a { display: none; margin-top: 18px; }
.pick__a p { max-width: 44ch; font-weight: 500; margin-bottom: 14px; }
#p1:checked ~ .pick__a--1, #p2:checked ~ .pick__a--2, #p3:checked ~ .pick__a--3 { display: block; }

/* Enquiry */
.notice:focus { outline: none; }
.notice { grid-column: 1 / -1; padding: 16px 18px; font-weight: 500; background: var(--accent); color: var(--ink); }
.notice--err { background: #a11d1d; color: #fff; }
.enquiry { display: grid; grid-template-columns: 5fr 7fr; gap: 40px 48px; padding: var(--gap) var(--m); align-items: start; scroll-margin-top: 16px; }
.enquiry__l > p { max-width: 36ch; margin-top: 20px; }
.enquiry__d { margin: 40px 0 0; display: grid; gap: 18px; }
.enquiry__d div { display: grid; grid-template-columns: 4.5em 1fr; gap: 12px; }
.enquiry__d dt { font-weight: 500; }
.enquiry__d dd { margin: 0; overflow-wrap: anywhere; }
.enquiry__d a { text-decoration: none; }
.enquiry__d a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
.field--wide, .form__priv { grid-column: 1 / -1; }
.field label { display: block; font-weight: 500; margin-bottom: 6px; }
.req { color: #a11d1d; }
.field input, .field select, .field textarea { width: 100%; min-height: 54px; padding: 12px 14px; background: var(--surface); color: var(--ink); border: 0; border-bottom: 4px solid var(--ink); border-radius: 0; font: 400 var(--body)/1.4 'Jost', system-ui, sans-serif; transition: background-color .15s; }
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: var(--accent); }
.form__priv { font-size: var(--small); color: var(--muted); }
.form .btn { border: 0; cursor: pointer; justify-self: start; font-family: 'Jost', system-ui, sans-serif; }


/* Inner pages */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.subhero { position: relative; overflow: hidden; background: var(--deep); color: var(--pale); padding: 132px var(--m) clamp(48px, 7vw, 88px); min-height: 460px; }
.subhero > * { position: relative; z-index: 2; }
.subhero .beam--sub { position: absolute; z-index: 1; top: -70px; right: 5vw; height: 620px; aspect-ratio: 88 / 164; background: var(--accent); clip-path: var(--ibeam); }
.beam--sub img { mix-blend-mode: multiply; filter: grayscale(1) contrast(1.25); object-position: 50% 30%; }
.subhero h1 { font-size: clamp(2.5rem, 1.4rem + 4.4vw, 5.5rem); }
.subhero p { max-width: 52ch; margin-top: 20px; font-size: var(--lead); line-height: 1.3; }
.subhero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.breadcrumb { margin-bottom: 20px; }
.breadcrumb__list { display: flex; flex-wrap: wrap; gap: .5em; margin: 0; padding: 0; list-style: none; font-size: var(--small); }
.breadcrumb__item + .breadcrumb__item::before { content: "/"; margin-right: .5em; opacity: .7; }
.breadcrumb__list a { color: inherit; }
.page-body { padding: clamp(56px, 8vw, 110px) var(--m); }
.prose { max-width: 74ch; }
.prose h2 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); margin: 2em 0 .5em; }
.prose h3 { font-size: var(--lead); font-weight: 500; margin: 1.6em 0 .4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul { list-style: disc; padding-left: 1.2em; }
.prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose a { text-underline-offset: 3px; }
.enquiry--page { padding-top: clamp(56px, 8vw, 96px); }
.aside h2 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); }
.aside p { max-width: 36ch; margin-top: 14px; }
.aside .enquiry__d div { grid-template-columns: 8em 1fr; }

/* Footer */
.foot { background: var(--deep); color: var(--pale); padding: clamp(48px, 6vw, 80px) var(--m) 24px; margin-top: 12px; }
.foot__row { display: grid; grid-template-columns: 7fr 5fr; gap: 32px; font-size: var(--lead); line-height: 1.35; }
.foot__row a { text-decoration: none; }
.foot__row a:hover { color: var(--accent); }
.foot a { color: inherit; }
.foot__big { font-weight: 700; text-transform: uppercase; letter-spacing: -0.04em; line-height: .86; font-size: calc((100vw - 2 * var(--m)) / 8.1); color: var(--accent); margin: 56px 0 24px -.04em; white-space: nowrap; }
.foot__credit { font-size: var(--small); opacity: .85; max-width: 90ch; }

@media (max-width: 1040px) {
  .bar nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--deep); padding: 16px var(--m) 24px; font-size: 1.125rem; }
  .bar nav.is-open { display: block; }
  .bar ul { flex-direction: column; gap: 14px; }
  .bar__tel { display: none; }
  .bar__toggle { display: block; margin-left: auto; background: var(--accent); color: var(--ink); border: 0; font: 500 1rem 'Jost', sans-serif; padding: 0 18px; min-height: 44px; clip-path: var(--flanged); }
}
@media (max-width: 860px) {
  .bar__name { font-size: 1rem; }
  .hero { min-height: 100svh; padding-top: 80px; }
  .subhero { padding-top: 108px; min-height: 0; }
  .subhero .beam--sub { display: none; }
  .hero__copy { margin-top: 8px; padding-top: 28px; padding-bottom: 0; }
  h1 { font-size: 11.2vw; }
  .line { white-space: nowrap; }
  .hero__copy p { margin: 18px 0 20px; font-size: 1.25rem; }
  .beam { position: relative; top: auto; right: auto; order: 3; height: 76vh; min-height: 460px; margin: 28px -6vw -30vh auto; flex: none; }
  .law, .law__l, .panel, .std, .tile--main, .foot__row, .enquiry, .form { grid-template-columns: 1fr; }
  .enquiry { padding: 88px var(--m); }
  .law__s { grid-column: 1; }
  .panel { margin: 10px; gap: 20px; min-height: 0; }
  .panel__l { display: contents; }
  .panel__l h2 { font-size: 2.125rem; order: 1; }
  .panel__l > p { order: 2; margin: 0; }
  .panel__r { order: 3; margin-top: 20px; gap: 96px; }
  .panel__beam { order: 4; width: 62vw; margin: 28px auto -30%; }
  .std { padding: 88px var(--m); }
  .std__beam { height: 56svh; margin-left: -20vw; }
  .std__grid { grid-template-columns: 1fr; gap: 32px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile--main { grid-column: 1 / -1; grid-row: 1; }
  .tile--pic { min-height: 130px; height: 130px; }
}
