/*
Theme Name: DefAvia
Theme URI: https://www.defavia.com
Author: DefAvia
Description: Dark, single-purpose theme for the DefAvia radar range: home page, three radar pages with specification and range tables, company page and an enquiry form. Radar figures live in inc/radars.php.
Version: 1.0.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: defavia
*/
:root {
	--bg: #0c0f12; --bg-alt: #11151a; --surface: #171c22; --line: #262d36;
	--fg: #eceef0; --muted: #98a2ad; --accent: #f29a1f; --accent-ink: #14100a;
	--display: Arial, Helvetica, sans-serif;
	--body: Arial, Helvetica, sans-serif;
	--mono: Arial, Helvetica, sans-serif;
	--gutter: max(20px, env(safe-area-inset-left, 0px));
	color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 18px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); letter-spacing: -0.015em; margin-bottom: 2rem; max-width: 24ch; }
h3 { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
p { margin: 0 0 1rem; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 820px; }
.eyebrow { font: 700 0.75rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
.lead { font-size: 1.2rem; color: #c9d0d7; max-width: 60ch; }
.small { font-size: 0.85rem; color: var(--muted); max-width: 90ch; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 100; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* buttons */
.btn { display: inline-block; font: 600 1rem/1 var(--body); padding: 0.95rem 1.5rem; border-radius: 6px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #ffb347; }
.btn-ghost { border-color: #56606c; color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-small { padding: 0.65rem 1rem; font-size: 0.9rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 2rem 0 0; }
.more { color: var(--accent); font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(12, 15, 18, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; font: 700 1.3rem/1 var(--display); }
.brand img { width: 34px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 1.8rem; }
.site-nav .menu { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.site-nav .menu a { text-decoration: none; font-weight: 500; font-size: 0.98rem; color: #cfd5db; }
.site-nav .menu a:hover, .site-nav .current-menu-item > a { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid #56606c; color: var(--fg); font: 500 0.8rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; padding: 0.6rem 0.9rem; border-radius: 6px; }

/* hero */
.hero { position: relative; min-height: min(88vh, 860px); display: flex; align-items: flex-end; overflow: hidden; }
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,15,18,.35) 0%, rgba(12,15,18,.55) 45%, var(--bg) 100%); }
.hero-inner { position: relative; padding-block: 7rem 5rem; }
.hero h1 { max-width: 14ch; margin-bottom: 1.5rem; }

/* sections */
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.page-head { padding-top: clamp(4rem, 9vw, 7rem); }
.page-head h1 { margin-bottom: 1.5rem; font-size: clamp(2.2rem, 5vw, 3.8rem); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.split > * { min-width: 0; }

/* key facts */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts > div { padding: 1.4rem 1.4rem 1.6rem 0; border-bottom: 1px solid var(--line); }
.facts dt, .spec-group dt { font: 500 0.74rem/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.facts dd { margin: 0; font-size: 1.08rem; font-weight: 500; line-height: 1.35; }
.facts.single { grid-template-columns: 1fr 1fr; margin-top: 2rem; }

/* cards */
.cards { display: grid; gap: 1.4rem; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.8rem; display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.card p { margin: 0; color: #c2c9d0; }
.tag { align-self: flex-start; font: 500 0.78rem/1 var(--mono); letter-spacing: 0.08em; color: var(--accent); border: 1px solid rgba(242,154,31,.45); border-radius: 4px; padding: 0.4rem 0.55rem; white-space: nowrap; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.features li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.2rem; align-items: start; padding: 1.2rem 0; border-bottom: 1px solid var(--line); color: #c2c9d0; }
.features strong { color: var(--fg); }

/* imagery */
.wide-images { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.wide-images figure, .framed, .product-shot { margin: 0; position: relative; }
.wide-images img { width: 100%; height: clamp(240px, 36vw, 520px); object-fit: cover; }
.wide-images figcaption { position: absolute; left: 1.2rem; bottom: 1rem; font: 500 0.74rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; background: rgba(12,15,18,.8); padding: 0.45rem 0.7rem; border-radius: 4px; }
.framed img { border: 1px solid var(--line); border-radius: 10px; width: 100%; }

/* product cards and pages */
.product-img { display: block; background: #0c0f12; border-radius: 6px; overflow: hidden; margin-bottom: 0.4rem; }
.product-img img { width: 100%; height: 240px; object-fit: contain; }
.product-img img[src$=".jpg"] { object-fit: cover; }
.card.product h3 { font-size: 2rem; font-weight: 700; }
.card.product .eyebrow { margin: 0; font-size: 0.7rem; }
.mini { margin: 0.4rem 0; display: grid; gap: 0.8rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.mini dt { font: 700 1.6rem/1 var(--display); }
.mini dd { margin: 0.2rem 0 0; font-size: 0.86rem; color: var(--muted); }
.price { font: 700 1.25rem var(--display); color: var(--accent); }
.card.product .more { margin-top: auto; padding-top: 0.6rem; }
.product-hero { padding-bottom: 3rem; }
.product-hero h1 { margin-bottom: 1.5rem; }
.product-shot img { width: 100%; max-height: 520px; object-fit: contain; border-radius: 10px; }
.product-shot img[src$=".jpg"] { object-fit: cover; border: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 3.5rem 0 0; border-top: 1px solid var(--line); }
.stats > div { padding: 1.6rem 1.5rem 0 0; }
.stats dt { font: 700 clamp(2rem, 4.2vw, 3.2rem)/1 var(--display); color: var(--accent); letter-spacing: -0.02em; }
.stats dd { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.95rem; max-width: 30ch; }
.use-cases { margin: 2.2rem 0 0; color: #c2c9d0; }
.use-cases .eyebrow { display: block; margin-bottom: 0.4rem; }
.measured { background: var(--surface); border: 1px solid rgba(242,154,31,.45); border-radius: 8px; padding: 1rem 1.2rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

/* tables */
.table-scroll { overflow-x: auto; margin: 1.5rem 0 1rem; border: 1px solid var(--line); border-radius: 10px; }
table.range { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.98rem; }
.range th, .range td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
.range thead th { font: 500 0.72rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); background: var(--surface); }
.range tbody tr:last-child th, .range tbody tr:last-child td { border-bottom: 0; }
.range tbody th { font-weight: 600; }
.range .num { text-align: right; font-variant-numeric: tabular-nums; }
.range .bar { width: 30%; min-width: 160px; }
.range .bar span { display: block; height: 10px; background: var(--accent); border-radius: 2px; min-width: 3px; }
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 4rem; margin-bottom: 2rem; }
.spec-group h3 { font-size: 1.3rem; color: var(--accent); padding-bottom: 0.7rem; border-bottom: 1px solid var(--line); }
.spec-group dl { margin: 0; }
.spec-group dl > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.spec-group dt { margin: 0; padding-top: 0.2rem; }
.spec-group dd { margin: 0; font-weight: 500; }

/* team */
.person { flex-direction: row; gap: 1.4rem; align-items: flex-start; }
.person img { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; flex: none; }
.person .eyebrow { margin: 0.3rem 0 0.8rem; font-size: 0.7rem; }

/* call to action */
.cta { background: var(--accent); color: var(--accent-ink); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta h2 { margin: 0 0 0.5rem; max-width: none; }
.cta p { margin: 0; font-size: 1.15rem; }
.cta .btn-primary { background: var(--accent-ink); color: var(--fg); }
.cta .btn-primary:hover { background: #000; }

/* form */
.enquiry { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: clamp(1.4rem, 3vw, 2.2rem); }
.enquiry p { margin: 0 0 1.1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.enquiry label { display: block; font: 500 0.72rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.45rem; }
.enquiry input, .enquiry select, .enquiry textarea { width: 100%; background: var(--bg); color: var(--fg); border: 1px solid #3a434d; border-radius: 6px; padding: 0.8rem 0.9rem; font: 400 1rem var(--body); }
.enquiry input:focus, .enquiry select:focus, .enquiry textarea:focus { border-color: var(--accent); outline: none; }
.hp { position: absolute !important; left: -9999px; }
.form-foot { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 0 !important; }
.notice { padding: 0.9rem 1rem; border-radius: 6px; border: 1px solid; }
.notice-ok { border-color: #3f9b61; background: rgba(63,155,97,.12); }
.notice-bad { border-color: #d0573d; background: rgba(208,87,61,.12); }

/* editor content */
.prose h1 { font-size: clamp(2.4rem, 5vw, 4rem); margin-bottom: 1.5rem; }
.prose h2 { margin-top: 2.5rem; }
.prose a { color: var(--accent); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-top: 4rem; color: var(--muted); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; align-items: start; }
.footer-brand img { width: 84px; height: auto; margin-bottom: 1.2rem; }
.footer-brand p { max-width: 34ch; }
.site-footer h3 { font: 500 0.74rem var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg); margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-legal { margin-top: 3rem; padding-block: 1.5rem; border-top: 1px solid var(--line); font-size: 0.82rem; }
.footer-legal p { margin: 0; }

@media (max-width: 960px) {
	.split, .cards.three, .spec-grid { grid-template-columns: 1fr; }
	.facts { grid-template-columns: 1fr 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.nav-toggle { display: block; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; padding: 1.2rem 20px 1.6rem; gap: 1.2rem; }
	.site-nav.is-open { display: flex; }
	.site-nav .menu { flex-direction: column; gap: 1rem; }
}
@media (max-width: 640px) {
	body { font-size: 17px; }
	.cards.two, .wide-images, .stats, .field-row, .facts.single { grid-template-columns: 1fr; }
	.features li { grid-template-columns: 1fr; gap: 0.6rem; }
	.features .tag { justify-self: start; }
	.person { flex-direction: column; }
	.spec-group dl > div { grid-template-columns: 1fr; gap: 0.1rem; }
	.hero-inner { padding-block: 5rem 3rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
