/* The display face of the marketing pages: the same condensed, sporty type the tenants' public sites
   use (Barlow Condensed ExtraBold, SIL OFL, app/assets/stylesheets/BarlowCondensed-OFL.txt). */
@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/BarlowCondensed-ExtraBold-fc508976.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* The playing field (docs/decisions/0058-landing-field.md). Every marketing surface reads its colors
   from these variables, keyed on the sport in `data-sport`, so another sport's field (a basketball
   court, a tennis court) only adds its own block here and its markings partial
   (app/views/marketing/fields/_<sport>.html.erb). */
.mk-world {
  --stand: #07170e;        /* header, footer, the dark bands: the stand around the field */
  --stand-raised: #0d2417;
  --chalk: #f3f2ea;        /* line markings and text on the field */
  --chalk-soft: rgb(243 242 234 / 0.78);
  --flood: #f5d547;        /* floodlight yellow: the main action, and hover responses */
  --flood-hover: #ffe27a;
  --ink: #07170e;
}

.mk-world[data-sport="soccer"],
.mk-world [data-sport="soccer"] {
  --field-a: #123f28;      /* mowing stripes */
  --field-b: #15472e;
  --field-line: rgb(243 242 234 / 0.62);
  --field-line-faint: rgb(243 242 234 / 0.22);
}

/* Mowing stripes: across the page on phones, along it from md up (the field turns with the screen). */
.mk-field {
  background-color: var(--field-a);
  background-image: repeating-linear-gradient(180deg, var(--field-a) 0 6rem, var(--field-b) 6rem 12rem);
}
@media (min-width: 48rem) {
  .mk-field {
    background-image: repeating-linear-gradient(90deg, var(--field-a) 0 10rem, var(--field-b) 10rem 20rem);
  }
}

/* A chalk marking. Lines are borders, so they stay crisp at any zoom. */
.mk-mark {
  position: absolute;
  pointer-events: none;
  border-color: var(--field-line); /* widths come from Tailwind's border utilities */
}
.mk-mark--faint { border-color: var(--field-line-faint); }
.mk-spot {
  position: absolute;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 9999px;
  background: var(--field-line);
  pointer-events: none;
}

/* The lines are drawn once when the page loads, as if the groundskeeper just went over them. */
@media (prefers-reduced-motion: no-preference) {
  .mk-draw-x { animation: mk-draw-x 1.1s cubic-bezier(0.16, 1, 0.3, 1) var(--mk-delay, 0ms) both; }
  .mk-draw-y { animation: mk-draw-y 1.1s cubic-bezier(0.16, 1, 0.3, 1) var(--mk-delay, 0ms) both; }
  .mk-draw-o { animation: mk-draw-o 1.3s cubic-bezier(0.16, 1, 0.3, 1) var(--mk-delay, 0ms) both; }
}
@keyframes mk-draw-x { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes mk-draw-y { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes mk-draw-o { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(75% at 50% 50%); } }

/* Every number on the page sits on the same figures: condensed, tabular, right-aligned in tables. */
.mk-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums lining-nums;
}

/* The main action: floodlight yellow on the stand's ink. */
.mk-cta {
  background: var(--flood);
  color: var(--ink);
  box-shadow: 0 10px 24px -12px rgb(0 0 0 / 0.6);
  transition: background-color 160ms ease, transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.mk-cta:hover { background: var(--flood-hover); }
.mk-cta:active { transform: translateY(1px); }
.mk-cta:focus-visible { outline: 3px solid var(--chalk); outline-offset: 3px; }

.mk-ghost {
  color: var(--chalk);
  box-shadow: inset 0 0 0 2px var(--field-line);
  transition: box-shadow 160ms ease, background-color 160ms ease;
}
.mk-ghost:hover { box-shadow: inset 0 0 0 2px var(--chalk); background: rgb(243 242 234 / 0.06); }
.mk-ghost:focus-visible { outline: 3px solid var(--chalk); outline-offset: 3px; }

.mk-link {
  color: var(--chalk);
  text-decoration: underline;
  text-decoration-color: var(--field-line);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}
.mk-link:hover { text-decoration-color: var(--flood); }
.mk-link:focus-visible { outline: 3px solid var(--chalk); outline-offset: 3px; border-radius: 2px; }

/* A chalk callout tied to the thing it names: a short line, then the label. */
.mk-callout {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--chalk);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
}
.mk-callout::before {
  content: "";
  flex: none;
  width: 1.75rem;
  height: 3px;
  background: var(--field-line);
}

/* A screenshot's caption, tied to it by a chalk leader that starts at the image's bottom edge. */
.mk-lead {
  position: relative;
  display: block;
  padding: 1.1rem 0 0 2rem;
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.3;
}
.mk-lead::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0.75rem;
  width: 0.875rem;
  height: 1.85rem;
  border-left: 3px solid var(--field-line);
  border-bottom: 3px solid var(--field-line);
}

/* --- The site's look picker: the admin's design, palette and light/dark, over real captures. --- */
/* Two choices on a chalk-ruled track; the picked one is chalk with ink text. */
.mk-segment {
  display: inline-flex;
  padding: 3px;
  border-radius: 0.5rem;
  box-shadow: inset 0 0 0 2px var(--field-line);
}
.mk-segment label { position: relative; }
.mk-segment input { position: absolute; opacity: 0; pointer-events: none; }
.mk-segment span {
  display: grid;
  place-items: center;
  min-height: 2.5rem;
  min-width: 5rem;
  padding: 0 0.875rem;
  border-radius: 0.3rem;
  font-weight: 600;
  color: var(--chalk-soft);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.mk-segment label:hover span { color: var(--chalk); background: rgb(243 242 234 / 0.08); }
.mk-segment input:checked + span { background: var(--chalk); color: var(--ink); }
.mk-segment input:focus-visible + span { outline: 3px solid var(--chalk); outline-offset: 3px; }

/* A palette: its primary and accent, ringed in chalk when picked. */
.mk-swatch { position: relative; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 9999px; cursor: pointer; }
.mk-swatch > span[aria-hidden] {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  box-shadow: 0 0 0 2px rgb(243 242 234 / 0.35);
  transition: box-shadow 160ms ease, transform 160ms cubic-bezier(0.16, 1, 0.3, 1);
}
.mk-swatch:hover > span[aria-hidden] { transform: scale(1.08); }
.mk-swatch input:checked ~ span[aria-hidden] { box-shadow: 0 0 0 3px var(--stand), 0 0 0 6px var(--chalk); }
.mk-swatch input:focus-visible ~ span[aria-hidden] { outline: 3px solid var(--chalk); outline-offset: 6px; }

/* While a look's captures load, the old ones blur back; the new ones arrive sharp. */
.mk-look-shot { transition: filter 260ms cubic-bezier(0.16, 1, 0.3, 1), opacity 260ms cubic-bezier(0.16, 1, 0.3, 1); }
[data-look-shots][data-loading] .mk-look-shot { filter: blur(6px) saturate(0.6); opacity: 0.7; }
@media (prefers-reduced-motion: reduce) {
  .mk-look-shot { transition: none; }
  [data-look-shots][data-loading] .mk-look-shot { filter: none; }
}

/* The FAQ's plus turns into a minus when the answer is open. */
.mk-faq summary::-webkit-details-marker { display: none; }
.mk-faq .mk-faq-bar { transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1); }
.mk-faq[open] .mk-faq-bar { transform: rotate(90deg); }
