/* dbthomaslaw.nz
 *
 * Replaces the Bootstrap 3 + "fh5co" theme stack the Micronaut app served
 * (bootstrap.css, style.css, animate.css, icomoon.css, flexslider.css,
 * magnific-popup.css and two owl-carousel sheets — 288 KB in total).
 *
 * The design is deliberately unchanged: the values below are the ones the old
 * style.css used, so the site should look the same. What is gone is the grid
 * framework, the icon font, and every rule for components this site never had
 * (modals, dropdowns, tabs, carousels, counters, popups). No JavaScript is
 * required to render any of it.
 */

/* ---------------------------------------------------------------- font ---- */

@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/work-sans-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/work-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/work-sans-latin.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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --accent: #f95959;
  --accent-alt: #007cb9; /* card icon on hover, from the old .services:hover */

  --ink: #000;
  --body-text: #828282;
  --nav-link: rgba(0, 0, 0, 0.7);
  --footer-link: rgba(0, 0, 0, 0.5);

  --band: rgba(0, 0, 0, 0.05);
  --footer-bg: #efefef;
  --hero-scrim: rgba(0, 0, 0, 0.4);

  --font: "Work Sans", Arial, Helvetica, sans-serif;

  --shell: 1170px; /* Bootstrap's .container at its widest */
  --gutter: 15px;
  --section-y: 5em;
  --radius: 4px;
}

/* ---------------------------------------------------------------- base ---- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

.pure-g [class*="pure-u"] {
  font-family: var(--font);
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.7;
  color: var(--body-text);
  background: #fff;
}

h1,
h2,
h3,
h4,
h5,
h6,
figure {
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  margin: 0 0 20px;
}

p {
  margin: 0 0 20px;
}

ul,
ol {
  margin: 0 0 20px;
  padding-left: 20px;
}

a {
  color: var(--accent);
  transition: 0.5s;
}

a:hover,
a:focus,
a:active {
  color: var(--accent);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

::selection {
  color: #fff;
  background: var(--accent);
}

/* The go-to-top link used to be animated by jQuery easing. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* htmx swaps #main with `transition:true`, which uses the View Transition API. That does
   not honour prefers-reduced-motion on its own, so opt out explicitly — the swap still
   happens, just without the cross-fade. */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 10px 20px;
  background: #fff;
  color: var(--ink);
}

.skip-link:focus {
  left: 0;
}

/* ----------------------------------------------------------------- nav ---- */

.nav {
  padding: 18px 0;
}

.nav__shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav__shell nav,
.nav .pure-menu-horizontal {
  width: auto;
}

.nav__logo {
  display: block;
  flex: none;
}

.nav__logo img {
  display: block;
}

.pure-menu-horizontal .nav__links,
.nav__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__links .pure-menu-link,
.nav__links a {
  position: relative;
  display: block;
  padding: 5px 0;
  font-size: 15px;
  color: var(--nav-link);
  background: transparent;
}

.nav__links .pure-menu-link:hover,
.nav__links .pure-menu-link:focus,
.nav__links a:hover,
.nav__links a:focus {
  color: var(--ink);
  background: transparent;
}

/* Was `.fh5co-nav ul li.active > a` plus a 20x2px ::after bar. */
.nav__links .pure-menu-link[aria-current="page"],
.nav__links a[aria-current="page"] {
  color: var(--ink);
}

.nav__links .pure-menu-link[aria-current="page"]::after,
.nav__links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 20px;
  height: 2px;
  background: var(--accent);
}

@media screen and (max-width: 768px) {
  /* The theme hid the menu here and had JavaScript build an off-canvas drawer,
     which meant no navigation at all without it. Three links wrap fine. */
  .nav__shell {
    flex-direction: column;
    gap: 15px;
  }

  .pure-menu-horizontal .nav__links,
  .nav__links {
    justify-content: center;
  }
}

/* ---------------------------------------------------------------- hero ---- */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 40px 0;
  text-align: center;
  background-color: #333;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

/* Was `.slides li:after`. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-scrim);
}

.hero__inner {
  position: relative; /* above the scrim */
  z-index: 1;
  width: 100%;
}

.hero__title {
  margin: 0 0 20px;
  font-size: 50px;
  line-height: 1.3;
  font-weight: 300;
  color: #fff;
}

.hero__tagline {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 500;
  color: #fff;
}

@media screen and (max-width: 768px) {
  .hero__title {
    font-size: 30px;
  }
}

.badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

@media screen and (max-width: 480px) {
  .badges {
    gap: 10px;
  }
}

.badge-image {
  display: block;
  flex: 0 1 288px;
  width: 100%;
  max-width: 288px;
  height: auto;
  min-width: 0;
}

/* ------------------------------------------------------------- section ---- */

.section {
  padding: 2.5em 0;
  background: var(--band);
}

@media screen and (max-width: 768px) {
  .section {
    padding: 1.5em 0;
  }
}

/* Was `.services`: a white card. */
.card {
  position: relative;
  padding: 30px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.06);
  transition: 0.3s;
}

.card:hover {
  box-shadow: 0 14px 30px -15px rgba(0, 0, 0, 0.75);
}

/* The portrait on the About page, was Bootstrap's `.pull-right`. */
.portrait {
  float: right;
  margin: 40px;
}

@media screen and (max-width: 768px) {
  .portrait {
    float: none;
    margin: 0 auto 20px;
  }
}

/* -------------------------------------------------------------- footer ---- */

.footer {
  padding: 1.25em 0 var(--section-y);
  background: var(--footer-bg);
}

@media screen and (max-width: 768px) {
  .footer {
    padding: 0.75em 0 3em;
  }
}

/* Four columns, indented by one column to match the old
   `col-md-push-1` offset the theme applied to each. */
.footer__columns {
  padding-left: 8.33%;
}

.footer__columns > [class*="pure-u"] {
  box-sizing: border-box;
  padding: 0 15px 20px;
}

.footer h2 {
  margin-bottom: 20px;
  font-size: 18px;
}

.footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer .pure-menu-link,
.footer a {
  padding: 0;
  color: var(--footer-link);
  background: transparent;
  line-height: inherit;
  display: inline;
}

.footer .pure-menu-link:hover,
.footer .pure-menu-link:focus,
.footer a:hover,
.footer a:focus {
  color: var(--footer-link);
  text-decoration: underline;
  background: transparent;
}

@media screen and (max-width: 992px) {
  .footer__columns {
    padding-left: 0;
  }
}

/* ------------------------------------------------------------- gototop ---- */

/* The theme faded this in past 200px of scroll and animated the jump with
   jQuery easing. `scroll-behavior: smooth` covers the animation; the button is
   simply always present. */
.gototop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius);
}

.gototop:hover,
.gototop:focus {
  color: #fff;
  background: rgba(0, 0, 0, 0.7);
}

.gototop svg {
  width: 22px;
  height: 22px;
}
