/* ==========================================================================
   Nationwide Planning Permission - base styles (shared by every page)
   Bootstrap 5 supplies the grid and utilities. Page-specific rules live in
   css/pages/<group>.css, scoped to body.page-<name> or a unique class prefix.
   Values are taken from the original site's stylesheet so pages map one-to-one.
   ========================================================================== */

/* 1. Tokens -------------------------------------------------------------- */
:root {
  --navy: #082750;          /* original --ink: headings, header buttons, featured band */
  --navy-hover: #0d3567;
  --ink: #041a37;           /* original --ink-deep: body text, dark CTA band, footer */
  --ink-soft: #263c58;      /* navigation links */
  --muted: #4a596b;
  --gold: #e5a93d;          /* original --accent */
  --gold-dark: #b87814;     /* original --accent-dark: eyebrows, icons, hover */
  --cream: #f6f3ec;         /* original --paper */
  --sand: #f0ede6;
  --mist: #e8f0f8;          /* original --blue-soft */
  --white: #ffffff;
  --success: #1f7a5a;
  --line: #d8dee7;
  --radius: 5px;
  --gutter: clamp(24px, 7vw, 110px);
  --header-h: 92px;
  --header-row: 92px;
  --announce-h: 38px;
  --shadow: 0 24px 70px rgba(4, 26, 55, 0.13);

  --bs-body-font-family: Arial, Helvetica, sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--cream);
  --bs-link-color: var(--navy);
  --bs-link-hover-color: var(--gold-dark);
}

/* 2. Base ---------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 24px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--navy);
  font-weight: 500;
}

p {
  margin-bottom: 0;
}

a {
  color: var(--navy);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--gold-dark);
}

img,
svg {
  max-width: 100%;
}

.icon {
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
}

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

main [id] {
  scroll-margin-top: 24px;
}

.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;
}

/* 3. Typography helpers -------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 18px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background: var(--gold);
  flex: 0 0 auto;
}

.lead {
  font-size: 20px;
  line-height: 32px;
  color: var(--muted);
}

.section-heading {
  max-width: 760px;
}

.section-heading h2 {
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 18px 0;
}

.section-heading p {
  color: #5e6c7d;
  font-size: 17px;
  line-height: 1.6;
}

.section-heading.light h2 {
  color: var(--white);
}

.section-heading.light p {
  color: #b8c6d6;
}

.text-link {
  display: inline;
  padding-bottom: 4px;
  border-bottom: 1px solid #99a2ad;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--navy);
}

.text-link .icon {
  display: block;
  width: 16px;
  height: 24px;
}

/* 4. Buttons ------------------------------------------------------------- */
.button,
.button-dark,
.button-accent,
.button-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 21px;
  border: 0;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.button:hover,
.button-dark:hover,
.button-accent:hover,
.button-outline:hover {
  transform: translateY(-2px);
}

/* Icons keep the original's 16px drawing inside a 24px box (SVG height attribute) */
.button .icon,
.button-dark .icon,
.button-accent .icon,
.button-outline .icon {
  width: 16px;
  height: 24px;
}

.button-dark,
.button {
  background: var(--navy);
  color: var(--white);
}

.button-dark {
  box-shadow: 0 10px 28px rgba(8, 39, 80, 0.18);
}

.button-dark:hover,
.button:hover,
.button-dark:focus-visible,
.button:focus-visible {
  background: var(--navy-hover);
  color: var(--white);
}

.button-accent {
  min-height: 56px;
  padding: 0 27px;
  background: var(--gold);
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(184, 120, 20, 0.22);
}

.button-accent:hover,
.button-accent:focus-visible {
  background: var(--gold-dark);
  color: var(--ink);
}

.button-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(8, 39, 80, 0.28);
}

.button-outline:hover,
.button-outline:focus-visible {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.button:disabled,
.button-dark:disabled,
.button-accent:disabled {
  opacity: 0.7;
  cursor: wait;
}

/* 5. Announcement bar and header ---------------------------------------- */
.announcement {
  background: var(--navy);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  padding: 10px 24px;
}

.site-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: calc(var(--header-row) - 1px) auto;
  align-items: center;
  column-gap: 26px;
  padding: 0 clamp(24px, 5vw, 78px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(8, 39, 80, 0.1);
}

.site-header .brand {
  grid-column: 1;
  grid-row: 1;
}

.site-header nav:not(.legal-nav) {
  grid-column: 2;
  grid-row: 1;
}

.site-header .header-actions {
  grid-column: 3;
  grid-row: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: 250px;
  text-decoration: none;
  min-width: 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--navy);
}

.brand-mark {
  position: relative;
  display: block;
  flex: 0 0 55px;
  width: 55px;
  height: 58px;
  overflow: hidden;
}

.brand-mark img {
  position: absolute;
  top: -32px;
  left: -48px;
  display: block;
  width: 150px;
  height: 150px;
  max-width: none;
}

.brand-words {
  display: block;
  min-width: 0;
  line-height: 1.5;
}

.brand-words strong,
.brand-words small {
  display: block;
  white-space: nowrap;
  text-transform: uppercase;
}

.brand-words strong {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.17em;
}

.brand-words small {
  margin-top: 4px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.23em;
  color: #626b76;
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.2vw, 34px);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}

.site-header nav a {
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.5;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--gold-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}

.portal-link {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.phone-link .icon {
  width: 16px;
  height: 24px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 6. Footer -------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: #ffffff;
  font-size: 16px;
  line-height: 24px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr 0.8fr 1.2fr;
  gap: clamp(32px, 5vw, 76px);
  padding: 78px clamp(24px, 6vw, 90px) 62px;
}

.footer-brand .brand-lockup.inverse {
  display: flex;
  width: max-content;
  color: #ffffff;
}

.footer-brand .brand-lockup.inverse .brand-mark img {
  filter: brightness(0) invert(1);
}

.footer-brand .brand-lockup.inverse .brand-words small {
  color: #b9c6d5;
}

.footer-brand p {
  max-width: 370px;
  margin: 15px 0 28px;
  color: #b9c6d5;
  font-size: 14px;
  line-height: 1.7;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.social-links span {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  opacity: 0.38;
}

.social-links .icon {
  width: 16px;
  height: 16px;
}

.footer-column,
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
}

.footer-column h3,
.footer-contact h3 {
  margin: 0 0 14px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-column a {
  color: #c6d1de;
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
}

.footer-column a:hover {
  color: #ffffff;
}

.footer-contact > a:not(.button),
.footer-contact > p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: #d2dce7;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.footer-contact > a:not(.button):hover {
  color: #ffffff;
}

.footer-contact .icon {
  width: 16px;
  min-width: 16px;
  height: 24px;
}

.footer-contact .button-accent {
  margin-top: 12px;
  color: var(--ink);
  white-space: normal;
  text-align: center;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px 24px;
  padding: 22px clamp(24px, 6vw, 90px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a5b8;
  font-size: 11px;
  line-height: 16.5px;
}

.footer-legal p {
  margin: 0;
}

.footer-legal nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-legal a {
  color: #94a5b8;
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--gold);
}

/* 7. Floating contact dock ----------------------------------------------- */
.contact-dock {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  filter: drop-shadow(0 14px 28px rgba(4, 26, 55, 0.25));
}

.dock-call,
.dock-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  border: 0;
  border-radius: 28px;
  text-decoration: none;
  cursor: pointer;
}

.dock-call {
  width: 50px;
  height: 50px;
  background: var(--white);
  color: var(--navy);
}

.dock-call:hover {
  color: var(--gold-dark);
}

.dock-help {
  height: 50px;
  padding: 0 21px;
  background: var(--navy);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.dock-help:hover {
  background: var(--navy-hover);
  color: var(--white);
}

.contact-dock .icon {
  width: 19px;
  height: 19px;
}

.help-panel {
  position: absolute;
  right: 0;
  bottom: 62px;
  width: 300px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(4, 26, 55, 0.18);
  filter: none;
}

.help-panel[hidden] {
  display: none;
}

.help-panel h2 {
  font-size: 22px;
  margin: 0 0 8px;
}

.help-panel p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.help-panel .button-dark {
  width: 100%;
  margin-bottom: 14px;
}

.help-mail {
  font-size: 13px;
  font-weight: 700;
  word-break: break-all;
}

/* 8. Breadcrumbs and calls to action (shared) ---------------------------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--navy);
}

.breadcrumbs .icon {
  width: 14px;
  height: 14px;
}

.final-cta {
  background: var(--ink);
  color: var(--white);
  padding: 105px 24px;
  text-align: center;
}

.final-cta .eyebrow {
  justify-content: center;
}

.final-cta h2 {
  max-width: 900px;
  margin: 18px auto;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 4vw, 60px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.final-cta p {
  max-width: 680px;
  margin: 0 auto 30px;
  color: #bbc7d5;
  font-size: 16px;
  line-height: 1.6;
}

.final-cta > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
}

.final-cta > div > a:last-child {
  color: var(--white);
  font-weight: 800;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.final-cta.compact {
  padding-block: 82px;
}

/* 9. Forms (shared enquiry pattern) -------------------------------------- */
.enquiry-form .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.enquiry-form label,
.enquiry-form .field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.enquiry-form .req {
  color: #b3261e;
}

.enquiry-form input:not([type="checkbox"]):not([type="radio"]),
.enquiry-form select,
.enquiry-form textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(8, 39, 80, 0.2);
  border-radius: var(--radius);
}

.enquiry-form textarea {
  min-height: 130px;
  resize: vertical;
}

.enquiry-form input:focus,
.enquiry-form select:focus,
.enquiry-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(229, 169, 61, 0.25);
}

.enquiry-form .is-invalid input,
.enquiry-form .is-invalid select,
.enquiry-form .is-invalid textarea,
.enquiry-form input.is-invalid,
.enquiry-form select.is-invalid,
.enquiry-form textarea.is-invalid {
  border-color: #b3261e;
  background: #fff8f7;
}

.enquiry-form .field-error {
  display: none;
  font-size: 13px;
  line-height: 18px;
  color: #a31f17;
}

.enquiry-form .is-invalid .field-error {
  display: block;
}

.enquiry-form .consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.enquiry-form .consent input {
  margin-top: 4px;
  accent-color: var(--navy);
}

.enquiry-form .hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 4px;
  font-size: 15px;
  line-height: 24px;
}

.form-status[hidden] {
  display: none;
}

.form-status.is-success {
  background: #e9f5ec;
  color: #1d5a2e;
  border-left: 4px solid #2f8a4b;
}

.form-status.is-error {
  background: #fbeceb;
  color: #8a1f17;
  border-left: 4px solid #b3261e;
}

/* 10. FAQ (native details, shared) --------------------------------------- */
.faq-list details {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.faq-list details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  cursor: pointer;
  list-style: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  line-height: 30px;
  color: var(--navy);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary > span {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  color: var(--gold-dark);
  transition: transform 0.2s ease;
}

.faq-list details[open] summary > span {
  transform: rotate(45deg);
}

.faq-list details p {
  margin-top: 14px;
  max-width: 820px;
  color: var(--muted);
  font-size: 16px;
  line-height: 26px;
}

/* 11. Responsive --------------------------------------------------------- */
@media (max-width: 1150px) {
  .site-header {
    column-gap: 18px;
  }

  .site-header .brand {
    width: 225px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: 4px;
  }

  .site-header nav:not(.legal-nav) {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 6px 0 14px;
    border-top: 1px solid rgba(8, 39, 80, 0.1);
  }

  .site-header.nav-open nav:not(.legal-nav) {
    display: flex;
  }

  .site-header nav a {
    width: 100%;
    padding: 12px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
  }

  .site-header nav a:last-child {
    border-bottom: 0;
  }
}

@media (min-width: 1151px) {
  .site-header nav:not(.legal-nav) {
    justify-content: center;
  }
}

@media (max-width: 820px) {
  :root {
    --header-row: 78px;
  }

  .site-header {
    padding: 0 20px;
  }

  .site-header .brand {
    width: 225px;
  }

  .phone-link {
    display: none;
  }

  .header-actions .button {
    padding-inline: 15px;
  }
}

@media (max-width: 760px) {
  :root {
    --header-row: 76px;
  }

  .site-header {
    padding: 0 18px;
    column-gap: 8px;
  }

  .site-header .brand {
    width: 205px;
  }

  .nav-toggle {
    margin-left: 0;
  }

  .brand-mark {
    flex-basis: 47px;
    width: 47px;
  }

  .brand-mark img {
    top: -26px;
    left: -47px;
    width: 138px;
    height: 138px;
  }

  .brand-words strong {
    font-size: 17px;
  }

  .brand-words small {
    font-size: 7px;
  }

  .announcement {
    text-align: left;
    padding-right: 18px;
  }

  .portal-link {
    display: none;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .contact-dock {
    right: 12px;
    bottom: 12px;
  }

  .dock-help {
    width: 50px;
    padding: 0;
    font-size: 0;
  }

  .dock-help .icon {
    margin: 0;
  }

  .help-panel {
    width: min(300px, calc(100vw - 32px));
  }

  .final-cta > div {
    flex-direction: column;
  }

  .faq-list summary {
    font-size: 19px;
    line-height: 26px;
  }
}

@media (max-width: 560px) {
  .announcement {
    font-size: 9px;
    line-height: 1.5;
    letter-spacing: 0.06em;
  }

  .header-actions .button {
    width: 46px;
    padding: 0;
    font-size: 0;
  }

  .header-actions .button .icon {
    width: 19px;
    height: 19px;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* 12. Review fixes: planning-help form and mobile CTA */
.help-panel {
  width: min(340px, calc(100vw - 32px));
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 22px;
}

.help-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.help-head h2 {
  font-size: 22px;
  margin: 0;
}

.help-panel .help-eyebrow {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 4px;
}

.help-close {
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 26px;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}

.help-form .field {
  gap: 4px;
  margin-bottom: 10px;
}

.help-form label {
  font-size: 12px;
}

.help-form input:not([type="checkbox"]),
.help-form textarea {
  padding: 9px 11px;
  font-size: 14px;
}

.help-form textarea {
  min-height: 70px;
}

.help-form .field-error {
  font-size: 12px;
}

.help-submit {
  width: 100%;
  margin-top: 4px;
}

.help-form .form-status {
  font-size: 13px;
  padding: 10px 12px;
  margin-top: 10px;
}

@media (max-width: 575.98px) {
  .final-cta .button-accent {
    padding: 0 16px;
  }
}
