/* 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 the "saved" state, nothing else */
  --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 demo's "saved" line: the one state that earns floodlight. Hidden until there's something to say. */
.mk-callout--live { color: var(--flood); font-size: 1.125rem; font-weight: 700; }
.mk-callout--live:empty::before { display: none; }

/* --- The demo: a phone with the admin's result form, beside the public standings. --- */
.mk-demo-row { transition: background-color 900ms ease; }
.mk-demo-row[data-changed] { background-color: rgb(245 213 71 / 0.38); }
.mk-demo-row[data-moving] { transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1), background-color 900ms ease; }
@media (prefers-reduced-motion: reduce) {
  .mk-demo-row[data-moving] { transition: background-color 900ms ease; }
}

.mk-step {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  background: #eef0f2;
  color: #111827;
  transition: background-color 120ms ease;
}
.mk-step:hover { background: #e2e5e9; }
.mk-step:focus-visible { outline: 3px solid #111827; outline-offset: 2px; }

/* 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); }
