/*
 * The shared base for the brand sites (D-289): layout, header and menu, buttons, cards, FAQ,
 * footer, focus and reduced motion. Every colour, the display face and the hero wash come from
 * CSS variables that each site's brand.css sets (light, and dark under prefers-color-scheme), so
 * this file has no colour of its own. Each brand folder carries a byte-identical copy as base.css
 * (npm test fails if one differs): edit this file, then copy it over every web/<brand>/base.css.
 * Class names follow myyard.pro's styles.css, so a rule can be lifted from there with its colours
 * swapped for tokens.
 */

:root {
  --radius: 12px;
  --radius-lg: 20px;
  --max: 1120px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.06), 0 24px 60px rgba(0, 0, 0, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-strong);
}

img,
svg {
  display: block;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

[hidden] {
  display: none !important;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--card);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
}

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

/* ---------- Header ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--nav-bg);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.nav.scrolled {
  border-bottom-color: var(--border);
}

.nav .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  flex: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  flex: none;
}

/* The mark flips with the page: the tile in the accent, the glyph in the colour on it. A stroked
   glyph (fill="none") draws its lines in that colour instead. */
.mark-tile {
  fill: var(--accent);
}

.mark-glyph {
  fill: var(--on-accent);
}

.mark-glyph[fill="none"] {
  fill: none;
  stroke: var(--on-accent);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 19px;
  letter-spacing: var(--display-tracking);
  line-height: 1.1;
  white-space: nowrap;
}

.wm-accent {
  color: var(--accent-strong);
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 550;
  padding: 0 12px;
  border-radius: 999px;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
}

/* The menu's own rows for the header's Sign in and site switch, shown only in the phone menu. */
.nav-links .nav-links-signin,
.nav-links .nav-links-switch {
  display: none;
}

/* The phone menu's button (D-243): only below 960px, and only once nav-menu.js has run (the header
   gets .has-menu), so without JavaScript the header reads as before. */
.nav-menu {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--subtle);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.nav-menu:hover {
  background: var(--surface);
}

.nav-menu-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav-menu-icon::before,
.nav-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nav-menu-icon::before {
  top: -6px;
}

.nav-menu-icon::after {
  top: 6px;
}

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

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

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

.nav-signin {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 8px;
}

.nav-signin:hover {
  color: var(--accent-strong);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 0;
  font: 650 16px var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost {
  background: var(--card);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--subtle);
}

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

.btn-sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 96px;
  background: var(--hero-wash);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

/* A hero with no card beside it (the pro pages): one wide column. */
.hero.solo .wrap {
  grid-template-columns: minmax(0, 860px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 650;
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 6px 12px;
  border-radius: 999px;
}

.hero h1 {
  font-size: clamp(38px, 6.4vw, 72px);
  line-height: 1.05;
  letter-spacing: var(--display-tracking);
  font-weight: var(--display-weight);
  margin: 20px 0;
}

.hero h1 em {
  display: block;
  font-style: var(--em-style);
  color: var(--accent-strong);
}

.lede {
  font-size: 20px;
  color: var(--muted);
  max-width: 34em;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 32px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 650;
  color: var(--accent-strong);
  text-decoration: none;
}

.hero-link:hover {
  text-decoration: underline;
}

.hero-note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
  max-width: 36em;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
}

.hero-facts li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-facts svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* An example request, drawn as a card beside the copy (below it on phones). Not a control. */
.hero-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--border);
  padding: 24px;
  max-width: 420px;
  width: 100%;
  justify-self: center;
}

.hero-card-label {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-card h3 {
  font-size: 26px;
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  margin-top: 10px;
}

.hero-card dl {
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.hero-card dl div {
  display: grid;
  gap: 2px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.hero-card dt {
  font-size: 13px;
  color: var(--muted);
}

.hero-card dd {
  margin: 0;
  font-weight: 600;
}

.hero-card .rate {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

.hero-card .rate b {
  display: block;
  font-size: 30px;
  color: var(--text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.hero-card .rate b small {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}

.hero-card-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 18px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 650;
}

/* ---------- Sections ---------- */

section {
  padding: 96px 0;
}

section.alt {
  background: var(--surface);
}

.section-head {
  max-width: 660px;
  margin-bottom: 48px;
}

.kicker {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-strong);
}

h2 {
  font-size: clamp(30px, 4.4vw, 48px);
  letter-spacing: var(--display-tracking);
  font-weight: var(--display-weight);
  margin-top: 12px;
}

.section-head p {
  font-size: 19px;
  color: var(--muted);
  margin-top: 16px;
}

.fineprint {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
  max-width: 62em;
}

/* Numbered steps */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.step {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--border);
  padding: 24px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
  margin-bottom: 20px;
}

.step h3 {
  font-size: 19px;
  letter-spacing: -0.01em;
}

.step p {
  color: var(--muted);
  font-size: 16px;
  margin-top: 8px;
}

/* Service cards */

.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.services.three {
  grid-template-columns: repeat(3, 1fr);
}

.service {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service h3 {
  font-size: 19px;
  letter-spacing: -0.01em;
}

.service p {
  color: var(--muted);
  font-size: 15px;
}

.service .by {
  margin-top: auto;
  padding-top: 14px;
  font-size: 14px;
  font-weight: 650;
  color: var(--accent-strong);
}

/* Promises: an icon, a bold line and a sentence */

.promise-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.promise-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 22px;
}

.promise-list svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.promise-list strong {
  display: block;
  font-size: 18px;
}

.promise-list span {
  display: block;
  color: var(--muted);
  font-size: 16px;
  margin-top: 4px;
}

/* $0 tiles */

.fees {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.fee {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 22px 24px;
}

.fee b {
  display: block;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: var(--display-weight);
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent-strong);
}

.fee strong {
  display: block;
  font-size: 18px;
  margin-top: 12px;
}

.fee span {
  display: block;
  color: var(--muted);
  font-size: 15px;
  margin-top: 4px;
}

.fee-note {
  color: var(--muted);
  font-size: 15px;
  margin-top: 24px;
  max-width: 62em;
}

.fee-note strong {
  color: var(--text);
}

.paid-direct {
  margin-top: 16px;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 24px;
}

.paid-direct h3 {
  font-size: 20px;
}

.paid-direct p {
  color: var(--muted);
  margin-top: 10px;
}

.methods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.methods li {
  font-size: 14px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-radius: 999px;
  padding: 4px 12px;
}

/* A plain list of services (the pro page) */

.svc-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.svc-list.three {
  grid-template-columns: repeat(3, 1fr);
}

.svc-list li {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--border);
  padding: 22px 24px;
}

.svc-list strong {
  display: block;
  font-size: 18px;
}

.svc-list span {
  display: block;
  color: var(--muted);
  font-size: 15px;
  margin-top: 4px;
}

/* FAQ */

.faq {
  max-width: 760px;
}

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

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 40px 22px 0;
  font-weight: 650;
  font-size: 18px;
  position: relative;
}

.faq summary:hover {
  color: var(--accent-strong);
}

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}

.faq details p {
  color: var(--muted);
  padding: 0 0 22px;
  max-width: 62ch;
}

/* The closing band */

.cta {
  text-align: center;
}

.cta .section-head {
  margin: 0 auto 32px;
}

.cta .hero-ctas {
  justify-content: center;
  margin-top: 0;
}

.cta .fineprint {
  margin: 24px auto 0;
  max-width: 40em;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 56px;
  font-size: 14px;
  color: var(--muted);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
}

footer .wordmark {
  font-size: 17px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin-left: auto;
}

footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  color: var(--muted);
  text-decoration: none;
}

footer nav a:hover {
  color: var(--text);
}

/* ---------- 404 ---------- */

.not-found {
  padding: 96px 0 120px;
  background: var(--hero-wash);
}

.not-found h1 {
  font-size: clamp(38px, 6.4vw, 64px);
  letter-spacing: var(--display-tracking);
  font-weight: var(--display-weight);
}

.not-found p {
  margin-top: 16px;
  font-size: 19px;
  color: var(--muted);
  max-width: 34em;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }

  .hero-card {
    justify-self: start;
  }

  .steps,
  .services,
  .fees,
  .svc-list {
    grid-template-columns: 1fr 1fr;
  }

  .services.three,
  .svc-list.three,
  .promise-list {
    grid-template-columns: 1fr;
  }

  .nav.has-menu .nav-menu {
    display: inline-flex;
  }

  .nav-links {
    display: none;
  }

  /* The section links as a stacked panel under the header while the menu is open (D-243). */
  .nav.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    padding: 8px 16px 12px;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }

  .nav.menu-open .nav-links a {
    display: flex;
    min-height: 48px;
    padding: 0 8px;
    border-radius: 10px;
    color: var(--text);
    font-size: 17px;
  }

  .nav.menu-open .nav-links a:hover {
    background: var(--surface);
  }

  .nav .nav-switch {
    margin-left: auto;
  }

  .nav.has-menu .nav-menu {
    margin-left: auto;
  }

  .nav.has-menu .nav-switch {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .wrap {
    padding: 0 16px;
  }

  .nav .wrap {
    gap: 8px;
  }

  .nav .btn-sm {
    padding: 0 14px;
  }

  /* Icon-only Menu; its label stays for screen readers. */
  .nav-menu {
    padding: 0 13px;
  }

  .nav-menu .nav-menu-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  /* No room for Sign in and the switch beside the menu: they become the menu's last two rows. */
  .nav.has-menu .nav-signin,
  .nav.has-menu .nav-switch {
    display: none;
  }

  /* Without JavaScript there's no menu: the footer carries Sign in. */
  .nav-signin {
    display: none;
  }

  .nav.menu-open .nav-links .nav-links-signin,
  .nav.menu-open .nav-links .nav-links-switch {
    display: flex;
    font-weight: 650;
  }

  .nav.menu-open .nav-links .nav-links-signin {
    margin-top: 4px;
    border-top: 1px solid var(--border);
    border-radius: 0 0 10px 10px;
  }

  .hero {
    padding: 48px 0 64px;
  }

  .lede {
    font-size: 18px;
  }

  .section-head p {
    font-size: 17px;
  }

  section {
    padding: 64px 0;
  }

  .steps,
  .services,
  .fees,
  .svc-list {
    grid-template-columns: 1fr;
  }

  .hero-ctas > .btn {
    flex: 1 1 100%;
  }

  .hero-card {
    max-width: none;
  }

  footer nav {
    margin-left: -6px;
  }
}

/* A long wordmark sets on two lines on phones (wordmark-stack), so the header fits. */
@media (max-width: 480px) {
  .nav .wordmark-stack {
    display: flex;
    flex-direction: column;
    font-size: 15px;
    line-height: 1.05;
  }
}

@media (max-width: 359px) {
  .nav .wordmark-stack {
    font-size: 14px;
  }

  .nav .btn-sm {
    padding: 0 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
