/* C&M Mowing */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Press Start 2P";
  src: url("../fonts/press-start-2p-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* The pixel scene draws over this; it's what shows before scripts run. */
  --lawn: linear-gradient(to top, #71492a 0 28px, #55802a 28px 31px, #b6d437 31px 72px, #a9cb3b 72px 110px, transparent 110px);
  --sky: #91d6e2;
  --sky-pale: #c4e9ef;
  --sky-deep: #3591a8;
  --lime: #b6d437;
  --lime-2: #aacb31;
  --lime-pale: #e4f0b4;
  --ink: #15281d;
  --ink-2: #3a5144;
  --cream: #fbfbf3;
  --paper: #ffffff;
  --dirt: #71492a;
  --dirt-dark: #5a3a21;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --pixel: "Press Start 2P", ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --ground: 148px;
  --b: 4px; /* pixel border */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--lime); color: var(--ink); }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }
/* The game and its pointer need JavaScript. */
html:not(.js) .play, html:not(.js) .hero-hint { display: none; }

.icon { width: 1.25em; height: auto; flex: none; }

/* A square-cornered "pixel" border: four offset shadows leave the corners notched. */
.pixel-box {
  background: var(--paper);
  box-shadow:
    0 calc(var(--b) * -1) 0 var(--ink),
    0 var(--b) 0 var(--ink),
    calc(var(--b) * -1) 0 0 var(--ink),
    var(--b) 0 0 var(--ink),
    calc(var(--b) * 2.5) calc(var(--b) * 2.5) 0 rgba(21, 40, 29, .16);
}

/* ---------- buttons ---------- */

.btn {
  --lift: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 56px;
  padding: .85em 1.3em;
  font: 800 1.0625rem/1.1 var(--sans);
  color: var(--ink);
  text-decoration: none;
  background: var(--lime);
  border: 3px solid var(--ink);
  border-radius: 0;
  box-shadow: var(--lift) var(--lift) 0 var(--ink);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, background-color .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: calc(var(--lift) + 2px) calc(var(--lift) + 2px) 0 var(--ink); }
.btn:active { transform: translate(var(--lift), var(--lift)); box-shadow: 0 0 0 var(--ink); }
.btn-alt { background: var(--paper); }
.btn .icon { width: 1.2em; }

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: 8px 2px;
  font: 700 .95rem/1.2 var(--sans);
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.text-btn .icon { width: 1.3em; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vh, 64px) var(--gutter) calc(var(--ground) + clamp(10px, 3vh, 36px));
  background: var(--sky) var(--lawn);
  text-align: center;
}

.scene {
  position: absolute;
  top: 0;
  left: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.scene-ui {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  /* Shrink the sign on short screens so the lawn stays in view. */
  width: clamp(min(100%, 420px), calc((100svh - var(--ground) - 300px) * 1.97), min(100%, max(720px, 34vw)));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 2.6vh, 28px);
  pointer-events: none;
}
.hero-inner a, .hero-inner button, .logo { pointer-events: auto; }

/* The logo lives on a yard sign, posts planted in the lawn. */
.sign {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.sign::before, .sign::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 40px;
  width: 16px;
  height: 200vh;
  background: linear-gradient(90deg, #a8733f 0 4px, #8a5a2f 4px 12px, #6b4423 12px 16px);
}
.sign::before { left: 13%; }
.sign::after { right: 13%; }
.sign-board {
  container-type: inline-size;
  width: 100%;
  padding: clamp(22px, 4vw, 40px) clamp(18px, 4.5vw, 44px) clamp(18px, 3vw, 30px);
  background: var(--paper);
  box-shadow:
    0 -5px 0 var(--ink), 0 5px 0 var(--ink), -5px 0 0 var(--ink), 5px 0 0 var(--ink),
    10px 10px 0 2px rgba(21, 40, 29, .18);
}
.logo {
  position: relative;
  width: 100%;
  margin: 0 0 clamp(14px, 2.4vw, 22px);
}
.logo-art { width: 100%; height: auto; overflow: visible; }
.logo-mowing { position: absolute; inset: 0; width: 100%; height: 100%; }

.logo-short rect, .logo-tall rect, .logo-chips rect {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.logo-chips rect { opacity: 0; transform-origin: 50% 50%; }

/* Intro: every stripe starts tall, the word is hidden, and a cut runs left to right. */
html.intro .logo { animation: rise .5s cubic-bezier(.2, .8, .3, 1) both; }
html.intro .logo-short rect {
  animation: cut .3s cubic-bezier(.3, .9, .4, 1.35) both;
  animation-delay: calc(.4s + var(--i) * 42ms);
}
html.intro .logo-chips rect {
  animation: chip .75s cubic-bezier(.25, .6, .45, 1) both;
  animation-delay: calc(.42s + var(--i) * 42ms);
}
html.intro .logo-mowing { animation: reveal 1.05s linear .55s both; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes cut { from { transform: scaleY(2.671); } to { transform: scaleY(1); } }
@keyframes reveal { from { clip-path: inset(0 98.3% 0 0); } to { clip-path: inset(0 49.7% 0 0); } }
@keyframes chip {
  0% { opacity: 0; transform: translate(0, 0) rotate(0); }
  8% { opacity: 1; }
  45% { transform: translate(calc(var(--dx) * .6), -70px) rotate(90deg); opacity: 1; }
  100% { transform: translate(var(--dx), 26px) rotate(200deg); opacity: 0; }
}

/* A breeze through the tall stripes on hover. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .logo:hover .logo-tall rect {
    animation: breeze .9s ease-in-out both;
    animation-delay: calc(var(--i) * 28ms);
  }
}
@keyframes breeze {
  0%, 100% { transform: none; }
  35% { transform: skewX(-7deg) scaleY(.93); }
  70% { transform: skewX(3deg) scaleY(1.03); }
}

.tagline {
  text-wrap: balance;
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.2rem, .95rem + 1.2vw, 1.75rem);
  font-size: clamp(1.15rem, 4.5cqi, 1.9rem);
  line-height: 1.25;
  letter-spacing: -.01em;
}

/* Buttons hang under the sign like riders on chains. */
.riders {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px 28px;
  margin-top: 22px;
}
.rider { position: relative; transform-origin: 50% -22px; }
.rider::before, .rider::after {
  content: "";
  position: absolute;
  bottom: calc(100% + 3px);
  width: 3px;
  height: 20px;
  background: repeating-linear-gradient(to bottom, #59646b 0 5px, transparent 5px 7px);
}
.rider::before { left: 18%; }
.rider::after { right: 18%; }
.rider:hover { transform: none; box-shadow: var(--lift) var(--lift) 0 var(--ink); animation: swing .7s ease-in-out; }
.rider:active { animation: none; }
@keyframes swing {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(3deg); }
  60% { transform: rotate(-2deg); }
  85% { transform: rotate(.6deg); }
}

.hero-hint {
  font: 400 .68rem/1.6 var(--pixel);
  color: var(--ink);
  text-decoration: none;
  padding: 6px 8px;
  opacity: .78;
}
.hero-hint:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

.bob { display: inline-block; animation: bob 1s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(3px); } }

/* Speech bubble that follows the mowing guy */
.bubble {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, calc(-100% - 12px)) scale(.4);
  transform-origin: calc(50% + var(--tail, 0px)) calc(100% + 12px);
  opacity: 0;
  padding: 9px 11px 8px;
  font: 400 11px/1.5 var(--pixel);
  color: var(--ink);
  white-space: nowrap;
  background: var(--paper);
  box-shadow: 0 -3px 0 var(--ink), 0 3px 0 var(--ink), -3px 0 0 var(--ink), 3px 0 0 var(--ink);
  transition: opacity .12s, transform .18s steps(3, end);
}
.bubble.show { opacity: 1; transform: translate(-50%, calc(-100% - 12px)) scale(1); }
.bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(50% + var(--tail, 0px) - 7.5px);
  width: 15px;
  height: 9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 3' shape-rendering='crispEdges'%3E%3Cpath fill='%2315281d' d='M0 0h1v1H0zM4 0h1v1H4zM1 1h1v1H1zM3 1h1v1H3zM2 2h1v1H2z'/%3E%3Cpath fill='%23fff' d='M1 0h3v1H1zM2 1h1v1H2z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

/* ---------- section basics ---------- */

.section-title {
  margin: 0 0 .45em;
  font-weight: 900;
  font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  text-align: center;
  text-wrap: balance;
}
.eyebrow {
  margin: 0 auto 34px;
  width: fit-content;
  padding: 9px 12px 8px;
  font: 400 .72rem/1.4 var(--pixel);
  letter-spacing: .02em;
  text-transform: uppercase;
  background: var(--paper);
  box-shadow: 0 -3px 0 var(--ink), 0 3px 0 var(--ink), -3px 0 0 var(--ink), 3px 0 0 var(--ink);
}
.lede {
  text-wrap: balance;
  margin: 0 auto;
  max-width: 34em;
  font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem);
  font-weight: 600;
  text-align: center;
}

/* ---------- review ---------- */

.review {
  padding: clamp(64px, 10vw, 128px) var(--gutter) clamp(72px, 11vw, 136px);
  background: repeating-linear-gradient(90deg, var(--lime) 0 56px, var(--lime-2) 56px 112px);
}
.quote {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) clamp(24px, 6vw, 64px) clamp(28px, 4vw, 44px);
}
.quote-mark {
  position: absolute;
  top: -30px;
  left: clamp(18px, 5vw, 52px);
  width: 54px;
  height: auto;
  padding: 10px 10px 6px;
  box-sizing: content-box;
  color: var(--ink);
  background: var(--sky);
  box-shadow: 0 -4px 0 var(--ink), 0 4px 0 var(--ink), -4px 0 0 var(--ink), 4px 0 0 var(--ink);
}
.quote blockquote { margin: 0; }
.quote p {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.25rem, .95rem + 1.5vw, 2rem);
  line-height: 1.38;
  letter-spacing: -.012em;
  text-wrap: pretty;
}
.quote mark {
  color: inherit;
  background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%);
  padding: 0 .08em;
}
.quote figcaption {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 1.4em;
  font-weight: 800;
  font-size: 1.05rem;
}
.quote figcaption::before {
  content: "";
  width: 36px;
  height: 4px;
  background: var(--ink);
}

/* ---------- steps ---------- */

.steps {
  padding: clamp(64px, 10vw, 120px) var(--gutter);
  background: var(--cream);
}
.steps .section-title { margin-bottom: clamp(36px, 5vw, 56px); }
.step-list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1080px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 36px 32px;
}
.step {
  position: relative;
  padding: 30px 26px 28px;
}
.step-art {
  width: auto;
  height: 76px;
  margin-bottom: 18px;
}
.step-num {
  position: absolute;
  top: -16px;
  right: 18px;
  padding: 9px 10px 8px;
  font: 400 .8rem/1 var(--pixel);
  background: var(--lime);
  box-shadow: 0 -3px 0 var(--ink), 0 3px 0 var(--ink), -3px 0 0 var(--ink), 3px 0 0 var(--ink);
}
.step h3 {
  margin: 0 0 6px;
  font-weight: 900;
  font-size: 1.45rem;
  line-height: 1.15;
  letter-spacing: -.015em;
}
.step p { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.step a { font-weight: 700; color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- game ---------- */

.play {
  padding: clamp(64px, 10vw, 120px) var(--gutter) clamp(72px, 10vw, 120px);
  background: var(--sky);
}
.play-head { margin-bottom: clamp(28px, 4vw, 44px); }
.game { max-width: 960px; margin: 0 auto; }
.game-frame {
  padding: 10px;
  background: var(--ink);
  box-shadow: 10px 10px 0 rgba(21, 40, 29, .22);
}
.game-hud {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 6px 14px;
  font: 400 .66rem/1 var(--pixel);
  color: var(--lime-pale);
}
.hud-item { white-space: nowrap; }
.hud-item b { font-weight: 400; color: var(--lime); }
.game-bar {
  flex: 1;
  height: 12px;
  background: #2c4434;
  box-shadow: inset 0 0 0 2px #233629;
}
.game-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--lime) 0 6px, var(--lime-2) 6px 12px);
}
.game-screen { position: relative; }
.game-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  background: #6f9b33;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: pan-y;
  cursor: crosshair;
}
.game.playing .game-canvas { touch-action: none; }
.game-canvas:focus-visible { outline: 3px solid var(--lime); outline-offset: -3px; }

.game-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(21, 40, 29, .42);
}
.overlay-card {
  max-width: 440px;
  padding: 24px 24px 22px;
  text-align: center;
  background: var(--paper);
  box-shadow: 0 -4px 0 var(--ink), 0 4px 0 var(--ink), -4px 0 0 var(--ink), 4px 0 0 var(--ink);
}
.overlay-title {
  margin: 0 0 16px;
  font: 400 .8rem/1.5 var(--pixel);
  text-transform: uppercase;
}
.overlay-hint { margin: 14px 0 0; font-size: .9rem; color: var(--ink-2); }
.hint-touch { display: none; }
@media (pointer: coarse) {
  .hint-keys { display: none; }
  .hint-touch { display: inline; }
}
.overlay-time { margin: 0 0 6px; font-weight: 700; font-size: 1.15rem; }
.overlay-time b { font-weight: 900; }
.overlay-time span { display: block; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.overlay-text { margin: 0 0 18px; }
.overlay-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; }

.game-toast {
  position: absolute;
  left: 50%;
  top: 14px;
  margin: 0;
  padding: 8px 11px 7px;
  font: 400 10px/1.5 var(--pixel);
  white-space: nowrap;
  background: var(--paper);
  box-shadow: 0 -3px 0 var(--ink), 0 3px 0 var(--ink), -3px 0 0 var(--ink), 3px 0 0 var(--ink);
  transform: translate(-50%, -8px);
  opacity: 0;
  transition: opacity .15s, transform .15s;
  pointer-events: none;
}
.game-toast.show { opacity: 1; transform: translate(-50%, 0); }

.game-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 18px;
}
#game-sound .icon-soundOn { display: none; }
#game-sound[aria-pressed="true"] .icon-soundOn { display: block; }
#game-sound[aria-pressed="true"] .icon-soundOff { display: none; }

/* ---------- contact ---------- */

.contact {
  position: relative;
  overflow: hidden;
  min-height: clamp(560px, 80vh, 760px);
  display: grid;
  place-items: center;
  padding: clamp(56px, 9vw, 104px) var(--gutter) calc(var(--ground) + clamp(28px, 5vw, 56px));
  background: var(--sky) var(--lawn);
  text-align: center;
}
.contact-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.contact-inner a { pointer-events: auto; }
.contact .section-title { margin-bottom: 10px; }
.big-phone {
  font-weight: 900;
  font-size: clamp(2.6rem, 1.4rem + 6vw, 5.2rem);
  line-height: 1;
  letter-spacing: -.03em;
  text-decoration: none;
  padding: 4px 10px;
  background: linear-gradient(transparent 62%, var(--lime) 62%, var(--lime) 94%, transparent 94%);
}
.big-phone:hover { background: linear-gradient(transparent 8%, var(--lime) 8%, var(--lime) 94%, transparent 94%); }
.big-email {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  max-width: 100%;
  font-weight: 700;
  font-size: clamp(.95rem, .85rem + .6vw, 1.25rem);
  overflow-wrap: anywhere;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.place {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  margin: 6px 0 0;
  font-weight: 700;
}
.place .icon { width: 1em; }

.you-tag {
  position: absolute;
  top: 0;
  left: 0;
  padding: 7px 8px 6px;
  font: 400 10px/1 var(--pixel);
  background: var(--lime);
  box-shadow: 0 -3px 0 var(--ink), 0 3px 0 var(--ink), -3px 0 0 var(--ink), 3px 0 0 var(--ink);
  transform: translate(-50%, calc(-100% - 14px));
  animation: tag-bob 1s steps(2) infinite;
}
.you-tag::after {
  content: "";
  position: absolute;
  top: calc(100% + 3px);
  left: calc(50% - 6px);
  width: 12px;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 2' shape-rendering='crispEdges'%3E%3Cpath fill='%2315281d' d='M0 0h4v1H0zM1 1h2v1H1z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
@keyframes tag-bob { 50% { transform: translate(-50%, calc(-100% - 10px)); } }

/* ---------- footer & call bar ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom, 0px));
  font-size: .9rem;
  font-weight: 600;
  color: #f1e3d2;
  background: var(--dirt-dark);
}
.site-footer a { text-decoration-thickness: 2px; text-underline-offset: 3px; }

.callbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 54px;
  font: 800 1.05rem/1 var(--sans);
  color: var(--ink);
  text-decoration: none;
  background: var(--lime);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  transform: translateY(calc(100% + 24px));
  transition: transform .25s cubic-bezier(.3, .8, .4, 1);
}
.callbar .icon { width: 1.2em; }
.callbar.show { transform: none; }
@media (max-width: 720px) {
  .callbar { display: flex; }
  .site-footer { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
}

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

.lost { text-align: center; }
.lost-code {
  margin: 0 0 18px;
  font: 400 clamp(2.4rem, 12cqi, 4.5rem)/1 var(--pixel);
  color: var(--sky);
  text-shadow: .08em .08em 0 var(--lime);
}
.lost-title {
  margin: 0 0 10px;
  font-weight: 900;
  font-size: clamp(1.6rem, 7cqi, 2.6rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.lost-text { margin: 0; font-weight: 600; color: var(--ink-2); text-wrap: balance; }

/* ---------- small screens ---------- */

@media (max-width: 560px) {
  .riders { width: 100%; max-width: 320px; flex-direction: column; align-items: stretch; }
  .sign::before { left: 9%; }
  .sign::after { right: 9%; }
  .bubble { font-size: 9px; padding: 7px 8px 6px; }
  .game-hud { gap: 10px; font-size: .58rem; }
  .game-frame { padding: 7px; }
  .overlay-card { padding: 18px 16px 16px; }
  .overlay-actions .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bob, .you-tag { animation: none; }
  .btn, .callbar, .bubble { transition: none; }
  .rider:hover { animation: none; }
}
