/* ============================================
	 FreRule合同会社 — shared styles
	 Monochrome × Grain, Swiss editorial
   ============================================ */

:root {
	
	--ff-sans: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
	--ff-jp: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
	--ff-mono: "JetBrains Mono", "Menlo", "Consolas", monospace;
	--maxw: 1480px;
	--pad-x: clamp(20px, 4vw, 64px);
	--pad-x2: clamp(20px, 6vw, 82px);
	--ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--bg: #0e0e0c;
	--bg-2: #1a1a17;
	--fg: #f5f3ee;
	--fg-muted: #8a8a85;
	--line: rgba(245, 243, 238, 0.16);
	--line-strong: rgba(245, 243, 238, 0.36);
	--grain-opacity: 0.42;
	--grain-blend: screen;
	--invert: 1;
	
}

* {
	
	margin: 0;
	padding: 0;
	
	box-sizing: border-box;
	
}

html,
body {
	
	overflow-x: hidden;
	
	background: var(--bg);
	
	color: var(--fg);
	
	font-family: var(--ff-jp);
	font-feature-settings: "palt";
	
	-webkit-font-smoothing: antialiased;
	
	text-rendering: optimizeLegibility;
	
}

body {
	
	position: relative;
	
	min-height: 100vh;
	
	transition: 
		background-color 0.4s var(--ease), 
		color 0.4s var(--ease);
	
}

/* ============================================
	 GRAIN OVERLAY — fixed full-viewport noise
   ============================================ */

.grain {
	
	display: none;
	
	/*
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 9999;
	opacity: var(--grain-opacity);
	mix-blend-mode: var(--grain-blend);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0	0 0 0 0 0	0 0 0 0 0	0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
	background-size: 240px 240px;
	*/
	
}

/* ============================================
	 TYPOGRAPHY
   ============================================ */

.mono,
.label {
	
	font-family: var(--ff-mono);
	font-weight: 400;
	font-size: 11px;
	
	letter-spacing: 0.04em;
	
	text-transform: uppercase;
	
}

.label {
	
	display: inline-flex;
	
	gap: 8px;
	
	align-items: center;
	
	color: var(--fg-muted);
	
}

.label::before {
	
	opacity: 0.6;
	
	width: 18px;
	height: 1px;
	
	background: currentColor;
	
	content: "";
	
}

.eyebrow {
	
	color: var(--fg-muted);
	
	font-family: var(--ff-mono);
	font-size: 11px;
	
	letter-spacing: 0.14em;
	
	text-transform: uppercase;
	
}

h1,
h2,
h3 {
	
	font-family: var(--ff-sans);
	font-weight: 500;
	line-height: 0.95;
	
	letter-spacing: -0.025em;
	
}

p {
	
	line-height: 1.75;
	
}

.jp {
	
	font-family: var(--ff-jp);
	
	letter-spacing: 0.02em;
	
}

/* ============================================
	 NAV
   ============================================ */

.nav {
	
	display: flex;
	
	justify-content: space-between;
	
	align-items: center;
	
	position: fixed;
	
	top: 0;
	right: 0;
	left: 0;
	
	z-index: 100;
	
	/*
	padding: 22px var(--pad-x);
	*/
	padding: 22px var(--pad-x2);
	
	color: #f5f3ee;
	
	mix-blend-mode: difference;
	
}

.nav .brand {
	
	display: flex;
	
	gap: 10px;
	
	align-items: center;
	
	color: inherit;
	
	font-family: var(--ff-sans);
	font-weight: 500;
	font-size: 18px;
	
	letter-spacing: -0.01em;
	
	text-decoration: none;
	
}

.nav .brand .dot {
	
	display: inline-block;
	
	width: 8px;
	height: 8px;
	
	border-radius: 50%;
	
	background: currentColor;
	
}

.nav .links {
	
	display: flex;
	
	gap: 28px;
	
	align-items: center;
	
	font-family: var(--ff-mono);
	font-size: 11px;
	
	letter-spacing: 0.12em;
	
	text-transform: uppercase;
	
}

.nav .links a {
	
	opacity: 0.7;
	
	position: relative;
	
	padding: 4px 0;
	
	color: inherit;
	
	text-decoration: none;
	
	transition: opacity 0.3s var(--ease);
	
}

.nav .links a:hover,
.nav .links a[aria-current="page"] {
	
	opacity: 1;
	
}

.nav .links a::after {
	
	position: absolute;
	
	bottom: 0;
	left: 0;
	
	transform: scaleX(0);
	transform-origin: left center;
	
	width: 100%;
	height: 1px;
	
	background: currentColor;
	
	content: "";
	
	transition: transform 0.4s var(--ease);
	
}

.nav .links a:hover::after,
.nav .links a[aria-current="page"]::after {
	
	transform: scaleX(1);
	
}

.nav .clock {
	
	opacity: 0.7;
	
	font-family: var(--ff-mono);
	font-size: 11px;
	
	letter-spacing: 0.08em;
	
}

@media (max-width: 720px) {
	
	.nav {
		
		padding: 16px 20px;
		
	}
	
	.nav .links {
		
		gap: 14px;
		
		font-size: 10px;
		
	}
	
	.nav .clock {
		
		display: none;
		
	}
	
}

/* ============================================
	 FOOTER
   ============================================ */

.footer {

	position: relative;

	z-index: 2;

	padding: 80px var(--pad-x) 36px;

}

.footer::before {

	position: absolute;

	top: 0;
	left: 50%;

	transform: translateX(-50%);

	width: calc(100% - 2 * var(--pad-x));
	height: 1px;

	max-width: calc(var(--maxw) - 2 * var(--pad-x));

	background: var(--line);

	content: "";

}

.footer .row {
	
	display: grid;
	
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 40px;

	margin: 0 auto;

	max-width: calc(var(--maxw) - 2 * var(--pad-x));
	
}

.footer .big {
	
	grid-column: 1 / -1;

	margin: 0 auto 48px;

	max-width: calc(var(--maxw) - 2 * var(--pad-x));
	
	font-family: var(--ff-sans);
	font-weight: 500;
	font-size: clamp(48px, 10vw, 160px);
	line-height: 0.9;
	
	letter-spacing: -0.04em;
	
}

.footer h4 {
	
	margin-bottom: 16px;
	
	color: var(--fg-muted);
	
	font-family: var(--ff-mono);
	font-size: 11px;
	font-weight: 400;
	
	letter-spacing: 0.14em;
	
	text-transform: uppercase;
	
}

.footer ul {
	
	list-style: none;
	
}

.footer li {
	
	margin-bottom: 10px;
	
	font-size: 14px;
	
}

.footer a {
	
	border-bottom: 1px solid transparent;
	
	color: var(--fg);
	
	text-decoration: none;
	
	transition: border-color 0.3s var(--ease);
	
}

.footer a:hover {
	
	border-color: var(--fg);
	
}

.footer .meta {
	
	display: flex;
	
	justify-content: space-between;

	max-width: calc(var(--maxw) - 2 * var(--pad-x));

	margin: 64px auto 0;
	
	padding-top: 24px;
	
	border-top: 1px solid var(--line);
	
	color: var(--fg-muted);
	
	font-family: var(--ff-mono);
	font-size: 11px;
	
	letter-spacing: 0.1em;
	
	text-transform: uppercase;
	
}

@media (max-width: 720px) {
	
	.footer .row {
		
		grid-template-columns: 1fr 1fr;
		
	}
	
	.footer .meta {
		
		flex-direction: column;
		gap: 10px;
		
	}
	
}

/* ============================================
	 COMMON SECTIONS
   ============================================ */

.page {
	
	position: relative;
	
	z-index: 1;
	
	padding-top: 30px; /* clear nav */
	
}

.section {
	
	margin: 0 auto;
	
	padding: clamp(80px, 12vh, 160px) var(--pad-x);
	
	max-width: var(--maxw);
	
}

.divider {
	
	margin: 0;
	
	border: none;
	border-top: 1px solid var(--line);
	
}

/* ============================================
	 BUTTONS / LINKS
   ============================================ */

.btn {
	
	display: inline-flex;
	
	gap: 12px;
	
	align-items: center;
	
	position: relative;
	
	padding: 18px 26px;
	
	overflow: hidden;
	
	border: none;
	
	background: var(--fg);
	
	color: var(--bg);
	
	font-family: var(--ff-mono);
	font-size: 12px;
	
	letter-spacing: 0.14em;
	
	text-decoration: none;
	
	text-transform: uppercase;
	
	cursor: pointer;
	
	transition: transform 0.4s var(--ease);
	
}

.btn:hover {
	
	transform: translateY(-2px);
	
}

.btn .arrow {
	
	display: inline-block;
	
	transition: transform 0.4s var(--ease);
	
}

.btn:hover .arrow {
	
	transform: translateX(6px);
	
}

.btn-ghost {
	
	border: 1px solid var(--line-strong);
	
	background: transparent;
	
	color: var(--fg);
	
}

.link-arrow {
	
	display: inline-flex;
	
	gap: 10px;
	
	align-items: center;
	
	padding-bottom: 4px;
	
	border-bottom: 1px solid var(--fg);
	
	color: var(--fg);
	
	font-family: var(--ff-mono);
	font-size: 12px;
	
	letter-spacing: 0.12em;
	
	text-decoration: none;
	
	text-transform: uppercase;
	
	transition: gap 0.3s var(--ease);
	
}

.link-arrow:hover {
	
	gap: 18px;
	
}

/* ============================================
	 SCROLL REVEAL
   ============================================ */

[data-reveal] {
	
	opacity: 0;
	transform: translateY(40px);
	
	transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
	
}

[data-reveal].in {
	
	opacity: 1;
	transform: translateY(0);
	
}

[data-reveal="char"] {
	
	display: inline-block;
	
}

[data-reveal-stagger] > * {
	
	opacity: 0;
	
	transform: translateY(28px);
	
	transition: 
		opacity 0.9s var(--ease-out), 
		transform 0.9s var(--ease-out);
	
}

[data-reveal-stagger].in > * {
	
	opacity: 1;
	
	transform: translateY(0);
	
}

[data-reveal-stagger].in > *:nth-child(2) {
	
	transition-delay: 0.08s;
	
}

[data-reveal-stagger].in > *:nth-child(3) {
	
	transition-delay: 0.16s;
	
}

[data-reveal-stagger].in > *:nth-child(4) {
	
	transition-delay: 0.24s;
	
}

[data-reveal-stagger].in > *:nth-child(5) {
	
	transition-delay: 0.32s;
	
}

[data-reveal-stagger].in > *:nth-child(6) {
	
	transition-delay: 0.40s;
	
}
