/* Fonts (self-hosted Lato) */
@font-face {
  font-family: "Lato";
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/lato-400-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lato";
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/lato-400-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;
}
@font-face {
  font-family: "Lato";
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/lato-700-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Lato";
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/lato-700-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;
}
@font-face {
  font-family: "Montserrat";
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/montserrat-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat";
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/montserrat-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;
}

/* Tokens */
:root {
  --accent: #e96656;
  --accent-dark: #cb4332;
  --text: #808080;
  --text-dark: #404040;
  --footer-bg: #272727;
  --footer-bar-bg: #171717;
  --nav-height: 76px;
  --font-heading: "Montserrat", Helvetica, Arial, sans-serif;
  --bg-image: url("../assets/accounting-banking-calculator-938965.jpg");
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: var(--nav-height);
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Lato", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 25px;
  text-align: center;
  background: #fff;
}

h1, h2, h3, p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Hero (also carries the fixed background image reused by the contact section) */
.hero {
  position: relative;
  background: var(--bg-image) center / cover fixed no-repeat;
}

.hero__overlay {
  padding: 285px 0 210px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 5px 11px 0 rgba(50, 50, 50, 0.08);
}

.hero__title {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 55px;
  font-weight: 700;
  line-height: 65px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

/* Navigation */
.nav {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  min-height: var(--nav-height);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-height);
}

.nav__brand img {
  display: block;
  width: auto;
  height: 47px;
}

.nav__menu {
  display: flex;
  gap: 20px;
}

.nav__menu a {
  position: relative;
  display: block;
  color: var(--text-dark);
  font-size: 16px;
  line-height: 35px;
  transition: color 0.2s ease-in-out;
}

.nav__menu a:hover,
.nav__menu a:focus-visible,
.nav__menu a.is-current {
  color: var(--accent);
}

.nav__menu a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 12.5%;
  width: 75%;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.nav__menu a.is-current::before {
  opacity: 1;
}

.nav__toggle {
  display: none;
  width: 40px;
  height: 34px;
  padding: 7px 9px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.nav__toggle:hover,
.nav__toggle:focus-visible {
  background: var(--accent);
}

.nav__bar {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: #888;
}

.nav__toggle:hover .nav__bar,
.nav__toggle:focus-visible .nav__bar {
  background: #fff;
}

/* Sections */
.section {
  padding: 100px 0;
}

.section__header {
  padding-bottom: 75px;
}

.section__title {
  display: inline-block;
  margin-top: 15px;
  padding-bottom: 10px;
  color: var(--text-dark);
  font-family: var(--font-heading);
  font-size: 45px;
  font-weight: 700;
  line-height: 40px;
  text-transform: uppercase;
}

.section__title--light {
  color: #fff;
}

.section__legend {
  max-width: 720px;
  margin: 0 auto;
  color: #000;
  font-size: 16px;
}

.section__legend--light {
  color: #fff;
}

/* Focus */
.focus,
.stack {
  overflow: hidden;
}

.stack {
  padding: 80px 0 55px;
}

.focus__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.focus__grid--five {
  grid-template-columns: repeat(5, 1fr);
}

.focus-box {
  --box-color: var(--accent);
  padding: 0 15px;
  margin-bottom: 25px;
}

.focus-box p {
  line-height: 21px;
}

.focus-box:nth-child(4n + 2) { --box-color: #34d293; }
.focus-box:nth-child(4n + 3) { --box-color: #3ab0e2; }
.focus-box:nth-child(4n + 4) { --box-color: #f7d861; }

/* Slide-in on scroll; main.js adds .reveal, then .is-visible. */
.reveal {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 1s ease-in-out 0.15s, transform 1s ease-in-out 0.15s;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.focus-box__icon {
  width: 145px;
  height: 145px;
  margin: 0 auto 20px;
  border: 10px solid #ececec;
  border-radius: 50%;
  background: #fff;
  transition: border-color 0.35s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.focus-box__icon img {
  width: 63px;
  height: 63px;
}

.focus-box:hover .focus-box__icon,
.focus-box__icon:focus-within {
  border-color: var(--box-color);
}

.focus-box__title {
  position: relative;
  display: inline-block;
  margin-bottom: 30px;
  color: var(--text-dark);
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
}

.focus-box__title::before {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 12.5%;
  width: 75%;
  height: 2px;
  background: var(--box-color);
}

/* Toolbox: logo badges ring in their brand colour on hover. */
.stack .section__header {
  padding-bottom: 50px;
}

.stack .focus-box__icon {
  width: 120px;
  height: 120px;
  border-width: 8px;
}

.stack .focus-box__icon img {
  width: auto;
  height: 50px;
}

.stack .focus-box__title {
  margin-bottom: 25px;
}

/* Approach: four steps on a light band, one accent colour only. */
.approach {
  overflow: hidden;
  background: #f7f7f7;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.step {
  position: relative;
  padding-top: 24px;
}

/* The rule is a pseudo-element so its transition doesn't override .reveal's. */
.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #dcdcdc;
  transition: background-color 0.35s ease-in-out;
}

.step:hover::before {
  background: var(--accent);
}

.step:nth-child(2).reveal { transition-delay: 0.3s; }
.step:nth-child(3).reveal { transition-delay: 0.45s; }
.step:nth-child(4).reveal { transition-delay: 0.6s; }

.step__num {
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-family: var(--font-heading);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
}

.step__title {
  margin-bottom: 10px;
  color: var(--text-dark);
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  transition: color 0.35s ease-in-out;
}

.step:hover .step__title {
  color: var(--accent);
}

.step p {
  padding-right: 20px;
  line-height: 21px;
}

.section__note {
  position: relative;
  max-width: 840px;
  margin: 70px auto 0;
  padding-top: 40px;
  color: var(--text-dark);
  font-family: var(--font-heading);
  font-size: 28px;
  line-height: 40px;
}

.section__note::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 60px;
  height: 2px;
  margin-left: -30px;
  background: var(--accent);
}

.section__note strong {
  color: var(--accent);
  font-weight: 700;
}

/* Contact */
.contact {
  padding-bottom: 95px;
  background:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    var(--bg-image) center / cover fixed no-repeat;
}

.contact__mail {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 40px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background 0.3s ease-in-out;
}

.contact__mail:hover,
.contact__mail:focus-visible {
  background: var(--accent-dark);
}

/* Footer */
.footer {
  color: #939393;
  background: var(--footer-bg);
  font-size: 0.7em;
  line-height: 20px;
}

.footer__inner {
  padding-top: 50px;
  padding-bottom: 30px;
}

.footer__inner strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.15em;
}

.footer__bar {
  padding: 30px 0;
  background: var(--footer-bar-bg);
}

/* Responsive */
@media (max-width: 991px) {
  .focus__grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 50px;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 16px;
    text-align: center;
  }

  .step p {
    padding: 0 10px;
  }
}

@media (max-width: 767px) {
  .nav {
    position: relative;
  }

  .hero {
    background-attachment: scroll;
  }

  .contact {
    background-attachment: scroll;
  }

  .hero__overlay {
    padding: 30% 0 25%;
  }

  .hero__title {
    font-size: 35px;
    line-height: 45px;
  }

  .nav__inner {
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .nav__toggle {
    display: block;
  }

  .nav__menu {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin-top: 10px;
  }

  .nav__menu.is-open {
    display: flex;
  }

  .nav__menu li {
    padding: 8px 0;
    border-bottom: 1px solid #ededed;
  }

  .nav__menu a {
    text-align: left;
  }

  .nav__menu a::before {
    display: none;
  }

  .section {
    padding: 60px 0;
  }

  .section__header {
    padding-bottom: 15px;
  }

  .section__title {
    font-size: 35px;
    line-height: 1.2;
  }

  .focus__grid {
    grid-template-columns: 1fr;
    row-gap: 40px;
  }

  .steps {
    grid-template-columns: 1fr;
    row-gap: 30px;
  }

  .step p {
    max-width: 420px;
    margin: 0 auto;
  }

  .section__note {
    margin-top: 40px;
    padding-top: 30px;
    font-size: 21px;
    line-height: 31px;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .contact {
    padding-bottom: 60px;
  }

  .contact__mail {
    padding: 14px 24px;
    font-size: 18px;
  }

  .footer__inner {
    padding-top: 30px;
  }
}

/* Colour fades stay; only the slide-in is dropped (the anchor scroll is skipped in main.js). */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
