/* QUAKE-LINK 紹介用サイト スタイルシート（研究室GIS・ダークコンソール風） */

.quake-content {
  --bg: #0b1017;
  --bg-alt: #0f1620;
  --surface: #141d29;
  --surface-2: #192433;
  --border: #253447;
  --text: #e2eaf3;
  --text-muted: #8fa3b8;
  --blue: #3b82f6;
  --cyan: #38bdf8;
  --red: #ef4444;
  --amber: #f59e0b;
  --green: #10b981;
  --site-light-blue: #226fa566;
  --site-light-violet: #2e4d7a59;
  --mono: "JetBrains Mono", "Consolas", monospace;
  --sans: "Inter", "Noto Sans JP", system-ui, -apple-system, sans-serif;
}

.quake-content {
  background-color: var(--bg);
  background-image: var(--site-background-lights);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  position: relative;
}

.quake-view > .site-header { z-index: 2; }
.quake-view > .skip { z-index: 3; }
.quake-content .quake-section-nav { padding-top: 20px; }

@media (prefers-reduced-motion: reduce) {
  html:has(.quake-view) { scroll-behavior: auto; }
}

/* 経緯線グリッド背景 */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(56, 189, 248, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ヒーロー */
.quake-hero {
  padding: 58px 0 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 36px;
  align-items: center;
}

.hero-art {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.09);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.dot.red {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

.quake-hero h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.75rem);
  line-height: 1.25;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.mono-accent {
  font-family: var(--mono);
  color: #f8fafc;
  letter-spacing: 0.04em;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
}

.btn-primary {
  background: var(--blue);
  color: #ffffff;
  border: 1px solid #60a5fa;
}
.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--cyan);
  color: #ffffff;
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.metric-val {
  display: block;
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cyan);
}
.metric-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* セクション共通 */
.quake-section {
  padding: 68px 0;
}

.section-alt {
  background: rgba(15, 22, 32, 0.78);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.quake-section-head {
  margin-bottom: 34px;
}

.section-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--cyan);
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.quake-section-head h2 {
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

/* 機能カード */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.card-accent.cyan { background: var(--cyan); }
.card-accent.red { background: var(--red); }
.card-accent.amber { background: var(--amber); }
.card-accent.green { background: var(--green); }

.card-index {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
  color: #cbd5e1;
}
.card-list li::before {
  content: "▸ ";
  color: var(--cyan);
  font-family: var(--mono);
}

/* 技術仕様 */
.spec-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}

.spec-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
}

.spec-panel h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  color: #f1f5f9;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.spec-table th,
.spec-table td {
  border: 1px solid var(--border);
  padding: 9px 12px;
  text-align: left;
}

.spec-table th {
  background: #101824;
  color: #94a3b8;
  width: 34%;
  font-weight: 600;
}

.formula-box {
  background: #0c121b;
  border: 1px solid #223246;
  border-left: 3px solid var(--blue);
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 4px;
}
.formula-box:last-child {
  margin-bottom: 0;
}

.formula-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #93c5fd;
  margin-bottom: 6px;
}

.formula-box code {
  display: block;
  font-family: var(--mono);
  font-size: 1rem;
  color: #f8fafc;
  background: #131c28;
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.formula-box p {
  font-size: 0.83rem;
  color: var(--text-muted);
}

/* タイムライン */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tl-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: baseline;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 14px 18px;
  border-radius: 6px;
}

.tl-item.latest {
  border-color: var(--blue);
  background: rgba(29, 58, 92, 0.28);
}

.tl-item.archived {
  opacity: 0.78;
}

.tl-ver {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--cyan);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tl-status {
  display: inline-block;
  width: fit-content;
  font-size: 0.66rem;
  padding: 1px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.tl-status.active {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.45);
}
.tl-status.closed {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.tl-body {
  font-size: 0.9rem;
  color: #cbd5e1;
}

/* ダウンロードボックス */
.download-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, #131f2e 0%, #16273c 100%);
  border: 1px solid #35547a;
  border-radius: 10px;
  padding: 32px;
}

.dl-left {
  max-width: 650px;
}

.dl-left h2 {
  margin-bottom: 10px;
}

.dl-left p {
  color: #cbd5e1;
  font-size: 0.93rem;
  margin-bottom: 14px;
}

.dl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--mono);
}


.quake-download-count {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 12px 0 4px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.quake-download-count dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dl-left .quake-count-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* フッター */
.footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: #090d13;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-links a {
  color: var(--cyan);
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
}

/* レスポンシブ */
@media (max-width: 960px) {
  .hero-grid,
  .feature-grid,
  .spec-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container { padding-inline: 16px; }
  .quake-content .quake-section-nav { padding-top: 16px; }
  .quake-hero { padding-block: 26px 36px; }
  .hero-grid { gap: 18px; }
  .quake-hero h1 { font-size: clamp(1.5rem, 5.6vw, 2rem); }
  .hero-desc { margin-bottom: 18px; }
  .hero-actions { margin-bottom: 18px; }
  .hero-actions .btn, .download-box .btn {
    width: 100%;
    min-height: 44px;
    padding-inline: 12px;
    text-align: center;
  }
  .tl-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 12px;
  }
  .tl-ver { flex-flow: row wrap; align-items: center; gap: 4px 8px; }
  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding-top: 12px;
  }
  .metric-val { font-size: .925rem; }
  .metric-lbl { display: block; line-height: 1.4; }
  .quake-section { padding-block: 34px; }
  .quake-section-head { margin-bottom: 18px; }
  .feature-card, .spec-panel, .download-box { padding: 14px; }
  .spec-table, .formula-box code { overflow-wrap: anywhere; }
  .spec-table { table-layout: fixed; }
  .spec-table th, .spec-table td { padding: 7px; vertical-align: top; }
  .download-box { gap: 14px; }
  .footer-inner { flex-direction: column; }
  .footer-links { line-height: 1.5; }
  .footer-links a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .quake-hero {
    position: relative;
    overflow: clip;
  }
  .quake-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 68% 54%,
      transparent 27%, #38bdf833 28%, transparent 29% 41%,
      #38bdf826 42%, transparent 43% 55%, #38bdf81f 56%, transparent 57%);
    pointer-events: none;
    animation: quake-wave 1.55s var(--ease-out) both;
  }
  .hero-copy > *, .hero-art {
    animation: site-arrive 600ms var(--ease-out) both;
  }
  .hero-copy h1 { animation-delay: 60ms; }
  .hero-copy .hero-desc { animation-delay: 115ms; }
  .hero-copy .hero-actions { animation-delay: 165ms; }
  .hero-copy .hero-metrics, .hero-art { animation-delay: 215ms; }
  .hero-actions:focus-within { animation: none; }

  .card-accent {
    transform-origin: left;
  }
  .card.motion-entered .card-accent { animation: progress-fill 650ms var(--ease-out); }
  .quake-section:target .quake-section-head h2,
  .quake-section:target .download-box h2 { animation: daybook-heading-highlight 1.2s ease-out; }

  .quake-content .btn {
    transition: translate 180ms var(--ease-out), background-color 180ms, box-shadow 220ms;
  }
  .quake-content .btn:active { translate: 0 1px; transition-duration: 80ms; }
  @media (hover: hover) {
    .quake-content .btn:hover {
      translate: 0 -2px;
      box-shadow: 0 6px 18px #38bdf83b;
    }
    .quake-content .btn:active { translate: 0 1px; }
  }
}

@keyframes quake-wave {
  from { opacity: 0; transform: scale(.75); }
  40% { opacity: .9; }
  to { opacity: .45; transform: scale(1.05); }
}
