/* ==========================================================================
   Ammonite site header (ammonite-5 template)
   Markup: blocks/page-top.php  Behaviour: js/am-header.js
   Loaded after Bootstrap and the theme CSS. Everything is scoped to .am-*
   except the font, the login modal and the reCAPTCHA badge (see bottom).
   ========================================================================== */

/* Inter, self-hosted (latin subset, SIL OFL - see fonts/Inter-OFL-LICENSE.txt) */
@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/inter-latin-400-normal.woff2) format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;font-style:normal;font-weight:500;font-display:swap;src:url(../fonts/inter-latin-500-normal.woff2) format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Inter;font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/inter-latin-600-normal.woff2) format("woff2");
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root{
  --am-font:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --am-ink:#08161b;          /* matches the shell background */
  --am-panel:#0d2127;
  --am-drawer:#0b1c21;
  --am-green:#83c454;        /* brand green: the single accent */
  --am-green-hi:#97d46a;
  --am-on-green:#0b2410;
  --am-text:#e8f1f2;
  --am-muted:#9fb6bb;
  --am-line:rgba(255,255,255,.10);
  --am-h:68px;
}

/* The generated theme CSS sets body to Gotham with !important, so this needs it too */
body.am-site{font-family:var(--am-font)!important}

/* --- Ribbon (template option "Show ribbon") ------------------------------ */
.am-ribbon{position:relative;background:var(--am-green);color:var(--am-on-green);font-family:var(--am-font);font-size:13px;font-weight:500;line-height:1.4;text-align:center;padding:7px 44px}
.am-ribbon a{color:inherit;font-weight:600}
.am-ribbon-close{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:6px;background:none;color:inherit;cursor:pointer}
.am-ribbon-close:hover{background:rgba(11,36,16,.1)}
.am-ribbon-close svg{width:12px;height:12px}
.am-ribbon.is-dismissed{display:none}

/* --- Bar ----------------------------------------------------------------- */
.am-header{position:sticky;top:0;z-index:1000;height:var(--am-h);font-family:var(--am-font);
  background:rgba(8,22,27,.72);-webkit-backdrop-filter:saturate(140%) blur(14px);backdrop-filter:saturate(140%) blur(14px);
  border-bottom:1px solid var(--am-line);color:var(--am-text);transition:background .2s}
.am-header.is-scrolled{background:rgba(8,22,27,.94)}
body:not(.am-home) .am-header{background:var(--am-ink)}   /* inner pages: solid */

/* Homepage: the shell (first hero module) runs full-bleed under the translucent bar */
body.am-home #main{margin-top:calc(var(--am-h) * -1)}

.am-wrap{max-width:1320px;height:100%;margin:0 auto;padding:0 24px;display:flex;align-items:center;gap:28px}
.am-logo{display:flex;align-items:center;flex:none}
.am-logo img{height:30px;width:auto;display:block}

.am-header a,.am-header button,.am-drawer a,.am-drawer summary{outline-offset:2px}
.am-header :focus-visible,.am-drawer :focus-visible{outline:2px solid var(--am-green)}

/* --- Desktop nav --------------------------------------------------------- */
.am-nav{display:flex;align-items:center;gap:2px;list-style:none;margin:0;padding:0}
.am-nav > li{position:relative}
.am-nav > li > a,.am-nav > li > button{display:flex;align-items:center;gap:6px;height:40px;padding:0 12px;border-radius:8px;
  font-family:inherit;font-size:14.5px;font-weight:500;line-height:1;color:var(--am-text);text-decoration:none;background:none;border:0;cursor:pointer;white-space:nowrap}
.am-nav > li > a:hover,.am-nav > li > button:hover,.am-nav > li.is-open > button{background:rgba(255,255,255,.07);color:#fff}
.am-nav > li > a[aria-current],.am-nav > li.is-active > button{color:#fff;box-shadow:inset 0 -2px 0 var(--am-green);border-radius:0}
.am-caret{width:10px;height:10px;opacity:.7;transition:transform .15s;flex:none}
.am-nav li.is-open .am-caret{transform:rotate(180deg)}

/* Dropdown: 2-column mega menu when items have icons, otherwise narrow */
.am-mega{position:absolute;top:calc(100% + 12px);left:-12px;width:560px;padding:10px;border-radius:14px;
  background:var(--am-panel);border:1px solid var(--am-line);box-shadow:0 24px 60px rgba(0,0,0,.45);
  display:grid;grid-template-columns:1fr 1fr;gap:2px;opacity:0;visibility:hidden;transform:translateY(-4px);transition:opacity .15s,transform .15s,visibility .15s}
.am-mega::before{content:"";position:absolute;left:0;right:0;top:-14px;height:14px}   /* hover bridge across the gap */
.am-mega.am-narrow{width:300px;grid-template-columns:1fr}
.am-nav li.is-open .am-mega{opacity:1;visibility:visible;transform:none}
.am-mega > a{display:flex;gap:12px;padding:12px;border-radius:10px;text-decoration:none;color:var(--am-text)}
.am-mega > a:hover,.am-mega > a[aria-current]{background:rgba(255,255,255,.06);color:var(--am-text)}
.am-mega .am-ico{flex:none;width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:rgba(131,196,84,.12);color:var(--am-green);font-size:16px}
.am-mega b{display:block;font-size:14px;font-weight:600;margin-bottom:2px}
.am-mega small{display:block;font-size:12.5px;color:var(--am-muted);line-height:1.4}
.am-mega-foot{grid-column:1/-1;margin-top:6px;padding:12px;border-top:1px solid var(--am-line);display:flex;justify-content:space-between;gap:16px;font-size:13px;color:var(--am-muted)}
.am-mega-foot a{color:var(--am-green);font-weight:600;text-decoration:none;white-space:nowrap}
.am-mega-foot a:hover{color:var(--am-green-hi);text-decoration:underline}

/* --- Actions ------------------------------------------------------------- */
.am-actions{margin-left:auto;display:flex;align-items:center;gap:6px;flex:none}
.am-phone{display:flex;align-items:center;gap:8px;height:40px;padding:0 12px;border-radius:8px;color:var(--am-text);text-decoration:none;font-size:14.5px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}
.am-phone svg{width:16px;height:16px;color:var(--am-green)}
.am-sep{width:1px;height:22px;background:var(--am-line);margin:0 6px}
.am-header .am-login{height:40px;display:flex;align-items:center;padding:0 12px;border-radius:8px;color:var(--am-text);text-decoration:none;font-size:14.5px;font-weight:500;white-space:nowrap}
.am-phone:hover,.am-header .am-login:hover{background:rgba(255,255,255,.07);color:#fff}
.am-cta{height:40px;display:flex;align-items:center;gap:8px;padding:0 18px;margin-left:6px;border-radius:10px;white-space:nowrap;
  background:var(--am-green);color:var(--am-on-green);font-weight:600;font-size:14.5px;text-decoration:none;transition:background .15s}
.am-cta:hover{background:var(--am-green-hi);color:var(--am-on-green)}
.am-cta svg{width:14px;height:14px}

.am-burger,.am-callicon{display:none;width:42px;height:42px;padding:0;border-radius:10px;border:1px solid var(--am-line);background:none;color:var(--am-text);place-items:center;cursor:pointer;text-decoration:none}
.am-burger svg,.am-callicon svg{width:20px;height:20px}
.am-callicon svg{color:var(--am-green)}
.am-burger:hover,.am-callicon:hover{background:rgba(255,255,255,.07);color:var(--am-text)}

/* --- Mobile drawer ------------------------------------------------------- */
.am-drawer{position:fixed;inset:var(--am-h) 0 0 0;z-index:999;background:var(--am-drawer);color:var(--am-text);font-family:var(--am-font);
  padding:20px 20px 28px;overflow:auto;overscroll-behavior:contain;display:none;flex-direction:column;gap:4px}
.am-drawer.is-open{display:flex}
.am-drawer details{border-bottom:1px solid var(--am-line)}
.am-drawer summary,.am-drawer > a.am-row{list-style:none;display:flex;justify-content:space-between;align-items:center;padding:16px 4px;font-size:17px;font-weight:500;color:inherit;text-decoration:none;cursor:pointer;border-bottom:1px solid var(--am-line)}
.am-drawer details summary{border-bottom:0}
.am-drawer summary::-webkit-details-marker{display:none}
.am-drawer details a{display:block;padding:10px 4px 10px 14px;color:var(--am-muted);text-decoration:none;font-size:15px}
.am-drawer a[aria-current]{color:#fff}
.am-drawer details[open] .am-caret{transform:rotate(180deg)}
.am-drawer-bottom{margin-top:auto;padding-top:24px;display:grid;gap:10px}
.am-drawer-call,.am-drawer-demo{display:flex;justify-content:center;align-items:center;gap:10px;height:50px;border-radius:12px;text-decoration:none;font-weight:600;font-size:16px}
.am-drawer-call{border:1px solid var(--am-line);color:var(--am-text)}
.am-drawer-call svg{width:18px;height:18px;color:var(--am-green)}
.am-drawer-demo{background:var(--am-green);color:var(--am-on-green)}
.am-drawer-call:hover{color:var(--am-text)}
.am-drawer-demo:hover{color:var(--am-on-green);background:var(--am-green-hi)}
.am-drawer-account{display:flex;justify-content:center;gap:8px}
.am-drawer-account .am-login{display:flex;align-items:center;height:40px;padding:0 12px;color:var(--am-muted);text-decoration:none;font-weight:600;font-size:16px}

@media (max-width:1180px){ .am-phone span{display:none} .am-phone{padding:0 10px} }
@media (max-width:1020px){
  .am-header nav,.am-sep,.am-header .am-login,.am-phone{display:none}
  .am-burger,.am-callicon{display:grid}
  .am-cta{padding:0 14px}
  .am-wrap{gap:12px;padding:0 16px}
}
@media (min-width:1021px){ .am-drawer{display:none!important} }
@media (max-width:420px){ .am-cta{display:none} }
@media (prefers-reduced-motion:reduce){ .am-header,.am-mega,.am-caret,.am-cta{transition:none} }

/* ==========================================================================
   Login modal (moved from mod_toms_login/tmpl/login_standard.php inline <style>,
   see html/mod_toms_login/login_standard.php). Colours were the customisation
   login button / hover colours at the time of the move.
   ========================================================================== */
#toms-login-modal h3{text-align:start;font-size:28px;font-weight:300;margin-top:0;margin-bottom:26px;line-height:40px;color:#333;text-transform:uppercase}
#toms-login-modal input[type=text],
#toms-login-modal input[type=password]{width:100%!important;height:54px!important}
label[for=toms-login-remember]{display:inline-block}
#toms-login-modal #toms-login-remember{margin-top:0!important}
#toms-login-modal .toms-submit,.toms-custom-btn{width:100%;padding:16px 22px;background-color:#46b277;color:#fff;background-repeat:repeat-x;border:none;border-radius:4px}
#toms-login-modal .toms-submit:hover,.toms-custom-btn:hover{background-color:#8fd0ac}
#toms-login a{text-decoration:none}
.toms-custom-btn{padding:6px 22px}

/* ==========================================================================
   reCAPTCHA: the badge overlapped the shell's Next button. Google allows hiding
   it (visibility, not display) when the text disclosure (.am-recaptcha-note) is
   shown near the form - see mod_ammonite_chatbot.
   ========================================================================== */
.grecaptcha-badge{visibility:hidden}
.am-recaptcha-note{margin:12px 0 0;font-size:12px;line-height:1.5;color:#6c7a80}
.am-recaptcha-note a{color:inherit;text-decoration:underline}
