:root {
	--color-primary: #ec642a;
	--color-accent: #A7A17C;
	--color-navy: #02214a;
	--color-navy-dark: #0E2A51;
	--color-cream: #fffbe2;
	--color-text: #000;
	--color-line-cream: rgba(255, 251, 226, 0.5);
	--font-jp: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
	--font-display: 'Marcellus', serif;
	--font-mono-serif: 'Cormorant', serif;
}

html {
	font-size: 16px;
}

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

body {
	margin: 0;
	background: var(--color-cream);
	color: var(--color-navy);
	font-family: var(--font-jp);
	font-size: 16px;
	font-feature-settings: 'palt';
	text-autospace: normal;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
	/* 画像のドラッグ（ゴースト画像）と選択を防ぐ */
	user-drag: none;
	-webkit-user-drag: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

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

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

dl,
dt,
dd,
p,
h1,
h2,
h3,
h4,
h5,
h6,
figure,
blockquote {
	margin: 0;
}

button {
	font: inherit;
	cursor: pointer;
	background: none;
	border: 0;
}

/* PC/SP切り替え用の改行ユーティリティ */
.br-sp {
	display: none;
}

.br-pc {
	display: inline;
}

/* PC/SPで中身を出し分けるユーティリティ */
.u-sp-only {
	display: none;
}

/* ========== Scroll fade-in animation ==========
   `js-fade` クラスは <head> のインラインスクリプトで即時付与され、
   JS 無効/未対応時にはコンテンツが消えたままにならないようにしている。
   ※ トップページのヒーロー（.hero__logo / .hero__scroll / .site-header）は
     top.css 側で独自のロード演出を持っているため、ここでは対象外。 */
html.js-fade .fv-slider,
html.js-fade .brand__lead,
html.js-fade .message__photo,
html.js-fade .message__card,
html.js-fade .initiatives__inner,
html.js-fade .brand__body,
html.js-fade .information__card,
html.js-fade .lineup__heading,
html.js-fade .product-card,
html.js-fade .craft__inner,
html.js-fade .culture__title,
html.js-fade .culture__list,
html.js-fade .company__heading,
html.js-fade .company__row,
html.js-fade .contact-cta__card,
html.js-fade .news-archive__heading,
html.js-fade .news-archive__item,
html.js-fade .news-pagination,
html.js-fade .news-detail__header,
html.js-fade .news-detail__body,
html.js-fade .news-detail__back {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
		transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
	will-change: opacity, transform;
}

html.js-fade .is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	html.js-fade .fv-slider,
	html.js-fade .brand__lead,
	html.js-fade .message__photo,
	html.js-fade .message__card,
	html.js-fade .initiatives__inner,
	html.js-fade .brand__body,
	html.js-fade .information__card,
	html.js-fade .lineup__heading,
	html.js-fade .product-card,
	html.js-fade .craft__inner,
	html.js-fade .culture__title,
	html.js-fade .culture__list,
	html.js-fade .company__heading,
	html.js-fade .company__row,
	html.js-fade .contact-cta__card,
	html.js-fade .news-archive__heading,
	html.js-fade .news-archive__item,
	html.js-fade .news-pagination,
	html.js-fade .news-detail__header,
	html.js-fade .news-detail__body,
	html.js-fade .news-detail__back {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* The whole site is sized at design px (1280 PC / 390 SP) and zoomed
   to fit the actual viewport, so any value in CSS is a design px. */
.site {
	width: 1280px;
	margin: 0 auto;
	background: var(--color-cream);
	zoom: calc(100vw / 1280px);
}

/* ========== Site header (fixed / follows scroll) ==========
   `.site` の外に配置し、独自に zoom を適用する。
   `.site` 内に置くと zoom コンテナ内 position:fixed の副作用
   （スクロール時に中身が上に張り付く現象）が発生するため。 */
.site-header {
	position: fixed;
	top: -5px;
	left: 0;
	width: 1280px;
	height: 100px;
	background: var(--color-cream);
	z-index: 50;
	zoom: calc(100vw / 1280px);
}

.site-header__logo {
	position: absolute;
	left: 50px;
	top: 35px;
	display: block;
}

.site-header__logo img {
	width: 133px;
	height: 30px;
	object-fit: contain;
}

.site-header__nav {
	position: absolute;
    right: 51px;
    top: 41px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-header__nav-link {
	font-family: var(--font-jp);
	font-weight: 500;
	font-size: 16px;
	line-height: 1;
	color: var(--color-navy);
	text-decoration: none;
	transition: opacity 0.2s ease;
}

@media (hover: hover) {
	.site-header__nav-link:hover {
		opacity: 0.7;
	}
}

.site-header__nav-link.is-touch {
	opacity: 0.7;
}

/* Hamburger toggle (SP only — hidden on PC) */
.site-header__toggle {
	display: none;
}

/* ========== Contact CTA (shared) ========== */
.contact-cta {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	padding: 200px 50px 0;
}

.contact-cta__card {
	display: grid;
	place-items: center;
	width: 580px;
	height: 200px;
	background: var(--color-accent);
	color: var(--color-cream);
	border-radius: 20px;
	font-family: var(--font-jp);
	font-weight: 600;
	font-size: 20px;
	line-height: 1.6;
	text-align: center;
	text-decoration: none;
	transition: scale 0.3s ease;
}

/* フェードイン演出（js-fade）が transform と transition を持つため、hover は scale で拡大し、transition は両方を指定する */
html.js-fade .contact-cta__card {
	transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
		transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
		scale 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
	html.js-fade .contact-cta__card {
		transition: none;
	}
}

@media (hover: hover) {
	.contact-cta__card:hover {
		scale: 1.03;
	}
}

/* SP：タップ中は hover と同じ見た目にする（.is-touch は touch.js が付け外しする） */
.contact-cta__card.is-touch {
	scale: 1.03;
}

/* ========== Site footer ========== */
.site-footer {
	position: relative;
	margin-top: 200px;
	background: var(--color-cream);
}

.back-to-top {
	position: absolute;
	right: 51px;
	bottom: 231px;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	color: var(--color-navy-dark);
	font-family: var(--font-jp);
	font-weight: 500;
	font-size: 16px;
	line-height: 1;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

@media (hover: hover) {
	.back-to-top:hover {
		opacity: 0.7;
	}
}

.back-to-top.is-touch {
	opacity: 0.7;
}

.back-to-top__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.back-to-top__arrow img {
	width: 30px;
	height: 11px;
}

/* PC：左上にロゴ、右上にナビ、右下にコピーライト */
.site-footer__bar {
	min-height: 205px;
	background: var(--color-navy-dark);
	color: #fff;
	padding: 50px 59px 32px 65px;
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto 1fr;
	column-gap: 40px;
}

.site-footer__logo {
	grid-column: 1;
	grid-row: 1 / 3;
	align-self: start;
	display: inline-block;
	width: 178px;
	line-height: 0;
}

.site-footer__logo img {
	width: 100%;
	height: auto;
}

.site-footer__copy {
	grid-column: 2;
	grid-row: 2;
	justify-self: end;
	align-self: end;
	margin-top: 54px;
	font-family: var(--font-jp);
	font-weight: 600;
	font-size: 16px;
	line-height: 1.6;
	text-align: right;
}

.site-footer__nav {
	grid-column: 2;
	grid-row: 1;
	justify-self: end;
	align-self: start;
	margin-top: -8px; /* line-height 分を詰めて文字の上端をロゴ上端に揃える */
	display: flex;
	gap: 30px;
}

.site-footer__nav-link {
	font-family: var(--font-jp);
	font-weight: 400;
	font-size: 16px;
	line-height: 1.8;
	color: #fff;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

@media (hover: hover) {
	.site-footer__nav-link:hover {
		opacity: 0.7;
	}
}

.site-footer__nav-link.is-touch {
	opacity: 0.7;
}

/* ========== SP overrides ========== */
@media (max-width: 767px) {
	.site {
		width: 390px;
		zoom: calc(100vw / 390px);
	}

	.br-sp {
		display: inline;
	}

	.br-pc {
		display: none;
	}

	.u-pc-only {
		display: none;
	}

	.u-sp-only {
		display: inline;
	}

	.site-header {
		width: 390px;
		height: 80px;
		z-index: 100;
		zoom: calc(100vw / 390px);
	}

	.site-header__logo {
		top: 20px;
		left: 20px;
	}

	.site-header__logo img {
		width: auto;
		height: 31px;
	}

	/* Hamburger toggle */
	.site-header__toggle {
		position: absolute;
		right: 20px;
		top: 30px;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		width: 50px;
		height: 12px;
		padding: 0;
		background: none;
		border: 0;
		cursor: pointer;
		z-index: 110;
		--toggle-bar-h: 2px;
	}

	/* 線の太さ：zoom で画面幅に応じて太さが変わらないよう、実画面で常に2pxになる値に換算する */
	@supports (width: calc(2px * 390px / 100vw)) {
		.site-header__toggle {
			--toggle-bar-h: calc(2px * 390px / 100vw);
		}
	}

	.site-header__toggle-bar {
		display: block;
		width: 100%;
		height: var(--toggle-bar-h);
		background: #000000;
		transition: transform 0.3s ease, background 0.3s ease;
	}

	.site-header__toggle.is-open .site-header__toggle-bar {
		background: var(--color-cream);
	}

	.site-header__toggle.is-open .site-header__toggle-bar:nth-child(1) {
		transform: translateY(calc((12px - var(--toggle-bar-h)) / 2)) rotate(45deg);
	}

	.site-header__toggle.is-open .site-header__toggle-bar:nth-child(2) {
		transform: translateY(calc((12px - var(--toggle-bar-h)) / -2)) rotate(-45deg);
	}

	/* SP navigation: full-screen overlay */
	.site-header__nav {
		position: fixed;
		top: 0;
		left: 0;
		right: auto;
		width: 100%;
		height: calc(100vh / 100vw * 390px);
		min-height: 100vh;
		flex-direction: column;
		justify-content: flex-start;
		align-items: center;
		gap: 40px;
		padding-top: 140px;
		background: var(--color-navy-dark);
		transform: translateX(100%);
		transition: transform 0.3s ease;
		visibility: hidden;
		z-index: 105;
	}

	.site-header__nav.is-open {
		transform: translateX(0);
		visibility: visible;
	}

	.site-header__nav-link {
		font-family: var(--font-jp);
		font-weight: 500;
		font-size: 18px;
		color: var(--color-cream);
	}

	.contact-cta {
		padding: 161px 20px 0;
		gap: 10px;
	}

	.contact-cta__card {
		width: auto;
		height: 133px;
		border-radius: 10px;
		font-size: 13px;
		line-height: 1.6;
		padding: 0 16px;
	}

	.site-footer {
		margin-top: 160px;
	}

	.back-to-top {
		right: 20px;
		bottom: 313px;
		gap: 10px;
		font-size: 13px;
	}

	.back-to-top__arrow img {
		width: 22px;
		height: auto;
	}

	.site-footer__bar {
		min-height: 260px;
		padding: 40px 20px 40px;
		display: flex;
		flex-direction: column;
		align-items: center;
		column-gap: 0;
	}

	.site-footer__logo {
		width: 136px;
		margin: 0;
	}

	.site-footer__nav {
		margin-top: 31px;
		flex-direction: column;
		align-items: center;
		gap: 10px;
		justify-self: auto;
		align-self: auto;
	}

	.site-footer__nav-link {
		font-size: 13px;
		line-height: 1.6;
	}

	.site-footer__copy {
		margin-top: 30px;
		width: auto;
		font-size: 13px;
		text-align: center;
		align-self: center;
	}
}
