/*
Theme Name: Media Metrix
Description: One-page theme for Media Metrix LLC, converted from the hand-made static site. Business info, hero text, photos and the form recipient are editable in Appearance → Customize → Media Metrix. Privacy Policy, Terms of Use and Accessibility pages are created on activation; the contact form emails requests with wp_mail().
Version: 1.0.0
Requires at least: 6.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tz-landing
*/

/* Media Metrix — midnight navy, electric blue, lime; live search demo */
:root {
  --night: #0b1020;
  --night-2: #131a33;
  --night-3: #1f2847;
  --blue: #2b59ff;
  --blue-dark: #1d44d8;
  --lime: #c6ff3d;
  --paper: #f5f7ff;
  --ink: #0e1428;
  --muted: #4a5270;
  --white: #fff;
  --font: "Figtree", system-ui, sans-serif;
  --mono: "Roboto Mono", ui-monospace, monospace;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--font); font-size: 1.1875rem; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: var(--blue-dark); text-underline-offset: 3px; }
h1, h2, h3 { font-weight: 800; line-height: 1.06; margin: 0; letter-spacing: -0.025em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; box-shadow: 0 0 0 6px var(--night); border-radius: 8px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--lime); color: var(--night); padding: 12px 18px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }

.kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.04em; color: var(--lime); margin-bottom: 16px; }
.kicker__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(198, 255, 61, 0.2); }
.kicker--dark { color: var(--blue-dark); }
.kicker--dark::before { content: "//"; color: var(--blue); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 26px; border-radius: 12px; font: 800 1.0625rem/1.2 var(--font); text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s; }
.btn:hover { transform: translateY(-2px); }
.btn--lg { min-height: 60px; padding: 14px 30px; font-size: 1.125rem; }
.btn--lime { background: var(--lime); color: var(--night); box-shadow: 0 10px 30px -12px rgba(198, 255, 61, 0.6); }
.btn--lime:hover { background: #d7ff73; }
.btn--ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.04); }
.btn--ghost:hover { border-color: var(--lime); color: var(--lime); }
.btn--blue { background: var(--blue); color: var(--white); }
.btn--blue:hover { background: var(--blue-dark); }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(11, 16, 32, 0.92); backdrop-filter: blur(10px); color: var(--white); border-bottom: 1px solid var(--night-3); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 48px; color: var(--white); text-decoration: none; }
.brand__mark { width: 46px; height: 46px; flex: none; }
.brand__text { font-size: 1.625rem; font-weight: 500; letter-spacing: -0.02em; }
.brand__text b { font-weight: 900; color: var(--lime); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { color: #dfe4f5; text-decoration: none; font-weight: 600; font-size: 1.0625rem; padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 10px; }
.nav a:not(.btn):hover { background: var(--night-3); color: var(--white); }
.nav .btn { margin-left: 10px; }

/* Hero */
.hero { background-color: var(--night); background-image: linear-gradient(rgba(43, 89, 255, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(43, 89, 255, 0.12) 1px, transparent 1px); background-size: 40px 40px; color: var(--white); padding: clamp(60px, 8vw, 110px) 0; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -10%; top: -20%; width: 60%; height: 120%; background: radial-gradient(circle, rgba(43, 89, 255, 0.35), transparent 60%); pointer-events: none; }
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.75rem, 6vw, 5.25rem); margin-bottom: 24px; }
.hero h1 span { display: block; color: var(--lime); }
.hero__lead { font-size: clamp(1.1875rem, 1.6vw, 1.3125rem); color: #c9d0ea; max-width: 34em; margin-bottom: 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.serp { background: var(--white); color: var(--ink); border-radius: 22px; padding: 22px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8); }
.serp__bar { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 18px; border-radius: 999px; border: 2px solid #dfe4f5; margin-bottom: 18px; font-size: 1.125rem; }
.serp__bar svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; }
.serp__query { font-family: var(--mono); color: var(--ink); white-space: nowrap; overflow: hidden; }
.serp__caret { width: 2px; height: 24px; background: var(--blue); }
.js .serp__caret { animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.serp__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.res { display: grid; gap: 2px; padding: 12px 16px; border-radius: 14px; background: var(--paper); position: relative; }
.res__url { font-family: var(--mono); font-size: 0.9375rem; color: #3d6e3a; }
.res__title { font-size: 1.125rem; font-weight: 700; color: #1a0dab; }
.res--you { background: #eef3ff; box-shadow: inset 0 0 0 2px var(--blue); }
.res--you .res__title { color: var(--blue-dark); }
.res__tag { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 0.9375rem; font-weight: 700; background: var(--lime); color: var(--night); padding: 3px 10px; border-radius: 999px; }
.res--you.is-top { box-shadow: inset 0 0 0 2px var(--blue), 0 12px 30px -12px rgba(43, 89, 255, 0.6); }
.serp__note { margin-top: 14px; font-size: 0.9375rem; color: var(--muted); text-align: center; }

/* Heads */
.head { max-width: 760px; margin-bottom: 44px; }
.head h2 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); margin-bottom: 12px; }
.head p:not(.kicker) { color: var(--muted); }

/* Services */
.services { padding: clamp(80px, 9vw, 120px) 0; background: var(--paper); }
.services__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.svc { background: var(--white); border: 1px solid #e0e5f6; border-radius: 22px; padding: 30px 28px; transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; }
.svc:hover { transform: translateY(-4px); border-color: var(--blue); box-shadow: 0 30px 50px -36px rgba(43, 89, 255, 0.6); }
.svc__code { font-family: var(--mono); font-size: 0.9375rem; font-weight: 700; color: var(--blue-dark); margin-bottom: 12px; }
.svc h3 { font-size: 1.75rem; margin-bottom: 10px; }
.svc > p:not(.svc__code) { color: var(--muted); margin-bottom: 18px; }
.svc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.svc__list li { font-size: 0.9375rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: #eef3ff; color: var(--blue-dark); }

/* Hub */
.hub { background: var(--night); color: var(--white); padding: clamp(80px, 9vw, 120px) 0; overflow: hidden; }
.hub__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hub h2 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); margin-bottom: 16px; }
.hub p:not(.kicker) { color: #c9d0ea; }
.orbit { position: relative; width: min(100%, 420px); aspect-ratio: 1; justify-self: center; border-radius: 50%; border: 2px dashed rgba(198, 255, 61, 0.35); }
.js .orbit { animation: spin 40s linear infinite; }
.orbit__core { position: absolute; left: 50%; top: 50%; width: 40%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: var(--blue); display: grid; place-items: center; text-align: center; font-weight: 800; font-size: 1.25rem; line-height: 1.15; box-shadow: 0 0 0 14px rgba(43, 89, 255, 0.2), 0 0 60px rgba(43, 89, 255, 0.6); }
.orbit__node { position: absolute; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%; background: var(--night-2); border: 2px solid var(--lime); display: grid; place-items: center; font-weight: 800; font-size: 1.0625rem; color: var(--lime); }
.js .orbit__node { animation: spin 40s linear infinite reverse; }
.js .orbit__core { animation: spin 40s linear infinite reverse; }
.orbit__node--a { left: 50%; top: 0; }
.orbit__node--b { left: 100%; top: 50%; }
.orbit__node--c { left: 50%; top: 100%; }
.orbit__node--d { left: 0; top: 50%; }
@keyframes spin { to { rotate: 360deg; } }

/* Approach */
.approach { padding: clamp(80px, 9vw, 120px) 0; }
.approach__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 18px; align-items: flex-start; padding: 18px 20px; border-radius: 18px; border: 1px solid #e0e5f6; }
.steps__n { font-family: var(--mono); font-weight: 700; font-size: 1.125rem; color: var(--night); background: var(--lime); border-radius: 10px; padding: 6px 10px; flex: none; }
.steps h3 { font-size: 1.375rem; margin-bottom: 4px; }
.steps p { color: var(--muted); font-size: 1.0625rem; }
.approach__photos { display: grid; gap: 18px; }
.approach__photos img { width: 100%; aspect-ratio: 9 / 6.4; object-fit: cover; border-radius: 22px; }
.approach__photos img:nth-child(2) { width: 82%; margin-left: auto; margin-top: -60px; border: 8px solid var(--white); box-shadow: 0 30px 50px -30px rgba(14, 20, 40, 0.6); }

/* FAQ */
.faq { padding: 0 0 clamp(80px, 9vw, 120px); }
.faq__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.faq__list { display: grid; gap: 12px; }
.faq__list details { border-radius: 16px; border: 1px solid #e0e5f6; background: var(--paper); }
.faq__list details[open] { background: var(--white); border-color: var(--blue); }
.faq__list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 14px 22px; font-weight: 800; font-size: 1.1875rem; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: "+"; flex: none; font-family: var(--mono); font-weight: 700; font-size: 1.5rem; color: var(--blue); transition: transform 0.25s; }
.faq__list details[open] summary::after { transform: rotate(45deg); }
.faq__list details p { padding: 0 22px 22px; color: var(--muted); }

/* Contact */
.contact { background: var(--night); color: var(--white); padding: clamp(80px, 9vw, 120px) 0; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact h2 { font-size: clamp(2.25rem, 4.4vw, 3.5rem); margin-bottom: 14px; }
.contact__info > p:not(.kicker) { color: #c9d0ea; margin-bottom: 26px; }
.contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.contact__list li { display: grid; gap: 2px; }
.contact__list span { font-family: var(--mono); font-size: 0.9375rem; color: var(--lime); }
.contact__list a { color: var(--white); font-weight: 700; justify-self: start; display: inline-flex; align-items: center; min-height: 44px; overflow-wrap: anywhere; }
.contact__list address { font-style: normal; }
.form { background: var(--white); color: var(--ink); border-radius: 24px; padding: clamp(22px, 4vw, 36px); display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: 1rem; }
.opt { font-weight: 400; color: var(--muted); }
.form input:not([type="checkbox"]), .form textarea { width: 100%; min-height: 54px; padding: 12px 14px; border: 1.5px solid #cfd6ee; border-radius: 12px; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.4 var(--font); }
.form textarea { resize: vertical; min-height: 130px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43, 89, 255, 0.2); }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips legend { font-weight: 700; font-size: 1rem; padding: 0; margin-bottom: 8px; }
.chips label { display: block; position: relative; }
.chips input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; min-height: 48px; padding: 10px 16px; border-radius: 999px; border: 2px solid #cfd6ee; font-weight: 700; font-size: 1rem; }
.chips input:checked + span { background: var(--night); border-color: var(--night); color: var(--lime); }
.chips input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }
.form .btn { justify-self: start; }
.form__status { font-size: 1.0625rem; min-height: 1.5em; }
.form[data-state="success"] .form__status { color: #157347; font-weight: 700; }
.form[data-state="error"] .form__status { color: #b42318; font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.footer { background: #070b17; color: #b9c1dd; padding: 44px 0 24px; font-size: 1.0625rem; }
.footer a { color: var(--white); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--night-3); }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand strong { color: var(--white); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 18px; font-size: 0.9375rem; color: #9aa3c4; }

.mobile-bar { display: none; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .nav a:not(.btn) { display: none; }
  .hero__grid, .hub__grid, .approach__grid, .faq__grid, .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .serp { max-width: 560px; }
  .approach__photos { max-width: 560px; }
}

@media (max-width: 767px) {
  .header__inner { min-height: 66px; }
  .brand__mark { width: 40px; height: 40px; }
  .brand__text { font-size: 1.375rem; }
  .nav .btn { display: none; }
  .serp { padding: 16px; }
  .res__tag { position: static; transform: none; justify-self: start; margin-top: 4px; }
  .services__grid { grid-template-columns: minmax(0, 1fr); }
  .orbit { width: min(100% - 110px, 320px); }
  .orbit__node { width: 88px; height: 88px; margin: -44px 0 0 -44px; font-size: 1rem; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .form .btn { justify-self: stretch; }
  .footer__bottom { flex-direction: column; }
  body { padding-bottom: 84px; }
  .mobile-bar { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--night); box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, 0.6); }
  .mobile-bar .btn { min-height: 54px; padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Legal links & form consent */
.legal-links { line-height: 2; }
.legal-links a { white-space: nowrap; }
.form-legal { margin: 0; font-size: 0.9375rem; line-height: 1.5; }
.form-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Optional-field labels: keep "(optional)" on the label line so inputs in a row line up */
.form label:has(> .opt) { grid-template-columns: max-content minmax(0, 1fr); column-gap: 6px; align-items: baseline; }
.form label:has(> .opt) > :is(input, select, textarea) { grid-column: 1 / -1; }

/* ---------- WordPress additions ---------- */

/* Colours and type for WordPress pages (same as the site's legal pages) */
:root {
  --lg-bg: #ffffff;
  --lg-surface: #f7f7f7;
  --lg-ink: #0e1428;
  --lg-muted: #565b69;
  --lg-head: #0b1020;
  --lg-accent: #0b1020;
  --lg-line: #d4d5d8;
  --lg-display: Figtree, system-ui, sans-serif;
  --lg-body: Figtree, system-ui, sans-serif;
}

/* Sticky header below the admin bar for signed-in users */
.admin-bar .header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .header { top: 46px; } }
@media screen and (max-width: 600px) { .admin-bar .header { top: 0; } }

/* WordPress core helpers */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.screen-reader-text:focus { background: #fff; clip: auto !important; clip-path: none; color: #111; display: block; height: auto; left: 8px; padding: 12px 18px; top: 8px; width: auto; z-index: 100000; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }

/* Pages: Privacy Policy, Terms of Use, Accessibility Statement and any other page */
.page-doc { background: var(--lg-bg); color: var(--lg-ink); font-family: var(--lg-body); }
.page-doc__wrap { width: min(100% - 32px, 880px); margin-inline: auto; padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.page-doc .page-doc__title { font-family: var(--lg-display); font-weight: 400; color: var(--lg-head); font-size: clamp(2.25rem, 5vw, 3.25rem); line-height: 1.1; letter-spacing: normal; text-transform: none; margin: 0 0 14px; }
.page-doc__content { font-size: 1.1875rem; line-height: 1.7; }
.page-doc .page-doc__content h2 { font-family: var(--lg-display); font-weight: 400; color: var(--lg-head); font-size: clamp(1.5rem, 3vw, 1.875rem); line-height: 1.2; letter-spacing: normal; text-transform: none; margin: 2.2em 0 0.5em; }
.page-doc .page-doc__content h3 { font-family: var(--lg-body); font-weight: 700; color: var(--lg-ink); font-size: 1.1875rem; line-height: 1.3; letter-spacing: normal; text-transform: none; margin: 1.4em 0 0.3em; }
.page-doc .page-doc__content p, .page-doc .page-doc__content ul, .page-doc .page-doc__content ol { margin: 0 0 1em; max-width: 70ch; }
.page-doc .page-doc__content ul, .page-doc .page-doc__content ol { padding-left: 1.3em; list-style: revert; }
.page-doc .page-doc__content li { margin-bottom: 0.4em; }
.page-doc a { color: var(--lg-accent); overflow-wrap: anywhere; text-underline-offset: 3px; }
.page-doc .page-doc__content img { height: auto; }
.page-doc .page-date { color: var(--lg-muted); font-size: 1rem; }
.page-doc .page-contact { font-style: normal; padding: 18px 22px; border-left: 4px solid var(--lg-accent); background: var(--lg-surface); max-width: 70ch; margin: 0 0 1em; }
.page-doc .page-doc__back { margin-top: 40px; font-weight: 700; }
.page-doc .page-doc__back a { display: inline-flex; align-items: center; min-height: 44px; }
.page-doc .page-doc__item { padding: 22px 0; border-bottom: 1px solid var(--lg-line); }
.page-doc .page-doc__item h2 { font-family: var(--lg-display); font-weight: 400; font-size: 2rem; margin: 0 0 8px; }
.page-doc .page-doc__item h2 a { color: var(--lg-head); text-decoration: none; }
.page-doc .nav-links { display: flex; gap: 10px; margin-top: 28px; }
.page-doc .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border: 2px solid var(--lg-ink); color: var(--lg-ink); text-decoration: none; font-weight: 700; }
.page-doc .page-numbers.current { background: var(--lg-ink); color: var(--lg-bg); }
