/*
Theme Name: AdToon DEV Blog
Theme URI: https://blog.adtoon.net/
Author: VISIONAX LLC
Author URI: https://visionax.jp/
Description: AdToon DEV Blog専用テーマ
Version: 1.0.2
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: adtoon-dev-blog
*/

:root {
  --navy-1000: #061222;
  --navy-950: #08192f;
  --navy-900: #0c2341;
  --blue: #1768dc;
  --blue-light: #78a9ff;
  --orange: #ff682b;
  --text: #10233f;
  --muted: #66758a;
  --line: #dce4ee;
  --surface: #f3f7fb;
  --white: #fff;
  --content: 1160px;
  --article: 780px;
  --shadow: 0 18px 55px rgba(9, 31, 59, .1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--white); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif; font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
.site-shell { width: min(var(--content), calc(100% - 40px)); margin-inline: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.screen-reader-text:focus { z-index: 10000; top: 12px; left: 12px; width: auto; height: auto; padding: 10px 14px; clip: auto; color: var(--text); background: #fff; border-radius: 6px; }

.site-header { position: sticky; z-index: 100; top: 0; background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(15,42,75,.1); backdrop-filter: blur(16px); }
.site-header__inner { min-height: 78px; display: flex; align-items: center; gap: 30px; }
.site-brand { display: inline-flex; align-items: center; gap: 13px; color: var(--navy-950); font-weight: 900; text-decoration: none; white-space: nowrap; }
.site-brand img { width: 138px; }
.site-brand span { padding-left: 13px; border-left: 1px solid var(--line); font-size: .82rem; letter-spacing: .04em; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 25px; }
.site-nav a { font-size: .84rem; font-weight: 800; text-decoration: none; }
.site-nav a:hover { color: var(--blue); }
.official-link { padding: 10px 15px; color: var(--blue); border: 1px solid #b9d2f5; border-radius: 9px; font-size: .78rem; font-weight: 900; text-decoration: none; }

.eyebrow, .section-kicker { margin: 0; color: var(--orange); font-size: .7rem; font-weight: 950; letter-spacing: .17em; }
.eyebrow span { width: 32px; height: 3px; margin-right: 10px; display: inline-block; vertical-align: middle; background: var(--orange); border-radius: 2px; }
.button { min-height: 48px; padding: 11px 20px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 10px; font-size: .86rem; font-weight: 900; text-decoration: none; }
.button--primary { color: #fff; background: var(--blue); box-shadow: 0 10px 25px rgba(23,104,220,.24); }
.button--ghost { color: #fff; border-color: rgba(255,255,255,.34); }

.blog-hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(circle at 80% 30%, rgba(38,112,221,.34), transparent 34%), linear-gradient(125deg, var(--navy-900), var(--navy-1000) 72%); }
.blog-hero::after { content: "DEV"; position: absolute; right: -20px; bottom: -125px; color: rgba(255,255,255,.035); font-size: clamp(11rem, 26vw, 23rem); font-weight: 950; line-height: 1; letter-spacing: -.08em; pointer-events: none; }
.blog-hero__inner { position: relative; z-index: 1; min-height: 450px; padding: 92px 0; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 80px; }
.blog-hero h1 { margin: 20px 0 0; font-size: clamp(3rem, 5.4vw, 5.8rem); line-height: 1.04; letter-spacing: -.055em; }
.blog-hero h1 em { color: transparent; background: linear-gradient(95deg, #fff, #ff9e59 54%, var(--orange)); background-clip: text; font-style: normal; }
.blog-hero__inner > p { max-width: 500px; margin: 0; color: #c8d6e8; font-size: 1rem; line-height: 2; }

.category-guide { padding: 86px 0; background: var(--surface); }
.section-heading { margin-bottom: 34px; }
.section-heading h2 { margin: 7px 0 0; font-size: clamp(1.9rem, 3vw, 2.8rem); line-height: 1.3; letter-spacing: -.035em; }
.section-heading--split { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.section-heading--split > p { margin: 0; color: var(--muted); font-size: .88rem; }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.category-grid a { min-height: 190px; padding: 25px; display: flex; flex-direction: column; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 8px 24px rgba(9,31,59,.04); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.category-grid a:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.category-grid span { color: var(--blue); font-size: .66rem; font-weight: 950; letter-spacing: .12em; }
.category-grid strong { margin-top: auto; font-size: 1.15rem; }
.category-grid small { margin-top: 5px; color: var(--muted); font-weight: 700; }
.category-grid .category-grid__news { color: #fff; background: linear-gradient(145deg, #e84d19, #ff7b32); border-color: transparent; }
.category-grid__news span, .category-grid__news small { color: rgba(255,255,255,.82); }

.post-section { padding: 98px 0 112px; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 19px; box-shadow: 0 10px 32px rgba(9,31,59,.06); }
.post-card__link { height: 100%; display: flex; flex-direction: column; text-decoration: none; }
.post-card__visual { aspect-ratio: 16 / 10; overflow: hidden; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #102e55, #061222); }
.post-card__visual img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card__visual span { color: #8fb7f1; font-size: .76rem; font-weight: 950; letter-spacing: .18em; text-transform: uppercase; }
.post-card:hover .post-card__visual img { transform: scale(1.025); }
.post-card__body { flex: 1; padding: 24px; display: flex; flex-direction: column; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: .7rem; font-weight: 800; }
.post-meta a { color: var(--blue); text-decoration: none; }
.post-card h3 { margin: 13px 0 0; font-size: 1.22rem; line-height: 1.5; }
.post-card__body > p { margin: 12px 0 0; color: var(--muted); font-size: .86rem; }
.post-card__more { margin-top: auto; padding-top: 22px; color: var(--blue); font-size: .78rem; font-weight: 900; }
.empty-state { padding: 58px 30px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.empty-state h2, .empty-state h3 { margin: 10px 0 0; font-size: 1.55rem; }
.empty-state > p:last-child { margin: 10px 0 0; color: var(--muted); }
.navigation.pagination { margin-top: 42px; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.page-numbers { min-width: 42px; min-height: 42px; padding: 8px; display: inline-grid; place-items: center; background: var(--surface); border-radius: 8px; font-size: .8rem; font-weight: 850; text-decoration: none; }
.page-numbers.current { color: #fff; background: var(--blue); }

.archive-header, .article-header { color: #fff; background: linear-gradient(125deg, var(--navy-900), var(--navy-1000)); }
.archive-header .site-shell { padding: 74px 0; }
.archive-header h1 { margin: 10px 0 0; font-size: clamp(2.2rem, 4vw, 4rem); letter-spacing: -.04em; }
.archive-header__description { margin-top: 15px; color: #bfcee0; }
.archive-header__description p { margin: 0; }
.post-list { border-top: 1px solid var(--line); }
.post-row { padding: 32px 0; border-bottom: 1px solid var(--line); }
.post-row h2 { margin: 8px 0 0; font-size: 1.4rem; }
.post-row h2 a, .post-row__more { text-decoration: none; }
.post-row > p { max-width: 800px; margin: 10px 0 0; color: var(--muted); }
.post-row__more { margin-top: 13px; display: inline-block; color: var(--blue); font-size: .78rem; font-weight: 900; }

.article-shell { width: min(var(--article), calc(100% - 40px)); margin-inline: auto; }
.article-header .article-shell { padding: 76px 0 82px; }
.breadcrumbs { margin-bottom: 28px; display: flex; flex-wrap: wrap; gap: 7px; color: #95a9c3; font-size: .72rem; }
.breadcrumbs a { color: #c9d8ea; text-decoration: none; }
.article-header .post-meta { color: #aabbd0; }
.article-header .post-meta a { color: #94bcff; }
.article-header h1 { margin: 15px 0 0; font-size: clamp(2.25rem, 5vw, 4.3rem); line-height: 1.25; letter-spacing: -.045em; }
.article-header__lead { margin: 22px 0 0; color: #c5d3e4; font-size: 1rem; }
.article-featured { margin-top: 54px; }
.article-featured img { width: 100%; border-radius: 18px; box-shadow: var(--shadow); }
.article-content { padding: 70px 0 100px; color: #233752; }
.article-content > *:first-child { margin-top: 0; }
.article-content h2 { margin: 2.3em 0 .8em; padding-bottom: .45em; color: var(--text); border-bottom: 2px solid var(--blue); font-size: 1.75rem; line-height: 1.45; }
.article-content h3 { margin: 1.9em 0 .7em; color: var(--text); font-size: 1.35rem; line-height: 1.5; }
.article-content p, .article-content li { line-height: 2; }
.article-content a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-content img { border-radius: 10px; }
.article-content blockquote { margin: 30px 0; padding: 20px 24px; background: var(--surface); border-left: 4px solid var(--orange); }
.article-content pre { padding: 18px; overflow-x: auto; color: #e7eef8; background: var(--navy-950); border-radius: 10px; }
.article-content table { width: 100%; border-collapse: collapse; }
.article-content th, .article-content td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.post-navigation { padding: 0 0 90px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.post-navigation > div:last-child { text-align: right; }
.post-navigation a { display: inline-flex; flex-direction: column; color: var(--text); text-decoration: none; }
.post-navigation small { color: var(--muted); }

.not-found { min-height: 60vh; display: grid; place-items: center; }
.not-found__inner { padding: 100px 0; text-align: center; }
.not-found h1 { margin: 10px 0 0; font-size: clamp(2rem, 4vw, 3.5rem); }
.not-found p:not(.section-kicker) { margin: 14px 0 28px; color: var(--muted); }

.site-cta { padding: 62px 0; color: #fff; background: linear-gradient(110deg, #e64d18, #ff7b2f 58%, #ff963c); }
.site-cta__inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
.site-cta .eyebrow { color: rgba(255,255,255,.76); }
.site-cta h2 { margin: 8px 0 0; font-size: clamp(1.7rem, 3vw, 2.75rem); line-height: 1.35; }
.site-cta__actions { display: flex; gap: 10px; }
.site-footer { padding: 52px 0 38px; color: #aebdd1; background: var(--navy-1000); }
.site-footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 30px 55px; align-items: start; }
.site-brand--footer { color: #fff; font-size: 1.2rem; }
.site-footer p { margin: 8px 0 0; font-size: .8rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 20px; }
.site-footer nav a { color: #dce6f3; font-size: .78rem; font-weight: 800; text-decoration: none; }
.site-footer small { grid-column: 1 / -1; padding-top: 22px; color: #70829b; border-top: 1px solid rgba(255,255,255,.1); }

@media (max-width: 980px) {
  .site-nav { display: none; }
  .official-link { margin-left: auto; }
  .blog-hero__inner { grid-template-columns: 1fr; gap: 28px; }
  .blog-hero__inner > p { max-width: 700px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .post-grid { grid-template-columns: 1fr 1fr; }
  .site-cta__inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .site-shell, .article-shell { width: calc(100% - 28px); }
  .site-header__inner { min-height: 67px; gap: 12px; }
  .site-brand img { width: 116px; }
  .site-brand span { padding-left: 9px; font-size: .7rem; }
  .official-link { padding: 8px 10px; font-size: .7rem; }
  .blog-hero__inner { min-height: 0; padding: 72px 0 82px; }
  .blog-hero h1 { font-size: 3.1rem; }
  .category-guide, .post-section { padding: 66px 0; }
  .category-grid, .post-grid { grid-template-columns: 1fr; }
  .category-grid a { min-height: 150px; }
  .section-heading--split { align-items: start; flex-direction: column; gap: 8px; }
  .article-header .article-shell { padding: 55px 0 62px; }
  .article-header h1 { font-size: 2.25rem; }
  .article-content { padding: 55px 0 75px; }
  .article-content h2 { font-size: 1.5rem; }
  .article-content table { display: block; overflow-x: auto; }
  .post-navigation { grid-template-columns: 1fr; }
  .post-navigation > div:last-child { text-align: left; }
  .site-cta { padding: 52px 0; }
  .site-cta__actions { align-items: stretch; flex-direction: column; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; }
  .site-footer small { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
