/*-----------
reset
-----------*/
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
li { list-style: none; }
/* site phases are switched with the hidden attribute (see the note in page.html) */
[hidden] { display: none !important; }
/* blocks only for the Japanese page (kana index, campaign) */

/*-----------
body
-----------*/
:root {
	--orange: #ee7800;
	--orange-bg: #f29200;
	--navy: #00125e;
	--grey: #515151;
	--line: #6f7075;
	--placeholder: #c4c4c4;
	/* ponytail: design heading font is Morisawa "A P-OTF Ardeo Min2 H" (not a web font we have);
	   Dela Gothic One stands in. Swap here when a licensed webfont is available. */
	--font-display: "Dela Gothic One", "M PLUS Rounded 1c", sans-serif;
	--font-num: "Jost", sans-serif;
	--font-kv: "Noto Sans JP", sans-serif;
}

body {
	color: var(--navy);
	font-size: 16px;
	line-height: 2;
	font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", sans-serif;
	font-weight: 500;
	background: #fff;
	overflow-x: hidden;
}

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

/*-----------
common
-----------*/
a { color: inherit; text-decoration: none; transition: opacity 0.3s; }
a:hover { opacity: 0.7; }
button { font: inherit; cursor: pointer; border: 0; transition: opacity 0.3s; }
button:hover { opacity: 0.7; }

.inner {
	width: min(1200px, calc(100% - 48px));
	margin: 0 auto;
}

section { padding: clamp(56px, 6vw, 110px) 0; }

/* section backgrounds */
.bg-grid, .bg-pale {
	/* ponytail: the 40px grid tile is two gradients instead of an image */
	background-image:
		linear-gradient(rgba(234, 117, 0, 0.09) 1px, transparent 1px),
		linear-gradient(90deg, rgba(234, 117, 0, 0.09) 1px, transparent 1px);
	background-size: 40px 40px;
}
.bg-pale { background-color: #fff0e3; }
.bg-sparkles {
	background-image:
		url("../images/sparkles.svg"),
		linear-gradient(rgba(234, 117, 0, 0.09) 1px, transparent 1px),
		linear-gradient(90deg, rgba(234, 117, 0, 0.09) 1px, transparent 1px);
	background-size: min(1749px, 92%) auto, 40px 40px, 40px 40px;
	background-position: center 60px, 0 0, 0 0;
	background-repeat: no-repeat, repeat, repeat;
}
/* Parallax: the pattern is pinned to the window and each orange section is a window onto it,
   so it never has to repeat (the image doesn't tile) and runs on across consecutive sections.
   A fixed layer clipped by the section, not background-attachment: fixed, which iOS ignores. */
.bg-orange { position: relative; clip-path: inset(0); background: var(--orange-bg); }
.bg-orange::before {
	content: "";
	position: fixed;
	inset: 0;
	z-index: -1;
	/* 2740px as designed; grows only when the window is bigger than the image would be */
	background: url("../images/bg_pattern.webp") center / max(2740px, 143vw, 167vh) auto no-repeat;
}
/* consecutive orange sections read as one block. The 1px overlap hides the hairline of white
   that shows where two clipped sections meet on a fractional pixel.
   Only after a visible orange section (directly, or across one hidden section). */
.bg-orange:not([hidden]) + .bg-orange,
.bg-orange:not([hidden]) + [hidden] + .bg-orange { margin-top: -1px; padding-top: 1px; }

/* section heading with the short underline */
.sec-title {
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(26px, 3.6vw, 52px);
	line-height: 1.4;
	letter-spacing: 0.1em;
	text-indent: 0.1em;
	text-align: center;
	margin-bottom: clamp(32px, 4vw, 64px);
}
.sec-title::after {
	content: "";
	display: block;
	width: min(215px, 40%);
	height: 4px;
	margin: 20px auto 0;
	background: currentColor;
}
.sec-title.is-orange { color: var(--orange); }
/* white on orange: macOS fattens light text, which closes up the heavy kanji; grayscale smoothing keeps them open */
.sec-title.is-white { color: #fff; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.sec-kicker {
	font-weight: 900;
	font-size: clamp(20px, 2.2vw, 32px);
	line-height: 1.4;
	letter-spacing: 0.2em;
	text-align: center;
}
.sec-lead {
	font-weight: 700;
	font-size: clamp(16px, 1.7vw, 24px);
	line-height: 1.75;
	text-align: center;
	margin-bottom: clamp(24px, 3vw, 48px);
}
.sub-title {
	font-weight: 700;
	font-size: clamp(18px, 1.7vw, 24px);
	line-height: 1.4;
	text-align: center;
	margin-bottom: 24px;
}

/* white rounded box on the orange sections */
.box {
	background: #fff;
	border-radius: 20px;
	padding: clamp(16px, 4vw, 50px);
}

/* arrow icon after a label (down; right with .btn-shop / external links) */
.arrow { position: relative; }
.arrow::after {
	content: "";
	position: absolute;
	right: clamp(12px, 2vw, 30px);
	top: 50%;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	background: currentColor;
	-webkit-mask: url("../images/icon_arrow.svg") center / contain no-repeat;
	mask: url("../images/icon_arrow.svg") center / contain no-repeat;
}
.arrow[target="_blank"]::after { transform: rotate(-90deg); }

/*-----------
fade animation
-----------*/
.fadein {
	opacity: 0;
	transform: translate(0, 30px);
	transition: opacity 0.8s, transform 0.8s;
}
.fadein.scrollin {
	opacity: 1;
	transform: translate(0, 0);
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.fadein { opacity: 1; transform: none; transition: none; }
}

/*-----------
buttons
-----------*/
/* white pill (KV) */
.pill {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 68px;
	padding: 8px 60px;
	border-radius: 100px;
	background: #fff;
	color: var(--navy);
	font-weight: 700;
	font-size: 20px;
	line-height: 1.3;
	text-align: center;
}

/* shop buttons and the PV button on product cards */
.btn-shop, .btn-pv {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 40px;
	padding: 4px 36px;
	border-radius: 8px;
	background: var(--orange);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.3;
	text-align: center;
}
.btn-shop.arrow::after { right: 12px; width: 14px; height: 14px; margin-top: -7px; }
.btn-pv { background: var(--navy); gap: 8px; }
.btn-pv::before {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: url("../images/icon_play.svg") center / contain no-repeat;
	mask: url("../images/icon_play.svg") center / contain no-repeat;
}

/*-----------
page top
-----------*/
.pagetop {
	position: fixed;
	right: clamp(12px, 1.5vw, 29px);
	bottom: clamp(12px, 1.5vw, 29px);
	z-index: 9;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: clamp(64px, 6vw, 100px);
	aspect-ratio: 1;
	border: 4px solid var(--orange);
	border-radius: 50%;
	background: #fff;
	color: var(--orange);
	font-family: var(--font-num);
	font-weight: 700;
	font-size: clamp(13px, 1.2vw, 20px);
	line-height: 1.2;
	opacity: 0;
	pointer-events: none;
}
.pagetop.visible { opacity: 1; pointer-events: auto; }
.pagetop::before {
	content: "";
	width: 1.25em;
	height: 1.25em;
	background: currentColor;
	-webkit-mask: url("../images/icon_top.svg") center / contain no-repeat;
	mask: url("../images/icon_top.svg") center / contain no-repeat;
}

/* CMS text: a line break in content.json is a line break on the page */
.product .name, .dev .name, .news-body p, .schedule-list .text, .campaign-about p { white-space: pre-line; }

/*-----------
loader
-----------*/
/* hides the font swap and late images on first view; final.js fades it out when everything is in.
   The animation is the fallback: it goes away by itself after 5s if the script never runs. */
.loader {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: grid;
	place-items: center;
	background: var(--orange-bg);
	animation: loader-out 0.4s 5s forwards;
}
.loader img { width: 120px; animation: float 5s ease-in-out infinite; }
.is-loaded .loader { opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s; }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .loader img { animation: none; } }
