/* 資格ねこ 公式サイト（最初の版の簡単な版）。色と文字はアプリ（lib/design/tokens.dart）に合わせる。 */
@font-face {
  font-family: "Zen Maru Gothic";
  font-weight: 500;
  font-display: swap;
  src: url("fonts/zen-maru-500.woff2") format("woff2");
}

@font-face {
  font-family: "Zen Maru Gothic";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/zen-maru-700.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --canvas: #f5f4f1;
  --surface: #ffffff;
  --ink: #4e3122;
  --muted: #806450;
  --green: #3e6b55;
  --green-lip: #24453a;
  --green-soft: #e3ebdd;
  --wall: #5f7b5f;
  --wood: #8a5a3c;
  --wood-dark: #6e4530;
  --wood-line: #7a4e35;
  --mustard: #d9a441;
  --brick: #b5483a;
  --outline: #e6e1d8;
  --frame: 64rem;
  --gutter: 16px;
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 500 1rem/1.85 "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

a {
  color: var(--green);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--mustard);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: var(--gutter);
  z-index: 2;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
}

.skip-link:not(:focus) {
  clip-path: inset(50%);
}

.frame {
  width: min(calc(100% - 2 * var(--gutter)), var(--frame));
  margin-inline: auto;
}

/* 見出しの帯：アプリの壁と同じ深緑 */
.site-header {
  background: var(--wall);
  color: #fbf5ea;
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 24px;
  min-height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: inherit;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.wordmark img {
  width: 30px;
  height: auto;
}

.site-header ul,
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header nav a,
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: inherit;
  text-decoration: none;
}

.site-header nav a:hover,
.site-footer nav a:hover,
nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

h1,
h2,
h3 {
  margin: 0 0 0.6em;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.04em;
}

h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
}

h2 {
  font-size: clamp(1.25rem, 3.2vw, 1.5rem);
}

h3 {
  font-size: 1.0625rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1em;
}

:is(p, ul, ol, dl):last-child {
  margin-block-end: 0;
}

ul,
ol {
  padding-inline-start: 1.4em;
}

li + li {
  margin-block-start: 0.35em;
}

/* トップ：壁と腰板のおへやに、ねこが立つ */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12px 12px, rgb(255 255 255 / 0.09) 2px, transparent 2.5px) 0 0 / 24px 24px,
    var(--wall);
  color: #fbf5ea;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: end;
  gap: 24px;
  padding-block: clamp(32px, 7vw, 72px) 0;
}

.hero-copy {
  padding-block-end: clamp(48px, 9vw, 104px);
}

.eyebrow {
  display: inline-block;
  margin-block-end: 12px;
  padding: 2px 14px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.16);
  font-size: 0.875rem;
}

.hero h1 {
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 1.3;
}

.lead {
  max-width: 26em;
  font-size: clamp(1rem, 2.4vw, 1.125rem);
}

.badge-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.badge-line li {
  margin: 0;
  padding: 4px 14px;
  border: 1px solid rgb(251 245 234 / 0.4);
  border-radius: 999px;
  white-space: nowrap;
}

.hero-cat {
  justify-self: center;
  width: min(100%, 300px);
  margin: 0;
}

/* アプリと同じ、れんが色の単色ラグ */
.hero-cat {
  position: relative;
  isolation: isolate;
}

.hero-cat::after {
  content: "";
  position: absolute;
  inset: auto -14% -3% -14%;
  z-index: -1;
  height: 16%;
  border-radius: 50%;
  background: var(--brick);
}

.hero-cat img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  animation: settle 700ms ease-out both;
}

/* 腰板と床 */
.floor {
  position: absolute;
  inset: auto 0 0;
  height: clamp(72px, 12vw, 120px);
  background:
    linear-gradient(var(--wood-line) 0 6px, transparent 6px),
    repeating-linear-gradient(90deg, transparent 0 158px, rgb(0 0 0 / 0.12) 158px 160px),
    var(--wood);
}

@keyframes settle {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-cat img {
    animation: none;
  }
}

.section {
  margin-block: clamp(40px, 8vw, 80px);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cards li + li {
  margin: 0;
}

.card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
}

.card-mark {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  margin-block-end: 12px;
  padding-inline: 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 700;
}

.card p {
  color: var(--muted);
}

.store-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-block-end: 16px;
  padding: 0;
  list-style: none;
}

.store-list li {
  margin: 0;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 0 var(--outline);
}

.store-list strong,
.store-list span {
  display: block;
}

.store-list span {
  color: var(--muted);
}

.note p {
  color: var(--muted);
}

/* 規約などの読み物 */
.document {
  --frame: 46rem;
  margin-block: clamp(24px, 6vw, 56px);
  padding: clamp(24px, 5vw, 48px);
  border-radius: var(--radius);
  background: var(--surface);
}

.document section {
  margin-block-start: clamp(28px, 5vw, 40px);
}

.effective {
  color: var(--muted);
  font-size: 0.9375rem;
}

.key-values {
  display: grid;
  gap: 12px;
}

.key-values div {
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--canvas);
}

dt {
  font-weight: 700;
}

dd {
  margin: 0;
}

details {
  border-radius: 16px;
  background: var(--canvas);
}

details + details {
  margin-block-start: 8px;
}

summary {
  min-height: 48px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 700;
}

details > p {
  margin: 0;
  padding: 0 18px 14px;
}

.site-footer {
  margin-block-start: clamp(40px, 8vw, 80px);
  background: var(--wood-dark);
  color: #fbf5ea;
}

.footer-inner {
  padding-block: 16px;
}

/* フッターのリンクは2列の格子にして、スマホでも行と列をそろえる */
.site-footer nav {
  width: 100%;
}

.site-footer ul {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 0 24px;
}

.site-footer li {
  margin: 0;
  white-space: nowrap;
}

@media (max-width: 44rem) {
  .site-footer ul {
    grid-template-columns: repeat(2, max-content);
    column-gap: 40px;
  }
}

.copyright {
  width: 100%;
  margin: 0;
  color: rgb(251 245 234 / 0.72);
  font-size: 0.8125rem;
}

@media (max-width: 44rem) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-block-end: 0;
  }

  .hero-cat {
    width: min(64%, 240px);
    margin-block-end: clamp(28px, 6vw, 48px);
  }

  .cards,
  .store-list {
    grid-template-columns: 1fr;
  }
}
