/*
Theme Name: Affipro Systems v2
Theme URI: https://affipro.jp
Author: アフィプロシステムズ合同会社
Author URI: https://affipro.jp
Description: アフィプロシステムズ合同会社 公式サイト カスタムテーマ（「1人で、AIを活用して一騎当千法人を創る」版）
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Private
Text Domain: affipro
*/

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --white: #ffffff;
  --bg: #faf9f7;
  --bg2: #f4f1ed;
  --bg3: #ede9e3;
  --red: #c0271a;
  --red-l: #d93a2b;
  --red-d: #8c1a10;
  --orange: #c96e14;
  --orange-l: #e08020;
  --text: #1a1008;
  --text2: #6b5a42;
  --text3: #9c8a72;
  --border: rgba(192,39,26,0.12);
  --borderO: rgba(201,110,20,0.15);
  --sh: 0 2px 12px rgba(26,16,8,0.08);
  --shL: 0 4px 24px rgba(26,16,8,0.12);
  --radius: 12px;
  --radius-l: 16px;
  --pcdock-green: #7db834;
}

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 72px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Serif JP', 'Cormorant Garamond', serif;
  font-size: 15px;
  line-height: 1.85;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s; }
ul { list-style: none; }

h1, h2, h3, h4, .en { font-family: 'Cormorant', 'Cormorant Garamond', 'Noto Serif JP', serif; }
h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); font-weight: 500; line-height: 1.3; letter-spacing: .02em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 500; line-height: 1.3; margin-bottom: 1rem; letter-spacing: .02em; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: .95rem; font-weight: 600; margin-bottom: .4rem; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
section { padding: 5rem 0; }
.bg-white { background: var(--white); }
.bg2 { background: var(--bg2); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }

.section-tag {
  font-family: 'Cormorant Garamond', serif; font-size: 11px; letter-spacing: .28em;
  color: var(--orange); text-transform: uppercase; margin-bottom: .6rem; display: block;
}
.section-lead { color: var(--text2); max-width: 780px; margin-bottom: 3rem; line-height: 1.9; }

/* Buttons */
.btn {
  display: inline-block; font-family: 'Noto Serif JP', serif; font-size: 14px; font-weight: 400;
  padding: 13px 28px; border-radius: 4px; transition: opacity .2s, transform .15s;
  cursor: pointer; border: none; letter-spacing: .08em;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-secondary { background: rgba(201,110,20,.06); color: var(--orange); border: 1px solid rgba(201,110,20,.4); }
.btn-white { background: #fff; color: var(--red); }
.btn-outline-white { background: rgba(255,255,255,.08); color: #fff; border: 1.5px solid rgba(255,255,255,.55); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 1rem; }
.tag { font-size: 11px; padding: 3px 10px; border-radius: 20px; border: 1px solid var(--borderO); color: var(--text3); background: var(--bg); }

/* Header */
#site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); box-shadow: 0 1px 8px rgba(26,16,8,.06);
}
.admin-bar #site-header { top: 32px; }
.header-inner { display: flex; align-items: center; height: 68px; max-width: 1200px; margin: 0 auto; padding: 0 2rem; gap: 1.5rem; }
.site-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.site-logo img, .site-logo .custom-logo { width: auto; height: 44px; max-width: 180px; object-fit: contain; }
.logo-name { font-family: 'Cormorant', serif; font-weight: 600; font-size: 17px; letter-spacing: .12em; line-height: 1.2; }
.logo-sub { font-size: 9.5px; color: var(--text3); letter-spacing: .06em; font-weight: 200; }
#primary-nav { display: flex; align-items: center; gap: 1.8rem; margin-left: auto; }
#primary-nav ul { display: flex; gap: 1.8rem; }
#primary-nav a { color: var(--text2); font-size: 13px; white-space: nowrap; letter-spacing: .05em; }
#primary-nav a:hover, #primary-nav .current-menu-item > a { color: var(--red); }
.header-cta {
  background: var(--red); color: #fff !important; padding: 10px 20px; border-radius: 4px; font-size: 13px;
  font-weight: 500; white-space: nowrap; letter-spacing: .06em; box-shadow: 0 2px 8px rgba(192,39,26,.35);
}
.header-cta:hover { background: var(--red-l); }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; margin-left: auto; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s, opacity .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
#mobile-nav {
  display: none; position: fixed; inset: 68px 0 0 0; background: rgba(255,255,255,.98); z-index: 99;
  padding: 2rem; flex-direction: column; gap: .5rem; border-top: 1px solid var(--border); overflow-y: auto;
}
#mobile-nav.open { display: flex; }
#mobile-nav a { font-size: 16px; color: var(--text2); padding: .75rem 0; border-bottom: 1px solid var(--borderO); display: block; }
#mobile-nav .mobile-cta { margin-top: 1rem; background: var(--red); color: #fff; padding: 13px 24px; border-radius: 4px; text-align: center; border: none; }

/* Hero */
#hero { min-height: 88vh; display: flex; align-items: center; position: relative; overflow: hidden; padding: 5rem 2rem; background: var(--white); }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 65% at 18% 50%, rgba(192,39,26,.07), transparent 60%),
    radial-gradient(ellipse 40% 45% at 85% 30%, rgba(201,110,20,.06), transparent 55%);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(192,39,26,.035) 59px, rgba(192,39,26,.035) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(201,110,20,.025) 59px, rgba(201,110,20,.025) 60px);
}
.hero-inner { position: relative; max-width: 1100px; margin: 0 auto; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 3rem; }
.hero-content { max-width: 640px; flex: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px; background: rgba(192,39,26,.07); border: 1px solid rgba(192,39,26,.2);
  border-radius: 2px; padding: 6px 18px; font-size: 11px; color: var(--red); margin-bottom: 1.8rem;
  font-family: 'Cormorant Garamond', serif; letter-spacing: .18em;
}
.hero-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red-l); }
.hero-title { margin-bottom: 1.4rem; font-family: 'Noto Serif JP', serif; font-weight: 500; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.45; letter-spacing: .04em; }
.hero-title .line { display: block; }
.hero-title .accent { color: var(--red); }
.hero-title .ikki { color: var(--red); font-weight: 600; background: linear-gradient(transparent 70%, rgba(224,128,32,.22) 70%); }
.hero-sub { font-size: 15px; color: var(--text2); line-height: 1.95; margin-bottom: 2rem; max-width: 520px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cards { display: flex; flex-direction: column; gap: 14px; flex-shrink: 0; }
.hero-card { background: var(--white); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; min-width: 220px; box-shadow: var(--sh); }
.hero-card-label { font-size: 10px; color: var(--text3); margin-bottom: 5px; font-family: 'Cormorant Garamond', serif; letter-spacing: .14em; text-transform: uppercase; }
.hero-card-val { font-family: 'Noto Serif JP', serif; font-size: 22px; font-weight: 600; color: var(--orange-l); line-height: 1.3; }
.hero-card-val.red { color: var(--red); }
.hero-card-sub { font-size: 11px; color: var(--text3); margin-top: 3px; font-weight: 200; }

/* Concept */
.concept { background: var(--text); color: #f0ebe4; text-align: center; }
.concept .section-tag { color: var(--orange-l); }
.concept h2 { color: #fff; }
.concept-lead { max-width: 760px; margin: 0 auto 3rem; color: rgba(240,235,228,.8); line-height: 2.1; }
.concept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
.concept-card { background: rgba(255,255,255,.05); border: 1px solid rgba(224,128,32,.25); border-radius: 4px; padding: 1.8rem 1.5rem; }
.concept-num { font-family: 'Cormorant', serif; font-size: 34px; color: var(--orange-l); opacity: .6; line-height: 1; margin-bottom: .8rem; }
.concept-card h3 { color: #fff; font-family: 'Noto Serif JP', serif; font-weight: 500; font-size: 16px; margin-bottom: .6rem; }
.concept-card p { font-size: 13.5px; color: rgba(240,235,228,.75); line-height: 1.9; }

/* Reasons */
.reasons-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.reason-card { background: var(--white); border: 1px solid var(--borderO); border-radius: 4px; padding: 1.8rem 1.5rem; box-shadow: var(--sh); transition: box-shadow .2s; }
.reason-card:hover { box-shadow: var(--shL); }
.reason-num { font-family: 'Cormorant', serif; font-size: 36px; font-weight: 300; color: var(--red); opacity: .35; line-height: 1; margin-bottom: .8rem; }
.reason-card h3 { font-size: 16px; font-weight: 500; margin-bottom: .6rem; font-family: 'Noto Serif JP', serif; }
.reason-card p { font-size: 13.5px; color: var(--text2); line-height: 1.85; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card { background: var(--white); border: 1px solid var(--borderO); border-radius: var(--radius-l); padding: 1.8rem; box-shadow: var(--sh); transition: box-shadow .2s, border-color .2s; display: flex; flex-direction: column; }
.service-card:hover { box-shadow: var(--shL); border-color: rgba(192,39,26,.3); }
.service-card.featured { border: 1.5px solid rgba(192,39,26,.35); }
.service-label { font-family: 'Cormorant Garamond', serif; font-size: 11px; letter-spacing: .16em; color: var(--orange); text-transform: uppercase; margin-bottom: .5rem; }
.service-card h3 { margin-bottom: .7rem; font-size: 19px; font-family: 'Noto Serif JP', serif; font-weight: 500; }
.service-card p { color: var(--text2); font-size: 13.5px; line-height: 1.9; }
.service-card.wide {
  grid-column: 1 / -1; padding: 2.4rem;
  background: linear-gradient(135deg, #fff 0%, #fff 55%, rgba(192,39,26,.05) 100%);
}
.service-wide-head { display: flex; align-items: center; gap: 10px; margin-bottom: .5rem; }
.service-wide-head .service-label { margin-bottom: 0; }
.service-new { background: var(--red); color: #fff; font-family: 'Cormorant Garamond', serif; font-size: 11px; letter-spacing: .14em; padding: 2px 10px; border-radius: 2px; }
.service-card.wide h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: var(--text); margin-bottom: .4rem; }
.service-catch { color: var(--red) !important; font-size: 15px !important; font-weight: 500; margin-bottom: .6rem; }
.service-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 1.2rem; }
.service-steps li { background: var(--bg); border: 1px solid var(--borderO); border-radius: 4px; padding: .7rem .9rem; font-size: 13px; color: var(--text2); line-height: 1.6; }
.service-steps span { display: block; font-family: 'Cormorant', serif; font-size: 18px; color: var(--red); opacity: .6; line-height: 1.2; }
@media (max-width: 960px) { .service-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .service-card.wide { padding: 1.6rem; } .service-steps { grid-template-columns: 1fr; } }
.card-link { display: inline-block; margin-top: auto; padding-top: 1rem; font-size: 13px; color: var(--orange); letter-spacing: .05em; }
.card-link:hover { color: var(--red); }

/* News */
.news-list { display: flex; flex-direction: column; }
.news-item { display: flex; align-items: center; gap: 1.2rem; padding: 1rem 0; border-bottom: 1px solid var(--borderO); flex-wrap: wrap; }
.news-item:hover { color: var(--red); }
.news-date { font-family: 'Cormorant Garamond', serif; font-size: 14px; color: var(--text3); white-space: nowrap; }
.news-cat { font-size: 11px; padding: 2px 10px; border-radius: 2px; background: rgba(201,110,20,.09); color: var(--orange); border: 1px solid rgba(201,110,20,.25); white-space: nowrap; }
.news-title { flex: 1; font-size: 14px; }
.news-empty { color: var(--text3); font-size: 14px; padding: 1rem 0; }
.center-link { text-align: center; margin-top: 2rem; }
.text-link { font-size: 14px; color: var(--orange); letter-spacing: .06em; }
.text-link:hover { color: var(--red); }

/* CTA */
#cta { background: var(--red); text-align: center; padding: 5rem 2rem; }
#cta .section-tag { color: rgba(255,255,255,.6); }
#cta h2 { color: #fff; }
#cta p { color: rgba(255,255,255,.85); margin-bottom: 2rem; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Page hero / content */
.page-hero { position: relative; overflow: hidden; padding: 4.5rem 0 3.5rem; background: var(--white); border-bottom: 1px solid var(--borderO); }
.page-hero-title { font-family: 'Noto Serif JP', serif; font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 500; margin-bottom: .6rem; }
.page-hero-sub { color: var(--text2); }
.breadcrumb { background: var(--bg2); border-bottom: 1px solid var(--borderO); padding: .8rem 0; font-size: 12px; color: var(--text3); }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb .sep { margin: 0 .4rem; }
.single-content { font-size: 15px; line-height: 2; color: var(--text2); max-width: 820px; }
.single-content h2 { font-size: 22px; color: var(--text); margin: 2.2rem 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--borderO); font-family: 'Noto Serif JP', serif; }
.single-content h3 { font-size: 18px; color: var(--text); margin: 1.6rem 0 .8rem; font-family: 'Noto Serif JP', serif; }
.single-content p { margin-bottom: 1.2rem; }
.single-content a { color: var(--orange); text-decoration: underline; }
.single-content ul, .single-content ol { margin: 0 0 1.2rem 1.4rem; }
.single-content ul { list-style: disc; }
.single-content img { margin: 1.5rem 0; border-radius: 4px; }
.post-meta { font-size: 13px; color: var(--text3); margin-bottom: 2rem; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--borderO); font-size: 14px; }
.post-nav a { color: var(--orange); }

.archive-list { display: flex; flex-direction: column; }
.archive-item { border-bottom: 1px solid var(--borderO); }
.archive-item a { display: block; padding: 1.6rem 0; }
.archive-item a:hover .archive-title { color: var(--red); }
.archive-title { font-family: 'Noto Serif JP', serif; font-size: 18px; font-weight: 500; margin: .3rem 0; transition: color .2s; }
.archive-excerpt { font-size: 13.5px; color: var(--text2); }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 3rem; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 4px; border: 1px solid var(--borderO); font-size: 13px; color: var(--text2); }
.pagination .current { background: var(--red); color: #fff; border-color: var(--red); }

/* Company page */
.greeting-text p { font-size: 14.5px; color: var(--text2); line-height: 2.1; margin-bottom: 1.2rem; max-width: 780px; }
.greeting-sign { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--borderO); color: var(--text2); max-width: 780px; }
.greeting-sign strong { font-weight: 500; color: var(--text); font-size: 16px; }
.philosophy-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.philosophy-catch { font-family: 'Noto Serif JP', serif; font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-weight: 500; color: var(--red); line-height: 1.5; margin-bottom: 1.2rem; border-left: 3px solid var(--red); padding-left: 1rem; }
.philosophy-values { display: flex; flex-direction: column; gap: 16px; }
.value-card { background: var(--white); border: 1px solid var(--borderO); border-radius: 4px; padding: 1.4rem 1.6rem; box-shadow: var(--sh); display: flex; gap: 1.2rem; }
.value-num { font-family: 'Cormorant', serif; font-size: 28px; color: var(--orange); opacity: .5; line-height: 1; }
.value-card h4 { font-size: 15px; font-weight: 500; font-family: 'Noto Serif JP', serif; }
.value-card p { font-size: 13px; color: var(--text2); line-height: 1.8; }
.company-table-wrap { overflow-x: auto; }
.company-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.company-table th, .company-table td { padding: 1rem 1.2rem; border-bottom: 1px solid var(--borderO); text-align: left; vertical-align: top; line-height: 1.8; }
.company-table th { width: 180px; color: var(--text3); font-weight: 400; background: var(--bg2); white-space: nowrap; }
.company-table td { color: var(--text2); }
.company-table a { color: var(--orange); }
.map-embed { border-radius: 4px; overflow: hidden; box-shadow: var(--sh); margin-top: 1.5rem; }
.map-embed iframe { width: 100%; height: 400px; border: 0; display: block; }

/* Footer */
#site-footer { background: var(--text); padding: 3.5rem 0 1.5rem; color: #f0ebe4; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-logo-name { font-family: 'Cormorant', serif; font-weight: 600; font-size: 15px; letter-spacing: .1em; }
.footer-logo-sub { font-size: 11px; color: var(--text3); margin-bottom: 1rem; }
.footer-catch { font-size: 14px; color: var(--orange-l); margin-bottom: .6rem; }
.footer-about p { font-size: 13px; color: var(--text3); line-height: 2; font-weight: 200; }
.footer-col h4 { font-family: 'Cormorant Garamond', serif; font-size: 11px; font-weight: 500; margin-bottom: 1.1rem; color: var(--orange-l); letter-spacing: .22em; text-transform: uppercase; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--text3); font-size: 13px; font-weight: 200; }
.footer-col a:hover { color: var(--orange-l); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-size: 12px; color: var(--text2); }

/* Responsive */
@media (max-width: 960px) {
  .services-grid, .reasons-grid, .concept-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: repeat(2, 1fr); }
  .hero-cards { display: none; }
  .hero-inner { display: block; }
  .philosophy-layout { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
  .container, .header-inner, .footer-inner { padding: 0 1.2rem; }
  section { padding: 3.5rem 0; }
  #primary-nav, .header-cta { display: none; }
  .hamburger { display: flex; }
  #hero { min-height: auto; padding: 4rem 1.2rem 3rem; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { text-align: center; }
  .services-grid, .reasons-grid, .concept-grid, .footer-top { grid-template-columns: 1fr; }
  .cta-btns { flex-direction: column; align-items: center; }
  .cta-btns .btn { width: 100%; max-width: 320px; }
  .company-table th { width: 100px; font-size: 12px; padding: .8rem; }
  .company-table td { font-size: 13px; padding: .8rem; }
  .footer-bottom { flex-direction: column; }
}
