/* PlugBits — 類似図面検索 for kintone LP (v6「フレンドリーSaaS(ポップ)」)
   自己完結スタイル。サイト共通の /style.css には依存しない。

   コントラスト調整メモ:
   - --blue(#2F6FE3) 上の白文字はアルファを落とすと4.5:1を割るため(白85%で3.82:1)、
     CTAパネル背景だけ少し濃い --blue-panel(#2A5FC9) を使う。白85%で4.73:1、
     白100%(見出し)で5.87:1。
   - --blue-soft 上のバッジ文字は --blue(4.11:1)ではなく --ink(13.5:1)を使う。 */

:root {
  --bg: #FDFCF9;
  --ink: #26251F;
  --sub: #6B675C;
  --blue: #2F6FE3;
  --blue-panel: #2A5FC9;
  --blue-soft: #EAF1FD;
  --marker: #FFE24D;
  --card: #FFFFFF;
  --line: #E8E5DC;
  --radius: 16px;
  --radius-pill: 999px;
  --shadow: 0 6px 24px rgba(47, 111, 227, 0.10);
  --error: #B3261E;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* All <img> here carry HTML width/height attributes for CLS; that maps to a
   non-auto CSS height by default, which would fight any width-driven or
   aspect-ratio-driven sizing below. Force height:auto globally so each
   image's own width (or aspect-ratio) rule is what actually governs it. */
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

.dw-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* white text on the blue CTA panel needs a white outline to stay visible */
.dw-cta-panel :focus-visible {
  outline-color: #FFFFFF;
}

button {
  font-family: inherit;
  cursor: pointer;
}

h1, h2 {
  font-family: 'Zen Maru Gothic', 'Zen Kaku Gothic New', sans-serif;
}

.dw-mono,
.dw-meta-line,
.app-score,
.dw-stat-value,
.flow-card-label,
.mock-card-label,
.mock-thumb span,
.flow-node,
.record-field-label,
.record-link-caption {
  font-family: 'IBM Plex Mono', 'Liberation Mono', monospace;
  font-weight: 500;
}

.dw-meta-line {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--sub);
}

/* ---------- marker highlight (used at most once per section) ---------- */

.dw-marker {
  background-image: linear-gradient(transparent 62%, var(--marker) 62%);
  background-repeat: no-repeat;
  padding: 0 1px;
  white-space: nowrap;
}

/* ---------- scroll reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  transition-delay: calc(var(--i, 0) * 80ms);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ---------- header ---------- */

.dw-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 252, 249, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--line), 0 4px 16px rgba(38, 37, 31, 0.04);
}

.dw-header-inner {
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dw-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dw-brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.dw-brand-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

.dw-nav {
  display: none;
  gap: 20px;
  font-size: 14px;
  color: var(--sub);
}

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

.dw-header-cta {
  display: inline-block;
  background: var(--blue);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dw-header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(47, 111, 227, 0.32);
}

@media (min-width: 720px) {
  .dw-nav { display: flex; margin-left: auto; margin-right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .dw-header-cta { transition: none; }
}

/* ---------- hero ---------- */

.dw-hero {
  padding: 48px 0 64px;
}

.dw-hero-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.dw-bubble {
  margin: 0;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  box-shadow: var(--shadow);
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink);
  max-width: 260px;
}

.dw-bubble-1 { transform: rotate(-1.5deg); }
.dw-bubble-2 { transform: rotate(1deg); margin-top: 6px; }

/* ---------- pill row (generic; hero badges + BASIS closing pills) ---------- */

.dw-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dw-hero-badges { margin: 0 0 16px; }

.dw-pill {
  display: inline-block;
  background: var(--blue-soft);
  color: var(--ink);
  font-family: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
}

.dw-hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink);
  max-width: 16em;
}

.dw-hero-lead {
  margin: 0 0 24px;
  font-size: 16px;
  color: var(--sub);
  max-width: 40em;
}

.dw-cta-button {
  display: inline-block;
  background: var(--blue);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  border: none;
  line-height: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dw-cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(47, 111, 227, 0.32);
}

@media (prefers-reduced-motion: reduce) {
  .dw-cta-button, .dw-header-cta, .dw-form-submit { transition: none; }
}

.dw-hero-note {
  margin: 20px 0 0;
  font-size: 12.5px;
  color: var(--sub);
}

/* ---------- pseudo-app window ---------- */

.dw-app-window {
  margin-top: 40px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Kintone-flavored chrome strip: a CSS-only abstraction (no logo/wordmark),
   just the yellow band + dark nav band silhouette, to read as "this lives
   inside kintone" at a glance. Confined to the hero demo window only — it
   does not touch the page's own palette. */

.dw-app-chrome-yellow {
  height: 11px;
  background: #FDD000;
}

.dw-app-chrome-nav {
  height: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  background: #3E3E3E;
}

.dw-app-chrome-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.32);
}

.dw-app-content {
  padding: 16px;
}

.dw-app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  background: #F0F0F0;
  border-radius: 12px;
  padding: 10px 14px;
}

.dw-app-bar-label {
  /* Sample app name, not a monospace meta label — a regular typeface reads
     more like a real kintone app/record title. */
  font-family: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.dw-app-indicators {
  display: flex;
  gap: 2px;
}

/* 見た目は9pxのドットのまま、タッチターゲットは24pxを確保する */
.app-indicator {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-indicator::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--blue);
  background: transparent;
}

.app-indicator[aria-current="true"]::before {
  background: var(--blue);
}

.dw-app-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dw-app-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- record field mock (kintone record detail flavor) ---------- */

.record-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: #F9F8F4;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.record-field {
  display: flex;
  gap: 10px;
  margin: 0;
  font-size: 12.5px;
}

.record-field-label {
  flex: 0 0 auto;
  min-width: 3.4em;
  color: var(--sub);
}

.record-field-value {
  color: var(--ink);
  font-family: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  background: var(--blue);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-pill);
}

.dw-app-query {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #FFFFFF;
  overflow: hidden;
  line-height: 0;
}

.dw-app-query img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.dw-app-query.is-entering img {
  opacity: 0;
  transform: translateY(10px);
}

.dw-app-results {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.app-result {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FFFFFF;
  overflow: hidden;
  text-align: center;
}

/* フェードは画像のみに適用する。カード全体を透過させるとフェード中の
   スコア文字がコントラスト不足になるため、文字は常時不透明を保つ */
.app-result img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
  transition-delay: calc(var(--i, 0) * 90ms);
}

.app-result.is-entering img {
  opacity: 0;
  transform: translateY(10px);
}

.app-score {
  display: block;
  padding: 5px 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--blue);
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

@media (min-width: 720px) {
  .dw-app-body {
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
  }
  .dw-app-left { flex: 1.1; }
  .dw-app-results { flex: 1; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .dw-app-query img,
  .app-result img {
    transition: none !important;
  }
  .dw-app-query.is-entering img,
  .app-result.is-entering img {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- generic sections ---------- */

.dw-section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.dw-section-alt { background: #F6F4EE; }

.dw-section h2 {
  margin: 0 0 24px;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.5;
  font-weight: 700;
  color: var(--ink);
  max-width: 20em;
}

.dw-lines {
  max-width: 36em;
  margin-top: 24px;
}

.dw-lines-wide { max-width: 40em; }

.dw-lines p {
  margin: 0 0 0.9em;
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--sub);
}

.dw-lines p:last-child { margin-bottom: 0; }

.dw-closing-line {
  margin: 20px 0 0;
  font-size: 15.5px;
  color: var(--ink);
}

/* ---------- tape-mounted photo (課題対比・図面スタック用) ---------- */

.tape-photo {
  position: relative;
  display: block;
  transform: rotate(var(--r, 0deg));
}

.tape-photo::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  width: 46px;
  height: 18px;
  background: rgba(255, 226, 77, 0.55);
  border: 1px solid rgba(191, 168, 46, 0.25);
  transform: translateX(-50%) rotate(-4deg);
  box-shadow: 0 1px 2px rgba(38, 37, 31, 0.08);
}

.tape-photo img {
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(38, 37, 31, 0.16);
}

/* ---------- section 2: compare mock ---------- */

.dw-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 24px;
}

.mock-card {
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.mock-card-accent { border: 1.5px solid var(--blue); }

.mock-card-label {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--sub);
}

.mock-input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 10px;
}

.mock-empty {
  margin: 0;
  font-size: 13px;
  color: var(--sub);
}

.mock-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.mock-thumb {
  border-radius: 8px;
  overflow: visible;
  text-align: center;
}

.mock-thumb .tape-photo { border-radius: 8px; overflow: hidden; }

.mock-thumb img { aspect-ratio: 4 / 3; object-fit: cover; }

.mock-thumb span {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--blue);
}

@media (min-width: 640px) {
  .dw-compare { grid-template-columns: 1fr 1fr; }
}

/* ---------- section 3: flow cards ---------- */

.dw-flow-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.flow-card {
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  flex: 1;
}

.flow-card-label {
  display: inline-block;
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--blue-soft);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.flow-card-art {
  min-height: 76px;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}

.flow-card-art .mock-thumbs { width: 100%; gap: 8px; }
.flow-card-art .mock-thumb span { color: var(--blue); font-size: 10px; }

.art-btn {
  display: inline-block;
  background: var(--blue);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
}

.art-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ink);
}

.art-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 7px 12px;
  text-align: center;
}

/* RECORD card: thumbnail + "same record" frame, connected down to the chips */

.flow-card-art-record {
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.record-link-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.record-link-frame {
  display: block;
  width: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: var(--shadow);
}

.record-link-frame img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.record-link-caption {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--sub);
}

.record-link-line {
  width: 1px;
  height: 22px;
  background: var(--line);
}

.flow-card-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--sub);
}

@media (min-width: 860px) {
  .dw-flow-cards { flex-direction: row; }
}

/* ---------- section 4: real screenshot + flow ---------- */

.dw-real-shot {
  margin: 24px 0 8px;
}

.dw-real-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.dw-real-shot figcaption {
  margin: 10px 2px 0;
  font-size: 12.5px;
  color: var(--sub);
}

.dw-stack-flow {
  margin: 28px 0 24px;
}

.flow-nodes {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.flow-node {
  font-size: 13px;
  color: var(--ink);
  background: var(--blue-soft);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
}

.flow-node-arrow {
  color: var(--sub);
  font-size: 16px;
}

/* ---------- section 5: stats ---------- */

.dw-stats-section { text-align: center; }

.dw-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 32px 0 28px;
}

.dw-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 16px;
  /* Font-size below is sized off this card's own width (via cqi), not the
     viewport — the 3-column breakpoint makes viewport-relative (vw) sizing
     wrap onto two lines once each column narrows. */
  container-type: inline-size;
}

.dw-stat-value {
  margin: 0 0 8px;
  font-size: clamp(36px, 19cqi, 80px);
  font-weight: 500;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
}

.dw-stat-label {
  margin: 0;
  font-size: 13px;
  color: var(--sub);
}

.dw-stats-note {
  max-width: 42em;
  margin: 0 auto;
  font-size: 14px;
  line-height: 1.9;
  color: var(--sub);
  text-align: left;
}

@media (min-width: 720px) {
  .dw-stats { grid-template-columns: repeat(3, 1fr); }
  .dw-stats-note { text-align: center; }
}

/* ---------- CTA panel (blue) ---------- */

.dw-cta-wrap {
  padding: 8px 0 64px;
}

.dw-cta-panel {
  background: var(--blue-panel);
  color: #FFFFFF;
  border-radius: 24px;
  box-shadow: 0 20px 48px rgba(42, 95, 201, 0.28);
}

.dw-cta-panel-inner {
  padding: 48px 28px;
}

.dw-meta-line-onpaper { color: rgba(255, 255, 255, 0.85); }

.dw-cta-heading {
  margin: 0 0 18px;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  color: #FFFFFF;
}

.dw-cta-lead {
  margin: 0 0 28px;
  font-size: 15.5px;
  color: rgba(255, 255, 255, 0.85);
}

.dw-form {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dw-form[hidden] { display: none; }

.dw-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dw-form-row label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.dw-form-row input {
  font-family: inherit;
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--ink);
}

.dw-form-row input:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 1px;
}

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

.dw-form-submit {
  margin-top: 4px;
  width: 100%;
  text-align: center;
  background: #FFFFFF;
  color: var(--blue-panel);
}

.dw-form-submit:hover {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.dw-form-note {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
}

.dw-form-message {
  margin: 0;
  min-height: 1.4em;
  font-size: 13.5px;
  color: var(--error);
}

.dw-form-message:not(:empty) {
  display: inline-block;
  background: #FFFFFF;
  padding: 7px 12px;
  border-radius: 10px;
}

.dw-form-success {
  max-width: 440px;
  border-radius: var(--radius);
  padding: 24px;
  background: #FFFFFF;
}

.dw-form-success-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.dw-form-success p:last-child {
  margin: 0;
  font-size: 14px;
  color: var(--sub);
}

/* ---------- footer ---------- */

.dw-footer {
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
}

.dw-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dw-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13.5px;
  color: var(--sub);
}

.dw-footer-links a:hover { color: var(--ink); }

.dw-footer-inner small {
  font-size: 12.5px;
  color: var(--sub);
}

@media (min-width: 640px) {
  .dw-footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
