/* Rakuen Interactive — site styles. No build step, no third-party requests. */

@font-face {
	font-family: "Fredoka";
	src: url("/assets/fonts/Fredoka-Variable.ttf") format("truetype");
	font-weight: 300 700;
	font-display: swap;
}

:root {
	color-scheme: light;
	--paper: #ffffff;
	--soft: #f6f7f9;
	--line: #e7e9ee;
	--ink: #15171c;
	--muted: #5c6370;
	--link: #0a6fd6;

	/* the six letters of the logo */
	--red: #fd4743;
	--yellow: #febe06;
	--blue: #0a9ffe;
	--green: #30bc4f;
	--orange: #fe8005;
	--purple: #883bf4;
	--rainbow: linear-gradient(90deg, var(--red) 0 16.66%, var(--yellow) 0 33.33%, var(--blue) 0 50%, var(--green) 0 66.66%, var(--orange) 0 83.33%, var(--purple) 0);

	/* Blast Arena */
	--night: #0c1424;
	--blast: #ffa31a;
	--arena: #2fd0f0;

	--display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
	--text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--wrap: 1080px;
	--gutter: clamp(20px, 5vw, 40px);
	--radius: 20px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 17px/1.6 var(--text);
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- header / footer ---------- */

.site-header { border-top: 4px solid transparent; border-image: var(--rainbow) 1; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand img { height: 42px; width: auto; }

.nav { display: flex; gap: clamp(14px, 3vw, 30px); font-family: var(--display); font-weight: 500; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--ink); }

.site-footer { margin-top: clamp(64px, 10vw, 120px); border-top: 1px solid var(--line); background: var(--soft); font-size: 15px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding-block: 32px; }
.site-footer img { height: 34px; width: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer small { flex-basis: 100%; font-size: 14px; }

/* ---------- shared pieces ---------- */

.eyebrow { font-family: var(--display); font-weight: 500; font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.btn {
	display: inline-flex; align-items: center; gap: 10px;
	font-family: var(--display); font-weight: 600; font-size: 17px; line-height: 1;
	padding: 15px 24px; border-radius: 999px; border: 2px solid var(--ink);
	background: var(--ink); color: #fff; text-decoration: none;
	transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.soon { border-style: dashed; cursor: default; }
.btn.soon:hover { transform: none; }

.section { padding-top: clamp(56px, 9vw, 104px); }
.section > .wrap > h2 { font-size: clamp(28px, 4.4vw, 40px); margin-top: 10px; }

/* ---------- studio home ---------- */

.hero { padding-top: clamp(48px, 9vw, 112px); }
.hero h1 { font-size: clamp(40px, 8vw, 84px); max-width: 12ch; }
.hero h1 span:nth-child(1) { color: var(--red); }
.hero h1 span:nth-child(2) { color: var(--blue); }
.hero h1 span:nth-child(3) { color: var(--purple); }
.hero p { margin-top: 22px; max-width: 52ch; font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); }

.game-card {
	display: grid; grid-template-columns: 1.25fr 1fr; margin-top: 28px;
	border-radius: var(--radius); overflow: hidden; background: var(--night); color: #fff; text-decoration: none;
	transition: transform 0.2s ease;
}
.game-card:hover { transform: translateY(-4px); }
.game-card .art { aspect-ratio: 3 / 2; width: 100%; height: 100%; object-fit: cover; }
.game-card .body { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: clamp(24px, 4vw, 44px); }
.game-card .logo { width: min(240px, 70%); }
.game-card p { color: #c6cfdd; }
.game-card .more { font-family: var(--display); font-weight: 600; color: var(--arena); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.facts > div { padding-top: 18px; border-top: 4px solid var(--c, var(--ink)); }
.facts h3 { font-size: 21px; }
.facts p { margin-top: 8px; color: var(--muted); font-size: 16px; }

.contact { margin-top: 28px; padding: clamp(24px, 4vw, 40px); background: var(--soft); border-radius: var(--radius); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.contact p { max-width: 46ch; color: var(--muted); }

/* ---------- Blast Arena page ---------- */

.game-hero { position: relative; background: var(--night); color: #fff; overflow: hidden; }
.game-hero .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.game-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 20, 36, 0.25) 0%, rgba(12, 20, 36, 0.55) 55%, var(--night) 100%); }
.game-hero .wrap { position: relative; z-index: 1; padding-block: clamp(56px, 11vw, 132px) clamp(36px, 6vw, 64px); text-align: center; }
.game-hero .logo { width: min(520px, 82%); margin-inline: auto; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45)); }
.game-hero h1 { font-size: clamp(24px, 4vw, 38px); margin-top: 18px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); }
.game-hero .lede { margin: 12px auto 0; max-width: 46ch; color: #dbe3f0; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }
.game-hero .cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.game-hero .btn { background: var(--blast); border-color: var(--blast); color: #1a1205; }
.game-hero .btn.soon { background: rgba(12, 20, 36, 0.6); border-color: rgba(255, 255, 255, 0.7); color: #fff; }

.dark { background: var(--night); color: #fff; }
.dark .eyebrow { color: var(--arena); }

.trailer { padding-bottom: clamp(56px, 9vw, 96px); }
.trailer video { width: 100%; aspect-ratio: 1280 / 590; border-radius: var(--radius); background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 30px 60px rgba(0, 0, 0, 0.45); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.features > div { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.features .n { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.12em; color: var(--c, var(--orange)); }
.features h3 { font-size: 22px; margin-top: 8px; }
.features p { margin-top: 8px; color: var(--muted); font-size: 16px; }

.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 28px; }
.shots a { display: block; border-radius: 14px; overflow: hidden; background: var(--night); }
.shots img { width: 100%; aspect-ratio: 800 / 369; object-fit: cover; transition: transform 0.25s ease; }
.shots a:hover img { transform: scale(1.03); }

.arenas { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.arenas li { font-family: var(--display); font-weight: 500; padding: 9px 16px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); }

.know { margin-top: 28px; display: grid; grid-template-columns: auto 1fr; gap: clamp(18px, 4vw, 36px); align-items: start; padding: clamp(24px, 4vw, 40px); background: var(--soft); border-radius: var(--radius); }
.know img { width: clamp(84px, 14vw, 128px); border-radius: 22.5%; }
.know dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 0; }
.know dt { font-family: var(--display); font-weight: 600; }
.know dd { margin: 0; color: var(--muted); }

/* ---------- documents: privacy, terms, support ---------- */

.doc { max-width: calc(760px + var(--gutter) * 2); padding-top: clamp(40px, 7vw, 80px); }
.doc h1 { font-size: clamp(34px, 6vw, 52px); }
.doc .meta { margin-top: 12px; color: var(--muted); font-size: 15px; }
.doc .summary { margin-top: 28px; padding: 22px 24px; background: var(--soft); border-radius: 16px; border-left: 4px solid var(--blue); }
.doc h2 { font-size: 25px; margin-top: 48px; scroll-margin-top: 24px; }
.doc h3 { font-size: 19px; margin-top: 28px; }
.doc p, .doc ul, .doc ol, .doc table { margin-top: 14px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li + li { margin-top: 6px; }
.doc .toc { margin-top: 28px; padding: 0; list-style: none; columns: 2; column-gap: 32px; font-size: 16px; }
.doc .toc li { margin: 0 0 6px; break-inside: avoid; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
.doc th { font-family: var(--display); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 560px; }

details { border-bottom: 1px solid var(--line); padding: 16px 0 16px 1.3em; }
details summary { font-family: var(--display); font-weight: 600; font-size: 19px; cursor: pointer; list-style-position: outside; }
details p:first-of-type { margin-top: 10px; }

.notfound { text-align: center; padding-block: clamp(72px, 14vw, 160px); }
.notfound h1 { font-size: clamp(64px, 16vw, 140px); background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound p { margin: 12px 0 28px; color: var(--muted); }

/* ---------- small screens ---------- */

@media (max-width: 760px) {
	body { font-size: 16px; }
	.brand img { height: 34px; }
	.game-card { grid-template-columns: 1fr; }
	.facts, .features { grid-template-columns: 1fr; }
	.shots { grid-template-columns: 1fr; }
	.know { grid-template-columns: 1fr; }
	.know dl { grid-template-columns: 1fr; gap: 2px; }
	.know dd { margin-bottom: 12px; }
	.doc .toc { columns: 1; }
}

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