.racing-page {
  --turf: #355c3a;
  --turf-bright: #6d975f;
  --turf-dark: #0c140f;
  --cream: #f0ede6;
  /* 試し: アクセント文字をゴールドから芝グリーンへ */
  --gold: #4ec86a;
  --gold-bright: #8ef0a0;
  background: var(--ink);
}

.racing-page .site-header {
  border-bottom-color: rgba(216, 173, 97, .2);
}

.racing-hero {
  position: relative;
  min-height: 680px;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 78% 38%, rgba(78, 200, 106, .12), transparent 42%),
    radial-gradient(ellipse at 18% 22%, rgba(109, 151, 95, .08), transparent 36%),
    linear-gradient(165deg, #090b0a 0%, #101612 52%, #0a0d0b 100%);
}

.racing-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 11, 10, .55) 0%, transparent 58%);
  pointer-events: none;
}

.racing-hero-content {
  position: relative;
  z-index: 2;
  padding-block: 116px;
}

.racing-hero h1 {
  max-width: 720px;
  margin-block: 22px 30px;
  font-size: clamp(3.6rem, 8vw, 7.3rem);
  letter-spacing: -.04em;
}

.racing-hero-line {
  display: block;
  white-space: nowrap;
  word-break: keep-all;
  line-break: strict;
}

.racing-hero h1 em {
  color: var(--gold);
  font-style: normal;
}

.racing-hero .lead {
  max-width: 620px;
}

.racing-hero-note {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.6;
  text-align: left;
}

.racing-hero-note-accent {
  color: var(--gold-bright);
}

.racing-scroll {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
  color: var(--gold-bright);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-decoration: none;
}

.racing-scroll span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(216, 173, 97, .48);
  border-radius: 50%;
  transition: transform .2s ease, background .2s ease;
}

.racing-scroll:hover span {
  transform: translateY(3px);
  background: rgba(216, 173, 97, .1);
}

.racing-hero-art {
  position: absolute;
  z-index: 1;
  right: max(2vw, calc((100vw - 1120px) / 2));
  top: 50%;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.racing-horse {
  position: absolute;
  inset: 5% 1% 10% 8%;
  background: url("horse-racing-mark.png") center / contain no-repeat;
  opacity: .83;
  filter: drop-shadow(0 20px 34px rgba(0, 0, 0, .38));
}

.racing-apps {
  padding-block: 112px 126px;
  border-block: 1px solid var(--line);
  background:
    radial-gradient(circle at 88% 18%, rgba(64, 107, 61, .16), transparent 24%),
    var(--night);
}

.racing-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 36px;
  align-items: end;
}

.racing-section-head h2 {
  margin: 12px 0 0;
}

.racing-section-head > p {
  margin: 0;
  max-width: 31rem;
  justify-self: end;
  color: var(--muted);
}

.racing-app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 52px;
  align-items: stretch;
}

.racing-app-card {
  position: relative;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #141918;
  color: inherit;
  text-decoration: none;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.racing-app-card:hover {
  transform: translateY(-7px);
  border-color: rgba(216, 173, 97, .56);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
}

.racing-app-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .9;
  pointer-events: none;
}

.racing-app-prism::before {
  background:
    radial-gradient(circle at 78% 17%, rgba(114, 111, 211, .2), transparent 27%),
    linear-gradient(145deg, rgba(24, 25, 40, .72), transparent 55%);
}

.racing-app-seed::before {
  background:
    radial-gradient(circle at 74% 18%, rgba(118, 165, 82, .24), transparent 28%),
    linear-gradient(145deg, rgba(24, 38, 25, .65), transparent 55%);
}

.racing-app-simulator::before {
  background:
    radial-gradient(circle at 77% 18%, rgba(208, 137, 58, .2), transparent 28%),
    linear-gradient(145deg, rgba(40, 27, 17, .64), transparent 55%);
}

.racing-app-card > * {
  position: relative;
  z-index: 1;
}

.racing-app-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--gold-bright);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.3;
}

.racing-app-topline span:first-child {
  color: var(--muted);
}

.racing-visual {
  position: relative;
  height: 170px;
  margin-block: 22px 18px;
}

.racing-image-visual {
  overflow: hidden;
  border: 1px solid rgba(240, 237, 230, .14);
  border-radius: 14px;
  background: #0a0d0c;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .2);
}

.racing-image-visual::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 56%, rgba(7, 10, 8, .28)),
    linear-gradient(90deg, rgba(216, 173, 97, .09), transparent 25%);
}

.racing-image-visual > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, filter .45s ease;
}

.racing-app-card:hover .racing-image-visual > img {
  transform: scale(1.035);
  filter: saturate(1.06) contrast(1.02);
}

.prism-image-visual {
  background: #ffffff;
}

.prism-image-visual::after {
  background: none;
}

.prism-image-visual .prism-banner {
  object-fit: contain;
  object-position: center;
  padding-inline: 4%;
  box-sizing: border-box;
  background: #ffffff;
}

.racing-app-card:hover .prism-image-visual .prism-banner {
  transform: scale(1.02);
}

.racing-app-copy {
  flex: 0 1 auto;
}

.racing-app-type {
  margin: 0 0 8px;
  color: var(--gold-bright);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.racing-app-copy h3 {
  margin: 0 0 8px;
  font-family: inherit;
  font-size: 1.42rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: normal;
}

.racing-app-copy > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: inherit;
  line-height: 1.7;
}

.racing-app-arrow {
  display: block;
  margin-top: auto;
  padding-top: 14px;
  color: var(--gold);
  font-size: 1.25rem;
  line-height: 1.2;
  min-height: 1.5rem;
  text-align: center;
}

.racing-about {
  padding-block: 118px;
  background:
    linear-gradient(90deg, rgba(53, 92, 58, .13) 1px, transparent 1px),
    linear-gradient(rgba(53, 92, 58, .13) 1px, transparent 1px),
    var(--ink);
  background-size: 54px 54px;
}

.racing-about-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr);
  gap: 60px;
  align-items: start;
}

.racing-about h2 {
  max-width: 650px;
  margin: 13px 0 0;
}

.racing-about-copy {
  padding-top: 29px;
}

.racing-about-copy > p:first-child {
  color: var(--paper);
  font-size: 1.04rem;
}

.racing-note {
  margin: 28px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.8;
}

@media (max-width: 980px) {
  .racing-hero-art {
    right: -5%;
    width: min(50vw, 470px);
    opacity: .54;
  }

  .racing-app-grid {
    grid-template-columns: 1fr;
  }

  .racing-app-card {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(170px, .55fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
    column-gap: 30px;
  }

  .racing-app-topline {
    grid-column: 1 / -1;
  }

  .racing-visual {
    grid-column: 1;
    grid-row: 2 / 5;
    height: 205px;
    margin: 25px 0 0;
    align-self: center;
  }

  .racing-app-copy {
    grid-column: 2;
    grid-row: 2 / 4;
    margin-top: 28px;
  }

  .racing-app-copy h3 {
    min-height: 0;
  }

  .racing-app-arrow {
    grid-column: 2;
    grid-row: 4;
  }
}

@media (max-width: 780px) {
  .racing-hero {
    min-height: 620px;
  }

  .racing-hero-content {
    padding-block: 88px 110px;
  }

  .racing-hero h1 {
    /* 「新しい景色を。」7文字がコンテナ幅に必ず収まるようにする */
    font-size: min(3.2rem, calc((100vw - 48px) / 7.15));
  }

  .racing-hero .lead br {
    display: none;
  }

  .racing-hero-art {
    right: -18%;
    top: 50%;
    width: 72vw;
    opacity: .28;
  }

  .racing-section-head,
  .racing-about-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .racing-section-head > p {
    justify-self: start;
  }

  .racing-apps {
    padding-block: 78px 84px;
  }

  .racing-app-card {
    display: flex;
    min-height: 0;
  }

  .racing-visual {
    width: 100%;
    height: 145px;
    margin-block: 24px 20px;
  }

  .racing-app-copy {
    margin-top: 0;
    flex: 0 1 auto;
  }

  .racing-app-copy h3 {
    min-height: 0;
    font-size: 1.42rem;
  }

  .racing-app-arrow {
    margin-top: 16px;
  }

  .racing-about {
    padding-block: 78px;
  }

  .racing-about-copy {
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .racing-app-card,
  .racing-scroll span,
  .project-horse {
    transition: none;
  }
}
