/*
Theme Name: OptiMet
Theme URI: https://optimet.co.nz
Author: OptiTrac
Author URI: https://optimet.co.nz
Description: OptiMet marketing site theme. Supplies the sticky header nav and footer so each page's Custom HTML block stays free of navigation chrome. Built from the OptiMet page blocks.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: optimet
*/

/* =============================================================
   OptiMet brand tokens (shared chrome only).
   Page blocks carry their own scoped styles (#omx-*), so this
   stylesheet only styles the theme header, footer and page shell.
   navy #000D59 · blue #0049FF · amber #FFB600
   ============================================================= */
:root{
  --om-navy:#000d59; --om-blue:#0049ff; --om-amber:#ffb600;
  --om-txt:#101830; --om-mut:#50607e; --om-dim:#8a97b2;
  --om-line:#e6ebf4; --om-soft:#f6f8fc;
  --om-header-h:70px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Arial,sans-serif;
  color:var(--om-txt);
  background:#fff;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--om-blue)}
img{max-width:100%;height:auto}

/* ---- Skip link (a11y) ---- */
.om-skip{position:absolute;left:-9999px;top:0;background:var(--om-blue);color:#fff;
  padding:10px 16px;border-radius:0 0 8px 0;z-index:1000}
.om-skip:focus{left:0}

/* ---- Sticky header ---- */
.om-header{
  position:sticky;top:0;z-index:900;background:rgba(255,255,255,.96);
  backdrop-filter:saturate(1.2) blur(6px);
  border-bottom:1px solid var(--om-line);
}
.om-header-inner{
  max-width:1180px;margin:0 auto;padding:0 24px;height:var(--om-header-h);
  display:flex;align-items:center;justify-content:space-between;gap:20px;
}
.om-brand{display:flex;align-items:center;gap:10px;text-decoration:none;flex:none}
.om-brand img{height:34px;width:auto;display:block}
.om-brand .om-brand-fallback{font-weight:800;font-size:20px;color:var(--om-navy);letter-spacing:-.02em}

/* ---- Primary nav ---- */
.om-nav{display:flex;align-items:center}
.om-menu{list-style:none;margin:0;padding:0;display:flex;align-items:center;gap:2px}
.om-menu li{position:relative}
.om-menu a{
  display:block;text-decoration:none;color:var(--om-txt);font-weight:600;
  font-size:14.5px;padding:10px 12px;border-radius:8px;white-space:nowrap;
  transition:color .15s,background .15s;
}
.om-menu a:hover,.om-menu .current-menu-item>a,.om-menu .current_page_item>a{
  color:var(--om-blue);background:var(--om-soft);
}
/* contact / CTA emphasis */
.om-menu .om-cta>a{background:var(--om-blue);color:#fff}
.om-menu .om-cta>a:hover{background:#0038c8;color:#fff}

/* ---- Dropdown (Products ▾) ---- */
.om-menu .menu-item-has-children>a::after,
.om-menu .om-has-children>a::after{content:" \25BE";font-size:11px;color:var(--om-dim)}
.om-submenu{
  list-style:none;margin:0;padding:8px;position:absolute;top:calc(100% + 6px);left:0;
  min-width:210px;background:#fff;border:1px solid var(--om-line);border-radius:12px;
  box-shadow:0 12px 30px rgba(0,13,89,.12);opacity:0;visibility:hidden;transform:translateY(-6px);
  transition:opacity .15s,transform .15s,visibility .15s;
}
.om-menu li:hover>.om-submenu,
.om-menu li:focus-within>.om-submenu{opacity:1;visibility:visible;transform:translateY(0)}
.om-submenu a{font-weight:600;font-size:14px}

/* ---- Mobile toggle ---- */
.om-burger{display:none;background:none;border:1px solid var(--om-line);border-radius:8px;
  padding:8px 10px;cursor:pointer;color:var(--om-navy)}
.om-burger span{display:block;width:20px;height:2px;background:currentColor;margin:4px 0}

@media(max-width:960px){
  .om-burger{display:block}
  .om-nav{
    position:fixed;inset:var(--om-header-h) 0 0 auto;width:min(320px,86vw);
    background:#fff;border-left:1px solid var(--om-line);
    transform:translateX(100%);transition:transform .2s;overflow-y:auto;padding:12px;
    box-shadow:-10px 0 30px rgba(0,13,89,.08);
  }
  .om-nav.open{transform:translateX(0)}
  .om-menu{flex-direction:column;align-items:stretch;gap:2px}
  .om-menu a{padding:12px 14px}
  .om-submenu{position:static;opacity:1;visibility:visible;transform:none;box-shadow:none;
    border:none;border-left:2px solid var(--om-line);border-radius:0;margin:2px 0 6px 12px;padding:0}
}

/* ---- Page content shell ---- */
.om-main{min-height:40vh}

/* ---- Footer ---- */
.om-footer{background:var(--om-navy);color:#fff;margin-top:72px}
.om-footer a{color:#cdd7f5;text-decoration:none}
.om-footer a:hover{color:#fff;text-decoration:underline}
.om-footer-inner{max-width:1180px;margin:0 auto;padding:52px 24px 28px;
  display:flex;flex-wrap:wrap;gap:40px;justify-content:space-between}
.om-footer-brand{max-width:360px}
.om-footer-brand img{height:32px;width:auto;margin-bottom:14px;filter:brightness(0) invert(1)}
.om-footer-brand p{color:#aeb9dd;font-size:14px;margin:0}
.om-footer-cols{display:flex;gap:56px;flex-wrap:wrap}
.om-footer-col h4{font-size:12px;letter-spacing:.14em;text-transform:uppercase;
  color:#8fa0d6;margin:0 0 12px;font-weight:700}
.om-footer-col ul{list-style:none;margin:0;padding:0}
.om-footer-col li{margin:0 0 9px}
.om-footer-col a{font-size:14.5px}
.om-footer-bottom{border-top:1px solid rgba(255,255,255,.12)}
.om-footer-bottom-inner{max-width:1180px;margin:0 auto;padding:18px 24px;
  display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;align-items:center;
  font-size:13px;color:#8fa0d6}
.om-footer-bottom-inner a{color:#8fa0d6}

@media(max-width:640px){
  .om-footer-inner{flex-direction:column;gap:28px}
  .om-footer-cols{gap:36px}
}
