/* Trubuff landing page (buffalo logo). Generated from the approved design. */
/* Animations used in the page: gradient ribbon, moving routes, floating circles */
    body{margin:0;background:#FBF8F3}
    a{color:#1E1E22}a:hover{color:#F4462B}
    @keyframes tbFlow{0%{background-position:0% 50%}100%{background-position:100% 50%}}
    @keyframes tbRoute{to{stroke-dashoffset:-48}}
    @keyframes tbFloatA{0%,100%{transform:translate(0,0)}50%{transform:translate(0,-8px)}}
    @keyframes tbFloatB{0%,100%{transform:translate(0,0)}50%{transform:translate(5px,-6px)}}
    @keyframes tbFloatC{0%,100%{transform:translate(0,0)}50%{transform:translate(-5px,-7px)}}
    @media (prefers-reduced-motion:reduce){.tb-anim{animation:none!important}}

    html { scroll-behavior: smooth; }
    a:focus-visible, button:focus-visible { outline: 2px solid #F4462B; outline-offset: 3px; border-radius: 8px; }
    [id] { scroll-margin-top: 80px; }

    /* ---------- Loader: the ball drops to the bottom of the bar and bounces ---------- */
    .loader { position: fixed; inset: 0; z-index: 100; background: #FBF8F3; display: flex; align-items: center; justify-content: center;
              transition: opacity .45s ease, visibility .45s ease; }
    .loader.done { opacity: 0; visibility: hidden; }
    
    /* falls with gravity (speeds up), then rises and slows, like a real bounce */
    .loader-stage { display: flex; flex-direction: column; align-items: center; gap: 6px; }
    .loader-buff { animation: tbTrot .5s ease-in-out infinite alternate; }
    @keyframes tbTrot { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-6px) rotate(-2deg); } }
    .loader-ground { width: 190px; height: 3px; border-radius: 3px; background: repeating-linear-gradient(90deg, #D9D2C7 0 14px, transparent 14px 24px);
                     background-size: 24px 3px; animation: tbGround .5s linear infinite; }
    @keyframes tbGround { to { background-position: 24px 0; } }  /* ground runs back under the buffalo */
    @media (prefers-reduced-motion: reduce) { .loader { display: none; } html { scroll-behavior: auto; } }

    /* ---------- Products dropdown and phone menu ---------- */
    .menu-btn { display: none; width: 44px; height: 44px; margin-right: -10px; border: 0; background: none; color: #1E1E22; cursor: pointer; align-items: center; justify-content: center; }
    .menu-icon { position: relative; width: 22px; height: 12px; display: block; }
    .menu-icon span { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease, top .25s ease; }
    .menu-icon span:first-child { top: 0; }
    .menu-icon span:last-child { top: 10px; }
    .nav.open .menu-icon span:first-child { top: 5px; transform: rotate(45deg); }
    .nav.open .menu-icon span:last-child { top: 5px; transform: rotate(-45deg); }
    .nav-drop[aria-expanded="true"] { background: #EFEAE2 !important; }
    .nav-drop svg { transition: transform .2s ease; }
    .nav-drop[aria-expanded="true"] svg { transform: rotate(180deg); }

    @media (max-width: 760px) {
      .menu-btn { display: inline-flex; }
      .nav { padding-top: 12px !important; padding-bottom: 12px !important; }
      .nav-links { display: none !important; width: 100%; flex-direction: column; align-items: stretch !important; gap: 0 !important; padding: 8px 0 28px; font-size: 22px !important; }
      .nav.open .nav-links { display: flex !important; }
      .nav-links > a, .nav-links > .nav-drop { width: 100%; justify-content: space-between; padding: 18px 0 !important; border-radius: 0 !important; border-bottom: 1px solid #E8E2D8; margin: 0 !important; min-height: 60px; display: flex; align-items: center; }
      .nav-links > a, .nav-links > .nav-drop { box-sizing: border-box; }
      .nav-links > .nav-drop[aria-expanded="true"] { background: none !important; }
      .nav-links > a:last-child { margin-top: 24px !important; justify-content: center; border: 0; border-radius: 999px !important; font-size: 17px; padding: 14px !important; min-height: 52px; }
      .nav-links .drop-panel, .nav-links .drop-panel > div, .nav-links .drop-tiles { width: 100%; min-width: 0; box-sizing: border-box; }
      .site-header:has(.nav.open) { position: fixed !important; inset: 0; height: 100dvh; overflow-y: auto; background: #FBF8F3 !important; }
      html.menu-open { overflow: hidden; }
      .nav-links .drop-panel { border: 0 !important; box-shadow: none !important; background: none !important; border-bottom: 1px solid #E8E2D8 !important; }
      .nav-links .drop-panel > div { padding: 4px 0 18px !important; }
      .drop-tiles { grid-auto-columns: 86% !important; }
      .nav-links .drop-tiles a { font-size: 15px; }
      .hero-row { padding-top: 56px !important; padding-bottom: 64px !important; }
    }

    /* ---------- Hover and motion polish ---------- */
    :root { --ease: cubic-bezier(.2, .8, .2, 1); --accent: #F4462B; }
    .site-header { transition: box-shadow .3s var(--ease), background-color .3s var(--ease); }
    .site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(30, 30, 34, .35); background: rgba(251, 248, 243, .97) !important; }
    .logo .buff-body, .logo .bar-ball { transform-box: fill-box; transition: transform .45s var(--ease); }
    .logo .buff-body { transform-origin: 70% 90%; }
    .logo:hover .buff-body { transform: translateX(-3px) rotate(-6deg); }      /* buffalo lowers its head to charge */
    .logo:hover .bar-ball { transform: translateY(-30px); }                    /* ball rolls to the top of the bar */
    .nav-link { position: relative; }
    .nav-link::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 6px; height: 2px; border-radius: 2px;
                       background: #F4462B; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
    .nav-link:hover { color: #1E1E22 !important; }
    .nav-link:hover::after { transform: scaleX(1); }
    .btn { transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease); }
    .btn:hover { transform: translateY(-2px); }
    .btn-red:hover { box-shadow: 0 14px 28px -12px rgba(244, 70, 43, .55); background: #D93619 !important; color: #FFFFFF !important; }
    .btn-dark:hover { box-shadow: 0 14px 28px -14px rgba(30, 30, 34, .6); color: #FBF8F3 !important; }
    .btn-light:hover { box-shadow: 0 12px 24px -14px rgba(30, 30, 34, .35); border-color: #1E1E22 !important; color: #1E1E22 !important; }
    .btn:active { transform: translateY(0); }
    .arrow { display: inline-block; transition: transform .25s var(--ease); }
    .btn:hover .arrow, .card-link:hover .arrow, .card:hover .card-link .arrow { transform: translateX(4px); }
    .card { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease); }
    .card:hover { transform: translateY(-6px); border-color: #D9D2C7 !important; box-shadow: 0 28px 50px -28px rgba(30, 30, 34, .35); }
    .card-art { transition: transform .6s var(--ease); transform-origin: center; }
    .card:hover .card-art { transform: scale(1.04); }
    .card-link:hover { color: #F4462B !important; }
    .tile { transition: transform .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease); }
    .tile:hover { transform: translateY(-3px); border-color: #1E1E22 !important; background: #FFFFFF !important; color: #1E1E22 !important; }
    .service { transition: background-color .3s var(--ease); }
    .service svg { transition: transform .35s var(--ease); }
    .service:hover { background: #FDF9F4 !important; }
    .service:hover svg { transform: translateY(-3px) scale(1.08); }
    .node circle { transition: stroke .25s var(--ease), stroke-width .25s var(--ease); }
    .node:hover circle:last-of-type { stroke: #F4462B; stroke-width: 2.5; }

    /* ---------- Principles: a road that draws itself as you scroll ---------- */
    .road-section { background: #1E1E22; color: #FBF8F3; }
    .road-wrap { max-width: 1200px; margin: 0 auto; padding: 96px 24px 104px; }
    .road-head { display: flex; flex-direction: column; gap: 14px; max-width: 620px; }
    .road-eyebrow { margin: 0; font-size: 14px; font-weight: 600; color: #F4462B; }
    .road-head h2 { margin: 0; font-family: Unbounded, sans-serif; font-weight: 500; font-size: clamp(30px, 3.8vw, 46px); letter-spacing: -0.04em; line-height: 1.08; }
    .road-lead { margin: 0; font-size: 18px; line-height: 1.6; color: #B5B0A8; }
    .road { position: relative; height: 1040px; margin-top: 48px; }
    .road-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
    .road-svg path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
    .road-base { stroke: #2E2E34; stroke-width: 38; }
    .road-dash { stroke: #55555E; stroke-width: 2; stroke-dasharray: 10 12; }
    .road-progress { stroke: #F4462B; stroke-width: 4; }
    .road-line { display: none; }
    .traveller { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; transform: translate(50%, 0); will-change: transform; }
    .traveller .buff { --eye: #FFFFFF; filter: drop-shadow(0 6px 8px rgba(30, 30, 34, .18)); }
    .traveller-ball { display: block; width: 22px; height: 22px; border-radius: 50%; background: #F4462B; border: 4px solid #FFFFFF;
                      box-shadow: 0 6px 14px -4px rgba(244, 70, 43, .6); }
    .stop { position: absolute; top: var(--at); left: 0; right: 0; height: 0; }
    .stop-dot { position: absolute; top: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
                background: #F4462B; border: 4px solid #1E1E22; box-sizing: border-box;
                transition: transform .4s var(--ease), background-color .4s var(--ease); }
    .stop-left .stop-dot { left: 38%; }
    .stop-right .stop-dot { left: 62%; }
    .stop-card { position: absolute; top: 0; width: min(380px, 34%); transform: translateY(-50%); background: #26262B;
                 border: 1px solid #34343A; border-radius: 18px; padding: 24px 26px; box-sizing: border-box;
                 display: flex; flex-direction: column; gap: 8px; transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .3s; }
    .stop-left .stop-card { right: calc(62% + 40px); }
    .stop-right .stop-card { left: calc(62% + 40px); }
    .stop-card:hover { border-color: #F4462B; }
    .stop-num { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: .14em; color: #F4462B; }
    .stop-card h3 { margin: 0; font-size: 21px; font-weight: 700; color: #FBF8F3; }
    .stop-card p { margin: 0; font-size: 15.5px; line-height: 1.6; color: #B5B0A8; }
    /* Only hide the stops when the script is running, so the page reads fine without it */
    .js-road .stop-card { opacity: 0; }
    .js-road .stop-left .stop-card { transform: translate(-28px, -50%); }
    .js-road .stop-right .stop-card { transform: translate(28px, -50%); }
    .js-road .stop .stop-dot { transform: scale(.55); background: #D9D2C7; }
    .js-road .stop.in .stop-card { opacity: 1; transform: translateY(-50%); }
    .js-road .stop.in .stop-dot { transform: scale(1); background: #F4462B; }

    @media (max-width: 760px) {
      .road { height: auto; display: flex; flex-direction: column; gap: 22px; padding: 8px 0 8px 52px; }
      .road-svg { display: none; }
      .road-line { display: block; position: absolute; left: 15px; top: 0; bottom: 0; width: 12px; border-radius: 12px; background: #2E2E34; }
      .road-fill { display: block; width: 4px; margin: 0 auto; height: 100%; border-radius: 4px; background: #F4462B; }
      .stop { position: relative; top: auto; height: auto; }
      .stop-left .stop-dot, .stop-right .stop-dot { left: -31px; top: 28px; }
      .stop-card, .stop-left .stop-card, .stop-right .stop-card { position: relative; width: auto; left: auto; right: auto; transform: none; }
      .js-road .stop-left .stop-card, .js-road .stop-right .stop-card { transform: translateY(18px); }
      .js-road .stop.in .stop-card { transform: none; }
    }

    @media (prefers-reduced-motion: reduce) {
      .btn, .card, .tile, .arrow, .card-art, .service svg, .logo .buff-body, .logo .bar-ball, .stop-card, .stop-dot { transition: none !important; }
      .btn:hover, .card:hover, .tile:hover, .card:hover .card-art, .logo:hover .buff-body, .logo:hover .bar-ball { transform: none !important; }
    }
    @media (hover: none) { .card:hover, .btn:hover, .tile:hover { transform: none; } }

/* ---- WordPress additions ---- */
.admin-bar .site-header { top: 32px !important; }
@media screen and (max-width: 782px) { .admin-bar .site-header { top: 46px !important; } }
@media screen and (max-width: 600px) { .admin-bar .site-header { top: 0 !important; } }
.tb-email { text-decoration: none; transition: background-color .2s ease, transform .2s ease; }
.tb-email:hover, .tb-email:focus-visible { background: #D93619 !important; color: #FFFFFF !important; transform: translateY(-1px); }
.tb-email-missing { text-decoration: none; }
.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; }
