/* Archivo(可変フォント 300-900 / latinサブセット)。
   OFL-1.1 ライセンス。assets/fonts/OFL.txt を参照。
   自前配信にしているのは、外部からの到着がイントロ中に重なると
   全文字の組み直しが入ってコマが飛ぶため。 */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../assets/fonts/archivo-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =========================================================
   BASE — 変数 / リセット / タイポグラフィ / 共通ユーティリティ
   ========================================================= */

:root {
  /* Color */
  --color-accent: #F5D90A;
  --color-bg: #F2F0ED;
  --color-text: #171717;
  --color-dark: #171717;
  --color-text-on-yellow: #171717;
  --color-text-on-dark: #F2F0ED;
  --color-line: rgba(23, 23, 23, 0.18);
  --color-line-strong: rgba(23, 23, 23, 0.55);
  --color-muted: rgba(23, 23, 23, 0.6);

  /* Typography */
  --font-display: "Archivo", "Helvetica Neue", Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;

  /* Layout */
  --space-section: clamp(6rem, 12vw, 11rem);
  --space-gutter: clamp(1.25rem, 4vw, 4rem);
  --nav-height: 64px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

ul,
ol {
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* アンカー移動時に固定ナビへ隠れないようにする */
main section {
  scroll-margin-top: calc(var(--nav-height) - 8px);
}

/* ---------- Focus visible ---------- */
:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

.pr :focus-visible,
.work-modal :focus-visible {
  outline-color: var(--color-accent);
}

/* ---------- Typography helpers ---------- */
.section-heading {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* ---------- Utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* JSが有効なときだけ初期非表示にする要素の目印。
   アニメーション初期状態は animations.js (GSAP) 側で設定し、
   CSSでは隠さない = JS無効環境でも全コンテンツが読める。 */
.js-reveal {
  /* ここに will-change は置かない。ページ全体の要素にGPUレイヤーを
     抱えさせ続けることになる。動かす直前だけ必要なので JS 側で扱う。 */
}

/* body に .modal-open が付いたら背景スクロールを止める */
body.modal-open {
  overflow: hidden;
}
