/* ============================================================
   Quality Marine Electronics — styles
   Palette: deep navy + marine teal on white
   ============================================================ */

:root {
  --navy-950: #07182a;
  --navy-900: #0b2540;
  --navy-800: #10314f;
  --navy-700: #16406a;
  --teal-600: #0e93a8;
  --teal-500: #17b6c9;
  --teal-400: #2fd4e8;
  --ink: #1d2b3a;
  --muted: #5a6b7d;
  --line: #dde5ec;
  --bg-light: #f4f7fa;
  --white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(11, 37, 64, .08);
  --shadow-md: 0 10px 30px rgba(11, 37, 64, .14);
  --shadow-lg: 0 24px 60px rgba(7, 24, 42, .35);
  --radius: 14px;
  --header-h: 76px;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

.container {
  width: min(1180px, 100% - 48px);
  margin-inline: auto;
}

/* ---------- shared section bits ---------- */

.section { padding: 96px 0; }
.section--tinted { background: var(--bg-light); }
.section--dark { background: var(--navy-900); color: #eaf1f7; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-600);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--teal-500);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.02em;
  color: var(--navy-900);
}
.section--dark .section-title { color: var(--white); }

.section-lead {
  margin-top: 14px;
  max-width: 640px;
  color: var(--muted);
  font-size: 1.05rem;
}
.section--dark .section-lead { color: #b9c9d8; }

.section-head { margin-bottom: 48px; }
.section-head--center { text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-head--center .section-lead { margin-inline: auto; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--teal-500);
  color: var(--navy-950);
  box-shadow: 0 8px 20px rgba(23, 182, 201, .35);
}
.btn--primary:hover { background: var(--teal-400); transform: translateY(-2px); }

.btn--ghost {
  border: 2px solid rgba(255, 255, 255, .75);
  color: var(--white);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .12); border-color: var(--white); transform: translateY(-2px); }

.btn--navy {
  background: var(--navy-900);
  color: var(--white);
}
.btn--navy:hover { background: var(--navy-800); transform: translateY(-2px); }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  transition: box-shadow .25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand-name {
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: .01em;
  color: var(--navy-900);
  line-height: 1.15;
}
.brand-name small {
  display: block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal-600);
}

.main-nav ul { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  display: inline-block;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 600;
  white-space: nowrap; /* keep labels on one line; hamburger takes over below 1230px */
  color: var(--navy-800);
  transition: color .15s ease, background-color .15s ease;
}
.main-nav a:hover { color: var(--teal-600); background: rgba(23, 182, 201, .09); }
.main-nav a.active { color: var(--teal-600); background: rgba(23, 182, 201, .12); }

.header-cta { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.header-cta svg { width: 17px; height: 17px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 46px; height: 46px;
  padding: 10px;
  border-radius: 10px;
}
.nav-toggle span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--navy-900);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: max(620px, 92vh);
  display: flex;
  align-items: center;
  color: var(--white);
  background: var(--navy-950);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(7, 24, 42, .92) 8%, rgba(7, 24, 42, .68) 45%, rgba(7, 24, 42, .28) 75%, rgba(7, 24, 42, .45) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 64px;
  max-width: 720px;
}
.hero .eyebrow { color: var(--teal-400); }
.hero .eyebrow::before { background: var(--teal-400); }

.hero-title {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.hero-title em {
  font-style: normal;
  color: var(--teal-400);
}
.hero-sub {
  margin-top: 20px;
  max-width: 560px;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: #cfdce8;
}
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

.hero-badges {
  margin-top: 46px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #9fb6c9;
}
.hero-badges span { display: inline-flex; align-items: center; gap: 8px; }
.hero-badges svg { width: 15px; height: 15px; color: var(--teal-400); flex: none; }

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 64px;
  align-items: center;
}
.about-copy p + p { margin-top: 16px; }
.about-copy .lead { font-size: 1.12rem; color: var(--ink); }

.dealer-row {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.dealer-chip {
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: .83rem;
  font-weight: 700;
  color: var(--navy-800);
  box-shadow: var(--shadow-sm);
}

.ford-quote {
  margin-top: 30px;
  padding: 22px 26px;
  border-left: 4px solid var(--teal-500);
  background: linear-gradient(90deg, rgba(23, 182, 201, .07), transparent 70%);
  border-radius: 0 10px 10px 0;
}
.ford-quote p { font-size: 1.08rem; font-weight: 600; color: var(--navy-900); font-style: italic; }
.ford-quote cite { display: block; margin-top: 8px; font-size: .85rem; font-style: normal; font-weight: 700; color: var(--teal-600); letter-spacing: .06em; text-transform: uppercase; }

.about-media { position: relative; }
.about-media::before {
  content: "";
  position: absolute;
  inset: 22px -18px -18px 22px;
  border: 3px solid var(--teal-500);
  border-radius: var(--radius);
  z-index: 0;
}
.about-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 3.4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.about-badge {
  position: absolute;
  z-index: 2;
  left: -14px;
  bottom: 30px;
  background: var(--navy-900);
  color: var(--white);
  padding: 16px 22px;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  text-align: center;
}
.about-badge strong { display: block; font-size: 1.7rem; font-weight: 800; color: var(--teal-400); line-height: 1.1; }
.about-badge span { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #b9c9d8; }

/* ---------- services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(23, 182, 201, .45);
}

.service-icon {
  width: 58px; height: 58px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(23, 182, 201, .16), rgba(23, 182, 201, .05));
  color: var(--teal-600);
  margin-bottom: 20px;
}
.service-icon svg { width: 30px; height: 30px; }

.service-card h3 { font-size: 1.22rem; font-weight: 800; color: var(--navy-900); letter-spacing: -.01em; }
.service-card > p { margin-top: 10px; color: var(--muted); font-size: .96rem; }

.service-list { margin-top: 18px; display: grid; gap: 9px; }
.service-list li {
  position: relative;
  padding-left: 26px;
  font-size: .93rem;
  color: var(--ink);
}
.service-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: .5em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal-500);
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font-weight: 700;
  font-size: .93rem;
  color: var(--teal-600);
}
.service-link svg { width: 15px; height: 15px; transition: transform .18s ease; }
.service-link:hover svg { transform: translateX(4px); }

/* ---------- galleries ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 18px;
}

.g-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--navy-900);
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.g-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.g-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .45s ease;
}
.g-item:hover .g-thumb { transform: scale(1.05); }

.g-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px 14px 12px;
  background: linear-gradient(to top, rgba(7, 24, 42, .88), transparent);
  color: var(--white);
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .01em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}
.g-item:hover .g-caption,
.g-item:focus-visible .g-caption { opacity: 1; transform: none; }

/* mobile: always show caption */
@media (hover: none) {
  .g-caption { opacity: 1; transform: none; padding-top: 26px; }
}

.gallery-count {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(23, 182, 201, .14);
  color: var(--teal-600);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .05em;
}

/* ---------- boat shows ---------- */

.shows-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }

.show-card {
  position: relative;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 30px 28px;
  transition: transform .22s ease, box-shadow .22s ease;
}
.show-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.show-date {
  flex: none;
  width: 86px;
  text-align: center;
  background: var(--navy-900);
  border-radius: 12px;
  padding: 14px 8px;
  color: var(--white);
}
.show-date .month { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-400); }
.show-date .days { display: block; margin-top: 3px; font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.show-date .year { display: block; margin-top: 2px; font-size: .78rem; font-weight: 600; color: #9fb6c9; }

.show-info h3 { font-size: 1.18rem; font-weight: 800; color: var(--navy-900); }
.show-info p { margin-top: 6px; color: var(--muted); font-size: .95rem; }
.show-booth {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(23, 182, 201, .12);
  color: var(--teal-600);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .05em;
}

.shows-note {
  margin-top: 34px;
  text-align: center;
  color: var(--muted);
  font-size: 1.02rem;
}
.shows-note strong { color: var(--navy-900); }

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.contact-card {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: background-color .2s ease, transform .2s ease;
}
.contact-card:hover { background: rgba(255, 255, 255, .09); transform: translateY(-4px); }

.contact-icon {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(47, 212, 232, .14);
  color: var(--teal-400);
  margin-bottom: 18px;
}
.contact-icon svg { width: 26px; height: 26px; }

.contact-card h3 { font-size: .82rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #9fb6c9; }
.contact-card p, .contact-card a.big { margin-top: 10px; font-size: 1.05rem; font-weight: 600; color: var(--white); line-height: 1.5; }
.contact-card a.big:hover { color: var(--teal-400); }
.contact-card .sub { margin-top: 6px; font-size: .9rem; color: #b9c9d8; font-weight: 500; }

.contact-map-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--teal-400);
}
.contact-map-link svg { width: 15px; height: 15px; }

/* ---------- footer ---------- */

.site-footer { background: var(--navy-950); color: #b9c9d8; padding: 64px 0 0; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand img { width: 64px; height: 64px; }
.footer-brand p { margin-top: 16px; font-size: .93rem; max-width: 320px; }
.footer-dealers { margin-top: 18px; font-size: .8rem; font-weight: 700; letter-spacing: .05em; color: var(--teal-400); }

.site-footer h4 {
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 18px;
}
.footer-links li + li { margin-top: 10px; }
.footer-links a { font-size: .93rem; transition: color .15s ease; }
.footer-links a:hover { color: var(--teal-400); }

.footer-contact li { display: flex; gap: 10px; font-size: .93rem; }
.footer-contact li + li { margin-top: 12px; }
.footer-contact svg { width: 17px; height: 17px; color: var(--teal-400); flex: none; margin-top: 3px; }
.footer-contact a:hover { color: var(--teal-400); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .83rem;
  color: #7e94a8;
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }

.lb-backdrop { position: absolute; inset: 0; background: rgba(7, 24, 42, .93); backdrop-filter: blur(6px); }

.lb-figure {
  position: relative;
  z-index: 1;
  max-width: min(1100px, 100%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: lb-in .28s ease;
}
@keyframes lb-in { from { opacity: 0; transform: scale(.965); } to { opacity: 1; transform: none; } }

.lb-img {
  max-width: 100%;
  max-height: calc(100vh - 190px);
  margin-inline: auto;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  object-fit: contain;
}

.lb-caption { text-align: center; color: var(--white); }
.lb-title { display: block; font-size: 1.08rem; font-weight: 800; letter-spacing: .01em; }
.lb-desc { display: block; margin-top: 4px; font-size: .93rem; color: #b9c9d8; }

.lb-counter {
  position: absolute;
  top: -34px; left: 0;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: #9fb6c9;
}

.lb-btn {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(9, 30, 51, .72);
  border: 1px solid rgba(255, 255, 255, .4);
  color: var(--white);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
  transition: background-color .18s ease, transform .18s ease;
}
.lb-btn:hover { background: rgba(47, 212, 232, .3); transform: scale(1.06); }
.lb-btn svg { width: 22px; height: 22px; }

/* buttons are children of .lightbox (viewport-sized), not of .lb-figure */
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.06); }

body.lb-locked { overflow: hidden; }

/* ---------- back to top ---------- */

.to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 90;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--teal-400);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, background-color .2s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--navy-800); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- reveal on scroll ---------- */

[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ============================================================
   Responsive
   ============================================================ */

/* The single-line header (brand + 7 nav links + phone CTA) needs ~1140px of
   container width, and the container caps at 1180px once the viewport reaches
   ~1228px — so the inline nav is only shown from 1231px up. */
@media (max-width: 1230px) {
  /* mobile nav */
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  .main-nav.open { max-height: 480px; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 12px 20px 20px; }
  .main-nav a { display: block; padding: 13px 14px; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav li:last-child a { border-bottom: 0; }
  .header-cta { display: none; }
}

@media (max-width: 1023px) {
  :root { --header-h: 68px; }
  .section { padding: 76px 0; }

  .about-grid { grid-template-columns: 1fr; gap: 56px; }
  .about-media { max-width: 640px; }
  .about-badge { left: 12px; }

  .services-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; max-width: 560px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .hero { min-height: max(560px, 88vh); }
  .hero-actions .btn { width: 100%; max-width: 340px; }

  .shows-grid { grid-template-columns: 1fr; }

  .lb-close { top: 12px; right: 12px; width: 46px; height: 46px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-img { max-height: calc(100vh - 230px); }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 32px); }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }

  .brand img { width: 42px; height: 42px; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .g-caption { font-size: .76rem; padding: 22px 10px 9px; }

  .service-card { padding: 28px 24px; }
  .show-card { flex-direction: column; gap: 18px; }
  .about-badge { bottom: 16px; padding: 12px 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { justify-content: center; text-align: center; }

  .lb-btn { width: 44px; height: 44px; }
}
