/* Bomrobot homepage v4.1 — layout + visual polish */
.br-home {
  --br-max: 1200px;
  --br-pad: clamp(20px, 4vw, 36px);
  --br-brand: #0c4a6e;
  --br-accent: #0d9488;
  --br-line: #e2e8f0;
  --br-muted: #64748b;
  background: #f1f5f9;
  color: #0f172a;
  overflow-x: hidden;
}

.br-wrap {
  width: min(var(--br-max), 100% - 2 * var(--br-pad));
  margin-inline: auto;
}

/* —— Hero —— */
.br-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: min(82vh, 680px);
  background: linear-gradient(135deg, #f8fafc 0%, #fff 45%, #ecfeff 100%);
  border-bottom: 1px solid var(--br-line);
}

.br-hero__copy {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(40px, 6vw, 64px) var(--br-pad);
}

.br-hero__copy-inner {
  width: min(520px, 100%);
}

.br-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--br-accent);
  margin-bottom: 14px;
}

.br-hero__badge::before {
  content: "";
  width: 24px;
  height: 3px;
  background: var(--br-accent);
  border-radius: 2px;
}

.br-hero h1 {
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  color: var(--br-brand);
}

.br-hero__lead {
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.65;
  color: var(--br-muted);
  margin: 0 0 24px;
}

.br-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.br-hero__metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--br-line);
}

.br-hero__metric {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--br-line);
  border-radius: 12px;
}

.br-hero__metric strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--br-brand);
  line-height: 1.2;
}

.br-hero__metric span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--br-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
}

.br-hero__visual {
  position: relative;
  margin: clamp(20px, 3vw, 32px) var(--br-pad) clamp(20px, 3vw, 32px) 0;
  border-radius: 24px;
  overflow: hidden;
  min-height: 280px;
  box-shadow: 0 24px 60px rgba(12, 74, 110, 0.18);
}

.br-hero__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(12, 74, 110, 0.35) 100%);
  z-index: 1;
  pointer-events: none;
}

.br-hero__visual img {
  width: 100%;
  height: auto;
  max-height: min(520px, 72vh);
  object-fit: cover;
  object-position: center 42%;
  display: block;
  min-height: 300px;
}

.br-hero__visual-card {
  position: absolute;
  left: 20px;
  bottom: 20px;
  right: 20px;
  z-index: 2;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 12px;
  border-left: 4px solid var(--br-accent);
  backdrop-filter: blur(8px);
}

.br-hero__visual-card p {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: #0f172a;
}

/* —— Quick nav —— */
.br-quicknav {
  background: var(--br-brand);
  padding: 12px 0;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

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

.br-quicknav a {
  display: inline-flex;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.br-quicknav a:hover {
  background: var(--br-accent);
  border-color: var(--br-accent);
  color: #fff;
  transform: translateY(-1px);
}

.br-quicknav a.br-quicknav__cta {
  background: var(--br-accent);
  border-color: var(--br-accent);
  color: #fff;
  font-weight: 700;
}

/* —— Sections —— */
.br-section {
  padding: clamp(52px, 7vw, 72px) 0;
}

.br-section--alt {
  background: #fff;
  box-shadow: 0 1px 0 var(--br-line);
}

.br-section--engine {
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.br-section__head {
  margin-bottom: 36px;
  max-width: 560px;
}

.br-section__head--center {
  text-align: center;
  margin-inline: auto;
  max-width: 520px;
}

.br-section__head h2 {
  margin: 8px 0 10px;
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--br-brand);
}

.br-section__head p {
  margin: 0;
  color: var(--br-muted);
  line-height: 1.65;
  font-size: 15px;
}

.br-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--br-accent);
}

/* —— Bento: 2×2 + hero (balanced, no orphan cell) —— */
.br-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.br-bento__item {
  display: flex;
  flex-direction: column;
  min-height: 0;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--br-line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.br-bento__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
  border-color: #cbd5e1;
}

.br-bento__item--hero {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

.br-bento__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, #e8eef4 0%, #dfe7ef 100%);
  overflow: hidden;
  flex-shrink: 0;
}

.br-bento__item--hero .br-bento__thumb {
  aspect-ratio: auto;
  flex: 1;
  min-height: 340px;
  background: #dfe7ef;
  padding: 0;
}

.br-bento__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
  transition: transform 0.35s ease;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.br-bento__item--hero .br-bento__thumb img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  object-position: center 62%;
  transform: scale(1.14);
  transform-origin: center 68%;
}

.br-bento__item--hero:hover .br-bento__thumb img {
  transform: scale(1.18);
}

.br-bento__item:not(.br-bento__item--hero):hover .br-bento__thumb img {
  transform: scale(1.02);
}

.br-bento__body {
  padding: 16px 18px 18px;
}

.br-bento__title {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--br-brand);
  margin: 0 0 4px;
}

.br-bento__arrow {
  font-size: 13px;
  font-weight: 600;
  color: #0f766e;
  line-height: 1.45;
}

.br-bento__item:hover .br-bento__arrow {
  color: #0d9488;
}

.br-bento-aux {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: stretch;
}

.br-bento-aux__card {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 108px;
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--br-line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.br-bento-aux__card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.br-bento-aux__card--cta {
  background: linear-gradient(135deg, #ccfbf1 0%, #ecfeff 55%, #f0fdfa 100%);
  border-color: #5eead4;
  justify-content: center;
  text-align: left;
}

.br-bento-aux__card--cta .br-bento__title {
  color: #0c4a6e;
  font-size: 17px;
}

.br-bento-aux__card--cta .br-bento__arrow {
  color: #0f766e;
}

.br-bento-aux__thumb {
  flex: 0 0 148px;
  width: 148px;
  height: 92px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(145deg, #e8eef4 0%, #dfe7ef 100%);
}

.br-bento-aux__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.br-bento-aux__text {
  flex: 1;
  min-width: 0;
}

.br-bento-aux__text .br-bento__title {
  font-size: 15px;
  margin-bottom: 2px;
}

/* —— Loaders grid —— */
.br-loaders {
  background: #fff;
  border-block: 1px solid var(--br-line);
}

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

.br-loader-card {
  background: #f8fafc;
  border-radius: 18px;
  border: 1px solid var(--br-line);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.br-loader-card:hover {
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
  transform: translateY(-3px);
  border-color: #cbd5e1;
}

.br-loader-card__media {
  aspect-ratio: 4/3;
  background: #fff;
  padding: 20px;
  border-bottom: 1px solid var(--br-line);
}

.br-loader-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.br-loader-card__body {
  padding: 18px 20px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.br-loader-card__tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--br-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.br-loader-card__body h3 {
  margin: 8px 0 12px;
  font-size: 17px;
  font-weight: 800;
  color: var(--br-brand);
  line-height: 1.3;
  flex: 1;
}

.br-loader-card__link {
  font-size: 13px;
  font-weight: 700;
  color: #0369a1;
}

.br-loaders__foot {
  margin-top: 28px;
  text-align: center;
}

/* —— Pillars —— */
.br-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.br-pillar {
  background: #fff;
  padding: 26px 20px;
  text-align: center;
  border-radius: 16px;
  border: 1px solid var(--br-line);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.br-pillar__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ccfbf1, #99f6e4);
  color: #0f766e;
  font-size: 18px;
  font-weight: 800;
  line-height: 44px;
}

.br-pillar h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--br-brand);
}

.br-pillar p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--br-muted);
}

/* —— Mosaic —— */
.br-mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, minmax(150px, 1fr));
  gap: 12px;
}

.br-mosaic a {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  min-height: 150px;
}

.br-mosaic a:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.br-mosaic a:nth-child(2),
.br-mosaic a:nth-child(3) {
  grid-column: span 2;
}

.br-mosaic a:nth-child(4),
.br-mosaic a:nth-child(5) {
  grid-column: span 2;
}

.br-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.br-mosaic a:hover img {
  transform: scale(1.06);
}

.br-mosaic span {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: rgba(12, 74, 110, 0.88);
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* —— Engineering —— */
.br-engine {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.br-engine__copy > p {
  color: var(--br-muted);
  line-height: 1.65;
  font-size: 15px;
  margin: 0 0 8px;
}

.br-engine__steps {
  list-style: none;
  margin: 20px 0 24px;
  padding: 0;
  counter-reset: step;
}

.br-engine__steps li {
  position: relative;
  padding: 14px 16px 14px 52px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid var(--br-line);
  border-radius: 12px;
  counter-increment: step;
}

.br-engine__steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--br-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 28px;
  text-align: center;
}

.br-engine__steps strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--br-brand);
}

.br-engine__steps p {
  margin: 0;
  font-size: 13px;
  color: var(--br-muted);
  line-height: 1.5;
}

.br-engine__media {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.br-engine__media img {
  width: 100%;
  display: block;
}

/* —— Insights —— */
.br-insights__rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.br-insight {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid var(--br-line);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}

.br-insight:hover {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.br-insight__img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
}

.br-insight__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.br-insight__body {
  padding: 16px 18px 20px;
  flex: 1;
}

.br-insight__date {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.br-insight h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--br-brand);
}

.br-insight p {
  margin: 0;
  font-size: 13px;
  color: var(--br-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.br-guide-links {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* —— FAQ + quote —— */
.br-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: start;
}

.br-quote-panel {
  position: sticky;
  top: calc(var(--bom-header-h, 72px) + 16px);
  padding: 26px 24px;
  background: linear-gradient(160deg, #0c4a6e 0%, #075985 55%, #0d9488 100%);
  color: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(12, 74, 110, 0.25);
}

.br-quote-panel h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
}

.br-quote-panel > p {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.92;
}

.br-quote-panel__contacts {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.8;
}

.br-quote-panel__contacts a {
  color: #99f6e4;
  font-weight: 600;
  text-decoration: none;
}

.br-quote-panel__contacts a:hover {
  text-decoration: underline;
}

.br-quote-panel .bomrobot-btn--light {
  display: flex !important;
  width: 100%;
  justify-content: center;
  color: var(--br-brand) !important;
  font-weight: 700 !important;
}

.br-home .home-faq__list {
  margin: 0;
}

.br-home .home-faq__item {
  border: 1px solid var(--br-line);
  border-radius: 12px;
  margin-bottom: 8px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.br-home .home-faq__item.is-open {
  border-color: #99f6e4;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.08);
}

.br-home .home-faq__question {
  width: 100%;
  text-align: left;
  padding: 16px 44px 16px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--br-brand);
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  line-height: 1.45;
}

.br-home .home-faq__question::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--br-brand);
  font-size: 18px;
  font-weight: 400;
  line-height: 26px;
  text-align: center;
}

.br-home .home-faq__item.is-open .home-faq__question::after {
  content: "−";
  background: #ccfbf1;
  color: #0f766e;
}

.br-home .home-faq__answer {
  padding: 0 18px 16px;
  font-size: 14px;
  color: #475569;
  line-height: 1.65;
}

.br-home .home-faq__answer p {
  margin: 0;
}

/* —— Bottom CTA —— */
.br-home .br-bottombar {
  padding: 48px 0 56px;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  color: #fff !important;
  text-align: center;
}

.br-home .br-bottombar h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff !important;
}

.br-home .br-bottombar p {
  margin: 0 0 22px;
  font-size: 15px;
  max-width: 42ch;
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.88) !important;
  opacity: 1;
}

.br-bottombar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.br-home .br-btn-ghost {
  background: transparent !important;
  border: 2px solid rgba(255, 255, 255, 0.65) !important;
  color: #fff !important;
}

.br-home .br-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: #fff !important;
}

/* Hide legacy home blocks */
.br-home .home-hero,
.br-home .home-contact-strip,
.br-home .home-loaders,
.br-home .home-categories,
.br-home .home-applications,
.br-home .home-about,
.br-home .home-manufacturing,
.br-home .home-guides,
.br-home .home-au-guides,
.br-home .home-cta {
  display: none !important;
}

@media (max-width: 1024px) {
  .br-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .br-hero__copy {
    justify-content: flex-start;
    order: 2;
  }

  .br-hero__visual {
    order: 1;
    margin: var(--br-pad);
    margin-bottom: 0;
  }

  .br-hero__metrics {
    grid-template-columns: 1fr;
  }

  .br-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }

  .br-bento__item--hero {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .br-bento-aux {
    grid-template-columns: 1fr;
  }

  .br-bento-aux__card {
    grid-column: 1 / -1;
  }

  .br-loader-grid {
    grid-template-columns: 1fr;
  }

  .br-pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .br-engine {
    grid-template-columns: 1fr;
  }

  .br-split {
    grid-template-columns: 1fr;
  }

  .br-quote-panel {
    position: static;
  }

  .br-insights__rail {
    grid-template-columns: 1fr;
  }

  .br-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }

  .br-mosaic a {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    min-height: 130px;
  }

  .br-mosaic a:nth-child(1) {
    grid-column: span 2 !important;
    min-height: 200px;
  }
}

@media (max-width: 600px) {
  .br-bento {
    grid-template-columns: 1fr;
  }

  .br-bento-aux__card {
    flex-direction: column;
    align-items: flex-start;
  }

  .br-bento-aux__thumb {
    width: 100%;
    flex: none;
    height: 100px;
  }

  .br-pillars {
    grid-template-columns: 1fr;
  }

  .br-mosaic a:nth-child(1) {
    grid-column: span 2 !important;
  }
}
