/* 色と文字の大きさは mobile/lib/design_system のトークンに合わせている。
   LP とアプリで見た目がずれないようにするため。 */
:root {
  --green-100: #dceee1;
  --green-200: #b9dcc2;
  --green-400: #62ac79;
  --green-600: #2f7649;
  --green-700: #255e3b;
  --green-900: #173b28;

  --paper: #fcfcf9;
  --surface: #ffffff;
  --ink: #292925;
  --ink-soft: #595952;
  --ink-faint: #74746c;
  --line: #ddddd5;

  --font-sans: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP",
    system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --page: 1080px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-gap: clamp(4.5rem, 11vw, 7.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  /* 日本語には語の区切りが無いため、既定のままだと「買うもの」が「買」と
     「うもの」に割れる。折り返してよい位置は本文の <wbr> で示し、それ以外では
     折り返さない。それでも収まらないときだけ anywhere を逃げ道にする。 */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
p,
ol {
  margin: 0;
}

a {
  color: inherit;
}

:where(a, button, input):focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0.5rem;
  transform: translate(-50%, -200%);
  z-index: 10;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--green-600);
  color: #fff;
  font-size: 0.875rem;
  text-decoration: none;
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.section-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-600);
}

/* 見出し ------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem var(--gutter);
  background: rgba(252, 252, 249, 0.88);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
}

.masthead__link {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.2s, color 0.2s;
}

.masthead__link:hover {
  border-color: var(--green-600);
  color: var(--green-700);
}

/* ヒーロー ----------------------------------------------------------- */

.hero {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) var(--section-gap);
  display: grid;
  gap: clamp(2.75rem, 7vw, 4rem);
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.02fr 0.98fr;
    align-items: center;
  }
}

.hero__title {
  margin-top: 0.75rem;
  font-size: clamp(2.25rem, 7.5vw, 3.5rem);
  font-weight: 700;
  /* 和文は欧文ほど詰められない。行間も字間も、詰めすぎない側に寄せる。 */
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.hero__title-accent {
  color: var(--green-600);
}

.hero__lede {
  margin-top: 1.5rem;
  max-width: 30rem;
  color: var(--ink-soft);
}

.hero__lede + .hero__lede {
  margin-top: 0.5rem;
}

/* 先行登録フォーム ---------------------------------------------------- */

.signup {
  margin-top: 2rem;
  max-width: 30rem;
}

.signup__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.signup__input {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.8125rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.2s;
}

.signup__input::placeholder {
  color: var(--ink-faint);
}

.signup__input:hover {
  border-color: var(--green-400);
}

.signup__button {
  flex: 0 0 auto;
  padding: 0.8125rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--green-600);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.signup__button:hover {
  background: var(--green-700);
}

.signup__button[disabled] {
  background: var(--green-400);
  cursor: default;
}

.signup__status {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.7;
}

.signup__status:empty {
  display: none;
}

.signup__status[data-state="error"] {
  color: #b23a3a;
}

.signup__status[data-state="done"] {
  color: var(--green-700);
  font-weight: 500;
}

.signup__note {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

/* 円のデモ ----------------------------------------------------------- */

.demo {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
}

.demo__map {
  display: block;
  width: 100%;
  height: auto;
}

.demo__streets path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
}

.demo__ring {
  r: 38px;
  fill: rgba(47, 118, 73, 0.08);
  fill: color-mix(in srgb, var(--green-600) 8%, transparent);
  stroke: var(--green-400);
  stroke-width: 1.5;
  transition: r 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.demo__store-halo {
  fill: var(--green-100);
}

.demo__store {
  fill: var(--green-600);
}

.demo__me {
  fill: var(--green-700);
  stroke: var(--surface);
  stroke-width: 3;
  transform: translate(92px, 92px);
  animation: approach 2.6s cubic-bezier(0.33, 0.08, 0.2, 1) 0.5s forwards;
}

@keyframes approach {
  to {
    transform: translate(17px, 17px);
  }
}

.notice {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 32px -22px rgba(25, 25, 22, 0.7);
  opacity: 0;
  transform: translateY(10px);
  animation: notice-in 0.45s ease 2.85s forwards;
}

@keyframes notice-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notice__title {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.5;
}

.notice__body {
  margin-top: 0.125rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* 距離のつまみ -------------------------------------------------------- */

.radius {
  margin-top: 1.5rem;
}

.radius__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.radius__label {
  font-size: 0.875rem;
  font-weight: 500;
}

.radius__value {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--green-600);
}

.radius__input {
  width: 100%;
  margin: 0.625rem 0 0;
  accent-color: var(--green-600);
}

.radius__scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--ink-faint);
}

/* 使いかた ----------------------------------------------------------- */

.steps {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--section-gap);
}

.steps__list {
  margin-top: 2rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 2rem;
}

@media (min-width: 760px) {
  .steps__list {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }
}

.step {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

.step__index {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--green-600);
}

.step__title {
  margin-top: 0.375rem;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.6;
}

.step__body {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* 現在地の扱い -------------------------------------------------------- */

.privacy {
  background: var(--green-900);
  color: var(--green-100);
}

.privacy__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 5.5rem) var(--gutter);
}

.privacy__title {
  font-size: clamp(1.375rem, 3.6vw, 1.875rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: #fff;
}

.privacy__body {
  margin-top: 1.25rem;
  /* 和文は 1 行 35 文字前後で読みやすさが頭打ちになる。 */
  max-width: 34rem;
  color: var(--green-200);
}

.privacy__body + .privacy__body {
  margin-top: 0.5rem;
}

/* 締めくくり --------------------------------------------------------- */

.closing {
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--section-gap) var(--gutter);
  text-align: center;
}

.closing__title {
  font-size: clamp(1.5rem, 4vw, 2.125rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.closing__body {
  margin-top: 0.75rem;
  color: var(--ink-soft);
}

.signup--closing {
  margin-inline: auto;
  text-align: left;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--page);
  margin: 0 auto;
  padding: 1.75rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
}

.footer__note {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
  .demo__me {
    transform: translate(17px, 17px);
    animation: none;
  }

  .notice {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .demo__ring {
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
