/* ==========================================================================
   Base: tokens, reset, header, mobile drawer, footer, reveal animation
   Breakpoints: 992px = mobile layout (drawer nav, stacked columns), 768px = small type/spacing
   ========================================================================== */

:root {
  --ff-base: "Open Sans", Helvetica, Arial, Verdana, sans-serif;
  --ff-arial: arial;
  --ff-nav: arial, Helvetica, Arial, Verdana, sans-serif;
  --ff-serif: "Times New Roman", Times, serif;
  --c-text: #000;
  --c-body: #8d9095;
  --c-accent: #6d6461;
  --c-accent-hover: #8a8380;
  --c-hover: #9a8278;
  --c-line: #ddd;
  --c-gray: #f5f5f5;
  --header-h: 80px;
  --drawer-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--c-body);
  font: 400 16px/normal var(--ff-base);
}

img { max-width: 100%; border: 0; vertical-align: top; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; font: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- Desktop header ---------- */

.site-header {
  height: calc(var(--header-h) + 1px);
  background: #fff;
  border-bottom: 1px solid var(--c-line);
}
.site-header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 40px;
}
.logo { display: block; margin-left: 20px; }
.logo img { display: block; width: 150px; height: 28px; position: relative; top: -2px; }

.gnav { display: flex; }
.gnav > li { position: relative; margin: 0 20px; }
.gnav > li > a {
  display: block;
  padding: 2px 0 3px;
  border: 1px solid transparent;
  color: #000;
  font-family: var(--ff-nav);
  line-height: 24px;
  white-space: nowrap;
  transition: color .2s;
}
.gnav > li:hover > a { color: var(--c-hover); }

.gnav__sub {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 200;
  padding-top: 7px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.gnav > li:hover > .gnav__sub { opacity: 1; visibility: visible; }
.gnav__sub ul { min-width: 200px; background: #fff; border: 1px solid var(--c-line); }
.gnav__sub a {
  display: block;
  padding: 12px 0 12px 12px;
  color: #888;
  line-height: 24px;
  white-space: nowrap;
  transition: color .2s;
}
.gnav__sub li { border-bottom: 1px solid transparent; }
.gnav__sub a:hover { color: var(--c-hover); }

/* ---------- Mobile bar + drawer ---------- */

.m-bar, .drawer, .drawer-film { display: none; }

.page-body { min-height: 100px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--c-line); color: #000; }
.site-footer__in { padding: 0 40px; }
.site-footer__cols { display: flex; padding-top: 82px; }
.site-footer__col { width: 33.3333%; padding: 0 20px; }
.site-footer__title { margin-bottom: 14px; color: #000; font: 700 22px var(--ff-arial); }
.site-footer__col a { display: block; color: #000; font: 400 14px var(--ff-arial); }
.site-footer__col li { padding: 4px 0; }
.site-footer__copy { padding: 68px 20px 80px; color: #000; font: 400 14px var(--ff-arial); }

/* ---------- Scroll reveal (see js/site.js) ---------- */

.reveal { visibility: hidden; }
.reveal.is-in { visibility: visible; animation: fade-in-up 1s backwards; }

@keyframes fade-in-up {
  from { opacity: 0; transform: translate3d(0, 100%, 0); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Mobile layout (<= 992px) ---------- */

@media (max-width: 992px) {
  .site-header { display: none; }
  body { padding-top: 60px; }

  .m-bar {
    display: block;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9300;
    height: 61px;
    background: #fff;
  }
  .m-bar__logo { position: absolute; top: 15px; left: 50%; width: 100px; transform: translateX(-50%); }
  .m-bar__logo img { display: block; width: 100px; height: auto; }
  .m-bar__btn { position: absolute; top: 9px; left: 8px; width: 45px; height: 42px; }
  .m-bar__btn svg { display: block; margin: 1px 0 0 15px; }

  .drawer-film {
    display: block;
    position: fixed; inset: 0;
    z-index: 9400;
    background: rgb(29, 30, 31);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease-in-out, visibility .2s;
  }
  .drawer {
    display: block;
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 9401;
    width: var(--drawer-w);
    background: #fff;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .2s ease-in-out;
  }
  .drawer-open .drawer-film { opacity: .3; visibility: visible; }
  .drawer-open .drawer { transform: none; }

  .drawer li { position: relative; }
  .drawer a {
    display: block;
    padding: 20px 20px 24px;
    height: 60px;
    color: #000;
    line-height: 16px;
    transition: color .2s;
  }
  .drawer__toggle {
    position: absolute; top: 0; right: 0;
    width: 50px; height: 60px;
  }
  .drawer__toggle::before, .drawer__toggle::after {
    content: ""; position: absolute; top: 28px; right: 16px;
    width: 12px; height: 1px; background: #777;
    transition: transform .2s;
  }
  .drawer__toggle::after { transform: rotate(90deg); }
  .drawer .is-open > .drawer__toggle::after { transform: none; }
  .drawer .is-open > a { padding-left: 23px; color: var(--c-hover); }
  .drawer__sub { display: none; }
  .drawer .is-open > .drawer__sub { display: block; }
  .drawer__sub a { padding-left: 40px; }
}

@media (max-width: 992px) {
  .site-footer__in { padding: 0 6px; }
  .site-footer__cols { display: block; padding-top: 90px; }
  .site-footer__col { width: auto; padding: 0 20px; }
  .site-footer__col + .site-footer__col { margin-top: 46px; }
  .site-footer__title { font-size: 16px; }
}

/* Footer variant used by product pages (plain list spacing) */
.site-footer--plain { border-top-color: #d6d6d6; }
.site-footer--plain .site-footer__cols { padding-top: 80px; }
.site-footer--plain .site-footer__title { margin-bottom: 10px; }
.site-footer--plain li { padding: 0; }
.site-footer--plain .site-footer__copy { padding-top: 62px; }
@media (max-width: 992px) {
  .site-footer--plain .site-footer__cols { padding-top: 80px; }
  .site-footer--plain .site-footer__col + .site-footer__col { margin-top: 40px; }
}
