/*
 * WIM — Base / Reset
 *
 * 軽量リセット + 基本要素のタイポグラフィ。
 * design-system.css のトークンに依存。
 *
 * @package WIM
 */

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

html {
	-webkit-text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	min-height: 100vh;
	background-color: var(--wim-bg);
	color: var(--wim-ink);
	font-family: var(--wim-font-sans);
	font-size: var(--wim-fs-body);
	line-height: var(--wim-lh-body);
	letter-spacing: var(--wim-ls-body);
}

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--wim-space-5);
	font-family: var(--wim-font-serif);
	font-weight: var(--wim-weight-bold);
	color: var(--wim-ink);
	line-height: var(--wim-lh-heading);
	letter-spacing: var(--wim-ls-heading);
}

h1 { font-size: var(--wim-fs-h1); line-height: var(--wim-lh-display); }
h2 { font-size: var(--wim-fs-h2); }
h3 { font-size: var(--wim-fs-h3); }
h4 { font-size: var(--wim-fs-h4); }
h5 { font-size: var(--wim-fs-h5); }
h6 { font-size: var(--wim-fs-h6); }

/* ---- Paragraphs / inline ---- */
p {
	margin: 0 0 var(--wim-space-5);
}

strong, b {
	font-weight: var(--wim-weight-bold);
}

small {
	font-size: var(--wim-fs-caption);
}

/* ---- Links ---- */
a {
	color: var(--wim-ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	transition: color var(--wim-dur-base) var(--wim-ease);
}
a:hover,
a:focus-visible {
	color: var(--wim-gold-dark);
}

a.wim-focus:focus-visible,
button.wim-focus:focus-visible,
input.wim-focus:focus-visible,
textarea.wim-focus:focus-visible,
select.wim-focus:focus-visible,
:focus-visible {
	outline: var(--wim-focus-ring);
	outline-offset: var(--wim-focus-offset);
}

/* ---- Lists ---- */
ul, ol {
	margin: 0 0 var(--wim-space-5);
	padding-left: var(--wim-space-6);
}

li + li {
	margin-top: var(--wim-space-2);
}
/* grid / flex レイアウトの ul 内では兄弟マージンを打ち消す
   （cases / people-band / services など、カードを並べる grid の縦ズレ防止）*/
ul[role="list"] > li + li,
ul.wim-cases__grid > li + li,
ul.wim-people-band__grid > li + li,
ul.wim-services__grid > li + li {
	margin-top: 0;
}

/* ---- Media ---- */
img, svg, video, canvas, picture {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ---- Forms ---- */
button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
	background: none;
	border: 0;
	padding: 0;
}

/* ---- Code ---- */
code, kbd, samp, pre {
	font-family: var(--wim-font-mono);
	font-size: 0.95em;
}

pre {
	overflow-x: auto;
	padding: var(--wim-space-5);
	background-color: var(--wim-bg-dark-tech);
	color: var(--wim-ink-inverse);
	border-radius: var(--wim-radius-md);
	line-height: 1.6;
}

/* ---- Tables ---- */
table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: var(--wim-space-6);
}

th, td {
	padding: var(--wim-space-3) var(--wim-space-4);
	border-bottom: var(--wim-rule);
	text-align: left;
}

/* ---- Horizontal rule ---- */
hr {
	border: 0;
	border-top: var(--wim-rule);
	margin: var(--wim-space-7) 0;
}

/* ---- Selection ---- */
::selection {
	background-color: var(--wim-gold-soft);
	color: var(--wim-ink);
}

/* ---- WP screen-reader-text (a11y) ---- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background-color: var(--wim-bg-paper);
	border-radius: var(--wim-radius-sm);
	box-shadow: var(--wim-shadow-md);
	clip: auto !important;
	clip-path: none;
	color: var(--wim-ink);
	display: block;
	font-size: var(--wim-fs-body);
	font-weight: var(--wim-weight-bold);
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: var(--wim-z-toast);
}

/* ---- Skip link ---- */
.skip-link {
	left: -9999px;
	position: absolute;
	top: 8px;
	z-index: var(--wim-z-toast);
}
.skip-link:focus {
	left: 8px;
	background: var(--wim-bg-paper);
	color: var(--wim-ink);
	padding: var(--wim-space-3) var(--wim-space-5);
	border-radius: var(--wim-radius-sm);
	box-shadow: var(--wim-shadow-md);
	text-decoration: none;
}

/* ---- Container utility ---- */
.wim-container {
	width: 100%;
	max-width: var(--wim-container-content);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--wim-gutter);
	padding-right: var(--wim-gutter);
}

.wim-container--wide  { max-width: var(--wim-container-max); }
.wim-container--narrow{ max-width: var(--wim-container-narrow); }
.wim-container--prose { max-width: var(--wim-container-prose); }

/* ---- Section padding utility ---- */
.wim-section {
	padding-top: var(--wim-section-y);
	padding-bottom: var(--wim-section-y);
}
.wim-section--lg {
	padding-top: var(--wim-section-y-lg);
	padding-bottom: var(--wim-section-y-lg);
}
.wim-section--dark {
	background-color: var(--wim-bg-dark-tech);
	color: var(--wim-ink-inverse);
}
.wim-section--dark h1,
.wim-section--dark h2,
.wim-section--dark h3,
.wim-section--dark h4 {
	color: var(--wim-ink-inverse);
}

/* ---- Type utilities ---- */
.wim-serif { font-family: var(--wim-font-serif); }
.wim-sans  { font-family: var(--wim-font-sans);  }
.wim-mono  { font-family: var(--wim-font-mono);  }

.wim-meta-label {
	font-family: var(--wim-font-sans);
	font-size: var(--wim-fs-meta);
	font-weight: var(--wim-weight-medium);
	letter-spacing: var(--wim-ls-meta);
	text-transform: uppercase;
	color: var(--wim-muted);
	margin: 0;
}

.wim-lead {
	font-size: var(--wim-fs-lead);
	line-height: var(--wim-lh-body);
}

.wim-text-gradient {
	background: var(--wim-gradient-tech);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

/* ---- Layout helpers ---- */
.wim-flex { display: flex; }
.wim-grid { display: grid; }
.wim-hidden { display: none !important; }

@media (max-width: 767px) {
	.wim-hide-mobile { display: none !important; }
}
@media (min-width: 768px) {
	.wim-hide-desktop { display: none !important; }
}
