/* ==========================================================================
   base.css — reset, CSS variables, base typography
   ========================================================================== */

:root {
	--color-primary: #0B4F8A;
	--color-primary-dark: #083B66;
	--color-primary-light: #EAF4FB;

	/* Brand-strength neutrals: white / black / dark-gray / light-gray only.
	   Blue stays reserved for CTA / links / accents (see docs/design-system.md). */
	--color-black: #14171A;
	--color-gray-900: #1D2226;
	--color-gray-700: #4A5056;
	--color-gray-100: #F1F3F5;

	/* Kept for backward compatibility with earlier markup; now mapped onto
	   the black/blue pairing instead of red so urgency reads as "confident",
	   not "alarm". */
	--color-accent-emergency: var(--color-black);
	--color-accent-emergency-dark: var(--color-primary);

	--color-text: #222222;
	--color-text-light: #666666;
	--color-white: #FFFFFF;
	--color-bg: #F5F7F9;
	--color-border: #E1E6EA;

	--container-width: 1280px;
	--container-width-narrow: 960px;
	--container-pad: clamp(16px, 4vw, 40px);

	--font-family-base: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
	--font-family-en: "Inter", var(--font-family-base);

	--fs-h1: clamp(28px, 4vw, 44px);
	--fs-h2: clamp(24px, 3vw, 34px);
	--fs-h3: clamp(20px, 2.4vw, 26px);
	--fs-body: 16px;
	--fs-small: 14px;

	/* Large display type for the brand-forward top-page sections. */
	--fs-display: clamp(42px, 7vw, 96px);
	--fs-display-sm: clamp(30px, 4.5vw, 56px);
	--fs-eyebrow: 13px;
	--tracking-eyebrow: 0.18em;

	--lh-body: 1.8;
	--lh-heading: 1.4;
	--lh-display: 1.15;

	--space-xs: 8px;
	--space-sm: 16px;
	--space-md: 24px;
	--space-lg: 48px;
	--space-xl: 80px;
	--space-2xl: 120px;

	/* Section rhythm for the redesigned top page: generous, PC-first. */
	--space-section-pc: clamp(100px, 10vw, 160px);
	--space-section-sp: clamp(64px, 16vw, 100px);

	--radius: 4px;
	--radius-lg: 8px;

	--shadow-sm: 0 1px 3px rgba(20, 30, 40, 0.08);
	--shadow-md: 0 8px 24px rgba(20, 30, 40, 0.12);

	--header-height: 96px;
	--header-height-sp: 64px;
	--mobile-cta-height: 60px;

	--admin-bar-offset: 0px;
}

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

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

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

body {
	margin: 0;
	font-family: var(--font-family-base);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	color: var(--color-text);
	background: var(--color-white);
	overflow-x: hidden;
	padding-bottom: var(--mobile-cta-height);
}

@media (min-width: 768px) {
	body {
		padding-bottom: 0;
	}
}

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

iframe {
	max-width: 100%;
	border: 0;
}

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

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	line-height: var(--lh-heading);
	font-weight: 700;
	color: var(--color-text);
}

p {
	margin: 0 0 1em;
}

a {
	color: var(--color-primary);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

button {
	font-family: inherit;
	cursor: pointer;
}

table {
	width: 100%;
	border-collapse: collapse;
}

:focus-visible {
	outline: 3px solid var(--color-primary);
	outline-offset: 2px;
}

.c-skip-link {
	position: absolute;
	left: 0;
	top: -100px;
	background: var(--color-primary-dark);
	color: var(--color-white);
	padding: var(--space-sm) var(--space-md);
	z-index: 1000;
	transition: top 0.2s ease;
}

.c-skip-link:focus {
	top: 0;
}
