/*
Theme Name: Denim Lab
Description: Denim Lab editorial media theme.
Version: 1.0.0
Text Domain: denim-lab
*/

:root {
  --indigo: #1b365d;
  --denim: #355c7d;
  --leather: #8b5e3c;
  --paper: #f8f6f2;
  --ink: #222;
  --muted: #6f716f;
  --line: rgba(27, 54, 93, .18);
  --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Arial, "Yu Gothic", sans-serif; line-height: 1.75; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: rgba(248, 246, 242, .96); }
.header-inner, .footer-inner, .section-head, .meta-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.header-inner { min-height: 72px; }
.brand { color: var(--indigo); font-family: Georgia, serif; font-size: 1.35rem; font-weight: 700; letter-spacing: .18em; }
.site-nav, .footer-nav { display: flex; flex-wrap: wrap; gap: 18px; color: var(--denim); font-size: .86rem; font-weight: 700; }
.hero { position: relative; min-height: 430px; display: grid; place-items: center; overflow: hidden; color: var(--white); background: var(--indigo); }
.hero::before { position: absolute; inset: 0; content: ""; background: linear-gradient(90deg, rgba(10,27,49,.92), rgba(27,54,93,.55)), url("assets/images/denim-hero.png") center/cover; }
.hero-inner { position: relative; width: min(900px, 100%); padding: 76px 0; text-align: center; }
.eyebrow { color: var(--leather); font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.hero h1 { margin: 8px 0; font-family: Georgia, serif; font-size: clamp(3rem, 9vw, 6.4rem); letter-spacing: .12em; line-height: 1; }
.hero-copy { margin: 22px 0 0; font-family: "Yu Mincho", serif; font-size: clamp(1.2rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: .12em; line-height: 1.65; }
.search-form { display: flex; width: min(620px, 100%); overflow: hidden; border: 1px solid rgba(255,255,255,.55); background: var(--white); }
.search-form input { min-width: 0; flex: 1; border: 0; padding: 14px 16px; font: inherit; }
.search-form button { border: 0; padding: 0 20px; color: var(--white); background: var(--leather); font-weight: 700; cursor: pointer; }
.section { padding: 72px 0; }
.section-tinted { background: #eee8df; }
.section-dark { color: var(--white); background: var(--indigo); }
.section-title { margin: 0; color: var(--indigo); font-family: Georgia, "Yu Mincho", serif; font-size: clamp(1.75rem, 4vw, 2.6rem); line-height: 1.2; }
.section-dark .section-title { color: var(--white); }
.section-link { color: var(--leather); font-size: .86rem; font-weight: 700; }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 28px; }
.article-card { overflow: hidden; border: 1px solid var(--line); background: var(--white); box-shadow: 0 10px 24px rgba(27,54,93,.06); transition: transform .2s ease; }
.article-card:hover { transform: translateY(-4px); }
.article-card img, .card-placeholder { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: linear-gradient(135deg, var(--indigo), var(--denim)); }
.article-card-body { padding: 18px; }
.article-card h3 { margin: 8px 0; font-family: "Yu Mincho", serif; font-size: 1.17rem; line-height: 1.5; }
.article-meta { color: var(--muted); font-size: .76rem; }
.article-excerpt { margin: 12px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.8; }
.badge { display: inline-block; margin-right: 7px; padding: 2px 9px; color: var(--denim); border: 1px solid var(--line); background: var(--paper); font-size: .7rem; font-weight: 700; }
.popular-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; margin: 26px 0 0; padding: 0; list-style: none; background: rgba(255,255,255,.18); }
.popular-list li { min-height: 154px; padding: 20px; background: var(--indigo); }
.popular-number { display: block; color: #cfb596; font-family: Georgia, serif; font-size: 2.2rem; line-height: 1; }
.popular-list a { display: block; margin-top: 14px; font-family: "Yu Mincho", serif; font-weight: 700; line-height: 1.55; }
.featured-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 42px; margin-top: 28px; }
.featured-visual { min-height: 320px; background: url("assets/images/selvedge-detail.png") center/cover; }
.knowledge-path { margin: 0; padding: 0; list-style: none; counter-reset: path; }
.knowledge-path li { position: relative; padding: 17px 16px 17px 66px; border-top: 1px solid var(--line); background: rgba(255,255,255,.6); }
.knowledge-path li::before { position: absolute; left: 16px; color: var(--leather); counter-increment: path; content: "0" counter(path); font-family: Georgia, serif; font-size: 1.4rem; }
.archive-tabs { display: flex; gap: 0; margin-top: 30px; border-bottom: 1px solid var(--line); }
.archive-tab { min-width: 132px; border: 0; border-bottom: 3px solid transparent; padding: 14px 20px 12px; color: var(--muted); background: transparent; font-family: Georgia, serif; font-size: .84rem; font-weight: 700; letter-spacing: .16em; cursor: pointer; }
.archive-tab.is-active { color: var(--indigo); border-bottom-color: var(--leather); }
.archive-panel { display: none; }
.archive-panel.is-active { display: block; }
.empty-state { margin-top: 24px; padding: 18px; border: 1px dashed var(--line); color: var(--muted); background: rgba(255,255,255,.5); }
.site-footer { padding: 34px 0; color: #e8dfd2; background: #142a49; }
.footer-note { margin: 6px 0 0; font-size: .78rem; }
.page-hero { padding: 58px 0 36px; color: var(--white); background: var(--indigo); }
.page-hero h1 { max-width: 900px; margin: 10px 0; font-family: "Yu Mincho", serif; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.35; }
.article-shell { max-width: 1040px; }
.single-layout { padding: 48px 0 72px; }
.article-content { padding: clamp(24px, 4vw, 40px); background: var(--white); }
.article-body { max-width: 900px; margin-inline: auto; }
.article-hero-image { max-width: 1000px; margin: 0 auto 46px; overflow: hidden; border-radius: 14px; }
.article-hero-image img { width: 100%; height: auto; }
.article-content h2 { margin: 2.5em 0 .8em; padding-left: 14px; border-left: 4px solid var(--leather); color: var(--indigo); font-family: "Yu Mincho", serif; }
.article-content .denim-lab-content-image { max-width: 720px; margin: 42px auto; }
.denim-lab-content-image img { width: 100%; border-radius: 12px; }
.denim-lab-content-image figcaption { margin-top: 10px; color: var(--muted); font-size: .78rem; line-height: 1.7; }
.related-articles { margin-top: 54px; padding-top: 4px; border-top: 1px solid var(--line); }
.related-articles .article-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.related-articles .article-card-body { padding: 12px; }
.related-articles .article-card h3 { font-size: .96rem; }
.related-topic-candidates { margin-top: 18px; padding: 16px 18px; background: var(--paper); }
.related-topic-candidates p { margin: 0 0 6px; color: var(--denim); font-size: .8rem; font-weight: 700; }
.related-topic-candidates ul { margin: 0; padding-left: 20px; }
.related-mobile-list { display: none; }

@media (max-width: 820px) {
  .site-nav { display: none; }
  .article-grid, .featured-layout, .single-layout { grid-template-columns: 1fr; }
  .popular-list { grid-template-columns: 1fr; }
  .popular-list li { min-height: auto; }
  .hero { min-height: 360px; }
  .hero-inner { padding: 60px 0; }
  .hero h1 { font-size: clamp(2.7rem, 15vw, 4.8rem); }
  .hero-copy { font-size: 1.05rem; letter-spacing: .08em; }
  .archive-tabs { overflow-x: auto; }
  .archive-tab { min-width: 108px; padding-inline: 14px; }
  .single-layout { width: min(100% - 24px, 1040px); padding-top: 20px; }
  .article-content { padding: 20px 18px 28px; }
  .article-hero-image { margin-bottom: 30px; border-radius: 8px; }
  .article-content .denim-lab-content-image { margin: 32px auto; }
  .related-desktop-cards, .related-topic-candidates { display: none; }
  .related-mobile-list { display: block; margin: 18px 0 0; padding: 0; list-style: none; }
  .related-mobile-list li { padding: 12px 0 12px 18px; border-bottom: 1px solid var(--line); font-family: "Yu Mincho", serif; line-height: 1.6; }
  .related-mobile-list li::before { margin-left: -18px; margin-right: 8px; color: var(--leather); content: "・"; }
  .related-mobile-list a { color: var(--indigo); font-weight: 700; }
}
