/* One family with fixmycar.uk: the website's header, footer, width, type, colours and background on every app page.
   Header and footer classes are prefixed sf- so they never clash with app styles. Loaded after app.css and cards.css. */

:root {
  --ink: #101217; --ink-2: #474C55; --muted: #5F646D; --night-text: #101217; --night-muted: #5F646D;
  --line: rgba(17, 19, 24, .08); --line-2: rgba(17, 19, 24, .14);
  --bg-2: #F3F1EC; --panel-2: #F7F5F1;
  --violet: #7C6CF6; --violet-ink: #5243D1; --violet-bg: #EFEDFF;
  --shadow-sm: 0 1px 2px rgba(17, 19, 24, .05);
  --wrap: 1200px;
}

/* ---------- page background: the website's dot grid and soft glows */
body { font-size: 17px; line-height: 1.6; }
body::before { height: 560px; background:
  radial-gradient(640px 300px at 12% -40px, #FFE7CC, transparent 70%),
  radial-gradient(600px 300px at 90% -40px, #E9E4FF, transparent 70%); }
body::after { height: 520px; opacity: .55;
  background-image: radial-gradient(rgba(17, 19, 24, .16) 1px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 20%, #000 20%, transparent 75%); }

.sf-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; position: relative; }
.sf-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 16px; border-radius: 6px; background: var(--ink); color: #fff; }
.sf-skip:focus { left: 8px; color: #fff; }

/* ---------- buttons (website style) */
.sf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 10px; font: 600 15px/1 var(--sans); letter-spacing: -.01em; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .2s, transform .15s var(--ease); }
.sf-btn--amber { background: #FFB21A; color: #1A0F00; }
.sf-btn--amber:hover { background: #F5A300; color: #1A0F00; }
.sf-btn svg { transition: transform .2s var(--ease); }
.sf-btn:hover svg { transform: translateX(2px); }
.sf-btn:active { opacity: .85; }
.sf-btn--lg { min-height: 54px; padding: 0 26px; font-size: 16px; }

/* ---------- announce strip */
.sf-announce { position: relative; z-index: 51; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.sf-announce__inner { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 22px; font: 500 12px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.sf-announce__inner::-webkit-scrollbar { display: none; }
.sf-announce__item { display: inline-flex; align-items: center; gap: 8px; }
.sf-announce__item svg { color: #FF7A00; }

/* ---------- header */
.sf-header { position: sticky; top: 0; z-index: 50; padding: 14px 0; transition: background .25s, box-shadow .25s; }
.is-scrolled .sf-header { background: rgba(250, 249, 246, .82); -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px); box-shadow: 0 1px 0 var(--line); }
.sf-header__inner { display: flex; align-items: center; gap: 20px; }
.sf-header__end { display: flex; align-items: center; gap: 10px; }
.sf-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.sf-brand:hover { color: var(--ink); }
.sf-brand__mark { width: 34px; height: 34px; border-radius: 6px; background: #FFB21A; color: #1A0F00; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sf-brand__name { font-weight: 600; font-size: 19px; letter-spacing: -.03em; }
.sf-brand__tag { font: 600 10px/1 var(--mono); letter-spacing: .1em; color: var(--violet-ink); padding: 3px 6px; border-radius: 4px; background: var(--violet-bg); box-shadow: inset 0 0 0 1px rgba(82, 67, 209, .2); }
.sf-nav { margin: 0 auto; display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 10px; background: rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 1px var(--line); }
.sf-nav a { padding: 8px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: background .2s, color .2s; }
.sf-nav a:hover { color: var(--ink); background: var(--panel-2); }
.sf-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-2); }
.sf-btn--header { min-height: 42px; padding: 0 18px; font-size: 14px; }
.sf-iconbtn { position: relative; width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); text-decoration: none; }
.sf-iconbtn:hover, .sf-iconbtn[aria-current="page"] { color: #C2410C; background: #FFF6EA; }
.sf-iconbtn__count { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #C2410C; color: #fff; font: 700 11px/18px var(--sans); text-align: center; }
.sf-iconbtn__count[hidden] { display: none; }
.sf-header__label { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.sf-menu-btn { display: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); align-items: center; justify-content: center; cursor: pointer; }
.sf-mobile-nav { display: none; }
.sf-header .top__back { margin: 0 -8px 0 -8px; }
@keyframes sf-drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- footer */
.sf-footer { position: relative; z-index: 1; overflow: hidden; margin-top: 72px; border-top: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); font-size: 15px; }
.sf-footer a { color: var(--ink-2); text-decoration: none; }
.sf-footer a:hover { color: var(--ink); }
.sf-footer .sf-brand { color: var(--ink); }
.sf-footer__top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 40px; padding: 72px 0 44px; }
.sf-footer__pitch { margin: 18px 0 0; max-width: 26em; line-height: 1.65; }
.sf-footer__col h2 { margin: 0 0 18px; font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.sf-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.sf-footer__note { margin: 0 0 14px; padding: 14px 18px; border-radius: 8px; background: #FFF6EA; box-shadow: inset 0 0 0 1px rgba(214, 110, 0, .25); color: #7A3B00; font-size: 14px; font-weight: 500; }
.sf-footer__safety { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 18px 20px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; line-height: 1.6; }
.sf-footer__safety svg { flex: none; color: #C2410C; margin-top: 2px; }
.sf-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 22px 0 28px; font: 500 12px/1.6 var(--mono); color: var(--muted); }
.sf-footer__word { margin: 0 0 -0.14em; font-weight: 700; font-size: clamp(80px, 19vw, 280px); line-height: .78; letter-spacing: -.06em; text-align: center; white-space: nowrap; user-select: none; background: linear-gradient(180deg, rgba(17, 19, 24, .08), rgba(17, 19, 24, 0)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- page width: the website's 1200px column */
.pub-main, .pub-main:has(.dir), .pub-main:has(.gc-page), .pub-main:has(.lp) { max-width: var(--wrap); padding: 8px 28px 24px; }
.pub-main > .claim, .pub-main > .app-page { max-width: 680px; margin-left: auto; margin-right: auto; }
.site-body > main.wrap { max-width: 840px; margin: 8px auto 0; padding: 0 28px; }

/* ---------- headings: the website's display type */
.dir-hero h1, .towns-page h1, .claim h1, .app-title, .sheet > h1, .sheet h1:first-of-type { font-weight: 600; letter-spacing: -.045em; line-height: 1.04; color: var(--ink); }
.dir-hero h1 { font-size: clamp(36px, 4.8vw, 60px); margin: 10px 0 12px; }
.dir--results .dir-hero h1 { font-size: clamp(30px, 3.6vw, 44px); }
.towns-page h1, .claim h1, .app-title, .sheet > h1, .sheet h1:first-of-type { font-size: clamp(32px, 4vw, 48px); }
.dir-hero h1 em, .towns-page h1 em { font-style: normal; background: linear-gradient(100deg, #F59E0B 0%, #EA580C 55%, #DB2777 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dir-hero .lead { font-size: 19px; color: var(--ink-2); max-width: 36em; }
.lp-head h1 { font-size: clamp(30px, 3.4vw, 42px); letter-spacing: -.045em; }

/* ---------- town page: postcode areas fold away instead of filling the screen */
.dir-facts__more { margin-top: 12px; }
.dir-facts__more > summary { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; }
.dir-facts__more > summary::-webkit-details-marker { display: none; }
.dir-facts__more > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s var(--ease); }
.dir-facts__more[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.dir-facts__more[open] .dir-facts__areas { margin-top: 12px; }

/* ---------- the floating Call / Directions bar never covers the footer */
body:has(.lp-dock) .sf-footer { padding-bottom: 96px; }

@media (max-width: 1080px) {

  .sf-nav a { padding: 8px 12px; }
  .sf-footer__top { grid-template-columns: 1fr 1fr 1fr; }
  .sf-footer__top > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .sf-nav, .sf-btn--header { display: none; }
  .sf-menu-btn { display: inline-flex; }
  .sf-header__end { margin-left: auto; }
  .sf-mobile-nav { position: fixed; inset: 76px 12px auto 12px; z-index: 49; background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -20px rgba(17, 19, 24, .35); padding: 10px 22px 22px; border-radius: 12px; }
  .sf-mobile-nav.is-open { display: block; animation: sf-drop .25s var(--ease); }
  .sf-mobile-nav a:not(.sf-btn) { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 22px; font-weight: 600; letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
  .sf-mobile-nav .sf-btn { width: 100%; margin-top: 18px; }
  .sf-header__label { display: none; }
  /* the old app header rules no longer apply */
  .pub .sf-header { padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: 10px; background: rgba(250, 249, 246, .88); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--line); }
  .pub .sf-iconbtn { display: none; }
  body.pub .sf-footer { margin-bottom: 0; }
  html.is-app .sf-footer, html.is-app .sf-announce { display: none; }
}
@media (max-width: 760px) {
  .sf-footer__top { grid-template-columns: 1fr 1fr; gap: 32px 24px; padding: 52px 0 32px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .sf-wrap { padding: 0 18px; }
  .pub-main, .pub-main:has(.dir), .pub-main:has(.gc-page), .pub-main:has(.lp) { padding: 8px 16px 24px; }
  .site-body > main.wrap { padding: 0 12px; }
  .sf-announce__inner { font-size: 11px; overflow: hidden; }
  .sf-announce__item:nth-child(n+2) { display: none; }
  .sf-mobile-nav { inset: 72px 10px auto 10px; }
  .sf-brand__tag { display: none; }
  .dir-hero .lead { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .sf-mobile-nav.is-open { animation: none; } }

/* search, filters and meta a little wider on the 1200px column so the filter row fits on one line */
@media (min-width: 900px) { .dir-hero, .dir > .alert, .dir-meta, .dir-facts, .dir-chat, .dir-ai, .dir-credit { max-width: 780px; } }

/* Public pages (join, privacy, terms, errors) sit on the page like the website, not in a box inside a box */
.site-body--public .sheet { background: transparent; box-shadow: none; padding: 24px 0 0; border-radius: 0; animation: none; }
.site-body--public > main.wrap { max-width: 900px; }

/* Install the app: on a computer a quiet header button (the floating box is for phones only) */
.sf-install { width: auto; gap: 8px; padding: 0 16px 0 14px; border: 0; border-radius: 10px; font: 500 14px/1 var(--sans); cursor: pointer; }
.sf-install[hidden] { display: none; }

/* Search and ask boxes wear the website chat's animated border: two lights (amber and violet) orbit with a soft glow; faster while typing. Still for reduced motion. */
@property --sf-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes sf-orbit { to { --sf-angle: 360deg; } }
.dir-ask__box, .gc-ask { --sf-surface: linear-gradient(#fff, #fff); position: relative; isolation: isolate; border: 2px solid transparent;
  background: var(--sf-surface) padding-box,
    conic-gradient(from var(--sf-angle), rgba(255, 154, 15, .45) 0%, #FFB627 8%, #FF7A00 15%, #7C6CF6 25%, #B9A8FF 30%, rgba(124, 108, 246, .45) 40%, rgba(255, 154, 15, .45) 58%, #FF7A00 69%, #FFB627 75%, rgba(255, 154, 15, .45) 86%) border-box;
  box-shadow: 0 18px 40px -26px rgba(234, 88, 12, .45); animation: sf-orbit 5s linear infinite; }
.gc-ask { --sf-surface: linear-gradient(135deg, #FFF6E8, #F3F0FF); }
.dir-ask__box::before, .gc-ask::before { content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--sf-angle), transparent 0%, #FFB627 9%, #FF7A00 15%, #7C6CF6 26%, transparent 38%, transparent 60%, #FF7A00 70%, transparent 84%);
  filter: blur(16px); opacity: .55; animation: sf-orbit 5s linear infinite; transition: opacity .3s; }
.dir-ask__box::after, .gc-ask::after { content: ""; position: absolute; inset: -2px; z-index: -1; border: 2px solid transparent; border-radius: inherit; background: var(--sf-surface) padding-box; pointer-events: none; }
.dir-ask__box:focus-within, .gc-ask:focus-within { animation-duration: 2.4s; box-shadow: 0 22px 46px -24px rgba(234, 88, 12, .55); }
.dir-ask__box:focus-within::before, .gc-ask:focus-within::before { opacity: .9; animation-duration: 2.4s; }
@media (prefers-reduced-motion: reduce) { .dir-ask__box, .gc-ask, .dir-ask__box::before, .gc-ask::before { animation: none; } }

/* Clear buttons hide when there is nothing to clear (a display rule would otherwise keep them visible) */
.dir-mine__clear[hidden] { display: none; }

/* Directory landing on phones: the example searches are one sideways row, so the towns show sooner */
@media (max-width: 599px) {
  .dir-ask__suggest { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
  .dir-ask__suggest::-webkit-scrollbar { display: none; }
  .dir-ask__suggest li { flex: none; }
  .dir-ask__suggest a { white-space: nowrap; }
}
