/*
Theme Name: COSPEC LAB
Theme URI: https://example.com/cospec-lab
Author: COSPEC LAB
Description: PCスペック比較メディア向けの独立型WordPressテーマ。カテゴリー、月別、タグ別、注目記事、お問い合わせに対応。
Version: 1.0.2
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: cospec-lab
*/

:root {
  --bg: #07101c;
  --panel: #0a1422;
  --panel-2: #0d1929;
  --line: #1e3045;
  --cyan: #67e8f9;
  --cyan-soft: #a5f3fc;
  --text: #f8fafc;
  --muted: #94a3b8;
  --dim: #526276;
  --max: 1440px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% -10%, rgba(34, 211, 238, .08), transparent 35rem),
    var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; z-index: 99999; top: 8px; left: 8px; width: auto; height: auto;
  clip: auto; padding: 10px 14px; background: var(--cyan); color: #03111d;
}

.site-hero {
  position: relative; overflow: hidden; border-bottom: 1px solid rgba(103, 232, 249, .2);
  background-color: #050a12;
  background-image:
    linear-gradient(rgba(34, 211, 238, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, .035) 1px, transparent 1px);
  background-size: 38px 38px;
}
.site-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background: linear-gradient(transparent 50%, rgba(0, 0, 0, .18) 50%); background-size: 100% 4px;
}
.hero-inner {
  position: relative; z-index: 1; max-width: var(--max); min-height: 330px; margin: auto;
  padding: 40px 54px; display: grid; grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center; gap: 42px;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 10px; border: 1px solid rgba(103, 232, 249, .25);
  border-radius: 999px; padding: 6px 12px; background: rgba(34, 211, 238, .05);
  color: var(--cyan); font: 700 10px/1.2 ui-monospace, monospace; letter-spacing: .18em;
}
.status-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}
.site-name-jp { margin: 20px 0 0; color: #94a3b8; font-size: 13px; font-weight: 700; letter-spacing: .25em; }
.site-title { margin: 4px 0 0; font-size: clamp(48px, 7vw, 76px); line-height: 1; letter-spacing: -.055em; font-weight: 950; }
.site-title span { color: var(--cyan); }
.tagline { margin: 20px 0 0; max-width: 620px; color: #cbd5e1; font-size: 18px; font-weight: 600; }
.mascot {
  width: 258px; height: 270px; margin: auto; display: grid; place-items: center;
  border: 1px dashed rgba(103, 232, 249, .3); border-radius: 32px; background: rgba(34, 211, 238, .03);
}
.mascot img { width: 100%; height: 100%; object-fit: contain; }
.mascot-placeholder { color: rgba(103, 232, 249, .25); text-align: center; font: 900 42px/1 ui-monospace, monospace; }
.mascot-placeholder small { display: block; margin-top: 15px; color: var(--dim); font-size: 10px; letter-spacing: .2em; }

.main-nav { position: sticky; z-index: 50; top: 0; border-bottom: 1px solid var(--line); background: rgba(7, 16, 28, .96); backdrop-filter: blur(12px); }
.main-nav-inner { max-width: var(--max); margin: auto; padding: 0 54px; display: grid; grid-template-columns: repeat(4, 1fr); }
.main-nav a { padding: 16px 10px; border-inline: 1px solid rgba(30, 48, 69, .65); text-align: center; transition: .18s ease; }
.main-nav a:hover { background: rgba(34, 211, 238, .06); }
.nav-code { color: var(--cyan); font: 900 12px/1.2 ui-monospace, monospace; letter-spacing: .12em; }
.nav-label { margin-left: 8px; color: var(--muted); font-size: 12px; }

.site-grid { max-width: var(--max); margin: auto; padding: 48px 54px; display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 42px; }
.content-main { min-width: 0; }
.panel, .hero-panel {
  border: 1px solid var(--line); border-radius: 18px; background: rgba(10, 20, 34, .78);
}
.hero-panel { position: relative; overflow: hidden; padding: clamp(24px, 5vw, 42px); border-color: rgba(103, 232, 249, .2); }
.hero-panel::after { content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(34, 211, 238, .06); filter: blur(60px); }
.eyebrow { color: var(--cyan); font: 800 11px/1.4 ui-monospace, monospace; letter-spacing: .22em; }
.display-title { position: relative; z-index: 1; margin: 18px 0 0; font-size: clamp(32px, 5vw, 52px); line-height: 1.25; letter-spacing: -.035em; }
.display-title em { color: var(--cyan); font-style: normal; }
.intro-grid { position: relative; z-index: 1; margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.intro-grid p { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: rgba(5, 10, 18, .6); color: #cbd5e1; font-size: 14px; }

.section { margin-top: 62px; }
.section-heading { margin-bottom: 26px; padding-left: 16px; border-left: 2px solid var(--cyan); }
.section-heading .eyebrow { display: block; margin-bottom: 6px; }
.section-heading h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); line-height: 1.3; }
.section-heading p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.category-grid, .post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.post-grid.three { grid-template-columns: repeat(3, 1fr); }
.category-card { position: relative; overflow: hidden; padding: 26px; transition: .2s ease; }
.category-card:hover, .post-card:hover { transform: translateY(-3px); border-color: rgba(103, 232, 249, .5); }
.category-card h3 { margin: 7px 0 0; font-size: 21px; }
.category-card p { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.text-link { display: inline-flex; margin-top: 18px; color: var(--cyan); font-size: 12px; font-weight: 800; }

.featured-list { display: grid; gap: 12px; }
.featured-item {
  display: flex; align-items: center; gap: 18px; padding: 16px; border: 1px solid var(--line);
  border-radius: 12px; background: rgba(5, 10, 18, .6); transition: .18s ease;
}
.featured-item:hover { border-color: rgba(103, 232, 249, .5); background: var(--panel-2); }
.featured-rank { color: rgba(103, 232, 249, .35); font: 900 24px/1 ui-monospace, monospace; }
.featured-empty { color: var(--dim); border-style: dashed; }

.post-card { overflow: hidden; transition: .2s ease; }
.post-thumb { aspect-ratio: 16/9; overflow: hidden; border-bottom: 1px solid var(--line); background: #0c1726; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.post-card:hover .post-thumb img { transform: scale(1.04); }
.no-image {
  width: 100%; height: 100%; display: grid; place-items: center; color: var(--dim);
  font: 700 10px/1.4 ui-monospace, monospace; letter-spacing: .18em;
  background-image:
    linear-gradient(rgba(148, 163, 184, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, .04) 1px, transparent 1px);
  background-size: 16px 16px;
}
.post-card-body { padding: 20px; }
.post-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--dim); font-size: 11px; }
.post-category { color: var(--cyan); font: 800 11px/1.4 ui-monospace, monospace; letter-spacing: .12em; }
.post-card h3 { margin: 11px 0 0; font-size: 18px; line-height: 1.5; }
.post-card h3 a:hover { color: var(--cyan-soft); }
.post-excerpt { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

.sidebar-box { overflow: hidden; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 12px; background: rgba(5, 10, 18, .6); }
.sidebar-title { margin: 0; padding: 13px 15px; border-bottom: 1px solid var(--line); background: var(--panel-2); font: 900 12px/1.4 ui-monospace, monospace; letter-spacing: .16em; }
.sidebar-list { margin: 0; padding: 0; list-style: none; }
.sidebar-list li { border-bottom: 1px solid rgba(30, 48, 69, .7); }
.sidebar-list li:last-child { border-bottom: 0; }
.sidebar-list a { display: block; padding: 11px 14px; color: var(--muted); font-size: 12px; }
.sidebar-list a:hover { color: var(--cyan-soft); background: rgba(34, 211, 238, .04); }
.tag-cloud { padding: 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.tag-cloud a { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 11px !important; }
.tag-cloud a:hover { border-color: rgba(103, 232, 249, .5); color: var(--cyan-soft); }

.archive-header { margin-bottom: 28px; padding: 28px; }
.archive-header h1 { margin: 8px 0 0; font-size: clamp(30px, 4vw, 45px); }
.archive-header p { margin: 14px 0 0; max-width: 800px; color: #cbd5e1; }
.pagination { margin-top: 36px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.pagination a, .pagination span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); font-size: 12px; }
.pagination .current, .pagination a:hover { border-color: var(--cyan); color: var(--cyan); }

.article-header { max-width: 900px; margin: auto; }
.article-header h1 { margin: 18px 0 0; font-size: clamp(33px, 5vw, 54px); line-height: 1.3; letter-spacing: -.03em; }
.article-summary { margin: 18px 0 0; color: var(--muted); font-size: 16px; }
.article-meta { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 14px; color: var(--dim); font-size: 12px; }
.article-meta a { padding: 2px 7px; border: 1px solid var(--line); border-radius: 5px; }
.article-hero { margin: 28px auto 0; max-width: 1000px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; }
.article-content { max-width: 850px; margin: 44px auto 0; color: #cbd5e1; }
.article-content h2 { margin: 44px 0 16px; padding-left: 15px; border-left: 3px solid var(--cyan); color: var(--text); font-size: 27px; }
.article-content h3 { margin-top: 34px; color: var(--text); font-size: 21px; }
.article-content p, .article-content li { line-height: 2; }
.article-content table { width: 100%; border-collapse: collapse; }
.article-content th, .article-content td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; }
.article-content th { background: var(--panel-2); color: var(--cyan-soft); }
.article-content figure { max-width: 100%; }

.contact-form { max-width: 700px; margin-top: 28px; padding: 28px; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 800; }
.field input, .field textarea {
  width: 100%; border: 1px solid #334155; border-radius: 9px; outline: 0;
  background: var(--bg); padding: 12px 14px; color: var(--text);
}
.field input:focus, .field textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(103, 232, 249, .1); }
.field textarea { min-height: 170px; resize: vertical; }
.button {
  display: inline-flex; justify-content: center; border: 0; border-radius: 9px; cursor: pointer;
  background: var(--cyan); padding: 13px 22px; color: #04111c; font-weight: 900;
}
.button:hover { background: var(--cyan-soft); }
.notice { margin: 0 0 20px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.notice-success { border-color: rgba(52, 211, 153, .4); color: #a7f3d0; }
.notice-error { border-color: rgba(251, 113, 133, .4); color: #fecdd3; }

.site-footer { margin-top: 50px; border-top: 1px solid rgba(103, 232, 249, .2); background: #04080f; }
.footer-inner { max-width: var(--max); margin: auto; padding: 44px 54px; display: flex; justify-content: space-between; gap: 32px; }
.footer-name { margin: 0; font-size: 23px; font-weight: 950; }
.footer-tagline { margin: 5px 0 0; color: var(--dim); font-size: 13px; }
.footer-nav { display: grid; grid-template-columns: repeat(3, auto); gap: 9px 28px; color: var(--muted); font-size: 12px; }
.footer-nav a:hover { color: var(--cyan-soft); }
.copyright { padding: 17px; border-top: 1px solid #101b2a; color: #475569; text-align: center; font: 10px/1.4 ui-monospace, monospace; letter-spacing: .14em; }
.empty-state { padding: 48px 24px; border: 1px dashed var(--line); border-radius: 14px; color: var(--dim); text-align: center; }

@media (max-width: 1050px) {
  .site-grid { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .sidebar-box { margin: 0; }
  .post-grid.three { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .hero-inner { min-height: auto; padding: 38px 22px; grid-template-columns: 1fr; }
  .mascot { display: none; }
  .main-nav-inner { padding: 0; grid-template-columns: repeat(2, 1fr); }
  .nav-label { display: none; }
  .site-grid { padding: 34px 20px; }
  .intro-grid, .category-grid, .post-grid, .post-grid.three { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .footer-inner { padding: 36px 22px; flex-direction: column; }
  .footer-nav { grid-template-columns: repeat(2, 1fr); }
}
