/* =========================================================
   Repofy - style.css
   GA4レポート自動作成SaaS ランディングページ
   CSS変数によるカラー管理 + ライト/ダーク自動対応
   ========================================================= */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f5f8fc;
  --color-surface: #ffffff;
  --color-text: #101828;
  --color-text-muted: #4b5768;
  --color-border: #e2e8f0;

  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #eff6ff;
  --color-accent: #16a34a;

  --color-header-bg: rgba(255, 255, 255, 0.9);
  --color-cta-band-bg: #111c34;
  --color-cta-band-text: #ffffff;

  --excel-header-bg: #1e7145;
  --excel-header-text: #ffffff;
  --sheet-header-bg: #0f9d58;
  --sheet-header-text: #ffffff;

  --shadow-card: 0 4px 16px rgba(16, 24, 40, 0.06);
  --shadow-card-hover: 0 10px 30px rgba(16, 24, 40, 0.1);
  --radius-md: 12px;
  --radius-lg: 20px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", Meiryo, system-ui, sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0b1220;
    --color-bg-alt: #0f1829;
    --color-surface: #141f33;
    --color-text: #e8edf5;
    --color-text-muted: #a2acbd;
    --color-border: #26334a;

    --color-primary: #3b82f6;
    --color-primary-dark: #60a5fa;
    --color-primary-light: #16223c;
    --color-accent: #22c55e;

    --color-header-bg: rgba(11, 18, 32, 0.85);
    --color-cta-band-bg: #060b16;
    --color-cta-band-text: #ffffff;

    --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 10px 30px rgba(0, 0, 0, 0.4);

    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

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

.container-narrow {
  max-width: 760px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
}
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary-light);
}
.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-header-bg);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--color-text);
}
.logo-mark {
  font-size: 1.4rem;
}
.main-nav {
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
}
.main-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}
.main-nav a:hover {
  color: var(--color-primary);
}
.header-cta {
  flex-shrink: 0;
  padding: 10px 20px;
  font-size: 0.88rem;
}

@media (max-width: 760px) {
  .main-nav {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 88px;
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  color: var(--color-primary);
  background: var(--color-primary-light);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 0 18px;
}
.hero-copy h1 {
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  line-height: 1.35;
  margin: 0 0 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin: 0 0 32px;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.hero-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- Hero visual mockup (Excel-style) ---------- */
.hero-visual {
  display: flex;
  justify-content: center;
}
.mockup-window {
  width: 100%;
  max-width: 460px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card-hover);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.mockup-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.dot-red { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #28c840; }
.mockup-filename {
  margin-left: 8px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}
.mockup-body {
  padding: 18px;
}

.excel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  margin-bottom: 18px;
}
.excel-table th,
.excel-table td {
  border: 1px solid var(--color-border);
  padding: 6px 8px;
  text-align: center;
}
.excel-table thead th {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  font-weight: 600;
}
.excel-table tbody th {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  font-weight: 600;
  width: 24px;
}
.excel-table td.excel-header {
  background: var(--excel-header-bg);
  color: var(--excel-header-text);
  font-weight: 700;
}

.mockup-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 100px;
  padding: 8px 4px 0;
  border-top: 1px dashed var(--color-border);
}
.mockup-chart .bar {
  flex: 1;
  height: var(--h);
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  border-radius: 4px 4px 0 0;
}

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    order: 2;
  }
  .hero-actions {
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

/* ---------- Sections ---------- */
.section {
  padding: 88px 0;
}
.section-alt {
  background: var(--color-bg-alt);
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  text-align: center;
  margin: 0 0 12px;
}
.section-lead {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 0 auto 48px;
}

/* ---------- Grids & Cards ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 960px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .grid-4,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.card-icon {
  font-size: 1.8rem;
  margin-bottom: 14px;
}
.card h3 {
  font-size: 1.02rem;
  margin: 0 0 10px;
  line-height: 1.5;
}
.card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

/* ---------- Solution steps ---------- */
.steps {
  display: flex;
  align-items: stretch;
  gap: 16px;
  justify-content: center;
}
.step-card {
  flex: 1;
  max-width: 300px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.step-number {
  width: 40px;
  height: 40px;
  line-height: 40px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
}
.step-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}
.step-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--color-primary);
  font-weight: 700;
}

@media (max-width: 860px) {
  .steps {
    flex-direction: column;
    align-items: center;
  }
  .step-card {
    max-width: 420px;
    width: 100%;
  }
  .step-arrow {
    transform: rotate(90deg);
  }
}

/* ---------- Sample tabs ---------- */
.tabs {
  max-width: 860px;
  margin: 0 auto;
}
.tab-list {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.tab-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.tab-btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.tab-panel {
  display: none;
}
.tab-panel.is-active {
  display: block;
}

.sample-table-wrap {
  overflow-x: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.sample-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 520px;
}
.sample-table th,
.sample-table td {
  padding: 12px 16px;
  text-align: right;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.sample-table th:first-child,
.sample-table td:first-child {
  text-align: left;
}
.sample-table thead th {
  background: var(--sheet-header-bg);
  color: var(--sheet-header-text);
  font-weight: 700;
}
.sample-table tbody tr:last-child td {
  border-bottom: none;
}
.sample-table tbody tr:nth-child(even) {
  background: var(--color-bg-alt);
}

.sample-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

/* ---------- Sample charts (inline SVG, no external deps) ---------- */
.sample-chart {
  margin-bottom: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 20px 10px;
  box-shadow: var(--shadow-card);
}
.sample-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-axis {
  stroke: var(--color-border);
  stroke-width: 1;
}
.chart-bar {
  fill: var(--color-primary-light);
  stroke: var(--color-primary);
  stroke-width: 1;
}
.chart-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart-line-sessions {
  stroke: var(--color-primary);
}
.chart-line-users {
  stroke: var(--color-accent);
}
.chart-dot {
  stroke: var(--color-surface);
  stroke-width: 1.5;
}
.chart-dot-sessions {
  fill: var(--color-primary);
}
.chart-dot-users {
  fill: var(--color-accent);
}
.chart-label {
  fill: var(--color-text-muted);
  font-size: 11px;
  font-family: var(--font-sans);
}
.chart-value {
  fill: var(--color-text);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-sans);
}
.chart-value-lg {
  font-size: 20px;
}

.chart-legend {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-bottom: 6px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}
.legend-swatch-line-primary {
  background: var(--color-primary);
}
.legend-swatch-line-accent {
  background: var(--color-accent);
}
.legend-swatch-bar {
  background: var(--color-primary-light);
  border: 1px solid var(--color-primary);
  box-sizing: border-box;
}

/* ---------- Sample chart: pie ---------- */
.sample-chart-pie svg {
  max-width: 220px;
  margin: 0 auto;
}
.pie-seg.pie-c1 { stroke: var(--color-primary); }
.pie-seg.pie-c2 { stroke: var(--color-accent); }
.pie-seg.pie-c3 { stroke: #f59e0b; }
.pie-seg.pie-c4 { stroke: #a855f7; }
.pie-seg.pie-c5 { stroke: #ec4899; }
.pie-seg.pie-c6 { stroke: #0ea5e9; }
.legend-swatch.pie-c1 { background: var(--color-primary); }
.legend-swatch.pie-c2 { background: var(--color-accent); }
.legend-swatch.pie-c3 { background: #f59e0b; }
.legend-swatch.pie-c4 { background: #a855f7; }
.legend-swatch.pie-c5 { background: #ec4899; }
.legend-swatch.pie-c6 { background: #0ea5e9; }

.pie-legend {
  list-style: none;
  margin: 14px 0 4px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.pie-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- Sample chart: horizontal bar ---------- */
.chart-hbar {
  fill: var(--color-primary);
}
.chart-hbar-label {
  fill: var(--color-text-muted);
  font-size: 11px;
  font-family: var(--font-sans);
}
.chart-hbar-value {
  fill: var(--color-text);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-sans);
}

/* ---------- Pricing ---------- */
.pricing-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  text-align: center;
  box-shadow: var(--shadow-card-hover);
  position: relative;
}
.pricing-badge {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.pricing-name {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  font-weight: 700;
}
.pricing-price {
  margin: 0 0 24px;
}
.price-amount {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-primary);
}
.price-unit {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-left: 6px;
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  text-align: left;
  display: inline-block;
}
.pricing-features li {
  padding: 8px 0 8px 28px;
  position: relative;
  color: var(--color-text);
  font-size: 0.95rem;
}
.pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 800;
}
.pricing-cta {
  width: 100%;
  margin-bottom: 12px;
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.98rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-left: 12px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item p {
  margin: 14px 0 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--color-cta-band-bg);
  color: var(--color-cta-band-text);
  padding: 72px 0;
  text-align: center;
}
.cta-band h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 0 0 28px;
  font-weight: 800;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 40px 0 24px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-brand .logo-text {
  font-weight: 800;
}
.footer-org {
  width: 100%;
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.footer-links {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.footer-links a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}
.footer-links a:hover {
  color: var(--color-primary);
}
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.footer-bottom p {
  margin: 0;
}
.footer-demo-note {
  font-weight: 600;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-text);
  color: var(--color-bg);
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-card-hover);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1000;
  max-width: 90vw;
  text-align: center;
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
