/*
Theme Name: Shepway Pet Taxi
Description: A lightweight custom WordPress theme for Shepway Pet Taxi, specialising in UK and European pet travel.
Version: 1.0.3
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: shepway-pet-taxi
License: GPL-2.0-or-later
*/

/* =========================================================
   01. FOUNDATION
   Shared tokens for the header and the upcoming hero.
   No hero or other homepage sections are styled yet.
   ========================================================= */
:root {
  --spt-ink: #000000;
  --spt-ink-raised: #101510;
  --spt-lime: #79df09;
  --spt-lime-hover: #8ff323;
  --spt-white: #ffffff;
  --spt-muted: #bcc9be;
  --spt-container-width: 1520px;
  --spt-header-width: var(--spt-container-width);
  --spt-page-gutter: clamp(20px, 3.2vw, 48px);
  --spt-font-heading: 'Nunito', sans-serif;
  --spt-font-body: 'Manrope', sans-serif;
}

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

html {
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--spt-ink);
  color: var(--spt-white);
  font-family: var(--spt-font-body);
  -webkit-font-smoothing: antialiased;
}

/* Consistent typography across current and upcoming sections. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--spt-font-heading);
}

button, input, select, textarea {
  font: inherit;
}

.spt-container {
  width: 100%;
  max-width: var(--spt-container-width);
  margin-inline: auto;
  padding-inline: var(--spt-page-gutter);
}

.spt-skip-link {
  position: absolute;
  z-index: 1000;
  top: -120px;
  left: 16px;
  padding: 12px 18px;
  border-radius: 8px;
  background: var(--spt-lime);
  color: #101510;
  font-weight: 700;
}

.spt-skip-link:focus {
  top: 14px;
}

/* =========================================================
   02. HEADER
   The header and upcoming hero intentionally use the same
   dark background with no visible dividing border.
   ========================================================= */
.spt-header {
  position: relative;
  z-index: 30;
  width: 100%;
  background: #0B110D;
  color: var(--spt-white);
}

.spt-header__inner {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  column-gap: 28px;
  max-width: var(--spt-header-width);
  min-height: 94px;
  margin: 0 auto;
  padding: 10px var(--spt-page-gutter);
}

/* Brand logo (bundled by default, or WordPress custom logo if set). */
.spt-header__branding {
  min-width: 0;
  justify-self: start;
}

.spt-header__branding .custom-logo-link,
.spt-header__logo-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.spt-header__branding .custom-logo,
.spt-header__logo-image {
  display: block;
  width: 76px;
  height: 82px;
  max-width: none;
  object-fit: contain;
}

/* Desktop navigation */
.spt-header__desktop-nav {
  justify-self: center;
}

.spt-header__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.35vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.spt-header__links li {
  margin: 0;
  padding: 0;
}

.spt-header__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #dce5dd;
  font-size: 14px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease;
}

.spt-header__links a:hover,
.spt-header__links a:focus-visible,
.spt-header__links .current-menu-item > a,
.spt-header__links .current_page_item > a {
  color: var(--spt-lime);
}

/* Primary quote button */
.spt-header__quote,
.spt-header__mobile-quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--spt-lime);
  color: #101510;
  font-family: var(--spt-font-body);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease;
}

.spt-header__quote {
  justify-self: end;
  min-height: 45px;
  padding: 12px 22px;
}

.spt-header__quote:hover,
.spt-header__mobile-quote:hover {
  background: var(--spt-lime-hover);
}

.spt-header__arrow {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: currentColor;
  transition: transform 160ms ease;
}

.spt-header__quote:hover .spt-header__arrow,
.spt-header__mobile-quote:hover .spt-header__arrow {
  transform: translateX(3px);
}

.spt-header a:focus-visible,
.spt-header summary:focus-visible {
  outline: 2px solid var(--spt-lime);
  outline-offset: 4px;
}

/* Mobile menu is kept native and JavaScript-free. */
.spt-header__mobile-menu {
  display: none;
}

/* =========================================================
   03. RESPONSIVE HEADER
   ========================================================= */
@media (max-width: 1180px) {
  .spt-header__inner {
    grid-template-columns: 1fr auto;
    column-gap: 20px;
    min-height: 86px;
    padding: 9px var(--spt-page-gutter);
  }

  .spt-header__desktop-nav,
  .spt-header__quote {
    display: none;
  }

  .spt-header__mobile-menu {
    display: block;
    position: relative;
    justify-self: end;
  }

  .spt-header__menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(248, 251, 247, 0.17);
    border-radius: 12px;
    color: var(--spt-white);
    cursor: pointer;
    list-style: none;
    user-select: none;
  }

  .spt-header__menu-toggle::-webkit-details-marker {
    display: none;
  }

  .spt-header__menu-icon,
  .spt-header__menu-icon span {
    display: block;
  }

  .spt-header__menu-icon {
    width: 20px;
  }

  .spt-header__menu-icon span {
    width: 20px;
    height: 2px;
    margin: 4px 0;
    border-radius: 2px;
    background: currentColor;
  }

  .spt-header__mobile-menu[open] .spt-header__menu-toggle {
    border-color: var(--spt-lime);
    color: var(--spt-lime);
  }

  .spt-header__mobile-nav {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 40;
    width: min(310px, calc(100vw - 40px));
    padding: 18px;
    border: 1px solid rgba(248, 251, 247, 0.12);
    border-radius: 16px;
    background: var(--spt-ink-raised);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.3);
  }

  .spt-header__mobile-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
  }

  .spt-header__mobile-links li {
    margin: 0;
    padding: 0;
  }

  .spt-header__mobile-links a {
    display: block;
    padding: 12px 10px;
    border-radius: 8px;
    color: var(--spt-white);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
  }

  .spt-header__mobile-links a:hover,
  .spt-header__mobile-links a:focus-visible,
  .spt-header__mobile-links .current-menu-item > a,
  .spt-header__mobile-links .current_page_item > a {
    background: rgba(121, 223, 9, 0.1);
    color: var(--spt-lime);
  }

  .spt-header__mobile-quote {
    width: 100%;
    min-height: 46px;
    padding: 12px 18px;
  }
}

@media (max-width: 600px) {
  .spt-header__inner {
    min-height: 74px;
    padding: 7px var(--spt-page-gutter);
  }

  .spt-header__branding .custom-logo,
  .spt-header__logo-image {
    width: 56px;
    height: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spt-header * {
    transition: none !important;
  }
}
