:root {
  --bg: #eef2ff;
  --bg-2: #dfe7ff;
  --ink: #001144;
  --ink-soft: #334171;
  --brand: #00137a;
  --brand-strong: #01147b;
  --brand-2: #ffd11c;
  --brand-3: #abcc3f;
  --white: #ffffff;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: #ffffff;
  --line: rgba(0, 19, 122, 0.16);
  --line-strong: rgba(0, 19, 122, 0.28);
  --success: #abcc3f;
  --shadow: 0 18px 45px rgba(0, 19, 122, 0.14);
  --shadow-soft: 0 10px 26px rgba(0, 19, 122, 0.1);
  --heading-font: "League Spartan", "Arial Black", sans-serif;
  --body-font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --road-stripe: linear-gradient(100deg, var(--brand) 0 58%, var(--brand-2) 58% 66%, var(--brand-3) 66% 73%, var(--brand) 73% 100%);
  --site-photo: url("../img/JBSite%20background.png");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--body-font);
  color: var(--ink);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.72), rgba(223, 231, 255, 0.8)),
    var(--site-photo) center / cover fixed no-repeat,
    linear-gradient(155deg, rgba(255, 255, 255, 0.92), rgba(223, 231, 255, 0.92)),
    linear-gradient(135deg, rgba(0, 19, 122, 0.05) 0, rgba(0, 19, 122, 0) 38%),
    var(--bg);
  scroll-behavior: smooth;
}

body {
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(130deg, rgba(0, 19, 122, 0.05) 0 14%, transparent 14% 100%),
    linear-gradient(168deg, transparent 0 76%, rgba(171, 204, 63, 0.08) 76% 82%, transparent 82% 100%);
  pointer-events: none;
  z-index: -1;
}

p,
li,
input,
select,
textarea,
button {
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.topbar {
  background: linear-gradient(90deg, #00137a, #011d9a 68%, #00137a);
  color: #f5f7ff;
  font-size: 0.9rem;
  border-bottom: 2px solid rgba(255, 209, 28, 0.7);
}

.topbar-inner {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar a {
  color: #ffffff;
}

header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(0, 19, 122, 0.12);
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: min(240px, 100%);
}

.brand-logo {
  width: auto;
  height: clamp(42px, 4.8vw, 58px);
  max-width: 100%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
  padding-left: clamp(28px, 5vw, 72px);
  border-left: 1px solid rgba(0, 19, 122, 0.14);
}

.nav-links a {
  font-weight: 700;
  color: var(--brand);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
  background: linear-gradient(90deg, var(--brand-2), var(--brand-3));
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.nav-links .cta-btn {
  color: var(--white);
}

.nav-links .cta-btn::after {
  display: none;
}

.cta-btn,
.button {
  background: linear-gradient(120deg, var(--brand), var(--brand-strong));
  color: var(--white);
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cta-btn:hover,
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(0, 19, 122, 0.24);
}

.cta-btn:focus-visible,
.button:focus-visible,
.secondary-btn:focus-visible,
.nav-links a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(255, 209, 28, 0.55);
  outline-offset: 2px;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero {
  padding: 68px 0 52px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 26px;
  align-items: stretch;
}

.hero-copy {
  background: linear-gradient(145deg, #00137a 0%, #01147b 58%, #0628ae 100%);
  color: #f7f9ff;
  border-radius: 20px;
  padding: 34px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: auto -10% 18px 38%;
  height: 14px;
  transform: rotate(-11deg);
  border-radius: 999px;
  background: var(--road-stripe);
  opacity: 0.96;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -74px;
  top: -56px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 209, 28, 0.26), rgba(255, 209, 28, 0));
}

.hero h1,
.page-hero h1 {
  margin: 0 0 14px;
  font-family: var(--heading-font);
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 0.96;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(241, 244, 255, 0.96));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-card::before,
.card::before,
.quote-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2) 62%, var(--brand-3));
}

.hero-carousel {
  display: flex;
  flex-direction: column;
}

.hero-carousel .section-title {
  margin-bottom: 16px;
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  min-height: 222px;
}

.carousel-track {
  display: flex;
  align-items: stretch;
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  display: grid;
  align-content: start;
  gap: 12px;
  transition: opacity 0.3s ease;
}

.service-card {
  border: 1px solid rgba(0, 19, 122, 0.14);
  background: linear-gradient(180deg, var(--panel-strong), rgba(244, 247, 255, 0.96));
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.carousel-slide h3 {
  margin: 0;
  color: var(--brand);
  font-family: var(--heading-font);
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.carousel-slide p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.carousel-controls {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.carousel-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(0, 19, 122, 0.18);
  background: var(--white);
  color: var(--brand);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.carousel-btn:hover {
  transform: translateY(-1px);
  background: rgba(0, 19, 122, 0.06);
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(0, 19, 122, 0.22);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.carousel-dot.is-active {
  background: var(--brand);
  transform: scale(1.1);
}

.checklist {
  padding-left: 0;
  list-style: none;
  margin: 0;
}

.checklist li {
  padding: 9px 0;
  border-bottom: 1px solid rgba(0, 19, 122, 0.1);
  position: relative;
  padding-left: 20px;
}

.checklist li::before,
.list-two-col li::marker {
  color: var(--brand-3);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand-3));
}

.checklist li:last-child {
  border-bottom: 0;
}

.section {
  padding: 52px 0;
  position: relative;
}

.section:nth-of-type(even) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(0, 19, 122, 0.03));
}

.section-title {
  font-family: var(--heading-font);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0 0 10px;
  color: var(--brand);
  position: relative;
  padding-bottom: 16px;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(140px, 36vw);
  height: 7px;
  border-radius: 999px;
  background: var(--road-stripe);
  transform: skewX(-28deg);
}

.section-sub {
  margin: 0 0 26px;
  color: var(--ink-soft);
  max-width: 70ch;
}

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

.services-grid .card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.services-grid .card .button {
  margin-top: auto;
  display: inline-block;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-family: var(--heading-font);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
}

.page-hero {
  padding: 44px 0 30px;
}

.page-hero-panel {
  background: linear-gradient(125deg, rgba(0, 19, 122, 0.96), rgba(5, 37, 170, 0.92));
  color: #f7f9ff;
  border-radius: 18px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.page-hero-panel::after {
  content: "";
  position: absolute;
  left: 44%;
  right: -8%;
  bottom: 18px;
  height: 10px;
  transform: rotate(-10deg);
  border-radius: 999px;
  background: var(--road-stripe);
}

.page-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  max-width: 72ch;
}

.list-two-col {
  columns: 2;
  column-gap: 24px;
  margin: 0;
  padding-left: 18px;
}

.list-two-col li {
  margin-bottom: 8px;
}

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

.gallery-item {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--shadow-soft);
}

.gallery-label {
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.gallery-label span {
  padding: 8px;
}

.gallery-label span:first-child {
  background: rgba(255, 209, 28, 0.22);
  color: var(--brand);
}

.gallery-label span:last-child {
  background: rgba(171, 204, 63, 0.24);
  color: var(--brand);
}

.quote-form {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

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

label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(0, 19, 122, 0.18);
  border-radius: 10px;
  padding: 11px;
  font: inherit;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
}

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

.full {
  grid-column: 1 / -1;
}

.notice {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

.map-wrap iframe,
.reviews-wrap iframe {
  border: 0;
  width: 100%;
  min-height: 320px;
  border-radius: 14px;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

footer {
  margin-top: 50px;
  background: linear-gradient(160deg, #00137a, #01147b 68%, #000d58);
  color: #edf1ff;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  left: 52%;
  right: -12%;
  top: 24px;
  height: 8px;
  transform: rotate(-10deg);
  border-radius: 999px;
  background: var(--road-stripe);
  opacity: 0.95;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
  padding: 32px 0;
}

.footer-title {
  font-family: var(--heading-font);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.small {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  padding: 10px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.float-whatsapp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: linear-gradient(135deg, var(--brand-3), #90bd19);
  color: var(--brand);
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: var(--shadow);
  z-index: 50;
}

a:hover,
a:focus-visible {
  color: inherit;
}

.button,
.cta-btn,
.secondary-btn,
.float-whatsapp,
.nav-links a {
  text-decoration: none;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Hamburger toggle button (hidden on desktop) ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  flex-shrink: 0;
}

.nav-toggle:focus-visible {
  outline: 3px solid rgba(255, 209, 28, 0.55);
  outline-offset: 2px;
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

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

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

@media (max-width: 980px) {
  .hero-grid,
  .split,
  .grid-3,
  .footer-grid,
  .gallery-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .list-two-col {
    columns: 1;
  }

  .nav {
    align-items: flex-start;
    padding: 10px 0;
  }

  .brand-logo {
    height: clamp(38px, 9vw, 48px);
  }

  .nav-links {
    gap: 10px;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .nav-links a::after {
    bottom: -4px;
  }

  .carousel-track {
    min-height: 0;
  }

  .carousel-viewport {
    min-height: 248px;
  }

  .carousel-controls {
    margin-top: 20px;
  }
}

@media (max-width: 980px) and (min-width: 761px) {
  .nav {
    gap: 16px;
  }

  .nav-links {
    gap: 12px;
    margin-left: auto;
    padding-left: 24px;
    border-left: 1px solid rgba(0, 19, 122, 0.14);
  }
}

@media (max-width: 760px) {
  html,
  body {
    background:
      linear-gradient(155deg, rgba(255, 255, 255, 0.3), rgba(223, 231, 255, 0.4)),
      var(--site-photo) center top / cover no-repeat,
      linear-gradient(155deg, rgba(255, 255, 255, 0.2), rgba(223, 231, 255, 0.2)),
      linear-gradient(135deg, rgba(0, 19, 122, 0.05) 0, rgba(0, 19, 122, 0) 38%),
      var(--bg);
  }

  body::before {
    background: none;
  }

  /* Home page gets a different crop so mobile doesn't show a flat sky-heavy area */
  .home-page {
    background:
      linear-gradient(155deg, rgba(255, 255, 255, 0.28), rgba(223, 231, 255, 0.38)),
      var(--site-photo) 62% 62% / cover no-repeat,
      linear-gradient(155deg, rgba(255, 255, 255, 0.2), rgba(223, 231, 255, 0.2)),
      linear-gradient(135deg, rgba(0, 19, 122, 0.05) 0, rgba(0, 19, 122, 0) 38%),
      var(--bg);
  }

  /* Hide busy topbar on small screens */
  .topbar {
    display: none;
  }

  /* Compact sticky header */
  .nav {
    flex-wrap: wrap;
    min-height: 60px;
    padding: 8px 0;
    gap: 0;
    align-items: center;
  }

  .brand-logo {
    height: clamp(36px, 10vw, 46px);
  }

  /* Show hamburger on mobile */
  .nav-toggle {
    display: flex;
  }

  /* Hide nav links by default; shown when .is-open */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    margin-left: 0;
    padding: 6px 0 14px;
    border-left: none;
    border-top: 1px solid rgba(0, 19, 122, 0.1);
  }

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

  .nav-links a {
    padding: 11px 4px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0, 19, 122, 0.07);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a::after {
    display: none;
  }

  .page-hero {
    padding: 28px 0 18px;
  }

  .page-hero-panel {
    padding: 20px;
    border-radius: 16px;
  }

  .page-hero h1 {
    font-size: clamp(1.55rem, 7.2vw, 1.95rem);
    line-height: 1.08;
    letter-spacing: 0.035em;
    margin-bottom: 12px;
  }

  .page-hero p {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .split {
    gap: 14px;
  }

  .contact-page .quote-form,
  .contact-page .contact-card {
    padding: 18px;
  }

  .contact-page .contact-card .section-title {
    font-size: 1.25rem;
    line-height: 1.14;
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .contact-page .contact-card p {
    margin: 0 0 10px;
    line-height: 1.6;
    font-size: 0.98rem;
  }

  .contact-page .map-wrap iframe {
    min-height: 250px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-slide {
    animation: none;
    transition: none;
  }

  .carousel-track {
    transform: none !important;
  }
}
