/* =========================================================
   しふとこ — Editorial / 和モダン redesign（紫テーマ）
   Palette: 薄紫の紙 × 墨紫 × 紫(#800080) × ゴールド
   ========================================================= */

:root {
  --paper: #f6f0f7;
  --paper-2: #ece0ee;
  --ink: #241a30;
  --ink-soft: #514459;
  --ink-faint: #8a7d92;
  --plum: #800080; /* 元テーマの紫 */
  --plum-deep: #4f165c;
  --gold: #b98a3c; /* 紫に合わせる暖色アクセント */
  --line: rgba(36, 26, 48, 0.14);
  --line-strong: rgba(36, 26, 48, 0.3);
  --card: #fdfafd;
  --shadow: 0 30px 70px -30px rgba(45, 20, 55, 0.4);
  --shadow-sm: 0 14px 30px -18px rgba(45, 20, 55, 0.34);

  --serif: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
  --latin: "Fraunces", serif;

  --wrap: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--gothic);
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* width / height 属性は presentational hint として高さを固定するため、
   CSS 側で高さを指定していない画像は縦横比が崩れる。既定で auto に戻す。
   （height を明示している .brand-logo / .hero-photo img などは影響を受けない） */
img {
  height: auto;
}

a {
  color: inherit;
}

/* film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap,
.nav,
.hero-inner {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.wrap-narrow {
  max-width: 820px;
}

.only-sp {
  display: none;
}

/* =======================  HEADER / NAV  ======================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.nav {
  position: relative; /* anchor for absolute nav-panel (avoids fixed+overflow clip bug) */
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 74px;
}

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  margin-right: auto;
  min-height: 44px;
}

.brand-logo {
  height: clamp(30px, 3.4vw, 40px);
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  font-weight: 700;
}

.nav-links a {
  text-decoration: none;
  position: relative;
}

.nav-links a:not(.nav-cta) {
  padding-block: 6px;
  color: var(--ink-soft);
  transition: color 0.25s ease;
}

.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--plum);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.nav-links a:not(.nav-cta):hover {
  color: var(--ink);
}

.nav-links a:not(.nav-cta):hover::after {
  transform: scaleX(1);
}

.nav-cta {
  color: var(--paper);
  background: var(--plum);
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: background 0.25s ease, transform 0.25s ease;
}

.nav-cta:hover {
  background: var(--plum-deep);
  transform: translateY(-1px);
}

/* burger (hidden on desktop) */
.nav-burger {
  display: none;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  padding: 9px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--card);
  margin-left: auto;
}

.nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-burger em {
  font-style: normal;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.nav-panel {
  display: none;
}

/* =======================  BUTTONS  ======================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 14px 26px;
  border-radius: 999px;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--plum-deep);
  box-shadow: var(--shadow);
}

.btn-ghost {
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 17px 34px;
  font-size: 16px;
}

/* =======================  EYEBROW  ======================= */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--latin);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 22px;
}

.eyebrow-mark {
  color: var(--plum);
  font-size: 15px;
}

/* =======================  HERO  ======================= */
.hero {
  position: relative;
  padding-top: clamp(48px, 8vw, 96px);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-bottom: clamp(48px, 7vw, 88px);
}

.hero-title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(38px, 6.2vw, 76px);
  line-height: 1.18;
  letter-spacing: 0.01em;
  margin: 0 0 26px;
}

.hero-title .accent {
  color: var(--plum);
  position: relative;
  white-space: nowrap;
}

.hero-title .accent::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 0.12em;
  height: 0.42em;
  background: color-mix(in srgb, var(--gold) 32%, transparent);
  z-index: -1;
  transform: rotate(-1deg);
}

.hero-lead {
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--ink-soft);
  max-width: 30em;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 34px;
  margin: 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-stats dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.hero-stats dd {
  margin: 0;
  font-family: var(--latin);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 34px);
  color: var(--ink);
  line-height: 1;
}

.hero-stats dd em {
  font-family: var(--gothic);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-left: 3px;
}

/* hero visual */
.hero-visual {
  position: relative;
  margin: 0;
  aspect-ratio: 5 / 5.4;
}

.hero-photo {
  position: absolute;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo-back {
  top: 0;
  left: 0;
  width: 74%;
  aspect-ratio: 16 / 10;
  transform: rotate(-2.5deg);
}

.hero-photo-front {
  right: 0;
  bottom: 4%;
  width: 46%;
  aspect-ratio: 3 / 4.1;
  transform: rotate(3deg);
  border-radius: 22px;
}

.hero-badge {
  position: absolute;
  left: 2%;
  bottom: 6%;
  z-index: 3;
  background: var(--ink);
  color: var(--paper);
  padding: 13px 18px;
  border-radius: 13px;
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
}

.hero-badge-line {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--paper) 70%, transparent);
}

.hero-badge-strong {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  color: #e6c07f;
}

/* marquee */
.hero-marquee {
  border-block: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  padding-block: 15px;
}

.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.05em;
  animation: marquee 26s linear infinite;
}

.marquee-track i {
  color: var(--gold);
  font-style: normal;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* =======================  SECTION SHELL  ======================= */
.section {
  padding-block: clamp(64px, 9vw, 128px);
}

/* フォームなど、上の余白を詰めたいセクション */
.section-tight {
  padding-top: clamp(32px, 4vw, 56px);
}

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 4vw, 54px);
  align-items: start;
  margin-bottom: clamp(38px, 5vw, 64px);
}

.sec-no {
  font-family: var(--latin);
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 500;
  line-height: 0.8;
  color: var(--gold);
  margin: 0;
  padding-top: 6px;
}

.sec-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(27px, 3.6vw, 46px);
  line-height: 1.3;
  margin: 0 0 16px;
  letter-spacing: 0.01em;
}

.sec-lead {
  font-size: clamp(15px, 1.3vw, 16.5px);
  color: var(--ink-soft);
  max-width: 42em;
  margin: 0;
}

/* =======================  SCREENS  ======================= */
.screens-grid {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: clamp(24px, 3.5vw, 48px);
}

.screens-grid figure {
  margin: 0;
  width: 100%;
}

.screen-main {
  max-width: 900px;
}

.screens-grid img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.screens-grid figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-faint);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.screen-side {
  max-width: 320px;
}

/* 汎用: 背景をひとつ落としたセクション帯 */
.section-alt {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}

/* =======================  DEMO  ======================= */
.demo-grid {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: clamp(24px, 3.5vw, 44px);
}

.demo-portrait {
  width: 100%;
  max-width: 420px;
}

.demo-landscape {
  width: 100%;
  max-width: 780px;
}

.demo-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.demo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.demo-media {
  background: #12100d;
}

.demo-media video {
  width: 100%;
}

.demo-portrait .demo-media video {
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.demo-landscape .demo-media video {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.demo-body {
  padding: 24px 26px 28px;
}

.demo-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--plum);
  border: 1px solid color-mix(in srgb, var(--plum) 40%, transparent);
  padding: 3px 11px;
  border-radius: 999px;
  margin: 0 0 14px;
}

.demo-body h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(19px, 2vw, 24px);
  margin: 0 0 10px;
}

.demo-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* =======================  VALUE  ======================= */
.value-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.value-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
  padding: clamp(26px, 3.6vw, 44px) 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.3s ease;
}

.value-item:hover {
  padding-left: 14px;
}

.value-idx {
  display: grid;
  place-items: center;
  width: clamp(60px, 6.4vw, 82px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--plum);
  color: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.value-idx svg {
  width: 48%;
  height: 48%;
}

.value-item:hover .value-idx {
  transform: scale(1.08) rotate(-4deg);
}

.value-item:nth-child(2) .value-idx {
  background: var(--gold);
}

.value-item:nth-child(3) .value-idx {
  background: var(--ink);
}

.value-item h3 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(20px, 2.3vw, 28px);
  margin: 0 0 6px;
}

.value-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

/* =======================  PRICE  ======================= */
.price-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(34px, 5vw, 68px);
  box-shadow: var(--shadow);
}

.price-title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(30px, 4.4vw, 54px);
  margin: 0 0 16px;
  line-height: 1.2;
}

.price-num {
  color: var(--plum);
  font-family: var(--latin);
  font-weight: 600;
}

.price-unit {
  font-size: 0.55em;
}

.price-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 26em;
}

.price-right {
  text-align: center;
}

.price-sub {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--ink-faint);
}

/* =======================  FOOTER  ======================= */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 48px;
  background: var(--paper-2);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}

.footer-brand img {
  width: 150px;
  margin-bottom: 8px;
}

.footer-brand p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 13.5px;
}

.footer-meta {
  text-align: right;
  font-size: 13px;
  color: var(--ink-soft);
}

.footer-meta p {
  margin: 2px 0;
}

.footer-meta a {
  color: var(--plum-deep);
  font-weight: 700;
}

/* =======================  REVEAL ANIMATION  ======================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .marquee-track {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-burger {
    display: inline-flex;
    position: relative;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 44px;
    min-width: 44px;
  }

  .nav-burger em {
    position: absolute;
    right: calc(100% + 8px);
    white-space: nowrap;
  }

  /* absolute (NOT fixed) panel anchored to .nav → no overflow-clip trap */
  .nav-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: grid;
    width: min(300px, calc(100vw - 32px));
    padding: 10px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  .nav-toggle:checked ~ .nav .nav-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .nav-toggle:checked ~ .nav .nav-burger {
    background: var(--ink);
    border-color: var(--ink);
  }

  .nav-toggle:checked ~ .nav .nav-burger em {
    color: var(--paper);
  }

  .nav-toggle:checked ~ .nav .nav-burger span {
    background: var(--paper);
  }

  .nav-toggle:checked ~ .nav .nav-burger span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle:checked ~ .nav .nav-burger span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked ~ .nav .nav-burger span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .nav-panel a {
    padding: 13px 14px;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    color: var(--ink);
    transition: background 0.2s ease;
  }

  .nav-panel a:hover {
    background: var(--paper-2);
  }

  .nav-panel .nav-panel-cta {
    margin-top: 4px;
    text-align: center;
    color: var(--paper);
    background: var(--plum);
  }

  .nav-panel .nav-panel-cta:hover {
    background: var(--plum-deep);
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    aspect-ratio: 5 / 4;
    max-width: 460px;
    order: -1;
  }

  .price-card {
    grid-template-columns: 1fr;
  }

  .price-right {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .wrap,
  .nav,
  .hero-inner {
    width: calc(100% - 32px);
  }

  .only-sp {
    display: inline;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .sec-no {
    padding-top: 0;
  }

  .hero-stats {
    gap: 20px;
    flex-wrap: wrap;
  }

  .value-item {
    gap: 16px;
  }

  .value-item:hover {
    padding-left: 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-meta {
    text-align: left;
  }
}

/* =========================================================
   誕生と効果（ホーム value 内 Before/After + 効果指標）
   ========================================================= */
/* 減らせること → 導入事例への導線 */
.value-cta {
  margin-top: clamp(34px, 4vw, 52px);
  padding-top: clamp(30px, 3.5vw, 44px);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.value-cta p {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(16px, 1.9vw, 21px);
  color: var(--ink);
  max-width: 24em;
}

/* 短縮時間を人件費に換算した試算カード */
.savings {
  margin-top: clamp(18px, 2.6vw, 26px);
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(20px, 3.4vw, 44px);
  align-items: center;
  background: var(--plum-deep);
  color: var(--paper);
  border-radius: 20px;
  padding: clamp(26px, 3.6vw, 46px);
  box-shadow: var(--shadow);
}

.savings-label {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 14px;
  color: color-mix(in srgb, var(--paper) 80%, transparent);
}

.savings-amount {
  margin: 0 0 12px;
  font-family: var(--latin);
  font-weight: 600;
  font-size: clamp(38px, 5.6vw, 66px);
  line-height: 1;
  color: #e6c07f;
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex-wrap: wrap;
}

.savings-num {
  font-size: 1.18em;
}

.savings-per {
  font-family: var(--gothic);
  font-size: max(11px, 0.26em);
  font-weight: 900;
  color: var(--paper);
}

.savings-formula {
  margin: 0;
  font-size: 13.5px;
  color: color-mix(in srgb, var(--paper) 82%, transparent);
}

.savings-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.savings-breakdown li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 12px;
  font-size: 13px;
  color: color-mix(in srgb, var(--paper) 80%, transparent);
}

.savings-breakdown li:first-child {
  border-top: 0;
  padding-top: 0;
}

.savings-breakdown b {
  font-family: var(--latin);
  font-weight: 600;
  font-size: clamp(19px, 2.3vw, 26px);
  color: var(--paper);
  white-space: nowrap;
}

.savings-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--ink-faint);
}

@media (max-width: 780px) {
  .savings {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.ba-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.4vw, 26px);
  margin-bottom: clamp(20px, 3vw, 30px);
}

.ba-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(22px, 3vw, 34px);
}

.ba-before {
  background: var(--paper-2);
}

.ba-after {
  background: color-mix(in srgb, var(--plum) 8%, var(--card));
  border-color: color-mix(in srgb, var(--plum) 24%, transparent);
}

.ba-tag {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(17px, 2vw, 21px);
  margin: 0 0 16px;
}

.ba-before .ba-tag {
  color: var(--ink-soft);
}

.ba-after .ba-tag {
  color: var(--plum);
}

.ba-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}

.ba-card li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  color: var(--ink);
}

.ba-before li::before {
  content: "−";
  position: absolute;
  left: 4px;
  color: var(--ink-faint);
  font-weight: 900;
}

.ba-after li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  color: var(--plum);
  font-weight: 900;
}

.effect-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.4vw, 24px);
}

.effect {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--plum);
  border-radius: 14px;
  padding: clamp(24px, 2.8vw, 34px) clamp(18px, 2vw, 26px);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.effect:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.effect-2 {
  border-top-color: var(--gold);
}

.effect-3 {
  border-top-color: var(--ink);
}

.effect-num {
  font-family: var(--latin);
  font-weight: 600;
  font-size: clamp(42px, 5.6vw, 62px);
  line-height: 1;
  color: var(--plum);
  margin: 0 0 12px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
}

.effect-2 .effect-num {
  color: var(--gold);
}

.effect-3 .effect-num {
  color: var(--ink);
}

.effect-num span {
  font-size: 0.42em;
  font-family: var(--gothic);
  font-weight: 900;
}

.effect-num i {
  font-style: normal;
  font-size: 0.34em;
  margin-left: 5px;
  transform: translateY(-0.4em);
  color: var(--gold);
}

.effect-label {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(15px, 1.7vw, 18px);
  margin: 0 0 6px;
  color: var(--ink);
}

.effect-note {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin: 0;
}

@media (max-width: 780px) {
  .ba-grid,
  .effect-stats {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   INNER PAGES — 機能 / 料金 / 導入事例 / 他社比較 / お問い合わせ
   ========================================================= */

/* current nav link */
.nav-links a:not(.nav-cta)[aria-current="page"] {
  color: var(--ink);
}
.nav-links a:not(.nav-cta)[aria-current="page"]::after {
  transform: scaleX(1);
}
.nav-cta[aria-current="page"] {
  background: var(--plum-deep);
}

/* ---- page hero (secondary pages) ---- */
.page-hero {
  padding-top: clamp(44px, 6vw, 80px);
  padding-bottom: clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}

.page-hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.page-hero.no-visual .page-hero-inner {
  grid-template-columns: 1fr;
  max-width: 42em;
}

.page-title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(29px, 4.4vw, 54px);
  line-height: 1.28;
  letter-spacing: 0.01em;
  margin: 0 0 20px;
}

.page-title .title-line {
  display: block;
}

.page-title .accent {
  color: var(--plum);
}

.page-lead {
  font-size: clamp(15px, 1.35vw, 17px);
  color: var(--ink-soft);
  margin: 0;
  max-width: 40em;
}

.hero-frame {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: rotate(-1.4deg);
}

.hero-frame img {
  width: 100%;
}

/* ---- generic editorial card ---- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(24px, 3vw, 38px);
  box-shadow: var(--shadow-sm);
}

.panel-icon {
  display: grid;
  place-items: center;
  width: 52px;
  aspect-ratio: 1;
  border-radius: 14px;
  background: var(--plum);
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 800;
  font-size: 23px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.panel h2,
.panel h3 {
  font-family: var(--serif);
  font-weight: 700;
  margin: 0 0 12px;
}

.panel h2 {
  font-size: clamp(20px, 2.2vw, 26px);
}

.panel h3 {
  font-size: clamp(18px, 2vw, 22px);
}

.panel p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

/* grid helpers */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 2.6vw, 32px);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.6vw, 30px);
}

/* accent variety for panel icons */
.grid-3 .panel:nth-child(2) .panel-icon,
.grid-2 .panel:nth-child(2) .panel-icon {
  background: var(--gold);
}
.grid-3 .panel:nth-child(3) .panel-icon {
  background: var(--ink);
}

/* ---- feature list (機能ページ) ---- */
.feature-list {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.feature-list span {
  position: relative;
  padding-left: 30px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.feature-list span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 16px;
  height: 9px;
  border-left: 2px solid var(--plum);
  border-bottom: 2px solid var(--plum);
  transform: rotate(-45deg) translateY(-1px);
}

/* ---- price tiers (料金ページ) ---- */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.6vw, 28px);
  margin-bottom: clamp(28px, 4vw, 48px);
}

.tier {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(26px, 3vw, 36px);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tier:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.tier .tier-people {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--plum);
  border: 1px solid color-mix(in srgb, var(--plum) 34%, transparent);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 18px;
}

.tier .tier-amount {
  display: block;
  font-family: var(--latin);
  font-weight: 600;
  font-size: clamp(34px, 4.4vw, 48px);
  line-height: 1;
  color: var(--ink);
}

.tier .tier-amount em {
  font-family: var(--gothic);
  font-style: normal;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-left: 3px;
}

.tier p {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.tier.tier-hero {
  background: var(--ink);
  border-color: var(--ink);
}

.tier.tier-hero .tier-people {
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 45%, transparent);
}

.tier.tier-hero .tier-amount,
.tier.tier-hero p {
  color: var(--paper);
}

.tier.tier-hero .tier-amount em {
  color: color-mix(in srgb, var(--paper) 72%, transparent);
}

/* big price statement card (料金/price CTA reuse .price-card already) */
.price-statement {
  display: grid;
  gap: 6px;
  place-items: center;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(30px, 4vw, 52px);
  box-shadow: var(--shadow);
}

.price-statement .ps-amount {
  font-family: var(--latin);
  font-weight: 600;
  font-size: clamp(44px, 7vw, 78px);
  line-height: 1;
  color: var(--plum);
}

.price-statement .ps-unit {
  font-size: 0.4em;
}

.price-statement .ps-cap {
  font-weight: 700;
  color: var(--ink);
  font-size: 15px;
}

.price-statement .ps-note {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 4px 0 0;
}

/* ---- comparison / pricing table ---- */
.ctable {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.ctable-row {
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 15px clamp(14px, 2vw, 22px);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.ctable-row:last-child {
  border-bottom: 0;
}

.ctable-row > span:first-child {
  font-weight: 700;
  color: var(--ink);
}

.ctable-head {
  background: var(--ink);
  color: var(--paper);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.ctable-head > span:first-child {
  color: var(--paper);
}

.ctable .ctable-row .ours {
  color: var(--plum);
  font-weight: 900;
}

.ctable-head .ours {
  color: var(--gold);
}

.ctable-note {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 16px 0 0;
}

/* 5-col tables */
.ctable-5 .ctable-row {
  grid-template-columns: 1.1fr 0.9fr 0.9fr 0.9fr 1.7fr;
}

/* ---- case page ---- */
.case-visual {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--card);
}

.case-visual img.case-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-visual-body {
  padding: clamp(22px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.case-logo {
  width: 96px;
  border-radius: 10px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.case-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
}

.quote-panel {
  background: var(--ink);
  color: var(--paper);
  border-radius: 20px;
  padding: clamp(30px, 4vw, 56px);
  box-shadow: var(--shadow);
}

.quote-meta {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 18px;
}

.quote {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(19px, 2.6vw, 29px);
  line-height: 1.85;
  margin: 0 0 28px;
  color: var(--paper);
  text-indent: -0.5em;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 26px;
}

.kpi b {
  display: block;
  font-family: var(--latin);
  font-weight: 600;
  font-size: clamp(22px, 2.8vw, 32px);
  color: var(--gold);
  line-height: 1.1;
}

.kpi {
  font-size: 12.5px;
  color: color-mix(in srgb, var(--paper) 72%, transparent);
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ---- contact form ---- */
.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 3.4vw, 44px);
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.field input,
.field select,
.field textarea {
  font-family: var(--gothic);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--plum);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--plum) 18%, transparent);
}

.form-note {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 18px 0 20px;
}

.contact-form .btn {
  width: 100%;
}

/* ---- inner-page responsive ---- */
@media (max-width: 900px) {
  .page-hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-frame {
    order: -1;
    max-width: 480px;
  }
  .grid-2,
  .grid-3,
  .tier-grid {
    grid-template-columns: 1fr;
  }
  .case-visual {
    grid-template-columns: 1fr;
  }
  .case-visual img.case-photo {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 720px) {
  /* stacked cards for 5-col tables */
  .ctable-5 .ctable-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  /* ヘッダー行を隠しているので、各値に data-label で見出しを付ける */
  .ctable-5 .ctable-row > span[data-label] {
    display: grid;
    grid-template-columns: 5.5em 1fr;
    gap: 12px;
    align-items: baseline;
  }

  .ctable-5 .ctable-row > span[data-label]::before {
    content: attr(data-label);
    color: var(--ink-faint);
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: 0.02em;
  }
  .ctable-5 .ctable-head {
    display: none;
  }
  .ctable-5 .ctable-row > span:first-child {
    grid-column: 1 / -1;
    font-family: var(--serif);
    font-size: 16px;
    padding-bottom: 4px;
  }
  .ctable-5 .ctable-row > span:last-child {
    grid-column: 1 / -1;
    color: var(--ink-faint);
    font-size: 13px;
  }

  /* iOS Safari は 16px 未満の入力欄にフォーカスすると画面を拡大するため、
     モバイルでは 16px を下回らないようにする。 */
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
}

@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .kpi-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
