/*
Theme Name: Barrett Limited
Theme URI: https://barrettlimited.com/
Author: Barrett Limited
Author URI: https://barrettlimited.com/
Description: A mobile-first, SEO-ready WordPress theme for Barrett Limited's glass sourcing, engineering, and logistics website.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: barrett-limited
Tags: custom-logo, custom-menu, featured-images, one-column, two-columns, accessibility-ready, block-styles, wide-blocks
*/

:root {
  --bl-ink: #10212d;
  --bl-ink-soft: #4d6273;
  --bl-navy: #082f49;
  --bl-blue: #116184;
  --bl-teal: #1d9a9a;
  --bl-red: #c9272d;
  --bl-amber: #e8a634;
  --bl-surface: #f5f8fb;
  --bl-surface-strong: #e7eef4;
  --bl-white: #ffffff;
  --bl-border: #d8e3eb;
  --bl-shadow: 0 18px 42px rgba(8, 47, 73, 0.14);
  --bl-radius: 8px;
  --bl-container: 1180px;
}

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

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

body {
  margin: 0;
  color: var(--bl-ink);
  background: var(--bl-white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
}

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

a {
  color: var(--bl-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--bl-red);
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.65rem;
  color: var(--bl-ink);
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.35rem, 6vw, 4.7rem);
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3.15rem);
}

h3 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 9999;
  padding: 0.75rem 1rem;
  color: var(--bl-white);
  background: var(--bl-red);
  border-radius: var(--bl-radius);
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--bl-container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(216, 227, 235, 0.82);
  backdrop-filter: blur(16px);
}

.admin-bar .site-header {
  top: 32px;
}

.header-inner {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 0.85rem;
  min-height: 76px;
}

.site-branding {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.site-logo,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.site-logo img,
.custom-logo {
  display: block;
  width: auto;
  max-width: min(260px, 62vw);
  max-height: 58px;
}

.site-title {
  margin: 0;
  font-size: 1.1rem;
}

.site-title a {
  color: var(--bl-ink);
  text-decoration: none;
}

.nav-toggle {
  justify-self: end;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--bl-ink);
  background: var(--bl-surface);
  border: 1px solid var(--bl-border);
  border-radius: 50%;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  content: "";
  transition: transform 160ms ease, opacity 160ms ease;
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before {
  top: -7px;
}

.nav-toggle-bars::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

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

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

.site-navigation {
  grid-column: 1 / -1;
  display: none;
  padding: 0 0 1rem;
}

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

.primary-menu,
.primary-menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu {
  display: grid;
  gap: 0.15rem;
}

.primary-menu a {
  display: block;
  padding: 0.72rem 0;
  color: var(--bl-ink);
  font-weight: 700;
  text-decoration: none;
}

.primary-menu a:hover,
.primary-menu a:focus,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
  color: var(--bl-red);
}

.primary-menu .sub-menu {
  margin-left: 1rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--bl-surface-strong);
}

.header-actions {
  display: none;
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.05rem;
  color: var(--bl-white);
  background: var(--bl-red);
  border: 1px solid var(--bl-red);
  border-radius: var(--bl-radius);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.button:hover,
.button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus,
button:hover,
input[type="submit"]:hover {
  color: var(--bl-white);
  background: #a91f25;
  box-shadow: 0 12px 24px rgba(201, 39, 45, 0.2);
  transform: translateY(-1px);
}

.button.secondary {
  color: var(--bl-white);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.48);
}

.button.secondary:hover,
.button.secondary:focus {
  background: rgba(255, 255, 255, 0.24);
}

.button.ghost {
  color: var(--bl-navy);
  background: var(--bl-white);
  border-color: var(--bl-border);
}

.button.ghost:hover,
.button.ghost:focus {
  color: var(--bl-red);
  background: var(--bl-surface);
  box-shadow: none;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 690px;
  display: grid;
  align-items: end;
  padding: 7rem 0 3.5rem;
  overflow: hidden;
  color: var(--bl-white);
  background-color: var(--bl-navy);
  background-position: center;
  background-size: cover;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(3, 22, 36, 0.91) 0%, rgba(3, 22, 36, 0.74) 48%, rgba(3, 22, 36, 0.32) 100%),
    linear-gradient(180deg, rgba(3, 22, 36, 0.08), rgba(3, 22, 36, 0.78));
  content: "";
}

.hero-copy {
  max-width: 780px;
}

.hero h1,
.hero h2,
.hero p {
  color: var(--bl-white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.95rem;
  color: #dff7f7;
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 34px;
  height: 3px;
  background: var(--bl-amber);
  content: "";
}

.hero .lead {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.proof-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 3rem;
}

.proof-item {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--bl-radius);
}

.proof-item strong {
  display: block;
  color: var(--bl-white);
  font-size: 1.1rem;
}

.proof-item span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.93rem;
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section.tight {
  padding: clamp(2.7rem, 5vw, 4.6rem) 0;
}

.section-band {
  background: var(--bl-surface);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 2rem;
}

.section-heading p {
  color: var(--bl-ink-soft);
  font-size: 1.08rem;
}

.kicker {
  margin-bottom: 0.45rem;
  color: var(--bl-red);
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two,
.grid.three,
.grid.four {
  grid-template-columns: 1fr;
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.35rem;
  background: var(--bl-white);
  border: 1px solid var(--bl-border);
  border-radius: var(--bl-radius);
  box-shadow: 0 1px 0 rgba(8, 47, 73, 0.04);
}

.card.media-card {
  padding: 0;
  overflow: hidden;
}

.card.media-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.media-card-body {
  padding: 1.2rem;
}

.card h3 {
  margin-bottom: 0.45rem;
}

.card p {
  color: var(--bl-ink-soft);
}

.card a.more-link {
  margin-top: auto;
  color: var(--bl-red);
  font-weight: 800;
  text-decoration: none;
}

.icon-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1rem;
  color: var(--bl-white);
  background: var(--bl-blue);
  border-radius: 50%;
  font-weight: 900;
}

.split {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.split-visual {
  position: relative;
}

.split-visual img {
  width: 100%;
  border-radius: var(--bl-radius);
  box-shadow: var(--bl-shadow);
}

.metric-list {
  display: grid;
  gap: 0.8rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.metric-list li {
  padding-left: 1.25rem;
  border-left: 3px solid var(--bl-teal);
}

.process {
  counter-reset: process;
}

.process .card {
  position: relative;
  padding-top: 4rem;
}

.process .card::before {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--bl-white);
  background: var(--bl-red);
  border-radius: 50%;
  counter-increment: process;
  content: counter(process);
  font-weight: 850;
}

.cta-band {
  color: var(--bl-white);
  background: linear-gradient(135deg, var(--bl-navy), #0c4a5f 62%, #70323a);
}

.cta-band h2,
.cta-band p {
  color: var(--bl-white);
}

.cta-inner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.page-header {
  padding: clamp(4rem, 8vw, 6.5rem) 0 3rem;
  color: var(--bl-white);
  background:
    linear-gradient(110deg, rgba(8, 47, 73, 0.94), rgba(17, 97, 132, 0.88)),
    url("assets/images/barrett-hero.jpg") center / cover;
}

.page-header h1,
.page-header p {
  color: var(--bl-white);
}

.breadcrumbs {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--bl-white);
}

.content-area {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.layout {
  display: grid;
  gap: 2rem;
}

.entry-content > * {
  max-width: 780px;
}

.entry-content > .alignwide {
  max-width: var(--bl-container);
}

.entry-content img {
  border-radius: var(--bl-radius);
}

.entry-meta {
  color: var(--bl-ink-soft);
  font-size: 0.93rem;
}

.post-card {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--bl-border);
}

.post-card h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.sidebar,
.widget-area {
  padding: 1.2rem;
  background: var(--bl-surface);
  border: 1px solid var(--bl-border);
  border-radius: var(--bl-radius);
}

.widget {
  margin-bottom: 1.5rem;
}

.widget:last-child {
  margin-bottom: 0;
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
  width: 100%;
  min-height: 46px;
  padding: 0.75rem 0.85rem;
  color: var(--bl-ink);
  background: var(--bl-white);
  border: 1px solid var(--bl-border);
  border-radius: var(--bl-radius);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.barrett-contact-form {
  display: grid;
  gap: 1rem;
}

.barrett-contact-form .field-row {
  display: grid;
  gap: 1rem;
}

.barrett-contact-form label {
  display: grid;
  gap: 0.35rem;
  color: var(--bl-ink);
  font-weight: 750;
}

.form-message {
  padding: 1rem;
  border-radius: var(--bl-radius);
}

.form-message.success {
  color: #0d4f3c;
  background: #e7f8ef;
}

.form-message.error {
  color: #7d1d22;
  background: #fdecef;
}

.site-footer {
  color: rgba(255, 255, 255, 0.8);
  background: #071c2b;
}

.footer-main {
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-logo img {
  max-width: 260px;
  margin-bottom: 1rem;
}

.site-footer h2,
.site-footer h3,
.site-footer h4 {
  color: var(--bl-white);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.86);
}

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

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.site-footer li {
  margin-bottom: 0.55rem;
}

.footer-bottom {
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 0.9rem;
}

.footer-bottom-inner {
  display: grid;
  gap: 0.75rem;
}

.pagination,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.page-numbers,
.post-page-numbers,
.nav-links a,
.nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0.45rem 0.75rem;
  color: var(--bl-ink);
  background: var(--bl-white);
  border: 1px solid var(--bl-border);
  border-radius: var(--bl-radius);
  text-decoration: none;
}

.page-numbers.current,
.post-page-numbers.current,
.nav-links a:hover,
.nav-links a:focus {
  color: var(--bl-white);
  background: var(--bl-red);
  border-color: var(--bl-red);
}

.not-found-search {
  max-width: 640px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  width: auto;
  height: auto;
  clip: auto;
  padding: 0.75rem 1rem;
  color: var(--bl-white);
  background: var(--bl-red);
}

@media (min-width: 640px) {
  .proof-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .barrett-contact-form .field-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media (min-width: 800px) {
  .grid.two {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid.three {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid.four {
    grid-template-columns: repeat(4, 1fr);
  }

  .split {
    grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
  }

  .cta-inner {
    grid-template-columns: 1fr auto;
  }

  .layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .footer-grid {
    grid-template-columns: 1.35fr repeat(3, 1fr);
  }
}

@media (min-width: 980px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    min-height: 88px;
  }

  .nav-toggle {
    display: none;
  }

  .site-navigation {
    grid-column: auto;
    display: block;
    padding: 0;
  }

  .primary-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
  }

  .primary-menu li {
    position: relative;
  }

  .primary-menu a {
    padding: 0.7rem 0.78rem;
  }

  .primary-menu .sub-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    z-index: 20;
    display: none;
    width: 230px;
    margin: 0;
    padding: 0.65rem;
    background: var(--bl-white);
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    box-shadow: var(--bl-shadow);
  }

  .primary-menu li:hover > .sub-menu,
  .primary-menu li:focus-within > .sub-menu {
    display: block;
  }

  .primary-menu .sub-menu a {
    padding: 0.55rem 0.65rem;
  }

  .header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
  }

  .header-phone {
    color: var(--bl-ink);
    font-weight: 850;
    text-decoration: none;
  }
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

@media (max-width: 600px) {
  .admin-bar .site-header {
    top: 0;
  }

  .hero {
    min-height: 650px;
    padding-top: 5rem;
  }

  .search-form {
    flex-direction: column;
  }
}
