/* Boston Bay Legal – the one style sheet for the whole site.
   Wide screens get the original 994px layout; tablets and phones get the
   same pieces rearranged to fit (see the two @media blocks at the end). */

:root {
  --menu: #1fa8f9;          /* menu buttons and the Send message button */
  --menu-hover: #0b93e4;    /* those buttons under the pointer */
  --menu-current: #c1e4ff;  /* the current page's menu button */
  --bar: #7dccff;           /* the two light blue bars */
  --tagline: #3399ff;
  --grey-text: #404040;     /* Links and About pages */
  --cpi: #0080ff;           /* CPI note on the Links page */
}

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

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

body {
  background: #fff;
  color: #000;
  font: 16px/1.15 Arial, Helvetica, "Liberation Sans", sans-serif;
}

img { display: block; border: 0; }
a { color: #000; }

/* ---------- Page frame: grey-to-white panel, 994px wide ---------- */

.page {
  width: 994px;
  min-height: 768px;
  margin: 0 auto;
  padding: 0 0 10px 45px;
  background: #fff linear-gradient(#e0e0e0, #fefefe) no-repeat;
  background-size: 100% 768px;
}

/* ---------- Logo and tagline ---------- */

.masthead {
  position: relative;
  width: 904px;
  height: 110px;
}

.logo {
  position: absolute;
  left: 5px;
  top: 10px;
  display: block;
  width: 341px;
}
.logo img { width: 100%; height: auto; }

.tagline {
  position: absolute;
  right: 0;
  top: 89px;
  color: var(--tagline);
}

/* ---------- Photo strip and bars ---------- */

.banner {
  display: flex;
  gap: 1px;
  width: 904px;
  height: 202px;
}
.banner img { width: auto; height: 202px; }

.bar {
  width: 904px;
  height: 18px;
  background: var(--bar);
}

/* ---------- Photo, menu and page text ---------- */

.main {
  display: flex;
  align-items: flex-start;
}

.portrait {
  flex: none;
  width: 153px;
  height: 405px;
  margin-top: 5px;
}

.side {
  flex: none;
  width: 134px;
  margin-left: 42px;
  padding-top: 80px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Styled like the Contact page's Send message button: rounded, bold, lifting a little under the pointer */
.menu a {
  display: block;
  height: 36px;
  line-height: 36px;
  border-radius: 4px;
  text-align: center;
  background: var(--menu);
  color: #fff;
  font-weight: bold;
  letter-spacing: .02em;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .16);
  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.menu a:hover,
.menu a:focus-visible {
  background: var(--menu-hover);
  box-shadow: 0 5px 12px rgba(11, 147, 228, .35);
  transform: translateY(-1px);
}
.menu a[aria-current="page"] {
  background: var(--menu-current);
  color: #000;
  box-shadow: none;
  transform: none;
}
.menu a:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .menu a { transition: none; }
  .menu a:hover,
  .menu a:focus-visible { transform: none; }
}

.liability {
  margin-top: 30px;
  font: 12px/1.15 "Arial Narrow", "Liberation Sans Narrow", "Helvetica Neue", Arial, sans-serif;
  font-stretch: condensed;
  text-align: center;
}

.content {
  flex: none;
  width: 551px;
  margin-left: 26px;
  padding-top: 30px;
}

/* Headings and paragraphs are spaced one blank line apart, as before */
.content h1 {
  font-size: 1em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 1.15em;
}
.content p { margin-bottom: 1.15em; }
.content > :last-child { margin-bottom: 0; }

.grey { color: var(--grey-text); }

/* Fixed Fees page: 10pt text */
.small { font-size: 13.33px; }
.small h1 { line-height: 18.4px; margin-bottom: 18.4px; }
.small p { line-height: 15.5px; margin-bottom: 15.5px; }

/* Links page: 13px text with full-size blank lines between items */
.links p { font-size: 13px; line-height: 15.5px; margin-bottom: 18.4px; }
.cpi { margin-top: 36.8px; text-align: center; color: var(--cpi); }
.cpi p { margin-bottom: 0; }
.cpi a { color: inherit; }

/* Contact page: labels and details in two columns */
.details { margin-left: 20px; padding-top: 3px; }
.details div {
  display: grid;
  grid-template-columns: 130px 1fr;
  margin-bottom: 1.15em;
}
.details dt { font-weight: normal; }
.details dd { margin: 0; }
.details a[href^="tel:"] { text-decoration: none; color: inherit; }

/* Contact page: the two Google Maps links under the address */
.map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}
.map-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 9px;
  border: 1px solid #9fd3fb;
  border-radius: 16px;
  background: #fff;
  color: #0a6aa8;
  font-size: 14px;
  line-height: 18px;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.map-links a:hover,
.map-links a:focus-visible { background: var(--menu-current); border-color: var(--menu); }
.map-links a:focus-visible { outline: 2px solid #000; outline-offset: 1px; }
.map-links svg { width: 16px; height: 16px; flex: none; fill: currentColor; }

/* Contact page: the enquiry form – each label above its box, Phone and Email side by side */
.enquiry {
  margin: 0 2px 2.3em 20px;   /* 2px on the right keeps the boxes in line with the end of the light blue bars */
  padding-top: 3px;
}
.enquiry .field { margin-bottom: 14px; }
.enquiry .pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
}
.enquiry label {
  display: block;
  margin-bottom: 5px;
}
.enquiry input,
.enquiry select,
.enquiry textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 6px 9px;
  border: 1px solid #a3a3a3;
  border-radius: 4px;
  background: #fff;
  color: #000;
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .07);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.enquiry input,
.enquiry select { height: 34px; }
.enquiry select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 34px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;   /* on a phone the longest choices end in … once chosen */
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23404040' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 12px center;
  cursor: pointer;
}
.enquiry textarea { min-height: 9.5em; resize: vertical; line-height: 1.35; }
.enquiry input:focus,
.enquiry select:focus,
.enquiry textarea:focus {
  outline: none;
  border-color: var(--menu);
  box-shadow: 0 0 0 3px rgba(31, 168, 249, .25);
}
.enquiry .note {
  margin: 2px 0 14px;
  font-size: 13.33px;
  line-height: 15.5px;
  color: var(--grey-text);
}

/* The Send button: the menu's blue, lifting a little under the pointer (the menu buttons match it) */
.enquiry button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 22px 0 24px;
  border: 0;
  border-radius: 4px;
  background: var(--menu);
  color: #fff;
  font: bold 16px/1 Arial, Helvetica, "Liberation Sans", sans-serif;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .16);
  transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.enquiry button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform .15s ease;
}
.enquiry button:hover {
  background: var(--menu-hover);
  box-shadow: 0 5px 12px rgba(11, 147, 228, .35);
  transform: translateY(-1px);
}
.enquiry button:hover svg { transform: translateX(3px); }
.enquiry button:active { transform: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.enquiry button:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.enquiry button:disabled {
  background: var(--menu-current);
  color: #000;
  box-shadow: none;
  transform: none;
  cursor: default;
}
.enquiry button:disabled svg { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .enquiry button,
  .enquiry button svg { transition: none; }
  .enquiry button:hover,
  .enquiry button:hover svg { transform: none; }
}
.enquiry .status { margin: 12px 0 0; }
.enquiry .status:empty { display: none; }
.enquiry .status.error { color: #b00000; }

/* The box people never see: robots that fill in every box give themselves away.
   The page hides it with its own style too, in case a browser is still using an old copy of this sheet. */
.enquiry .trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* What shows instead of the form: the thank-you, or (without JavaScript) a pointer to the details */
.enquiry-done,
.enquiry-off { margin: 0 0 2.3em 20px; }
.enquiry-done:focus { outline: none; }

/* ---------- Tablets (and narrow desktop windows) ---------- */

@media (max-width: 999px) {
  .page {
    width: auto;
    min-height: 0;
    padding: 0 16px 16px;
  }
  .masthead {
    width: auto;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    padding: 10px 0 8px;
  }
  /* full size, 10px from the top as on a computer, so its shading matches the page's */
  .logo { position: static; width: 341px; max-width: 100%; flex: none; }
  .tagline { position: static; text-align: right; }

  .banner { width: auto; height: auto; }
  .banner img {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 301 / 202;
    object-fit: cover;
  }
  .bar { width: auto; height: 12px; }

  .main { padding: 16px 0; gap: 20px; }
  .portrait {
    width: 110px;
    height: auto;
    margin: 0;
    mix-blend-mode: darken;   /* lets the page's own shading show around the photo */
  }
  .side { margin: 0; padding: 0; }
  .menu { gap: 8px; }
  .liability { margin-top: 16px; }
  .content { flex: 1 1 0; min-width: 0; width: auto; margin: 0; padding: 0; }
  .enquiry { margin-right: 0; }
}

/* ---------- Phones ---------- */

@media (max-width: 599px) {
  .masthead { flex-direction: column; align-items: flex-start; gap: 6px; }
  .tagline { align-self: flex-end; }

  .main { flex-wrap: wrap; gap: 16px; }
  .portrait { width: 96px; }
  .side { flex: 1 1 0; min-width: 0; max-width: 320px; }
  .content { flex: 1 1 100%; margin-top: 8px; }

  .small, .small p, .links p { font-size: 15px; line-height: 1.3; }
  .details { margin-left: 0; }
  .details div { grid-template-columns: 112px 1fr; }

  /* the form: Phone and Email one above the other, and the Send button the full width */
  .enquiry, .enquiry-done, .enquiry-off { margin-left: 0; }
  .enquiry .pair { grid-template-columns: 1fr; }
  .enquiry .note { font-size: 15px; line-height: 1.3; }
  .enquiry button { width: 100%; justify-content: center; }
}
