/* ==========================================================================
   Sonex Branding — Global styles
   Reset · base typography · layout · header · footer · shared components
   ========================================================================== */

@import url("../fonts/fonts.css");

/* --------------------------------------------------------------------------
   1. Reset
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background-color: var(--c-black);
  color: var(--c-white);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: var(--fw-bold);
  color: var(--c-white);
  line-height: 1.3;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
textarea,
select {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--c-green-bright);
  outline-offset: 3px;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--c-green);
  color: var(--c-white);
}

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

/* --------------------------------------------------------------------------
   2. Layout helpers
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 10px;
}

/* A 1330-wide row whose own cells carry the 10px gutter instead */
.container--flush {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
}

.section {
  background-color: var(--c-black);
}

/* --------------------------------------------------------------------------
   3. Shared type patterns
   -------------------------------------------------------------------------- */

/* The "// WHO WE ARE" eyebrow. The slashes are green, the words white. */
.eyebrow {
  font-family: var(--f-display);
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
  color: var(--c-white);
  margin: 0;
}

.eyebrow span {
  color: var(--c-green);
}

.section-title {
  font-family: var(--f-display);
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--c-white);
}

.text-center {
  text-align: center;
}

.muted {
  color: var(--c-muted);
}

/* Green call-outs inside body copy ("Sonex Branding", "business.", …) */
.hl {
  color: var(--c-green-brand);
}

.hl--20 { font-size: 20px; font-weight: var(--fw-bold); }
.hl--25 { font-size: 25px; font-weight: var(--fw-bold); }
.hl--27 { font-size: 27px; font-weight: var(--fw-bold); }
.hl--32 { font-size: 32px; }

/* Inverse call-out — white words inside otherwise green display type */
.hl-white {
  color: var(--c-white);
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--f-display);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  line-height: 1;
  color: var(--c-white);
  background-color: var(--c-green);
  padding: 12px 24px;
  border-radius: 3px;
  text-align: center;
  transition: background-color var(--t-fast), color var(--t-fast),
              border-color var(--t-fast);
}

.btn:hover {
  background-color: var(--c-green-hover);
}

/* Outlined black pill used in the header */
.btn--outline {
  background-color: var(--c-black);
  font-size: var(--fs-btn);
  border: var(--bw-accent) solid var(--c-green);
  border-radius: var(--r-btn);
  padding: 12px 24px;
}

.btn--outline:hover {
  background-color: var(--c-green);
}

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */

.site-header {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--g-header);
  border: medium solid #113D05;
  position: relative;
  z-index: 100;
}

.site-header__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
}

.site-header__brand {
  flex: 0 0 15%;
  padding-inline: 10px;
}

.site-header__brand img {
  width: 212px;
  max-width: 100%;
}

.site-header__nav {
  flex: 0 0 70%;
  display: flex;
  align-items: center;
  padding-left: 167px;
}

.site-header__cta {
  flex: 0 0 15%;
  padding-inline: 10px;
  display: flex;
  justify-content: flex-end;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-menu > li:not(:last-child) {
  margin-right: 2px;
}

.nav-menu a {
  position: relative;
  display: block;
  font-family: var(--f-display);
  font-size: var(--fs-nav);
  font-weight: var(--fw-bold);
  line-height: 19px;
  letter-spacing: 0.1px;
  color: var(--c-white);
  padding: 12px 16px;
}

/* Underline pointer that grows out from the centre on hover, and sits
   permanently under the current page */
.nav-menu a::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background-color: var(--c-btn-accent);
  transform: scaleX(0);
  transition: transform var(--t-fast);
}

.nav-menu a:hover::after,
.nav-menu a:focus::after,
.nav-menu a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-menu a:hover,
.nav-menu a:focus {
  color: var(--c-green-hover);
}

.nav-menu a[aria-current="page"] {
  color: var(--c-green-bright);
}

/* Hamburger — only shown at the tablet breakpoint and below */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--c-white);
  border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}

.nav-toggle span + span {
  margin-top: 5px;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background-color: var(--c-black);
  padding: 70px 0 60px;
}

.site-footer__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  gap: 0;
}

.site-footer__col {
  flex: 0 1 50%;
  min-width: 0;
  padding: 10px;
}

/* Each footer column carries its own padding on the live site */
.site-footer__col--services { padding: 0; }
.site-footer__col--contact  { padding: 1px; }

/* The brand column carries the logo, blurb and social row */
.site-footer__col--brand img {
  width: 72%;
}

.footer-blurb {
  font-family: var(--f-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: 22px;
  color: var(--c-white);
  margin: 20px 0;
}

.site-footer__col--links {
  padding: 0 0 0 40px;
}

.footer-heading {
  font-family: var(--f-body);
  font-size: 29px;
  font-weight: var(--fw-bold);
  line-height: 50px;
  color: var(--c-white);
}

.footer-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-list li:not(:last-child) {
  padding-block-end: 8px;
}

.footer-list li:not(:first-child) {
  margin-block-start: 8px;
}

/* Small green diamond bullet on the Quick Links and Services columns */
.footer-list > li > svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--c-green);
}

.footer-list a,
.footer-list span {
  font-family: var(--f-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: 8px;
  color: var(--c-white);
}

.footer-list a:hover {
  color: var(--c-green);
}

/* Contact column pairs a green icon with each line */
.footer-list--contact li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-list--contact li:not(:last-child) {
  padding-block-end: 8px;
}

.footer-list--contact li:not(:first-child) {
  margin-block-start: 8px;
}

.footer-list--contact a {
  line-height: 11px;
  text-shadow: var(--sh-text);
}

.footer-list--contact svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  fill: var(--c-green);
}

/* Shifted 58px left of the column but keeping its width, so the icons stay
   centred in the offset box exactly as the original renders them */
.social-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  align-items: center;
  margin-left: -58px;
  margin-right: 58px;
}

.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0.4em;
  font-size: 20px;
  background-color: var(--c-black);
  border: var(--bw-accent) solid var(--c-green);
  border-radius: 50%;
  transition: background-color var(--t-fast);
}

.social-row a:hover {
  background-color: var(--c-green);
}

.social-row svg {
  width: 20px;
  height: 20px;
  fill: var(--c-white);
}

/* The Facebook mark is a stroked outline rather than a filled glyph */
.social-row svg[data-stroke],
.social-row a:first-child svg {
  fill: none;
  color: var(--c-white);
}

/* --------------------------------------------------------------------------
   7. Scroll reveal — the animation Elementor applied to most sections
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal--up    { transform: translateY(30px); }
.reveal--left  { transform: translateX(-40px); }
.reveal--right { transform: translateX(40px); }

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Sideways reveals would poke past a narrow viewport, so they lift instead */
@media (max-width: 767px) {
  .reveal--left,
  .reveal--right {
    transform: translateY(30px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   8. Responsive — header/footer
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .site-header__inner {
    flex-wrap: wrap;
    gap: 12px;
  }

  .site-header__brand {
    flex: 0 0 auto;
  }

  .site-header__brand img {
    width: 186px;
  }

  .nav-toggle {
    display: block;
    order: 3;
  }

  .site-header__nav {
    flex: 1 1 100%;
    order: 4;
    padding-left: 0;
    display: none;
  }

  .site-header__nav.is-open {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    background-color: var(--c-black);
    padding-bottom: 8px;
  }

  .nav-menu > li:not(:last-child) {
    margin-right: 0;
    border-bottom: 1px solid var(--c-border);
  }

  .nav-menu a {
    padding: 15px 16px;
  }

  .site-header__cta {
    flex: 0 0 auto;
    margin-left: auto;
    order: 2;
  }

  .site-footer__inner {
    flex-wrap: wrap;
    row-gap: 40px;
  }

  .site-footer__col {
    flex: 1 1 45%;
  }
}

@media (max-width: 767px) {
  .site-header__brand img {
    width: 150px;
  }

  .site-footer {
    padding: 50px 0 40px;
    text-align: center;
  }

  .site-footer__col {
    flex: 1 1 100%;
  }

  .site-footer__col--links {
    padding: 10px;
  }

  .social-row {
    margin-left: 0;
    margin-right: 0;
  }

  .site-footer__col--brand img {
    width: 60%;
    margin-inline: auto;
  }

  .footer-blurb {
    margin-top: 32px;
  }

  .social-row {
    justify-content: center;
  }

  .footer-list--contact li {
    justify-content: center;
  }
}
