/*
Theme Name: Apex Form Group
Theme URI: https://apexformgroup.com
Author: Apex Form Group
Description: Custom theme for Apex Form Group — structural formwork, steel fixing and concrete, Sydney. Includes projects, services, tender and careers forms, and one-click demo content setup.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: Proprietary
Text Domain: apex-form
*/

/* ---------- Fonts (self-hosted, SIL Open Font License) ---------- */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/barlow-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 800; font-display: swap; src: url('assets/fonts/barlow-condensed-latin-800-normal.woff2') format('woff2'); }

/* ---------- Design tokens (change these to re-skin the whole site) ---------- */
:root {
	--navy: #051C2E;
	--navy-2: #0A2740;
	--navy-3: #12344F;
	--orange: #FF6E03;
	--orange-dark: #C24E00;
	--orange-light: #FF8A3D;
	--ink: #051C2E;
	--muted: #4B6378;
	--muted-on-dark: rgba(255,255,255,0.76);
	--line: #E1E6EB;
	--bg-soft: #F3F5F7;
	--white: #ffffff;
	--font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
	--font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--gutter: clamp(16px, 4vw, 64px);
	--max: 1320px;
	--radius: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-dark); }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { line-height: 1.05; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; background: var(--white); color: var(--navy); padding: 12px 16px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--dark { background: var(--navy); color: var(--white); }
.section--dark2 { background: var(--navy-2); color: var(--white); }
.section--soft { background: var(--bg-soft); }
.section--orange { background: var(--orange); color: var(--navy); }
.eyebrow { display: block; font-weight: 600; font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: var(--orange-dark); margin-bottom: 14px; }
.section--dark .eyebrow, .section--dark2 .eyebrow, .hero .eyebrow { color: var(--orange); }
.display { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .005em; line-height: .95; }
.h-xl { font-size: clamp(56px, 9vw, 128px); }
.h-lg { font-size: clamp(40px, 5.4vw, 72px); }
.h-md { font-size: clamp(30px, 3.6vw, 46px); }
.lead { font-size: clamp(18px, 1.6vw, 21px); }
.muted { color: var(--muted); }
.section--dark .muted, .section--dark2 .muted { color: var(--muted-on-dark); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; }
.section-head p { max-width: 480px; margin: 0; }

/* ---------- Buttons ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 14px 28px; font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; text-decoration: none; border: 2px solid transparent; border-radius: var(--radius); cursor: pointer; transition: background .2s, color .2s, border-color .2s; font-family: var(--font-body); }
.btn--primary { background: var(--orange); color: var(--navy); }
.btn--primary:hover { background: var(--orange-light); color: var(--navy); }
.btn--dark { background: var(--navy); color: var(--white); }
.btn--dark:hover { background: var(--navy-3); color: var(--white); }
.btn--ghost { border-color: currentColor; color: var(--white); background: transparent; }
.btn--ghost:hover { background: var(--white); color: var(--navy); }
.btn--outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--navy); color: var(--white); border-bottom: 1px solid rgba(255,255,255,.1); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; }
.site-logo img { height: 54px; width: auto; }
.main-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.main-nav a { color: var(--white); text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; padding: 8px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a, .main-nav .current-menu-ancestor > a { border-bottom-color: var(--orange); color: var(--white); }
.header-cta { display: flex; align-items: center; gap: 18px; }
.header-phone { color: var(--white); text-decoration: none; font-weight: 600; white-space: nowrap; }
.header-phone:hover { color: var(--orange); }
.nav-toggle { display: none; background: none; border: 0; color: var(--white); width: 48px; height: 48px; cursor: pointer; padding: 0; }
.nav-toggle svg { width: 30px; height: 30px; }
@media (max-width: 1080px) {
	.header-phone { display: none; }
}
@media (max-width: 1240px) and (min-width: 961px) {
	.main-nav ul { gap: 18px; }
	.main-nav a { font-size: 14px; }
	.header-cta .btn { padding: 12px 16px; font-size: 13px; }
}
@media (max-width: 960px) {
	.nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); border-top: 1px solid rgba(255,255,255,.1); padding: 12px var(--gutter) 24px; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; }
	.main-nav a { display: block; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
	.header-cta .btn { display: none; }
	.site-logo img { height: 44px; }
	.site-header__inner { min-height: 70px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(88vh, 860px); display: flex; align-items: flex-end; color: var(--white); background: var(--navy); overflow: hidden; }
.hero__media, .hero__media img, .hero__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,28,46,.45) 0%, rgba(5,28,46,.55) 45%, rgba(5,28,46,.92) 100%); }
.hero__content { position: relative; padding-top: 120px; padding-bottom: clamp(56px, 8vw, 96px); }
.hero h1 { margin: 0; }
.hero p.lead { max-width: 640px; color: rgba(255,255,255,.88); margin: 26px 0 34px; }
.hero--page { min-height: 440px; }
.hero--page .hero__content { padding-top: 100px; padding-bottom: 64px; }
.hero__toggle { position: absolute; right: var(--gutter); bottom: 24px; z-index: 2; background: rgba(5,28,46,.7); color: var(--white); border: 1px solid rgba(255,255,255,.4); width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); background: var(--navy-2); color: var(--white); }
.stat { padding: 34px var(--gutter); border-right: 1px solid rgba(255,255,255,.1); }
.stat:last-child { border-right: 0; }
.stat__num { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 4vw, 56px); line-height: 1; color: var(--orange); }
.stat__label { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-on-dark); margin-top: 6px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.card { background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.section--dark .card, .section--dark2 .card { background: var(--navy-2); border-color: rgba(255,255,255,.08); color: var(--white); }
.section--dark2 .card { background: var(--navy-3); }
.card__img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.card__body { padding: 26px 26px 30px; }
.card__title { font-family: var(--font-display); font-size: 30px; font-weight: 700; text-transform: uppercase; margin: 0 0 8px; }
.card p { margin: 0; }
a.card:hover .card__title { color: var(--orange); }

.project-tile { position: relative; display: block; min-height: 440px; overflow: hidden; color: var(--white); text-decoration: none; background: var(--navy-2); }
.project-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.project-tile:hover img { transform: scale(1.04); }
.project-tile__info { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px 26px; background: rgba(5,28,46,.9); }
.project-tile__sector { color: var(--orange); font-size: 13px; letter-spacing: .15em; text-transform: uppercase; font-weight: 600; }
.project-tile__title { font-family: var(--font-display); font-size: 30px; font-weight: 700; text-transform: uppercase; line-height: 1.05; margin: 2px 0 4px; }
.project-tile__meta { color: rgba(255,255,255,.72); font-size: 15px; }
.project-tile:hover { color: var(--white); }

/* ---------- Split ---------- */
.split { display: flex; flex-wrap: wrap; }
.split > * { flex: 1 1 480px; min-width: 0; }
.split__media { min-height: 460px; position: relative; }
.split__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split__body { padding: clamp(56px, 7vw, 96px) var(--gutter); }
.ticks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; font-weight: 600; margin-top: 28px; }
.ticks > div { border-top: 3px solid var(--orange); padding-top: 12px; }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 18px; counter-reset: step; }
.process__step { background: var(--navy-2); }
.process__step img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.process__body { padding: 22px; }
.process__num { font-family: var(--font-display); font-size: 46px; font-weight: 800; color: var(--orange); line-height: 1; }
.process__step h3 { font-size: 20px; margin: 10px 0 6px; text-transform: none; font-family: var(--font-body); font-weight: 700; }
.process__step p { color: var(--muted-on-dark); font-size: 15px; margin: 0; }

/* ---------- Builders strip ---------- */
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 24px 48px; }
.logos span, .logos img { font-family: var(--font-display); font-weight: 700; font-size: 26px; color: #8A9AA8; text-transform: uppercase; letter-spacing: .04em; max-height: 48px; width: auto; filter: grayscale(1); opacity: .8; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--orange); color: var(--navy); }
.cta-band .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px; padding-top: 72px; padding-bottom: 72px; }
.cta-band h2 { margin: 0; max-width: 780px; }

/* ---------- Content (editor) ---------- */
.entry-content { max-width: 820px; }
.entry-content h2 { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(30px, 3.4vw, 44px); margin-top: 1.4em; }
.entry-content h3 { font-size: 24px; margin-top: 1.4em; }
.entry-content ul { padding-left: 22px; }
.entry-content li { margin-bottom: 6px; }
.entry-content img { margin: 24px 0; }
.entry-content .wp-block-image figcaption { font-size: 14px; color: var(--muted); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 18px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.form .req { color: var(--orange-dark); }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; padding: 13px 14px; border: 1px solid #B9C5CF; border-radius: 4px; background: var(--white); color: var(--ink); width: 100%; }
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--navy); outline: 2px solid var(--orange); outline-offset: 0; }
.form .hint { font-weight: 400; color: var(--muted); font-size: 14px; }
.form .hp { position: absolute; left: -9999px; }
.form-panel { background: var(--white); border: 1px solid var(--line); padding: clamp(24px, 4vw, 44px); }
.notice { padding: 16px 20px; margin-bottom: 20px; font-weight: 600; border-left: 5px solid; }
.notice--ok { background: #EAF7EE; border-color: #1E8E3E; color: #0E5223; }
.notice--err { background: #FDECEC; border-color: #C5221F; color: #7A1411; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.contact-list strong { display: block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); }
.contact-list a { color: var(--white); text-decoration: none; font-size: 19px; font-weight: 600; }

/* ---------- Project filters / single ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filters a { padding: 10px 18px; border: 1.5px solid var(--navy); color: var(--navy); text-decoration: none; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; }
.filters a.is-active, .filters a:hover { background: var(--navy); color: var(--white); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-top: 1px solid var(--line); margin: 0 0 40px; }
.facts div { padding: 18px 18px 18px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 700; font-size: 18px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.gallery-grid a { display: block; position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--navy-2); }
.gallery-grid img, .gallery-grid video { width: 100%; height: 100%; object-fit: cover; }
.gallery-grid .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.gallery-grid .play span { width: 64px; height: 64px; border-radius: 50%; background: var(--orange); display: flex; align-items: center; justify-content: center; }
.video-frame { position: relative; background: #000; }
.video-frame video { width: 100%; max-height: 720px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(2,10,18,.94); display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.is-open { display: flex; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 86vh; width: auto; }
.lightbox__close { position: absolute; top: 14px; right: 14px; width: 48px; height: 48px; background: var(--orange); border: 0; color: var(--navy); font-size: 28px; font-weight: 700; cursor: pointer; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--muted-on-dark); font-size: 15px; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--orange); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 40px; padding-top: 72px; padding-bottom: 48px; }
.footer-grid h3 { color: var(--white); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; font-family: var(--font-body); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; padding-bottom: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; }
.social { display: flex; gap: 12px; margin-top: 16px; }
.social a, .social__soon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.25); color: #fff; transition: background .15s, border-color .15s; }
.social a:hover, .social a:focus-visible { background: var(--orange); border-color: var(--orange); }
.social__soon { opacity: .55; cursor: default; }
.social svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Mobile action bar ---------- */
.mobile-bar { display: none; }
@media (max-width: 760px) {
	.mobile-bar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; box-shadow: 0 -4px 16px rgba(0,0,0,.2); }
	.mobile-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; text-decoration: none; font-size: 15px; }
	.mobile-bar a:first-child { background: var(--navy); color: var(--white); }
	.mobile-bar a:last-child { background: var(--orange); color: var(--navy); }
	body { padding-bottom: 56px; }
	.stat { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.1); }
}

/* ---------- Misc ---------- */
.pagination { display: flex; gap: 8px; margin-top: 40px; }
.pagination .page-numbers { padding: 10px 16px; border: 1px solid var(--line); text-decoration: none; color: var(--navy); }
.pagination .current { background: var(--navy); color: var(--white); }
.badge-sample { display: inline-block; background: #FFF4E5; color: #8A3B00; font-size: 12px; font-weight: 700; padding: 3px 8px; letter-spacing: .06em; text-transform: uppercase; }
.values { counter-reset: v; }
.value { border-top: 3px solid var(--orange); padding-top: 18px; }
.value h3 { font-family: var(--font-display); text-transform: uppercase; font-size: 28px; }
@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Top bar ---------- */
.topbar { background: #03131F; color: rgba(255,255,255,.85); font-size: 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.topbar__contact { display: flex; align-items: center; gap: 22px; min-width: 0; }
.topbar__contact a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar__contact a:hover { color: var(--orange); }
.topbar__contact svg { width: 15px; height: 15px; }
.social--top { margin-top: 0; gap: 8px; }
.social--top a, .social--top .social__soon { width: 32px; height: 32px; }
.social--top svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .topbar__email { display: none; } }
