/* ============================================================================
 * VeloGhost Blog / Guides — shared styles for EN / JA / PT blog index and
 * individual posts. Brand palette mirrors the main LP and release-notes:
 * dark base + maillot-jaune accent + cyan/lavender data tints.
 *
 * Loaded by:
 *   /blog/, /ja/blog/, /pt/blog/                    (index pages)
 *   /blog/<slug>/, /ja/blog/<slug>/, /pt/blog/<slug>/ (post pages)
 *
 * Design notes:
 *   - Cards use a "tape deck" frame (bracket corners) to echo HUD motif
 *   - Post body uses generous line-height for JP (1.85) and EN/PT (1.7)
 *   - Article max-width 720px for readability; figures break out to 920px
 *   - Tabular numerics for any inline stats/numbers
 * ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

:root {
  --bg-0: #0a0c12;
  --bg-1: #0e1119;
  --bg-2: #15191f;
  --bg-3: #1c2230;
  --line: #232936;
  --line-2: #2f3645;
  --line-3: #404a5c;
  --text: #e8eaed;
  --text-dim: #9aa0aa;
  --text-faint: #6c7280;
  --brand: #FFD400;
  --brand-soft: #FFE03A;
  --brand-glow: rgba(255, 212, 0, 0.35);
  --brand-tint: rgba(255, 212, 0, 0.10);
  --cyan: #41d3ff;
  --orange: #ffb13d;
  --green: #aaff66;
  --lavender: #9b88ff;
  --font-display: "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
                  "Yu Gothic UI", "Yu Gothic", system-ui, sans-serif;
  --font-body: var(--font-display);
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono",
               Menlo, Consolas, monospace;
  --container: min(1180px, calc(100vw - 32px));
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  font-feature-settings: "tnum" 1, "ss01" 1, "palt" 1;
  font-variant-numeric: tabular-nums slashed-zero;
  overflow-x: hidden;
  position: relative;
}
@media (min-width: 768px) { body { font-size: 17px; } }
@media (min-width: 1280px) { body { font-size: 18px; } }

body::before {
  content: "";
  position: fixed;
  inset: -10%;
  background-image:
    radial-gradient(ellipse 60vw 50vh at 15% -5%, rgba(255,212,0,0.10), transparent 60%),
    radial-gradient(ellipse 50vw 40vh at 100% 8%, rgba(65,211,255,0.06), transparent 65%);
  pointer-events: none;
  z-index: -2;
}

/* ─────────────────────────────── Header ─────────────────────────────── */
.tel-bar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10,12,18,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tel-row {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.tel-id {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tel-id b { color: var(--text); font-weight: 600; letter-spacing: 0.16em; }
.tel-id .crumb { color: var(--text-faint); }

.lang-dd { position: relative; }
.lang-dd summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.lang-dd summary::-webkit-details-marker { display: none; }
.lang-dd summary .caret { color: var(--text-faint); margin-left: 4px; }
.lang-dd[open] summary { color: var(--text); border-color: var(--line-2); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 160px;
  padding: 6px;
}
.lang-menu a {
  display: block;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-radius: 4px;
}
.lang-menu a:hover { background: var(--bg-2); color: var(--text); }
.lang-menu .hint { color: var(--text-faint); margin-left: 8px; font-size: 11px; }

/* Header CTA cluster: lang dropdown + Try button */
.tel-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tel-cta .btn-try {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--bg-0);
  background: var(--brand);
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.15s var(--ease);
}
.tel-cta .btn-try:hover { background: var(--brand-soft); }
.tel-cta .btn-try .arr { font-size: 1.1em; }
@media (max-width: 480px) {
  .tel-cta .btn-try .btn-text { display: none; }
  .tel-cta .btn-try { padding: 8px 10px; }
}

/* ─────────────────────────────── Hero ─────────────────────────────── */
.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(32px, 6vw, 56px);
}
.hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin-bottom: 20px;
}
.hero h1 .em {
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-soft) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-style: italic;
}
.hero .sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-dim);
  max-width: 640px;
}
.hero .sub b { color: var(--text); font-weight: 600; }

/* ─────────────────────────────── Post grid ─────────────────────────────── */
.feed {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(60px, 10vw, 120px);
}
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 24px;
}
@media (min-width: 768px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
}
@media (min-width: 1080px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.post-card:hover { border-color: var(--line-3); transform: translateY(-2px); }
.post-card .pc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.post-card .pc-meta .lang {
  background: var(--brand-tint);
  color: var(--brand);
  padding: 2px 6px;
  border-radius: 3px;
}
.post-card .pc-meta .dot { color: var(--text-faint); }
.post-card h2 {
  font-size: 20px;
  line-height: 1.35;
  font-weight: 600;
  margin-bottom: 10px;
}
.post-card h2 a { color: var(--text); }
.post-card h2 a:hover { color: var(--brand); }
.post-card .pc-excerpt { color: var(--text-dim); font-size: 14.5px; line-height: 1.65; }
.post-card .pc-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.post-card .tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  border: 1px solid var(--line);
  padding: 3px 7px;
  border-radius: 3px;
  letter-spacing: 0.06em;
}

/* Empty state */
.empty {
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  padding: clamp(40px, 6vw, 64px);
  text-align: center;
  color: var(--text-dim);
}
.empty .em-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--brand);
  margin-bottom: 12px;
}
.empty h3 { font-size: 22px; color: var(--text); margin-bottom: 12px; }
.empty p { max-width: 480px; margin: 0 auto 24px; font-size: 14.5px; }
.empty .btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--bg-0);
  background: var(--brand);
  padding: 10px 18px;
  border-radius: 6px;
  transition: background 0.15s var(--ease);
}
.empty .btn:hover { background: var(--brand-soft); }

/* ─────────────────────────────── Article body ─────────────────────────── */
.article-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.article-head {
  padding: clamp(40px, 7vw, 72px) 0 clamp(24px, 4vw, 40px);
  max-width: 820px;
}
.article-head .crumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.article-head .crumbs a { color: var(--text-dim); }
.article-head .crumbs a:hover { color: var(--brand); }
.article-head .crumbs .sep { margin: 0 8px; color: var(--text-faint); }
.article-head h1 {
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.005em;
  font-weight: 700;
  margin-bottom: 18px;
}
.article-head .lede {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-dim);
  max-width: 720px;
}
.article-head .meta-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.article-head .meta-row b { color: var(--text-dim); font-weight: 500; }

.article-body {
  max-width: 720px;
  padding: clamp(24px, 4vw, 48px) 0 clamp(40px, 7vw, 72px);
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.8;
  color: var(--text);
}
html[lang="ja"] .article-body { line-height: 1.85; }
.article-body > * + * { margin-top: 1.15em; }
.article-body h2 {
  margin-top: 2em;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.25;
  letter-spacing: -0.005em;
  font-weight: 700;
  border-top: 1px solid var(--line);
  padding-top: 1.4em;
}
.article-body h3 {
  margin-top: 1.5em;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  color: var(--text);
}
.article-body p { color: var(--text); }
.article-body a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-color: var(--brand-glow);
  text-underline-offset: 3px;
}
.article-body a:hover { text-decoration-color: var(--brand); }
.article-body strong { color: var(--text); font-weight: 700; }
.article-body em { color: var(--brand-soft); font-style: italic; }
.article-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-2);
  padding: 2px 6px;
  border-radius: 3px;
}
.article-body ul, .article-body ol { padding-left: 1.4em; color: var(--text); }
.article-body li { margin-top: 0.4em; }
.article-body ul li { list-style: disc outside; }
.article-body ol li { list-style: decimal outside; }
.article-body blockquote {
  border-left: 3px solid var(--brand);
  padding: 0.4em 0 0.4em 1em;
  margin: 1.4em 0;
  color: var(--text-dim);
  font-style: italic;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94em;
  margin: 1.4em 0;
}
.article-body th, .article-body td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.article-body th {
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--bg-1);
}
.article-body figure {
  margin: 1.6em -1em;
}
@media (min-width: 880px) {
  .article-body figure { margin: 1.6em calc((720px - 920px) / 2); }
}
.article-body figcaption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-align: center;
}
.article-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2em 0;
}

/* TL;DR callout */
.tldr {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 1.5em 0;
}
.tldr .tldr-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.tldr ul { padding-left: 1.2em; }

/* CTA blocks within posts */
.post-cta {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin: 2em 0;
  text-align: center;
}
.post-cta h3 { font-size: 20px; margin-bottom: 10px; color: var(--text); }
.post-cta p { color: var(--text-dim); margin-bottom: 18px; font-size: 14.5px; }
.post-cta .btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--bg-0);
  background: var(--brand);
  padding: 12px 22px;
  border-radius: 6px;
  transition: background 0.15s var(--ease);
}
.post-cta .btn:hover { background: var(--brand-soft); }

/* FAQ block (same look as main LP) */
.article-body details {
  border-top: 1px solid var(--line);
  padding: 1em 0;
}
.article-body details:last-of-type { border-bottom: 1px solid var(--line); }
.article-body summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.article-body summary::-webkit-details-marker { display: none; }
.article-body summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--brand);
  font-size: 1.2em;
}
.article-body details[open] summary::after { content: "−"; }
.article-body details > *:not(summary) { margin-top: 0.8em; color: var(--text-dim); }

/* Related posts */
.related {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) 0 clamp(60px, 8vw, 96px);
  border-top: 1px solid var(--line);
}
.related h2 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.related .post-grid { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .related .post-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─────────────────────────────── Footer ─────────────────────────────── */
.foot {
  border-top: 1px solid var(--line);
  background: var(--bg-1);
}
.foot-row {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.10em;
  color: var(--text-faint);
}
.foot a { color: var(--text-dim); transition: color 0.15s var(--ease); }
.foot a:hover { color: var(--text); }
.foot a + a::before { content: " · "; margin-inline: 6px; color: var(--text-faint); }

/* ─────────────────────────────── Focus polish ─────────────────────────── */
::selection { background: var(--brand); color: #0a0c12; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
