/* My Best Friend's Place. Theme tokens only; colors live in site/site.yaml.
   Patterns are SVG masks painted with theme tokens, so they follow light,
   dark and the row palettes. Fonts are system stacks: no downloads. */

:root {
  --mbfp-display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Arial Rounded MT", Nunito,
    "Varela Round", system-ui, sans-serif;
  --mbfp-radius: 18px;
  --mbfp-paw: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='14 12 36 36'%3E%3Cellipse cx='21.5' cy='26' rx='4.2' ry='5.4'/%3E%3Cellipse cx='28.5' cy='19.5' rx='4.2' ry='5.6'/%3E%3Cellipse cx='36.5' cy='19.5' rx='4.2' ry='5.6'/%3E%3Cellipse cx='43.5' cy='26' rx='4.2' ry='5.4'/%3E%3Cpath d='M32 29.5c-6.2 0-11.5 6.4-11.5 11.6 0 4.1 3.3 5.9 6.6 5.4 2-.3 3.3-1.3 4.9-1.3s2.9 1 4.9 1.3c3.3.5 6.6-1.3 6.6-5.4 0-5.2-5.3-11.6-11.5-11.6z'/%3E%3C/svg%3E");
  --mbfp-paws: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cdefs%3E%3Cg id='p'%3E%3Cellipse cx='21.5' cy='26' rx='4.2' ry='5.4'/%3E%3Cellipse cx='28.5' cy='19.5' rx='4.2' ry='5.6'/%3E%3Cellipse cx='36.5' cy='19.5' rx='4.2' ry='5.6'/%3E%3Cellipse cx='43.5' cy='26' rx='4.2' ry='5.4'/%3E%3Cpath d='M32 29.5c-6.2 0-11.5 6.4-11.5 11.6 0 4.1 3.3 5.9 6.6 5.4 2-.3 3.3-1.3 4.9-1.3s2.9 1 4.9 1.3c3.3.5 6.6-1.3 6.6-5.4 0-5.2-5.3-11.6-11.5-11.6z'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23p' transform='translate(8 10) rotate(-22 32 32) scale(.62)'/%3E%3Cuse href='%23p' transform='translate(52 52) rotate(-8 32 32) scale(.62)'/%3E%3Cuse href='%23p' transform='translate(104 92) rotate(14 32 32) scale(.62)'/%3E%3Cuse href='%23p' transform='translate(132 20) rotate(28 32 32) scale(.5)'/%3E%3C/svg%3E");
  --mbfp-trees: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='110' viewBox='0 0 150 110'%3E%3Cpath d='M34 6l16 28h-7l13 24h-8l15 28h-24v16h-10v-16h-24l15-28h-8l13-24h-7z'/%3E%3Cpath d='M104 36l11 20h-5l9 17h-6l11 21h-17v11h-7v-11h-17l11-21h-6l9-17h-5z'/%3E%3Cpath d='M138 58l7 13h-3l6 11h-4l7 14h-11v9h-5v-9h-11l7-14h-4l6-11h-3z'/%3E%3C/svg%3E");
}

/* Type */

h1,
h2,
h3,
.hero-title,
.site-branding-text,
.cb-photo-banner__title,
.cb-photo-tiles__tile-title,
.why-card-title,
.cb-card-title {
  font-family: var(--mbfp-display);
  letter-spacing: -0.01em;
}

h2,
.cb-card-grid-title,
.cb-photo-tiles__title {
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
}

.btn {
  border-radius: 999px;
  font-weight: 650;
}

/* Header */

.site-branding-text {
  font-weight: 750;
}

/* Hero */

.hero.hero--full {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  padding: clamp(2.5rem, 7vw, 5.5rem) 1.25rem;
  border-radius: 0;
  background: var(--bg-elev);
}

.hero.hero--full::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  opacity: 0.07;
  mask: var(--mbfp-paws) 0 0 / 180px 180px repeat;
}

.hero .hero-eyebrow {
  color: var(--accent);
  letter-spacing: 0.12em;
}

.hero .hero-title {
  font-size: clamp(2.1rem, 5.2vw, 3.6rem);
  line-height: 1.05;
  font-weight: 800;
}

.hero .hero-tagline {
  max-width: 36rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.55;
}

.hero .hero-logo-wrap {
  background: none;
  box-shadow: none;
  overflow: visible;
}

.hero .hero-logo {
  width: clamp(120px, 20vw, 230px);
  max-width: none;
  border-radius: 50%;
  box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 28%, transparent);
  transform: rotate(-8deg);
}

/* Photo bands without photos: a patterned band instead of an empty frame.
   Once a band has photos, the --no-media class goes away and these stop applying. */

.cb-photo-banner--no-media {
  position: relative;
  isolation: isolate;
  min-height: 0;
  padding: clamp(2.75rem, 6vw, 4.5rem) 0;
  background: var(--bg);
  color: var(--text);
}

.cb-photo-banner--no-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--text);
  opacity: 0.06;
  mask: var(--mbfp-paws) 0 0 / 180px 180px repeat;
}

[data-palette="spruce"] .cb-photo-banner--no-media {
  padding-bottom: clamp(5.5rem, 10vw, 7.5rem);
}

[data-palette="spruce"] .cb-photo-banner--no-media::before {
  inset: auto 0 0;
  height: 110px;
  opacity: 0.16;
  mask: var(--mbfp-trees) 0 100% / 150px 110px repeat-x;
}

.cb-photo-banner--no-media .cb-photo-banner__card {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 18px;
}

.cb-photo-banner--no-media .cb-photo-banner__title {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.08;
  font-weight: 800;
}

.cb-photo-banner--no-media .cb-photo-banner__subtitle {
  order: -1;
  margin: 0 0 0.4rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.12em;
}

.cb-photo-banner--no-media .cb-photo-banner__body {
  max-width: 38rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.55;
}

.cb-photo-banner__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Cards */

.cb-card,
.why-card,
.cb-photo-tiles__tile {
  border-radius: var(--mbfp-radius);
}

.cb-card {
  background: var(--bg-elev);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.cb-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--text) 10%, transparent);
}

.cb-card-icon-well {
  background: none;
}

.cb-card-tagline {
  color: var(--accent);
  font-weight: 650;
}

.cb-row--bg-muted .why-card {
  background: var(--bg);
}

.why-card-title::before,
.cb-photo-tiles__tile--no-image .cb-photo-tiles__tile-title::before {
  content: "";
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.45em;
  vertical-align: -0.08em;
  background: var(--accent);
  mask: var(--mbfp-paw) center / contain no-repeat;
  transform: rotate(-14deg);
}

.why-card-body {
  line-height: 1.55;
}

/* Info tiles without photos: compact cards, copy at the top. */

.cb-photo-tiles__tile--no-image {
  justify-content: flex-start;
  min-height: 0;
  border: 1px solid var(--border);
}

.cb-photo-tiles__tile--no-image .cb-photo-tiles__copy {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.4rem 1.4rem 1.25rem;
}

.cb-photo-tiles__tile--no-image .cb-photo-tiles__subtitle {
  order: -1;
  margin: 0 0 0.2rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cb-photo-tiles__tile--no-image .cb-photo-tiles__tile-title {
  font-size: 1.3rem;
}

.cb-photo-tiles__tile--no-image .cb-photo-tiles__body {
  flex: 1;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.55;
}

.cb-photo-tiles__tile--no-image .cb-photo-tiles__link {
  margin-top: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}

.cb-photo-tiles__tile--no-image .cb-photo-tiles__link::before {
  content: "→ ";
}

/* Footer */

.site-footer-text strong {
  color: var(--text);
}

/* Card grids: three across, or four when there are exactly four cards. */

@media (min-width: 900px) {
  .why-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .why-grid:has(> :nth-child(4):last-child) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.cb-fern--button_row {
  align-self: center;
}

/* A prose row that spans the page would run past 100 characters a line. */
.cb-fern-prose .cb-prose {
  max-width: 46rem;
}

/* Phones: stack the hero so the title gets the full width. */

@media (max-width: 767px) {
  .hero--with-logo .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "logo"
      "copy"
      "actions";
  }

  .hero--with-logo .hero-logo-wrap {
    justify-content: flex-start;
  }

  .hero .hero-logo {
    width: 88px;
  }
}

.btn[href^="tel:"] {
  white-space: nowrap;
}
