/* Reset & Base styles */

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

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

body {
	font-family: var(--font-serif);
	font-size: var(--text-base);
	line-height: var(--leading-relaxed);
	color: var(--color-sumi);
	background-color: var(--color-paper);
	font-feature-settings: "palt" 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

a {
	color: var(--color-tetsu);
	text-decoration: none;
	transition: color 0.2s;
}

a:hover {
	color: var(--color-shu);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-serif);
	font-weight: 500;
	line-height: var(--leading-tight);
}

h1 {
	font-size: var(--text-4xl);
	letter-spacing: 0.06em;
}

h2 {
	font-size: var(--text-3xl);
	letter-spacing: 0.08em;
}

h3 {
	font-size: var(--text-2xl);
	letter-spacing: 0.06em;
}

h4 {
	font-size: var(--text-xl);
}

p {
	margin-bottom: var(--space-4);
}

p:last-child {
	margin-bottom: 0;
}

ul,
ol {
	list-style: none;
}

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

button,
input,
select,
textarea {
	font-family: inherit;
	font-size: inherit;
}

/* Focus styles for accessibility */
:focus-visible {
	outline: 2px solid var(--color-shu);
	outline-offset: 2px;
}

/* Skip link */
.skip-link {
	position: absolute;
	top: -100%;
	left: 0;
	z-index: 9999;
	padding: var(--space-2) var(--space-4);
	background: var(--color-sumi);
	color: var(--color-paper);
	font-family: var(--font-sans);
	font-size: var(--text-sm);
}

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

/* Responsive font sizes */
@media (max-width: 768px) {
	h1 {
		font-size: var(--text-3xl);
	}

	h2 {
		font-size: var(--text-2xl);
	}

	h3 {
		font-size: var(--text-xl);
	}
}
