/* Shared frame for Local Trades UK. Homepage sections live in home.css. */

:root {
  --ink: #15241e;
  --paper: #f3f6f4;
  --white: #ffffff;
  --tile: #e7eee9;
  --line: #d5e0da;
  --green: #0e6b4f;
  --green-hover: #0a5340;
  --muted: #3d5248;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --header: 4.5rem;
  --ease: cubic-bezier(0.33, 1, 0.68, 1);
  --pad: clamp(1.25rem, 3vw, 2.5rem);
  --measure: 38rem;
  color-scheme: light;
  --hero-p: 0;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

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

button,
input,
select {
  font: inherit;
  color: inherit;
}

select {
  appearance: none;
  width: 100%;
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 2.6rem 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.2 6 6.2 11 1.2' fill='none' stroke='%2315241e' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 0.7rem;
  cursor: pointer;
  line-height: 1.3;
}

select:hover {
  border-color: var(--ink);
}

select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

select option {
  color: var(--ink);
  background: var(--white);
}

.select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.select-native {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.select-face {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 2.6rem 0.55rem 0.9rem;
  border: 1px solid var(--line);
  background: var(--white);
  text-align: left;
  cursor: pointer;
  line-height: 1.3;
}

.select-face::after {
  content: "";
  position: absolute;
  right: 0.9rem;
  top: 50%;
  width: 0.7rem;
  height: 0.45rem;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.2 6 6.2 11 1.2' fill='none' stroke='%2315241e' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s var(--ease);
}

.select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-face.is-placeholder .select-value {
  color: var(--muted);
}

.select-face:hover,
.select.is-open .select-face {
  border-color: var(--ink);
}

.select.is-open .select-face::after {
  transform: translateY(-50%) rotate(180deg);
}

.select.is-disabled .select-face {
  opacity: 0.55;
  cursor: not-allowed;
}

.select-menu {
  position: fixed;
  z-index: 60;
  margin: 0;
  padding: 0.3rem 0;
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--ink);
}

.select-menu[hidden] {
  display: none;
}

.select-option {
  display: block;
  width: 100%;
  padding: 0.7rem 0.95rem;
  text-align: left;
  line-height: 1.35;
  cursor: pointer;
}

.select-option.is-active {
  background: var(--tile);
}

.select-option[aria-selected="true"] {
  color: var(--green);
}

.select-option.is-placeholder {
  color: var(--muted);
}

.select-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
  .select-face::after {
    transition: none;
  }
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

p,
h1,
h2,
h3,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 80;
  background: var(--ink);
  color: var(--white);
  padding: 0.55rem 0.8rem;
}

.skip:focus {
  top: 0.6rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(100%, 90rem);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.kicker {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.2;
}

.btn,
.arrow-link {
  touch-action: manipulation;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.15rem;
  background: var(--green);
  color: var(--white);
  line-height: 1.2;
  transition: background-color 0.3s var(--ease);
}

.btn:hover {
  background: var(--green-hover);
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;
  line-height: 1.2;
}

.arrow-link::after {
  content: "";
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h12M9 3.5 13.5 8 9 12.5' fill='none' stroke='%23f3f6f4' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1rem;
  transition: transform 0.35s var(--ease);
}

.arrow-link:hover::after {
  transform: translateX(0.35rem);
}

.text-link {
  position: relative;
  display: inline;
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transition: width 0.3s var(--ease);
}

.text-link:hover::after {
  width: 0;
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header);
  background: var(--white);
  border-bottom: 1px solid transparent;
}

.header-bar {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: min(100%, 96rem);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
  flex: none;
  white-space: nowrap;
}

.logo svg {
  display: block;
  width: 1.55rem;
  height: 1.55rem;
}

.country-flag {
  display: block;
  flex: none;
  line-height: 0;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(21, 36, 30, 0.28);
}

.logo .country-flag svg {
  display: block;
  height: 1.45rem;
}

.logo .country-flag-uk svg {
  width: 2.9rem;
  height: 1.45rem;
}

.logo .country-flag-mt svg {
  width: 2.18rem;
  height: 1.45rem;
}

.menu-btn {
  margin-left: auto;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  background: var(--ink);
  flex: none;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--white);
  position: relative;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease), background-color 0.2s linear;
}

.menu-lines::before,
.menu-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-lines::before {
  top: -6px;
}

.menu-lines::after {
  top: 6px;
}

.menu-btn[aria-expanded="true"] .menu-lines {
  background: transparent;
}

.menu-btn[aria-expanded="true"] .menu-lines::before {
  top: 0;
  transform: rotate(45deg);
}

.menu-btn[aria-expanded="true"] .menu-lines::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nav-links,
.sub,
.meta-links {
  display: flex;
  flex-direction: column;
}

.nav-links a,
.sub a,
.nav-toggle,
.meta-links a,
.meta-links span {
  font-size: 1.35rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  padding-block: 0.35rem;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  letter-spacing: -0.02em;
}

.nav-toggle::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  margin-left: 0.6rem;
  transition: transform 0.2s var(--ease);
}

.has-sub.is-open > .nav-toggle {
  color: var(--green);
}

.has-sub.is-open > .nav-toggle::after {
  transform: rotate(225deg) translateY(-2px);
}

.sub {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 0;
  margin: 0;
  padding: 0 0 0 0.85rem;
  border-left: 2px solid transparent;
  visibility: hidden;
  pointer-events: none;
  transition: max-height 0.28s var(--ease), visibility 0s linear 0.28s, border-color 0.2s var(--ease);
}

.has-sub.is-open > .sub {
  max-height: 32rem;
  margin: 0.15rem 0 0.35rem;
  padding-top: 0.1rem;
  padding-bottom: 0.15rem;
  border-left-color: var(--green);
  visibility: visible;
  pointer-events: auto;
  transition: max-height 0.28s var(--ease), visibility 0s, border-color 0.2s var(--ease);
}

.sub a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.6rem;
  font-size: 1.05rem;
  color: var(--ink);
  padding-block: 0.4rem;
  border-bottom: 1px solid var(--line);
}

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

.sub a::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  flex: none;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s var(--ease);
}

.sub a:hover {
  color: var(--green);
}

.sub a:hover::after {
  transform: translateX(0.15rem) rotate(45deg);
}

.header-side {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: auto;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: baseline;
}

.meta-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-links {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.15rem 0.85rem;
}

.meta-links a,
.meta-links span {
  font-size: 0.95rem;
  padding: 0;
}

.meta-links [aria-current="true"] {
  font-weight: 600;
}

.region-flag {
  display: inline-block;
  height: 0.72em;
  width: auto;
  margin-right: 0.35rem;
  vertical-align: -0.08em;
  border-radius: 1px;
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 0 0 1px rgba(21, 36, 30, 0.28);
}

.region-flag svg {
  display: block;
  height: 0.72em;
  width: auto;
}

.header-cta {
  align-self: flex-start;
}

@media (max-width: 1359px) {
  html:not(.has-js) .site-header {
    position: sticky;
    height: auto;
  }

  html:not(.has-js) .header-bar {
    flex-wrap: wrap;
    height: auto;
    padding-block: 0.85rem 1.1rem;
  }

  html:not(.has-js) .menu-btn {
    display: none;
  }

  .has-js .site-nav {
    display: none;
    position: fixed;
    inset: var(--header) 0 0 0;
    z-index: 40;
    background: var(--paper);
    padding: 1.5rem var(--pad) 2.5rem;
    overflow: auto;
  }

  .has-js .site-nav.is-open {
    display: flex;
  }

  body.menu-open {
    overflow: hidden;
  }
}

@media (min-width: 1360px) {
  .menu-btn {
    display: none;
  }

  .site-nav {
    flex: 1;
    flex-direction: row;
    align-items: center;
    gap: 1.15rem;
    min-width: 0;
  }

  .nav-links {
    flex-direction: row;
    align-items: center;
    gap: 0.15rem 0.85rem;
  }

  .meta-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .nav-links > li > a,
  .nav-toggle {
    font-size: 0.95rem;
    letter-spacing: 0;
    padding-block: 0.4rem;
    width: auto;
  }

  .nav-toggle::after {
    width: 0.35rem;
    height: 0.35rem;
  }

  .has-sub {
    position: relative;
  }

  .has-sub:hover:not(.is-dismissed) > .nav-toggle,
  .has-sub:focus-within:not(.is-dismissed) > .nav-toggle,
  .has-sub.is-open > .nav-toggle {
    color: var(--green);
  }

  .has-sub:hover:not(.is-dismissed) > .nav-toggle::after,
  .has-sub:focus-within:not(.is-dismissed) > .nav-toggle::after,
  .has-sub.is-open > .nav-toggle::after {
    transform: rotate(225deg) translateY(-2px);
  }

  .sub {
    position: absolute;
    top: calc(100% - 0.15rem);
    left: 0;
    min-width: 19rem;
    max-height: min(70vh, 28rem);
    overflow: auto;
    margin: 0;
    padding: 0.35rem 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 3px solid var(--green);
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.4rem);
    transition: opacity 0.18s var(--ease), transform 0.2s var(--ease), visibility 0s linear 0.2s;
  }

  .has-sub:hover:not(.is-dismissed) > .sub,
  .has-sub:focus-within:not(.is-dismissed) > .sub,
  .has-sub.is-open > .sub {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.18s var(--ease), transform 0.2s var(--ease), visibility 0s;
  }

  .sub a {
    min-height: 2.55rem;
    padding: 0.45rem 1rem;
    font-size: 0.95rem;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
  }

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

  .sub a:hover {
    background: var(--paper);
    color: var(--green);
  }

  .header-side {
    margin-top: 0;
    margin-left: auto;
    flex-direction: row;
    align-items: center;
    gap: 1.15rem;
  }

  .meta-line {
    gap: 0.45rem;
  }

  .meta-links a,
  .meta-links span {
    font-size: 0.82rem;
  }
}

/* Footer */

.site-footer {
  background: var(--white);
  padding-top: clamp(3.25rem, 7vw, 5.5rem);
  overflow-x: clip;
}

.footer-grid {
  display: grid;
  gap: 2.25rem 2rem;
}

.footer-lead {
  max-width: 14ch;
  font-size: clamp(1.7rem, 2.5vw, 2.15rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.footer-note {
  max-width: 28rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-prompt {
  margin-top: 1.45rem;
  font-size: 0.92rem;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.15rem;
  margin-top: 0.7rem;
}

.footer-mailbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.75rem;
  background: var(--ink);
  color: var(--white);
  font-size: 0.92rem;
  line-height: 1.2;
}

.footer-mailbtn svg {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.footer-mailbtn:hover {
  background: #0c1814;
}

.footer-col {
  font-size: 0.95rem;
}

.footer-col .kicker {
  margin-bottom: 0.65rem;
}

.footer-kicker {
  margin-top: 1.35rem;
}

.footer-col li + li {
  margin-top: 0.28rem;
}

.footer-col a:hover {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.wordmark {
  margin: clamp(2.75rem, 6vw, 4.75rem) 0 0;
  padding: 0 0.5vw;
  font-size: 12.2vw;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.78;
  text-align: center;
  white-space: nowrap;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.35rem 1.75rem;
  margin-top: 0.35rem;
  padding: 0.15rem var(--pad) 1.35rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.footer-base a:hover {
  color: var(--ink);
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: minmax(16rem, 1.15fr) minmax(8rem, 0.42fr) minmax(9rem, 0.5fr);
    column-gap: clamp(2rem, 6vw, 6.5rem);
    align-items: start;
  }

  .wordmark {
    font-size: 10.35vw;
    letter-spacing: -0.05em;
  }
}

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

  .btn,
  .arrow-link::after,
  .text-link::after,
  .menu-lines,
  .menu-lines::before,
  .menu-lines::after,
  .nav-toggle::after,
  .sub,
  .sub a::after {
    transition: none;
  }
}

/* Directory card fixed to the corner of a blog article. */
.blog-float {
  position: fixed;
  z-index: 30;
  right: max(22px, env(safe-area-inset-right, 0px));
  bottom: max(22px, env(safe-area-inset-bottom, 0px));
  width: min(308px, calc(100vw - 36px));
  margin: 0;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 40px rgba(21, 36, 30, 0.16);
  animation: blog-float-in 0.28s ease;
}

.blog-float-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.blog-float-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.blog-float-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(14, 107, 79, 0.16);
}

.blog-float-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.blog-float-close:hover,
.blog-float-close:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

.blog-float-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.blog-float-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0 0 14px;
}

.blog-float-amount {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--ink);
}

.blog-float-unit {
  color: var(--muted);
  font-size: 0.95rem;
}

.blog-float-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin-bottom: 12px;
  padding: 0.45rem 0.9rem;
  border-radius: 0;
  background: var(--green);
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}

.blog-float-cta:hover,
.blog-float-cta:focus-visible {
  background: var(--green-hover);
  color: var(--white);
}

.blog-float-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-float-chips li {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.blog-float .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body:has(.site-header.is-open) .blog-float,
body:has(.site-header.is-menu-open) .blog-float,
body:has(.site-nav.is-open) .blog-float {
  display: none;
}

@keyframes blog-float-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .blog-float {
    right: max(14px, env(safe-area-inset-right, 0px));
    bottom: max(14px, env(safe-area-inset-bottom, 0px));
    width: min(280px, calc(100vw - 28px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-float {
    animation: none;
  }
}

@media print {
  .blog-float {
    display: none;
  }
}
