/*
 * 携帯の幅（390px）から設計し、広い画面では中央の軸に左右対称に広げる。
 * 余白は --s1〜--s6 の1つの尺度だけを使う。色は地の色と差し色1つ（--accent）。
 * 書体は端末の書体だけ。外の資源は読み込まない。
 */
:root {
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 1rem;
  --s4: 1.5rem;
  --s5: 2.5rem;
  --s6: 4rem;

  --bg: #f6f4ef;
  --surface: #fffdf9;
  --text: #23262b;
  --muted: #5c6269;
  --line: #e3ded4;
  --accent: #1e6a65;
  --accent-ink: #ffffff;
  --accent-soft: #e2eeec;

  --radius: 0.75rem;
  --measure: 35rem;
  --wide: 68rem;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic",
    "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Yu Gothic", Meiryo,
    system-ui, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181c;
    --surface: #1c2025;
    --text: #e8e5df;
    --muted: #a2a8af;
    --line: #2d333a;
    --accent: #7cc3bb;
    --accent-ink: #0e2321;
    --accent-soft: #1d3331;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.85;
  letter-spacing: 0.02em;
  text-align: center;
  line-break: strict;
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.5;
  font-weight: 700;
  font-feature-settings: "palt";
  text-wrap: balance;
  word-break: auto-phrase;
}

p,
ul,
ol,
dl,
dd {
  margin: 0;
}

/* 中央揃えの文は文節で折り返し、行末に1〜2文字だけ残るのを防ぐ */
p:not(.prose) {
  text-wrap: pretty;
  word-break: auto-phrase;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  width: min(100% - 2 * var(--s3), var(--wide));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  top: calc(-1 * var(--s6));
  left: 50%;
  transform: translateX(-50%);
  padding: var(--s2) var(--s3);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius);
  z-index: 1;
}

.skip:focus {
  top: var(--s2);
}

/* 頭と足 */
.site-header {
  padding-block: var(--s4);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-block;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.nav {
  display: flex;
  justify-content: center;
  gap: var(--s4);
  margin-top: var(--s2);
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--accent);
}

.site-footer {
  padding-block: var(--s5);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-name {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--s4);
  margin-top: var(--s3);
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--muted);
}

/* 区切り */
.hero {
  padding-block: var(--s6);
}

.hero-title {
  max-width: 20em;
  margin-inline: auto;
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem);
}

.hero-text {
  max-width: var(--measure);
  margin: var(--s4) auto 0;
  color: var(--muted);
}

.section {
  padding-block: var(--s6);
  border-top: 1px solid var(--line);
}

.section-title {
  margin-bottom: var(--s5);
  font-size: 1.375rem;
  letter-spacing: 0.06em;
}

.section-title::after {
  content: "";
  display: block;
  width: var(--s5);
  height: 2px;
  margin: var(--s3) auto 0;
  background: var(--accent);
}

/* 本文: 短い文は塊ごと中央の軸に置き、長い文は左右の端を揃える */
.prose {
  width: fit-content;
  max-width: var(--measure);
  margin-inline: auto;
  text-align: justify;
  text-align-last: left;
  text-wrap: pretty;
}

.lead {
  max-width: var(--measure);
  margin-inline: auto;
  font-size: 1.125rem;
  font-weight: 700;
}

.notice {
  max-width: var(--measure);
  margin-inline: auto;
  padding: var(--s3) var(--s4);
  background: var(--accent-soft);
  border-radius: var(--radius);
}

/* 並べる枠: 携帯は1列、広い画面は同じ幅の枠を中央に揃えて並べる */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  /* 端数の枠も中央の軸に寄せるため、折り返す flex で並べる */
  .grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .grid > * {
    flex: 0 1 20rem;
  }
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  padding: var(--s5) var(--s4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card-index {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.card-title {
  font-size: 1.125rem;
}

.card-text {
  color: var(--muted);
  text-wrap: pretty;
}

.card-meta {
  color: var(--muted);
  font-size: 0.875rem;
}

.card-link {
  margin-top: auto;
  padding-top: var(--s3);
  font-weight: 700;
}

.badge {
  display: inline-block;
  padding: var(--s1) var(--s3);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* 試す入口 */
.feature {
  background: var(--surface);
}

.price {
  max-width: var(--measure);
  margin: var(--s3) auto 0;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s3);
  margin-top: var(--s5);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12rem;
  min-height: 3rem;
  padding: 0 var(--s5);
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.ghost {
  background: transparent;
  color: var(--accent);
}

/* 運営者などの対の表: 中央の軸の左に項目、右に値 */
.facts {
  max-width: var(--measure);
  margin-inline: auto;
}

.facts div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
  padding-block: var(--s3);
  border-bottom: 1px solid var(--line);
}

.facts div:first-child {
  border-top: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
  text-align: right;
}

.facts dd {
  text-align: left;
}

/* 実績の頁 */
.page-head {
  padding-block: var(--s6) var(--s5);
}

.page-title {
  margin-block: var(--s3);
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  letter-spacing: 0.06em;
}

.page-head .notice {
  margin-top: var(--s4);
}

.measuring {
  display: inline-block;
  padding: var(--s2) var(--s4);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  letter-spacing: 0.12em;
}

.effect {
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.effect-item {
  color: var(--muted);
  font-size: 0.875rem;
}

.effect-value {
  font-size: 1.375rem;
  font-weight: 700;
}

.effect-basis {
  color: var(--muted);
  font-size: 0.8125rem;
}

.back {
  padding-block: var(--s5) var(--s6);
  border-top: 1px solid var(--line);
}

/* 問い合わせ */
.form {
  max-width: var(--measure);
  margin-inline: auto;
}

.field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s4);
}

.field label {
  font-weight: 700;
}

.req {
  margin-left: var(--s2);
  color: var(--accent);
  font-size: 0.75rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: var(--s3);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  text-align: left;
}

.form-note {
  color: var(--muted);
  font-size: 0.875rem;
}
