/* Detec New Zealand — site styles
   Hand-coded, no build step. Sections follow the order of index.html. */

/* ---------- Tokens ---------- */
:root {
  --navy: #0a2037;
  --navy-deep: #071a2a;
  --blue: #0877ba;        /* buttons, borders, large text */
  --blue-text: #0a6aa5;   /* small text on light backgrounds (AA contrast) */
  --sky: #76d2ff;         /* accents on dark backgrounds */
  --red: #d72c38;
  --muted: #5b6a7d;
  --line: #dbe4eb;
  --pale: #eef6fa;
  --mist: #f3f7fa;
  --white: #fff;
  --header-h: 79px;
  --radius: 8px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--navy); background: var(--white); font: 16px/1.65 'DM Sans', Arial, sans-serif; }
h1, h2, h3, h4 { font-family: Manrope, Arial, sans-serif; line-height: 1.18; letter-spacing: -.035em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 5.3rem); margin: 0 0 .35em; font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3.5vw, 3.5rem); margin: 0 0 22px; }
h3 { font-size: 1.25rem; margin: 0 0 10px; }
p { margin: 0 0 17px; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.topbar :focus-visible, .hero :focus-visible, .dark :focus-visible, .cpd :focus-visible, .footer :focus-visible { outline-color: var(--sky); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--white); color: var(--navy);
  padding: 10px 16px; border-radius: 5px; font-weight: 700; transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* Placeholder content that MUST be replaced before launch — see LAUNCH-CHECKLIST.md */
.todo { background: #fff3b0; color: #5a4300; padding: 0 .25em; border-radius: 3px; }

.container { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }
.eyebrow { display: block; font-size: .76rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--blue-text); margin-bottom: 17px; font-family: 'DM Sans', Arial, sans-serif; line-height: 1.5; }
.mini { font-size: .85rem; color: var(--muted); }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 20px; border-radius: 5px; border: 2px solid transparent;
  text-decoration: none; font-weight: 700; font-size: .89rem; line-height: 1.3;
  transition: transform .2s, background-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #bf2430; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #066aa5; }
.btn-outline { border-color: #fff; color: #fff; background: transparent; }
.btn-outline:hover { background: #ffffff1a; }
.btn-line { border-color: var(--blue); color: var(--blue-text); background: #fff; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--navy); color: #b9d0df; font-size: .78rem; }
.topbar .container { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
.topbar p { margin: 0; }
.topbar a { text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

.header { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid #e9eff3; box-shadow: 0 3px 18px #0a20370b; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: var(--header-h); position: relative; }
.logo { display: flex; align-items: center; }
.logo img { width: 120px; height: 65px; object-fit: contain; }
.navlinks { display: flex; gap: 24px; align-items: center; margin: 0; padding: 0; list-style: none; }
.navlinks a:not(.btn) { text-decoration: none; font-size: .86rem; font-weight: 700; }
.navlinks a:not(.btn):hover { color: var(--blue-text); }
.hamburger { display: none; border: 0; background: none; color: var(--navy); padding: 8px; }
.hamburger .icon { width: 28px; height: 28px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; min-height: 650px; }
.hero-media { position: absolute; inset: 0 0 0 46%; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .66; }
.hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #0a2037 0%, #0a203733 42%, #0a203700 100%); }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #0a2037 0%, #0a2037f0 36%, #0a20373b 100%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: flex; align-items: center; min-height: 650px; }
.hero-copy { max-width: 790px; padding: 85px 0; }
.hero .eyebrow { color: var(--sky); }
.hero h1 .line { display: block; }
.hero .highlight { color: #72d3ff; }
.hero .lead { max-width: 620px; color: #d4e3ed; font-size: 1.1rem; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 29px; }
.hero-badge { display: inline-block; border-left: 3px solid var(--red); padding-left: 13px; color: #e7f1f7; font-size: .83rem; margin: 40px 0 0; }

/* ---------- Trust strip ---------- */
.trust { background: var(--mist); border-bottom: 1px solid var(--line); }
.trust-inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 24px 0; margin: 0; list-style: none; }
.trust-inner li { display: flex; align-items: center; gap: 12px; font-size: .86rem; font-weight: 700; }
.tick { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #d7edf8; color: var(--blue-text); flex-shrink: 0; }
.tick .icon { width: 16px; height: 16px; stroke-width: 3; }
.trust-strip { padding: 26px 0 28px; border-bottom: 1px solid var(--line); background: #fff; }
.trust-label { text-align: center; font: 800 .7rem/1.5 'DM Sans', Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.trust-logos { display: flex; align-items: center; justify-content: center; gap: clamp(22px, 6vw, 90px); flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.trust-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.trust-item img { width: auto; height: 53px; max-width: 170px; object-fit: contain; }
.trust-item span { font-size: .72rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.intro { max-width: 760px; margin-bottom: 45px; }
.intro p { font-size: 1.1rem; color: var(--muted); }
.blue-section { background: var(--pale); }

.dark { background: var(--navy); color: #fff; }
.dark .eyebrow { color: #79d5ff; }
.dark p { color: #b8cfdd; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 65px; align-items: center; }
.photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.caption { font-size: .85rem; color: #a7c0d0; margin-top: 10px; }

/* Why test */
.comparison { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin: 0; padding: 0; list-style: none; }
.comp { border: 1px solid var(--line); padding: 30px 18px; border-radius: var(--radius); text-align: center; background: #fff; }
.comp .icon { width: 36px; height: 36px; color: var(--blue); margin-bottom: 14px; }
.comp strong { display: block; font-family: Manrope, Arial, sans-serif; }
.comp small { color: var(--muted); font-size: .85rem; }
.comp:last-child { border: 2px solid var(--blue); background: #eef8ff; }
.comp:last-child .icon { color: var(--red); }
.statement { font: 800 clamp(1.5rem, 2.4vw, 2.4rem)/1.4 Manrope, Arial, sans-serif; margin: 40px 0 0; max-width: 900px; letter-spacing: -.02em; }
.statement em { color: var(--blue-text); font-style: normal; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 50px auto 0; padding: 0; list-style: none; }
.step { border-top: 2px solid #45718b; padding-top: 23px; }
.step .num { color: #73d4ff; font-size: .82rem; font-weight: 800; letter-spacing: .06em; }
.step p { color: #c5d7e2; font-size: .93rem; }

/* Feature cards */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: #fff; padding: 32px; border: 1px solid #e1eaf0; border-radius: 9px; color: var(--navy); }
.feature > .icon { width: 34px; height: 34px; color: var(--blue); margin-bottom: 15px; }
.feature-grid .feature { display: flex; flex-direction: column; }
.feature-grid .feature p { flex: 1; }
.feature.has-photo { padding: 0 0 24px; overflow: hidden; }
.feature.has-photo > :not(.feature-photo) { margin-left: 26px; margin-right: 26px; }
.feature-photo { width: 100%; height: 195px; object-fit: cover; display: block; margin-bottom: 22px; background: var(--pale); }
.feature p { color: var(--muted); font-size: .94rem; }
.feature ul { color: var(--muted); font-size: .94rem; padding-left: 1.2em; margin: 0 0 17px; }
.definition { font-size: 1.15rem; color: var(--navy) !important; border-left: 4px solid var(--blue); padding-left: 18px; }
.callout { background: #fff; padding: 28px; border-left: 4px solid var(--blue); margin-top: 32px; font-size: .92rem; }
.callout p:last-child { margin: 0; }
.callout a { color: var(--blue-text); }

/* ELD vs flood testing */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.compare-table { width: 100%; border-collapse: collapse; font-size: .94rem; min-width: 620px; }
.compare-table caption { text-align: left; padding: 18px 20px 0; color: var(--muted); font-size: .85rem; caption-side: bottom; padding-bottom: 18px; }
.compare-table th, .compare-table td { text-align: left; vertical-align: top; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.compare-table thead th { font-family: Manrope, Arial, sans-serif; background: var(--mist); }
.compare-table thead th:last-child { background: #e3f2fb; color: var(--blue-text); }
.compare-table tbody th { width: 22%; font-weight: 700; }
.compare-table td { color: var(--muted); }
.compare-table td:last-child { color: var(--navy); }

/* Scanner demo */
.demo-wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 55px; align-items: center; }
.scan-stage {
  position: relative; height: 350px; border-radius: 12px; overflow: hidden;
  background: repeating-linear-gradient(0deg, #b8c4ce 0, #b8c4ce 2px, #d3dce2 3px, #d3dce2 76px);
  border: 9px solid #e2e9ee; touch-action: none; cursor: crosshair; box-shadow: 0 20px 45px #0a20371a;
}
.scan-stage::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0, transparent 185px, #9aaab65c 186px, #9aaab65c 188px); pointer-events: none; }
.scan-stage:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
/* The breach is hidden until found; main.js moves it to one of several spots on each reset. */
.defect { position: absolute; left: 69%; top: 47%; height: 11px; width: 23px; margin: -6px 0 0 -12px; background: #4b5157; transform: rotate(-25deg); border-radius: 40%; opacity: 0; transition: opacity .2s; }
.scanner { position: absolute; left: 12%; top: 34%; width: 110px; height: 95px; transform: translate(-50%, -50%); pointer-events: none; filter: drop-shadow(0 10px 5px #0003); }
.scanner-head { position: absolute; bottom: 0; left: 5px; width: 100px; height: 56px; background: linear-gradient(145deg, #2b9fe0, #0067b3); border: 5px solid #073c67; border-radius: 11px; }
.scanner-brand { position: absolute; top: 8px; left: 7px; width: 77px; height: 32px; object-fit: contain; filter: invert(1) grayscale(1) brightness(1.6); mix-blend-mode: screen; }
.scanner-handle { position: absolute; left: 52px; bottom: 49px; height: 45px; width: 7px; background: #344451; border-radius: 3px; }
.scanner-handle::after { content: ''; position: absolute; top: 0; left: -18px; width: 43px; height: 6px; background: #344451; border-radius: 4px; }
.scan-stage.found .defect { opacity: 1; box-shadow: 0 0 0 8px #d72c3866, 0 0 0 25px #d72c3822; }
.scan-overlay { position: absolute; left: 16px; bottom: 14px; background: #0a2037de; color: #fff; padding: 8px 12px; border-radius: 5px; font-size: .8rem; pointer-events: none; }
.meter { height: 12px; background: #dce8ee; border-radius: 20px; overflow: hidden; margin: 14px 0; }
.meter-fill { height: 100%; width: 9%; background: var(--blue); transition: width .15s, background-color .15s; }
.meter-fill.found { background: var(--red); }
.status { font-weight: 800; min-height: 30px; }
.demo-note { color: var(--muted); font-size: .8rem; margin-top: 10px; }

/* Case studies */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.case { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.case img { width: 100%; height: 215px; object-fit: cover; }
.case-content { padding: 24px; flex: 1; }
.case-content .eyebrow { font-size: .67rem; margin-bottom: 10px; }
.case-content p, .case-content li { color: var(--muted); font-size: .91rem; }
.case-facts { padding-left: 1.1em; margin: 0; }
.case-content .case-note { font-size: .8rem; border-top: 1px solid var(--line); padding-top: 12px; margin: 0; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 65px; align-items: start; }
.about-grid p { color: var(--muted); }
.about-grid p a { color: var(--blue-text); }
#film-thickness h3 { font-size: 1.05rem; }
.fact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fact-list li { background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: .94rem; }
.fact-list strong { display: block; font-family: Manrope, Arial, sans-serif; font-size: 1.05rem; }

/* CPD */
.cpd { background: linear-gradient(110deg, #0b3556, #0878ba); color: #fff; }
.cpd p { color: #d6eaf6; }
.cpd .eyebrow { color: #a5e2ff; }
.cpd .feature .eyebrow { color: var(--blue-text); }
.cpd .feature p, .cpd .feature li { color: var(--muted); }

/* Videos */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; }
.video-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.video-frame { position: relative; aspect-ratio: 16/9; background: #173c5b; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #173c5b; display: block; }
.video-play img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.video-play:hover img { opacity: 1; }
.video-play .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px #0005; }
.video-play .play .icon { width: 26px; height: 26px; fill: currentColor; stroke: none; margin-left: 4px; }
.video-body { padding: 18px; font-size: .9rem; }
.video-body h3 { font-size: 1.05rem; margin-bottom: 6px; letter-spacing: -.02em; }
.video-body p { color: var(--muted); margin-bottom: 8px; }
.video-body .meta { font-size: .8rem; margin: 0; }
.video-body a { color: var(--blue-text); }

/* FAQ */
.faq { max-width: 840px; }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-weight: 800; font-family: Manrope, Arial, sans-serif; list-style-position: outside; }
.faq summary h3 { display: inline; font-size: 1.05rem; letter-spacing: -.02em; }
.faq details p { color: var(--muted); padding-top: 12px; margin: 0; }

/* Contact */
.contact { background: var(--mist); }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 75px; }
.contact-card { background: #fff; padding: 35px; border-radius: 10px; border: 1px solid var(--line); }
.contact-details a { color: var(--blue-text); font-weight: 700; }
label { display: block; font-weight: 700; font-size: .84rem; margin: 0 0 7px; }
.optional { font-weight: 400; color: var(--muted); }
input, select, textarea { display: block; width: 100%; padding: 11px 12px; border: 1px solid #a9bac7; border-radius: 5px; background: #fff; color: var(--navy); margin-bottom: 16px; }
input[type="file"] { padding: 9px; background: var(--mist); }
textarea { min-height: 120px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { display: none; }
.form-note { font-size: .78rem; color: var(--muted); margin-top: 12px; }
.form-note a { color: var(--blue-text); }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: 6px; font-weight: 700; font-size: .92rem; }
.form-status:empty { display: none; }
.form-status.ok { background: #e3f6ea; color: #14532d; border: 1px solid #a6dcb8; }
.form-status.err { background: #fde8ea; color: #7f1d26; border: 1px solid #f3b3b9; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: #b7cedd; padding: 55px 0 25px; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; }
.footer-title { color: #fff; font-family: Manrope, Arial, sans-serif; font-weight: 800; display: block; margin-bottom: 8px; }
.footer-brand { font-size: 1.3rem; }
.footer a { color: #e3f3ff; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 4px; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid #28465b; padding-top: 20px; margin-top: 35px; color: #8da9bb; font-size: .82rem; }
.footer-legal p { margin: 0; }

/* Mobile call bar (shown on small screens only) */
.mobile-cta { display: none; }

/* ---------- Simple pages (privacy, 404) ---------- */
.page { padding: 80px 0 100px; }
.page .container { max-width: 780px; }
.page h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
.page h2 { font-size: 1.5rem; margin-top: 40px; }
.page p, .page li { color: var(--muted); }
.page a { color: var(--blue-text); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .navlinks { gap: 18px; }
}
@media (max-width: 900px) {
  .navlinks {
    display: none; position: absolute; top: var(--header-h); left: -16px; right: -16px; background: #fff;
    padding: 20px 25px 26px; box-shadow: 0 10px 15px #0002; flex-direction: column; align-items: flex-start; gap: 16px;
  }
  .navlinks.open { display: flex; }
  .navlinks a:not(.btn) { font-size: 1rem; }
  .hamburger { display: block; }
  .split, .demo-wrap, .contact-grid, .about-grid { grid-template-columns: 1fr; gap: 35px; }
  .feature-grid, .case-grid, .video-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-media { inset: 0; }
  .hero::after { background: linear-gradient(90deg, #0a2037f2, #0a2037b0); }
  .hero, .hero-inner { min-height: 590px; }
  .section { padding: 70px 0; }
  .steps { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 560px) {
  :root { --header-h: 68px; }
  .logo img { width: 100px; height: 54px; }
  .topbar .topbar-tagline { display: none; }
  .topbar .container { justify-content: center; }
  .comparison, .feature-grid, .case-grid, .video-grid, .trust-inner { grid-template-columns: 1fr; }
  .trust-inner { gap: 12px; }
  .trust-item img { height: 42px; max-width: 125px; }
  .hero-copy { padding: 64px 0; }
  .hero h1 .line { display: inline; }
  .hero .lead { font-size: 1rem; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .contact-card { padding: 24px; }
  .footer-inner { display: block; }
  .footer-inner > div { margin-bottom: 24px; }
  .scan-stage { height: 290px; }
  .mobile-cta {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -4px 18px #0a203722;
  }
  .mobile-cta .btn { padding: 11px 10px; }
  body.has-mobile-cta { padding-bottom: 66px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover { transform: none; }
}
