/* ==========================================================================
   Foundation
   共通変数・リセット・ベースタイポグラフィ
   ========================================================================== */

:root {
  /* Color - Base */
  --color-bg: #f7f6f2;
  --color-bg-alt: #e8eae7;
  --color-white: #ffffff;

  /* Color - Main */
  --color-text: #1f292b;
  --color-text-soft: #4a5457;
  --color-text-on-dark: #f7f6f2;

  /* Color - Accent */
  --color-accent: #52756f;
  --color-accent-dark: #3d5852;

  /* Color - Border */
  --color-border: rgba(31, 41, 43, 0.14);
  --color-border-soft: rgba(31, 41, 43, 0.08);

  /* Font */
  --font-jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-en: "Inter", "Helvetica Neue", Arial, sans-serif;

  /* Font size */
  --fs-body: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --fs-small: 0.8125rem;
  --fs-lead: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  --fs-h1: clamp(2rem, 1.55rem + 2.5vw, 3.375rem);
  --fs-h2: clamp(1.5rem, 1.3rem + 1.1vw, 2.25rem);
  --fs-h3: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --fs-label: clamp(0.8125rem, 0.78rem + 0.2vw, 0.875rem);

  /* Line height */
  --lh-heading: 1.4;
  --lh-body: 1.85;

  /* Spacing */
  --space-section: clamp(4.5rem, 3.5rem + 4vw, 8rem);
  --space-block: clamp(2.5rem, 2rem + 2vw, 4rem);

  /* Layout */
  --content-width: 75rem; /* 1200px */
  --content-width-narrow: 48rem; /* 768px */
  --content-padding-inline: clamp(1.25rem, 4vw, 3rem);
  --header-height: 4.5rem;

  /* Radius */
  --radius-s: 0.25rem;
  --radius-m: 0.5rem;
  --radius-l: 1rem;

  /* Motion */
  --duration-fast: 160ms;
  --duration-base: 320ms;
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  /* 「整う」動きのための、精密で静かな減速カーブ（オーバーシュートなし）。
     ブランドイントロの整列・退場アニメーションで使用する。 */
  --ease-intro: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
  /* モバイルメニュー展開時に body の overflow: hidden でスクロールバーが消えても、
     横幅が変化してレイアウトジャンプが起きないようにする（未対応ブラウザは無視される）。 */
  scrollbar-gutter: stable;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  min-height: 100svh;
  font-family: var(--font-jp);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

table {
  border-collapse: collapse;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: var(--lh-heading);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Focus
   -------------------------------------------------------------------------- */

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-s);
}

/* --------------------------------------------------------------------------
   Selection
   -------------------------------------------------------------------------- */

::selection {
  background-color: var(--color-accent);
  color: var(--color-text-on-dark);
}
