/*
Theme Name: Q1 News Blue
Theme URI: https://news.q1hd.jp/
Author: Q1 Holdings
Author URI: https://q1hd.jp/
Description: Q1ホールディングスのコーポレートカラーを継承したニュースサイト用テーマ。
Version: 1.3.0
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: q1-news-blue
*/

:root {
	--q1-navy: #0e2240;
	--q1-ink: #081526;
	--q1-brass: #b89b5e;
	--q1-brass-dark: #9a7f45;
	--q1-mist: #f4f6f9;
	--q1-line: #dce2ea;
	--q1-text: #2b3648;
	--q1-muted: #64708a;
	--q1-white: #ffffff;
	--q1-serif: "Shippori Mincho", "Hiragino Mincho ProN", serif;
	--q1-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
	--q1-en: "Inter", "Noto Sans JP", sans-serif;
	--q1-wrap: 1120px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--q1-white);
	color: var(--q1-text);
	font-family: var(--q1-sans);
	font-size: 15.5px;
	line-height: 1.9;
	-webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
	font-family: var(--q1-sans);
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

figure,
h1,
h2,
h3,
p {
	margin-top: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--q1-brass);
	outline-offset: 4px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	top: 12px;
	left: 12px;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 10px 16px;
	background: var(--q1-white);
	color: var(--q1-navy);
}

.content-wrap,
.site-header__inner,
.site-footer__inner,
.site-footer__bottom,
.news-hero__inner,
.page-hero__inner,
.article-header__inner {
	width: min(100% - 56px, var(--q1-wrap));
	margin-inline: auto;
}

.eyebrow {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 14px;
	color: var(--q1-brass-dark);
	font-family: var(--q1-en);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .34em;
	text-transform: uppercase;
}

.eyebrow::after {
	width: 42px;
	height: 1px;
	background: var(--q1-brass);
	content: "";
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(8, 21, 38, .96);
	box-shadow: 0 2px 18px rgba(8, 21, 38, .18);
	backdrop-filter: blur(10px);
}

.admin-bar .site-header {
	top: 32px;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 74px;
}

.site-branding__link,
.custom-logo-link {
	display: block;
}

.site-branding__logo,
.custom-logo {
	width: auto;
	height: 38px;
}

.site-header__label {
	color: var(--q1-brass);
	font-family: var(--q1-en);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .34em;
}

/* News hero */
.news-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(220px, 20vw, 270px);
	overflow: hidden;
	color: var(--q1-white);
}

.news-hero__background,
.news-hero__veil {
	position: absolute;
	inset: 0;
}

.news-hero__background {
	background: url("assets/images/hero.jpg") center 44% / cover no-repeat;
	transform: scale(1.02);
}

.news-hero__veil {
	background: linear-gradient(90deg, rgba(8, 21, 38, .92), rgba(14, 34, 64, .7) 52%, rgba(14, 34, 64, .22));
}

.news-hero__inner {
	position: relative;
	z-index: 1;
	padding-block: 52px 42px;
}

.news-hero .eyebrow {
	color: var(--q1-brass);
}

.news-hero h1 {
	margin-bottom: 10px;
	font-family: var(--q1-serif);
	font-size: clamp(36px, 4.5vw, 52px);
	font-weight: 700;
	letter-spacing: .12em;
	line-height: 1.35;
}

.news-hero__lead {
	max-width: 590px;
	margin-bottom: 0;
	color: rgba(255, 255, 255, .82);
	font-size: 15px;
	line-height: 2;
}

/* Index and cards */
.news-section {
	padding-block: 56px 92px;
}

.front-content {
	background: var(--q1-mist);
}

.front-content .content-wrap {
	display: grid;
	gap: 36px;
}

.front-panel {
	border: 1px solid var(--q1-line);
	background: var(--q1-white);
	padding: 34px 38px 38px;
}

.front-panel__heading {
	display: flex;
	align-items: flex-end;
	gap: 18px;
	margin-bottom: 25px;
	border-bottom: 1px solid var(--q1-line);
	padding-bottom: 16px;
}

.front-panel__heading .eyebrow {
	margin-bottom: 5px;
}

.front-panel__heading h2 {
	position: relative;
	margin: 0;
	color: var(--q1-navy);
	font-family: var(--q1-serif);
	font-size: 27px;
	line-height: 1.35;
}

.front-panel__heading h2::after {
	position: absolute;
	bottom: -17px;
	left: 0;
	width: 72px;
	height: 2px;
	background: var(--q1-brass);
	content: "";
}

.front-panel__heading > p {
	margin-bottom: 2px;
	color: var(--q1-muted);
	font-size: 12px;
}

.notice-item {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	gap: 22px;
	padding: 16px 0;
	border-bottom: 1px solid var(--q1-line);
}

.notice-item time {
	color: var(--q1-muted);
	font-family: var(--q1-en);
	font-size: 12px;
}

.notice-item__content {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 7px 12px;
}

.notice-item__content a {
	color: var(--q1-navy);
	font-family: var(--q1-serif);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.65;
}

.notice-item__content a:hover {
	color: var(--q1-brass-dark);
}

.notice-item__category,
.notice-item__new,
.resource-card__category {
	display: inline-flex;
	align-items: center;
	min-height: 22px;
	padding: 2px 8px;
	background: rgba(184, 155, 94, .14);
	color: var(--q1-brass-dark);
	font-size: 10px;
	font-weight: 700;
	line-height: 1.3;
}

.notice-item__new {
	background: var(--q1-navy);
	color: var(--q1-white);
	font-family: var(--q1-en);
	letter-spacing: .06em;
}

.content-tags {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
}

.content-tags span {
	border: 1px solid var(--q1-line);
	padding: 1px 6px;
	color: var(--q1-muted);
	font-family: var(--q1-sans);
	font-size: 9px;
	font-weight: 500;
	line-height: 1.5;
}

.resource-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.resource-card {
	min-width: 0;
	border: 1px solid var(--q1-line);
	background: var(--q1-white);
	transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.resource-card:hover {
	transform: translateY(-3px);
	border-color: var(--q1-brass);
	box-shadow: 0 12px 28px rgba(14, 34, 64, .09);
}

.resource-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.resource-card__media {
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--q1-mist);
}

.resource-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.resource-card__media--fallback {
	display: grid;
	place-items: center;
	background: var(--q1-navy);
	padding: 34px;
}

.resource-card__media--fallback img {
	object-fit: contain;
}

.resource-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 21px 19px 17px;
}

.resource-card__category {
	align-self: flex-start;
	margin-bottom: 10px;
}

.content-tags--resource {
	margin: -3px 0 10px;
}

.resource-card h3 {
	margin-bottom: 12px;
	color: var(--q1-navy);
	font-family: var(--q1-serif);
	font-size: 16px;
	line-height: 1.65;
}

.resource-card__excerpt {
	margin-bottom: 20px;
	color: var(--q1-muted);
	font-size: 12.5px;
	line-height: 1.75;
}

.resource-card__excerpt p {
	margin: 0;
}

.resource-card__meta {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	border-top: 1px solid var(--q1-line);
	padding-top: 13px;
	color: var(--q1-muted);
	font-family: var(--q1-en);
	font-size: 10px;
}

.resource-card__meta span {
	color: var(--q1-brass-dark);
	font-weight: 700;
}

.front-panel__empty {
	margin: 0;
	padding: 26px;
	background: var(--q1-mist);
	color: var(--q1-muted);
	text-align: center;
}

.front-panel__more {
	display: flex;
	justify-content: center;
	margin-top: 30px;
}

.front-panel__more a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 230px;
	border: 1px solid var(--q1-brass);
	padding: 11px 24px;
	background: var(--q1-navy);
	color: var(--q1-white);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	transition: background .2s ease, color .2s ease;
}

.front-panel__more a:hover {
	background: var(--q1-brass);
	color: var(--q1-ink);
}

@media (max-width: 980px) {
	.resource-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.section-heading {
	margin-bottom: 50px;
}

.section-heading h2,
.page-hero h1 {
	margin-bottom: 0;
	color: var(--q1-navy);
	font-family: var(--q1-serif);
	font-size: clamp(28px, 3.2vw, 38px);
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1.55;
}

.news-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 30px;
}

.news-card {
	min-width: 0;
	border: 1px solid var(--q1-line);
	background: var(--q1-white);
	transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.news-card:hover {
	transform: translateY(-4px);
	border-color: var(--q1-brass);
	box-shadow: 0 16px 38px rgba(14, 34, 64, .1);
}

.news-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.news-card__media {
	overflow: hidden;
	background: var(--q1-navy);
	aspect-ratio: 16 / 9;
}

.news-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .45s ease;
}

.news-card:hover .news-card__image {
	transform: scale(1.025);
}

.news-card__placeholder {
	display: grid;
	place-items: center;
	height: 100%;
	background:
		linear-gradient(rgba(184, 155, 94, .07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(184, 155, 94, .07) 1px, transparent 1px),
		var(--q1-ink);
	background-size: 44px 44px;
}

.news-card__placeholder span {
	color: var(--q1-brass);
	font-family: var(--q1-serif);
	font-size: 46px;
	font-weight: 700;
	letter-spacing: .08em;
}

.news-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 32px;
}

.news-card__meta,
.article-header__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 16px;
	margin-bottom: 17px;
	color: var(--q1-muted);
	font-family: var(--q1-en);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .08em;
}

.news-card__category,
.article-header__meta span {
	border: 1px solid var(--q1-brass);
	padding: 2px 9px;
	color: var(--q1-brass-dark);
}

.news-card__title {
	margin-bottom: 14px;
	color: var(--q1-navy);
	font-family: var(--q1-serif);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: .03em;
	line-height: 1.7;
}

.news-card__excerpt {
	margin-bottom: 22px;
	color: var(--q1-muted);
	font-size: 13.5px;
	line-height: 1.9;
}

.news-card__excerpt p {
	margin-bottom: 0;
}

.news-card__more {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 15px;
	border-top: 1px solid var(--q1-line);
	color: var(--q1-brass-dark);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
}

.pagination {
	margin-top: 58px;
}

.pagination .nav-links {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
}

.pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	border: 1px solid var(--q1-line);
	padding-inline: 12px;
	color: var(--q1-navy);
	font-family: var(--q1-en);
	font-size: 12px;
}

.pagination .current,
.pagination a:hover {
	border-color: var(--q1-navy);
	background: var(--q1-navy);
	color: var(--q1-white);
}

.empty-state {
	border: 1px solid var(--q1-line);
	padding: 54px;
	background: var(--q1-mist);
}

.empty-state h2 {
	margin-bottom: 0;
	color: var(--q1-navy);
	font-family: var(--q1-serif);
	font-size: 22px;
}

/* Page and archive headers */
.page-hero,
.article-header {
	position: relative;
	background:
		linear-gradient(rgba(184, 155, 94, .05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(184, 155, 94, .05) 1px, transparent 1px),
		var(--q1-mist);
	background-size: 64px 64px;
}

.page-hero--compact .page-hero__inner {
	padding-block: 82px 70px;
}

.page-hero__description {
	max-width: 700px;
	margin-top: 18px;
	color: var(--q1-muted);
}

.page-hero__description p {
	margin-bottom: 0;
}

/* Article */
.article-header__inner {
	max-width: 900px;
	padding-block: 92px 80px;
}

.article-header__meta {
	margin-bottom: 22px;
}

.article-header h1 {
	margin-bottom: 0;
	color: var(--q1-navy);
	font-family: var(--q1-serif);
	font-size: clamp(30px, 4.5vw, 48px);
	font-weight: 700;
	letter-spacing: .04em;
	line-height: 1.55;
}

.article-shell {
	width: min(100% - 56px, 900px);
	margin-inline: auto;
	padding-block: 72px 100px;
}

.article-featured {
	margin: 0 0 50px;
}

.article-featured img {
	width: 100%;
}

.article-content {
	font-size: 16px;
	line-height: 2;
}

.article-content > * {
	margin-bottom: 1.65em;
}

.article-content h2,
.article-content h3,
.article-content h4 {
	color: var(--q1-navy);
	font-family: var(--q1-serif);
	font-weight: 700;
	line-height: 1.6;
}

.article-content h2 {
	margin-top: 2.4em;
	border-left: 3px solid var(--q1-brass);
	padding-left: 18px;
	font-size: 27px;
}

.article-content h3 {
	margin-top: 2em;
	font-size: 22px;
}

.article-content a {
	color: var(--q1-brass-dark);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.article-content blockquote {
	margin-inline: 0;
	border-left: 3px solid var(--q1-brass);
	padding: 22px 28px;
	background: var(--q1-mist);
	color: var(--q1-navy);
	font-family: var(--q1-serif);
}

.article-content table {
	width: 100%;
	border-collapse: collapse;
}

.article-content th,
.article-content td {
	border: 1px solid var(--q1-line);
	padding: 12px 14px;
	text-align: left;
}

.article-content th {
	background: var(--q1-mist);
	color: var(--q1-navy);
}

.article-content pre {
	overflow-x: auto;
	padding: 20px;
	background: var(--q1-ink);
	color: var(--q1-white);
}

.article-content .wp-block-image,
.article-content .wp-block-gallery {
	margin-block: 2em;
}

.article-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 58px;
	border-top: 1px solid var(--q1-line);
	padding-top: 26px;
}

.article-tags a,
.back-link {
	color: var(--q1-brass-dark);
	font-size: 13px;
	font-weight: 700;
}

.article-tags a {
	display: inline-block;
	margin: 4px 8px 4px 0;
	border: 1px solid var(--q1-line);
	padding: 5px 10px;
}

/* Comments */
.comments-area {
	padding-top: 0;
}

.comments-title,
.comment-reply-title {
	color: var(--q1-navy);
	font-family: var(--q1-serif);
}

.comment-list {
	padding-left: 24px;
}

.comment-body {
	margin-bottom: 22px;
	border-bottom: 1px solid var(--q1-line);
	padding-bottom: 22px;
}

.comment-form input:not([type="submit"]),
.comment-form textarea,
.search-form input[type="search"] {
	width: 100%;
	border: 1px solid var(--q1-line);
	border-radius: 0;
	padding: 12px;
	background: var(--q1-white);
}

.submit,
.button-link,
.search-submit {
	display: inline-block;
	border: 1px solid var(--q1-brass);
	border-radius: 0;
	padding: 11px 24px;
	background: var(--q1-brass);
	color: var(--q1-ink);
	font-weight: 700;
	cursor: pointer;
}

/* Error */
.error-page {
	display: grid;
	min-height: 62vh;
	place-items: center;
	background: var(--q1-mist);
}

.error-page__inner {
	padding-block: 90px;
	text-align: center;
}

.error-page__inner .eyebrow {
	justify-content: center;
}

.error-page h1 {
	margin-bottom: 18px;
	color: var(--q1-navy);
	font-family: var(--q1-serif);
	font-size: clamp(30px, 4vw, 44px);
}

.error-page .button-link {
	margin-top: 18px;
}

/* Footer */
.site-footer {
	background: var(--q1-ink);
	color: rgba(255, 255, 255, .7);
}

.site-footer__inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
	padding-block: 58px 42px;
}

.site-footer__brand img {
	width: auto;
	height: 38px;
	margin-bottom: 14px;
}

.site-footer__brand p {
	margin-bottom: 0;
	font-size: 12px;
}

.site-footer__corporate {
	border-bottom: 1px solid var(--q1-brass);
	padding-bottom: 4px;
	color: var(--q1-brass);
	font-family: var(--q1-en);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .18em;
}

.site-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, .1);
	padding-block: 24px 30px;
	text-align: center;
}

.site-footer__bottom p {
	margin: 0;
	color: rgba(255, 255, 255, .38);
	font-size: 11px;
}

/* WordPress content alignment */
.alignwide {
	width: min(100vw - 56px, 1080px);
	max-width: none;
	margin-right: 50%;
	margin-left: 50%;
	transform: translateX(-50%);
}

.alignfull {
	width: 100vw;
	max-width: none;
	margin-right: 50%;
	margin-left: 50%;
	transform: translateX(-50%);
}

.wp-caption-text,
.wp-element-caption {
	margin-top: 8px;
	color: var(--q1-muted);
	font-size: 12px;
	text-align: center;
}

.sticky {
	border-color: var(--q1-brass);
}

.bypostauthor {
	border-left: 2px solid var(--q1-brass);
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 760px) {
	body {
		font-size: 14.5px;
	}

	.content-wrap,
	.site-header__inner,
	.site-footer__inner,
	.site-footer__bottom,
	.news-hero__inner,
	.page-hero__inner,
	.article-header__inner,
	.article-shell {
		width: min(100% - 40px, var(--q1-wrap));
	}

	.site-header__inner {
		min-height: 66px;
	}

	.site-branding__logo,
	.custom-logo {
		height: 30px;
	}

	.site-header__label {
		font-size: 9px;
		letter-spacing: .24em;
	}

	.news-hero {
		min-height: 220px;
	}

	.news-hero__background {
		background-position: 38% center;
	}

	.news-hero__inner {
		padding-block: 48px 34px;
	}

	.news-hero h1 {
		font-size: 36px;
	}

	.news-hero .eyebrow {
		gap: 8px;
		font-size: 10px;
		letter-spacing: .22em;
	}

	.news-hero .eyebrow::after {
		flex: none;
		width: 24px;
	}

	.news-hero__lead {
		font-size: 14px;
	}

	.news-section {
		padding-block: 38px 60px;
	}

	.front-content .content-wrap {
		gap: 24px;
	}

	.front-panel {
		padding: 26px 22px 28px;
	}

	.front-panel__heading {
		align-items: flex-start;
		flex-direction: column;
		gap: 5px;
	}

	.notice-item {
		grid-template-columns: 1fr;
		gap: 5px;
		padding: 15px 0;
	}

	.resource-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.section-heading {
		margin-bottom: 34px;
	}

	.news-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.news-card__body {
		padding: 25px 22px;
	}

	.news-card__title {
		font-size: 18px;
	}

	.page-hero--compact .page-hero__inner,
	.article-header__inner {
		padding-block: 62px 54px;
	}

	.article-header h1 {
		font-size: 30px;
	}

	.article-shell {
		padding-block: 52px 72px;
	}

	.article-featured {
		margin-bottom: 34px;
	}

	.article-content {
		font-size: 15px;
	}

	.article-content h2 {
		font-size: 23px;
	}

	.article-content h3 {
		font-size: 20px;
	}

	.article-footer,
	.site-footer__inner {
		align-items: flex-start;
		flex-direction: column;
	}

	.site-footer__inner {
		padding-block: 46px 34px;
	}

	.empty-state {
		padding: 36px 24px;
	}

	.alignwide,
	.alignfull {
		width: calc(100vw - 40px);
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.news-card,
	.news-card__image {
		transition: none;
	}
}
