/* ============================================================
   AJ Enterprises — Global Styles
   ============================================================ */

/* ---- Custom Properties ------------------------------------ */
:root {
  --brand-gold: #b39136;
  --brand-blue-dark: #0d2f57;
  --brand-blue: #4692f4;
  --midnight: #050b14;
  --color-light: #f5f6f8;
  --color-gray-50:  #f8f9fb;
  --color-gray-200: #e4e6ea;
  --color-gray-300: #ccd0d8;
  --color-gray-500: #9099a6;
  --color-gray-600: #5e6878;
  --color-gray-700: #3c4350;
  --color-gray-800: #252c38;
  --color-gray-900: #131820;
  --color-danger: #b42318;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

button,
a,
[role="button"],
input[type="submit"],
input[type="button"],
input[type="reset"] {
  touch-action: manipulation;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-gray-700);
  background: #fff;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ---- Layout ----------------------------------------------- */
.container {
  max-width: 1220px;
  margin: 0 auto;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
}

/* ---- Navbar ----------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 78px;
  display: flex;
  align-items: center;
  padding: 0;
}

.navbar-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 100%;
  width: 100%;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  /* Landscape mark (~1.45:1): bound height, let width follow aspect ratio */
  height: clamp(40px, 4.5vw, 52px);
  width: auto;
  max-width: min(220px, 52vw);
  object-fit: contain;
  object-position: left center;
  display: block;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .brand-logo {
    max-width: min(200px, 46vw);
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  min-width: 0;
}

.paint-nav-quote-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.paint-nav-quote-btn-desktop {
  margin-left: 1rem;
  padding: 0.72rem 1.35rem;
  font-size: 0.98rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(179, 145, 54, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.14);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.paint-nav-quote-btn-desktop:hover {
  box-shadow: 0 12px 30px rgba(156, 126, 46, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.18);
}

.nav-links .paint-nav-quote-btn-mobile {
  display: none;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}

/* ---- Mobile Nav ------------------------------------------- */
@media (max-width: 768px) {
  .navbar {
    height: auto;
    min-height: 78px;
  }

  .navbar-container {
    position: relative;
    min-height: 78px;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.75rem 0 max(0.75rem, env(safe-area-inset-bottom));
    background: rgba(5, 11, 20, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    max-height: calc(100svh - 78px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border-radius: 0;
  }

  .navbar-container .paint-nav-quote-btn-desktop {
    display: none;
  }

  .nav-links .paint-nav-quote-btn-mobile {
    display: inline-flex;
    width: calc(100% - 2.5rem);
    margin: 0.85rem 1.25rem 0;
    justify-content: center;
    padding: 0.8rem 1.2rem;
    font-size: 0.98rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(179, 145, 54, 0.42);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .brand-logo {
    max-width: min(180px, 52vw);
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* iOS focus zoom guard: any focused input < 16px triggers iOS Safari zoom. */
@media (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: max(16px, 1rem);
  }
}

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.18s ease;
  text-decoration: none;
  line-height: 1;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn:focus-visible {
  outline: 3px solid var(--brand-gold);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--brand-gold);
  color: #fff;
  border-color: var(--brand-gold);
}

.btn-primary:hover {
  background: #9c7e2e;
  border-color: #9c7e2e;
  color: #fff;
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.btn-outline-dark {
  background: transparent;
  color: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
}

.btn-outline-dark:hover {
  background: var(--brand-blue-dark);
  color: #fff;
}

/* ---- Quote CTA prominence (NOR-236 / NOR-252) ----------------------- */
button.btn-primary[data-quote-trigger]:not(.paint-nav-quote-btn),
a.btn-primary[data-quote-trigger],
a.btn-primary[href^='/request-a-quote'] {
  font-size: 1rem;
  padding: 0.85rem 1.65rem;
  font-weight: 700;
  box-shadow: 0 6px 22px rgba(179, 145, 54, 0.38), 0 2px 8px rgba(0, 0, 0, 0.14);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

button.btn-primary[data-quote-trigger]:not(.paint-nav-quote-btn):hover,
a.btn-primary[data-quote-trigger]:hover,
a.btn-primary[href^='/request-a-quote']:hover {
  box-shadow: 0 10px 30px rgba(156, 126, 46, 0.45), 0 3px 10px rgba(0, 0, 0, 0.16);
}

/* ---- Footer ----------------------------------------------- */
.bg-dark,
.footer {
  background: #0d1117;
  color: rgba(255, 255, 255, 0.9);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  /* Use longhand: padding shorthand wipes the .container horizontal padding
     because .footer-grid sits on the same element as .container. */
  padding-top: 3rem;
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-logo {
  height: clamp(48px, 5vw, 56px);
  width: auto;
  max-width: min(260px, 85vw);
  object-fit: contain;
  object-position: left center;
  display: block;
  margin-bottom: 0.5rem;
}

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

.footer-grid > *,
.footer-links,
.footer-contact {
  min-width: 0;
}

.footer-links li a,
.footer-contact p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

.footer-links li + li {
  margin-top: 0.45rem;
}

.footer-links li a:hover {
  color: #f6d889;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.2rem 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ---- Utilities -------------------------------------------- */
.text-muted {
  color: var(--color-gray-600);
}

.text-gold {
  color: var(--brand-gold);
}

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

.icon-sm {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  vertical-align: middle;
}

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