:root {
  --ink: #1e293b;
  --gray: #64748b;
  --paper: #ffffff;
  --paper-soft: #f8fafc;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --accent-warm: #f97316;
  --head-bg: #1e293b;
  --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: var(--paper-soft);
  line-height: 1.85;
  font-size: 15px;
}

img { max-width: 100%; display: block; }

.demo-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.demo-header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.demo-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
}

.demo-header h1 {
  font-size: 18px;
  font-weight: 800;
}

.demo-header a {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.demo-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px 72px;
}

.demo-intro {
  margin-bottom: 28px;
}

.demo-intro h2 {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
  margin-bottom: 10px;
}

.demo-intro p {
  color: var(--gray);
  font-size: 14px;
}

/* ===== Values grid ===== */
.values-grid {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(15, 23, 42, .06);
}

.values-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
}

.values-grid-head {
  padding: 36px 24px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--head-bg);
  color: #fff;
}

.values-grid-en {
  font-family: "Manrope", "Noto Sans JP", sans-serif;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 18px;
  color: #93c5fd;
}

.values-grid-head h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
}

.values-grid-lead {
  font-size: 13px;
  color: rgba(255, 255, 255, .72);
  line-height: 1.95;
  max-width: 360px;
}

.values-grid-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--paper-soft);
}

.values-grid-card {
  position: relative;
  min-height: 220px;
  padding: 22px 20px 24px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--paper);
  transition: background .2s ease;
}

.values-grid-card:hover {
  background: var(--accent-soft);
}

.values-grid-card:nth-child(2n) {
  border-right: none;
}

.values-grid-card:nth-last-child(-n+2) {
  border-bottom: none;
}

.values-grid-num {
  display: block;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 28px;
  color: var(--accent-warm);
}

.values-grid-illust {
  position: absolute;
  top: 18px;
  right: 16px;
  width: 72px;
  height: 58px;
}

.values-grid-illust img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.values-grid-card h4 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 10px;
  padding-right: 56px;
  color: var(--ink);
}

.values-grid-card p {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.85;
}

.demo-note {
  margin-top: 28px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

@media (min-width: 900px) {
  .values-grid-layout {
    grid-template-columns: minmax(280px, 34%) 1fr;
  }

  .values-grid-head {
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, .12);
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .values-grid-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .values-grid-card {
    min-height: 240px;
    padding: 28px 24px 30px;
  }

  .values-grid-card:nth-child(2n) {
    border-right: 1px solid var(--line);
  }

  .values-grid-card:nth-child(3n) {
    border-right: none;
  }

  .values-grid-card:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .values-grid-card:nth-last-child(-n+3) {
    border-bottom: none;
  }

  .values-grid-illust {
    width: 88px;
    height: 72px;
    top: 22px;
    right: 20px;
  }
}

@media (max-width: 899px) and (min-width: 560px) {
  .values-grid-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 559px) {
  .values-grid-head {
    padding: 28px 18px 24px;
  }

  .values-grid-card {
    min-height: 200px;
    padding: 18px 16px 20px;
  }

  .values-grid-card h4 {
    font-size: 15px;
    padding-right: 48px;
  }
}
