/*
Theme Name:  SWELL Child - B2B Survival
Theme URI:   https://b2b-survival.com/
Description: B2Bマーケターの生存戦略 カスタム子テーマ（SWELLベース）
Author:      B2B Marketer T
Template:    swell
Version:     1.0.0
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --color-bg:          #ffffff;
  --color-bg-sub:      #f5f6f8;
  --color-bg-card:     #ffffff;
  --color-navy:        #0f1e3d;
  --color-navy-light:  #1a3260;
  --color-accent:      #2351d4;
  --color-accent-hover:#1a3fb5;
  --color-text:        #1a1a2e;
  --color-text-muted:  #6b7280;
  --color-border:      #e5e8ef;
  --color-badge-skill: #dbeafe;
  --color-badge-skill-text: #1d4ed8;
  --color-badge-career:#dcfce7;
  --color-badge-career-text:#15803d;
  --color-badge-hustle:#fef9c3;
  --color-badge-hustle-text:#854d0e;
  --color-badge-default:#f3f4f6;
  --color-badge-default-text:#374151;

  --font-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  --font-heading: 'Noto Serif JP', 'Hiragino Mincho ProN', serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;

  --shadow-card: 0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.05);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,.1), 0 8px 32px rgba(0,0,0,.08);

  --container:  1120px;
  --gap:        24px;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   UTILITY
   ============================================================ */
.b2b-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   HEADER OVERRIDE
   ============================================================ */
.l-header,
#header {
  background: var(--color-navy) !important;
  border-bottom: none !important;
  box-shadow: none !important;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Logo */
.l-header .c-headLogo,
.l-header .site-name-text,
.l-header .header_logo_img,
#header .site-name-text {
  color: #ffffff !important;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .04em;
}

/* Nav links */
.l-header .c-gnav__item a,
.l-header .g-nav a,
#header .gnav__item a {
  color: rgba(255,255,255,.82) !important;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .03em;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}
.l-header .c-gnav__item a:hover,
#header .gnav__item a:hover {
  color: #ffffff !important;
  background: rgba(255,255,255,.1) !important;
}

/* Hamburger */
.l-header .c-headMenuBtn span,
.c-headMenuBtn__line {
  background: #ffffff !important;
}

/* ============================================================
   HERO SECTION (front-page)
   ============================================================ */
.b2b-hero {
  background: var(--color-navy);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}

.b2b-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 80% 50%, rgba(35,81,212,.25) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 10% 80%, rgba(15,30,61,.8) 0%, transparent 60%);
  pointer-events: none;
}

.b2b-hero__inner {
  position: relative;
  max-width: 680px;
}

.b2b-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.55);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.b2b-hero__eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: rgba(255,255,255,.35);
}

.b2b-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.5;
  letter-spacing: .04em;
  margin: 0 0 28px;
}

.b2b-hero__title em {
  font-style: normal;
  color: #7cb3ff;
}

.b2b-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.b2b-tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.75);
  font-size: 12.5px;
  font-weight: 500;
  transition: border-color .2s, color .2s;
  cursor: pointer;
}
.b2b-tag:hover {
  border-color: rgba(255,255,255,.6);
  color: #ffffff;
}

/* ============================================================
   SECTION COMMON
   ============================================================ */
.b2b-section {
  padding: 56px 0;
}

.b2b-section + .b2b-section {
  border-top: 1px solid var(--color-border);
}

.b2b-section--gray {
  background: var(--color-bg-sub);
}

.b2b-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}

.b2b-section__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: .03em;
  position: relative;
  padding-left: 14px;
}
.b2b-section__title::before {
  content: '';
  position: absolute;
  left: 0;
  top: .15em;
  width: 3px;
  height: .85em;
  background: var(--color-accent);
  border-radius: 2px;
}

.b2b-section__more {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap .2s;
}
.b2b-section__more:hover { gap: 7px; }
.b2b-section__more::after { content: '→'; }

/* ============================================================
   CATEGORY BADGE
   ============================================================ */
.b2b-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: var(--color-badge-default);
  color: var(--color-badge-default-text);
}

.b2b-badge--skill    { background: var(--color-badge-skill);  color: var(--color-badge-skill-text); }
.b2b-badge--career   { background: var(--color-badge-career); color: var(--color-badge-career-text); }
.b2b-badge--hustle   { background: var(--color-badge-hustle); color: var(--color-badge-hustle-text); }

/* ============================================================
   ARTICLE CARD GRID
   ============================================================ */
.b2b-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

@media (max-width: 900px) {
  .b2b-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .b2b-grid { grid-template-columns: 1fr; }
}

.b2b-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
  box-shadow: var(--shadow-card);
}
.b2b-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.b2b-card__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-bg-sub);
}
.b2b-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.b2b-card:hover .b2b-card__thumb img {
  transform: scale(1.04);
}

.b2b-card__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.b2b-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.b2b-card__date {
  font-size: 11.5px;
  color: var(--color-text-muted);
  letter-spacing: .03em;
}

.b2b-card__title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.b2b-card__excerpt {
  font-size: 12.5px;
  color: var(--color-text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* FEATURED card (first card, spans 2 cols) */
.b2b-card--featured {
  grid-column: span 2;
  flex-direction: row;
}
.b2b-card--featured .b2b-card__thumb {
  width: 52%;
  flex-shrink: 0;
  aspect-ratio: auto;
}
.b2b-card--featured .b2b-card__title {
  font-size: 17px;
  -webkit-line-clamp: 4;
}

@media (max-width: 900px) {
  .b2b-card--featured {
    grid-column: span 1;
    flex-direction: column;
  }
  .b2b-card--featured .b2b-card__thumb {
    width: 100%;
    aspect-ratio: 16/9;
  }
}

/* ============================================================
   CATEGORY NAV (below hero)
   ============================================================ */
.b2b-catbar {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 0;
}

.b2b-catbar__inner {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.b2b-catbar__inner::-webkit-scrollbar { display: none; }

.b2b-catbar__item {
  flex-shrink: 0;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: .03em;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}
.b2b-catbar__item:hover,
.b2b-catbar__item.is-active {
  color: var(--color-navy);
  border-bottom-color: var(--color-accent);
}

/* ============================================================
   PROFILE CARD
   ============================================================ */
.b2b-profile {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background: var(--color-navy);
  border-radius: var(--radius-lg);
  color: #ffffff;
}

.b2b-profile__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.2);
}

.b2b-profile__name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}

.b2b-profile__bio {
  font-size: 12.5px;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
}

/* ============================================================
   FOOTER OVERRIDE
   ============================================================ */
.l-footer,
#footer {
  background: var(--color-navy) !important;
  color: rgba(255,255,255,.7) !important;
  border-top: none !important;
}

.l-footer a,
#footer a {
  color: rgba(255,255,255,.7) !important;
}
.l-footer a:hover,
#footer a:hover {
  color: #ffffff !important;
}

.l-footer__copyright,
.p-footer__copyright {
  color: rgba(255,255,255,.4) !important;
  font-size: 12px;
}

/* ============================================================
   ARTICLE SINGLE PAGE
   ============================================================ */
.l-main .p-blogArticle,
.l-main .article-body,
.entry-content {
  max-width: 720px;
}

/* Heading styles inside article */
.entry-content h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-navy);
  border-left: 4px solid var(--color-accent);
  padding-left: 16px;
  margin: 48px 0 20px;
  line-height: 1.5;
}

.entry-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-navy);
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
}

.entry-content p {
  margin-bottom: 1.5em;
  font-size: 15px;
  line-height: 1.9;
}

/* ============================================================
   SIDEBAR OVERRIDE
   ============================================================ */
.l-sidebar .widget-title,
.l-sidebar .widgettitle {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-muted);
  border: none !important;
  padding: 0 0 10px !important;
  border-bottom: 1px solid var(--color-border) !important;
  background: none !important;
  margin-bottom: 14px !important;
}

/* ============================================================
   SWELL OVERRIDE: remove default styles
   ============================================================ */
/* Remove SWELL's default card shadows to apply ours */
.p-postCard { box-shadow: none !important; }

/* Ensure our front-page overrides SWELL's archive on homepage */
.l-mainWrapper--home .l-main {
  width: 100% !important;
  max-width: 100% !important;
}

/* Hide default sidebar on homepage */
.page-template-front-page .l-sidebar,
body.home .l-sidebar {
  display: none !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .b2b-hero { padding: 48px 0 44px; }
  .b2b-hero__title { font-size: 24px; }
  .b2b-section { padding: 40px 0; }
  .b2b-profile { flex-direction: column; text-align: center; }
}
