/* =====================================================================
   自由IT同盟 — Home page
   ===================================================================== */

/* --- Placeholder utility --- */
.ph {
  background-color: var(--surface-3);
  background-image:
    repeating-linear-gradient(135deg, oklch(0.88 0.01 255) 0 1px, transparent 1px 9px);
  display: grid; place-items: center; color: var(--ink-3);
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
  position: relative;
}
.ph span { background: var(--surface); padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); }

/* --- Hero --- */
.hero { padding: 52px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono);
  font-size: 12px; font-weight: 500; letter-spacing: .1em; color: var(--brand-ink);
  background: var(--brand-soft); border: 1px solid var(--brand-line);
  padding: 5px 12px; border-radius: 100px; margin-bottom: 20px;
}
.hero h1 { font-size: 42px; font-weight: 900; line-height: 1.32; letter-spacing: .01em; }
.hero h1 .hl { color: var(--brand-ink); }
.hero p.lead { font-size: 16px; color: var(--ink-2); margin: 18px 0 26px; max-width: 30em; }
.hero-search {
  display: flex; align-items: center; gap: 10px; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 13px; padding: 6px 6px 6px 16px;
  box-shadow: var(--shadow-sm); max-width: 440px; transition: border-color .15s, box-shadow .15s;
}
.hero-search:focus-within { border-color: var(--brand-line); box-shadow: 0 0 0 4px var(--brand-soft); }
.hero-search svg { width: 19px; height: 19px; color: var(--ink-3); flex-shrink: 0; }
.hero-search input { flex: 1; border: 0; outline: none; background: none; font-family: inherit; font-size: 15px; color: var(--ink); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }
.hero-tags .label { font-size: 12px; color: var(--ink-3); font-weight: 500; }

/* hero featured card */
.hero-feat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow-lg); transition: transform .2s, box-shadow .2s;
}
.hero-feat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg), 0 14px 40px oklch(0.4 0.02 255 / 0.1); }
.hero-feat .thumb { aspect-ratio: 16/9; }
.hero-feat .body { padding: 18px 20px 20px; }
.hero-feat .body h3 { font-size: 18px; line-height: 1.5; margin: 10px 0 0; }
.hero-feat .pick { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--warn); }

/* --- Section heading --- */
.section { padding: 30px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.section-head h2 { font-size: 23px; font-weight: 900; display: flex; align-items: center; gap: 11px; }
.section-head h2 .bar { width: 5px; height: 24px; border-radius: 3px; background: var(--brand); }
.section-head .more { font-size: 13px; font-weight: 700; font-family: var(--head); color: var(--brand-ink); display: inline-flex; align-items: center; gap: 5px; }
.section-head .more:hover { gap: 8px; }
.section-sub { font-size: 13.5px; color: var(--ink-3); margin: -14px 0 22px; }

/* --- Category grid --- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; align-items: center; gap: 14px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  position: relative; overflow: hidden;
}
.cat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cat); transform: scaleY(0); transform-origin: top; transition: transform .2s; }
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in oklch, var(--cat) 35%, var(--line)); }
.cat-card:hover::before { transform: scaleY(1); }
.cat-icon {
  width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; font-family: var(--head); font-weight: 900; font-size: 18px;
  color: var(--cat); background: color-mix(in oklch, var(--cat) 12%, white);
  border: 1px solid color-mix(in oklch, var(--cat) 25%, white);
}
.cat-icon svg { width: 22px; height: 22px; }
.cat-card .info h3 { font-size: 15px; font-weight: 700; }
.cat-card .info p { margin: 2px 0 0; font-size: 12px; color: var(--ink-3); font-family: var(--mono); }

/* --- Article cards --- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.acard {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.acard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line); }
.acard .thumb { aspect-ratio: 16/9; position: relative; }
.acard .thumb .chip { position: absolute; left: 12px; top: 12px; box-shadow: var(--shadow-sm); }
.acard .body { padding: 15px 17px 17px; display: flex; flex-direction: column; flex: 1; }
.acard h3 { font-size: 16.5px; line-height: 1.5; font-weight: 700; }
.acard:hover h3 { color: var(--brand-ink); }
.acard p { font-size: 13px; color: var(--ink-2); margin: 9px 0 0; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.acard .foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; gap: 14px; }

/* --- List rows (新着) --- */
.layout-2col { display: grid; grid-template-columns: 1fr 320px; gap: 36px; align-items: start; }
.list-rows { display: flex; flex-direction: column; }
.lrow {
  display: grid; grid-template-columns: 132px 1fr; gap: 18px; padding: 18px 0;
  border-bottom: 1px solid var(--line); transition: padding-left .15s;
}
.lrow:first-child { padding-top: 0; }
.lrow:hover { padding-left: 6px; }
.lrow .thumb { aspect-ratio: 4/3; border-radius: 9px; overflow: hidden; }
.lrow .lbody h3 { font-size: 16px; line-height: 1.55; font-weight: 700; }
.lrow:hover .lbody h3 { color: var(--brand-ink); }
.lrow .lmeta { display: flex; align-items: center; gap: 13px; margin-top: 10px; flex-wrap: wrap; }
.lrow .lexcerpt { font-size: 13px; color: var(--ink-2); margin: 7px 0 0; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Filter bar --- */
.filterbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.fbtn {
  font-size: 13px; font-weight: 700; font-family: var(--head); color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 100px;
  padding: 7px 15px; transition: all .15s; display: inline-flex; align-items: center; gap: 7px;
}
.fbtn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat, var(--ink-3)); }
.fbtn:hover { border-color: var(--ink-3); }
.fbtn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.fbtn.active .dot { background: #fff; }

/* --- Sidebar --- */
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.side-card + .side-card { margin-top: 20px; }
.side-card h3 { font-size: 15px; font-weight: 900; display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.side-card h3 .bar { width: 4px; height: 17px; border-radius: 2px; background: var(--brand); }
.rank-row { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.rank-row:last-child { border-bottom: 0; padding-bottom: 0; }
.rank-num { font-family: var(--head); font-weight: 900; font-size: 19px; color: var(--brand); line-height: 1.3; }
.rank-row:nth-child(n+4) .rank-num { color: var(--ink-3); }
.rank-row h4 { font-size: 13.5px; font-weight: 500; line-height: 1.55; font-family: var(--sans); }
.rank-row:hover h4 { color: var(--brand-ink); }
.rank-row .rmeta { font-size: 11px; color: var(--ink-3); font-family: var(--mono); margin-top: 5px; }

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

.cta-band {
  background: linear-gradient(135deg, var(--brand-ink), var(--brand));
  border-radius: 18px; padding: 36px 40px; color: #fff; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-band::after { content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: oklch(1 0 0 / 0.08); }
.cta-band h2 { font-size: 24px; font-weight: 900; color: #fff; }
.cta-band p { margin: 8px 0 0; font-size: 14px; opacity: .9; }
.cta-band .btn-white { background: #fff; color: var(--brand-ink); }

/* --- Footer --- */
.site-footer { background: var(--ink); color: oklch(0.82 0.01 255); margin-top: 60px; padding: 48px 0 30px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid h4 { color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 14px; letter-spacing: .04em; }
.foot-links { display: flex; flex-direction: column; gap: 9px; }
.foot-links a { font-size: 13px; color: oklch(0.74 0.01 255); transition: color .15s; }
.foot-links a:hover { color: #fff; }
.foot-about p { font-size: 13px; color: oklch(0.70 0.01 255); line-height: 1.8; margin: 12px 0 0; max-width: 26em; }
.foot-bottom { border-top: 1px solid oklch(0.34 0.01 255); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; font-size: 12px; color: oklch(0.62 0.01 255); font-family: var(--mono); }

/* --- Responsive --- */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero h1 { font-size: 34px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .layout-2col { grid-template-columns: 1fr; }
  .nav, .search-mini { display: none; }
  .menu-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .lrow { grid-template-columns: 100px 1fr; gap: 14px; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .hero h1 { font-size: 28px; }
}
