/* ------------------------------------------------------------------
   ハンケイサン — hankeisan.com
   editorial / minimal / warm cream
   ------------------------------------------------------------------ */

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

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

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

ul {
  list-style: none;
}

a {
  color: inherit;
}

/* ------------------------------------------------------------------
   Tokens
   ------------------------------------------------------------------ */
:root {
  /* Color */
  --color-bg:        #fffdf6;
  --color-text:      #1a1a18;
  --color-text-soft: #2a2a26;
  --color-muted:     #8a877d;
  --color-line:      #d8d2bf;

  /* Type */
  --font-sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN",
               "Yu Gothic", "YuGothic", "Noto Sans JP",
               system-ui, -apple-system, sans-serif;

  /* Layout */
  --site-max:   720px;
  --site-padX:  48px;
  --site-padY:  56px;
}

/* ------------------------------------------------------------------
   Base
   ------------------------------------------------------------------ */
html,
body {
  background: var(--color-bg);
  color: var(--color-text);
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.95;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #1a1a18;
  color: #fffdf6;
}

/* ------------------------------------------------------------------
   Layout container
   ------------------------------------------------------------------ */
.site {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: var(--site-padY) var(--site-padX) 40px;
  animation: fade-in 0.6s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------
   Header
   ------------------------------------------------------------------ */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px var(--site-padX);
}

.logo {
  display: inline-block;
  line-height: 0;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.65;
}

.logo img {
  height: 28px;
  width: auto;
}

/* Hamburger toggle — PC幅では非表示 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--color-text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 24px;
  font-size: 14px;
}

.nav a {
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nav a:hover {
  opacity: 0.55;
}

/* ------------------------------------------------------------------
   Hero / Catchphrase
   ------------------------------------------------------------------ */
.hero {
  margin-bottom: 80px;
}

.catchphrase {
  font-size: 21px;
  line-height: 1.9;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-text);
}

/* ------------------------------------------------------------------
   Block (section)
   ------------------------------------------------------------------ */
.block {
  margin-bottom: 56px;
}

.block-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-muted);
  margin-bottom: 18px;
  letter-spacing: 0.12em;
}

.block-body {
  font-size: 15px;
  line-height: 1.95;
  color: var(--color-text-soft);
}

/* ------------------------------------------------------------------
   Link list (やっていること)
   ------------------------------------------------------------------ */
.link-list {
  font-size: 15px;
  line-height: 1.95;
  color: var(--color-text-soft);
}

.link-list li {
  margin-bottom: 6px;
}

.link-list li:last-child {
  margin-bottom: 0;
}

.bullet {
  color: var(--color-muted);
  margin-right: 0.05em;
}

.link {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 0.5px;
  transition: opacity 0.2s ease;
}

.link:hover {
  opacity: 0.6;
}

/* ------------------------------------------------------------------
   Divider
   ------------------------------------------------------------------ */
.divider {
  border: 0;
  border-top: 0.5px solid var(--color-line);
  margin: 0 0 56px;
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px var(--site-padX);
  border-top: 0.5px solid var(--color-line);
  font-size: 12px;
  color: var(--color-muted);
  white-space: nowrap;
}

.footer a {
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.footer a:hover {
  opacity: 0.55;
}

/* ------------------------------------------------------------------
   Focus (keyboard navigation)
   ------------------------------------------------------------------ */
a:focus-visible {
  outline: 1.5px solid var(--color-text);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ------------------------------------------------------------------
   Responsive — SP: ナビをハンバーガーメニューに
   ------------------------------------------------------------------ */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    display: none;
  }

  /* 展開時：ウインドウいっぱいの黒背景オーバーレイ（コンテンツは押し下げない） */
  .nav.is-open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 50;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    padding: 96px var(--site-padX) 48px;
    background: var(--color-text);
    overflow-y: auto;
  }

  .nav.is-open a {
    width: 100%;
    padding: 12px 0;
    font-size: 20px;
    color: var(--color-bg);
  }

  /* 展開中はハンバーガー（✕）を最前面・白で固定表示 */
  .nav-toggle[aria-expanded="true"] {
    position: fixed;
    top: 28px;
    right: var(--site-padX);
    z-index: 60;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar {
    background: var(--color-bg);
  }
}

/* 展開中は背面のスクロールを固定 */
body.nav-open {
  overflow: hidden;
}

/* ------------------------------------------------------------------
   Responsive — tablet
   ------------------------------------------------------------------ */
@media (max-width: 720px) {
  :root {
    --site-padX: 32px;
    --site-padY: 40px;
  }

  .hero {
    margin-bottom: 56px;
  }

  .catchphrase {
    font-size: 18px;
    line-height: 1.95;
  }

  .block {
    margin-bottom: 44px;
  }

  .divider {
    margin-bottom: 44px;
  }
}

/* ------------------------------------------------------------------
   Responsive — mobile
   ------------------------------------------------------------------ */
@media (max-width: 480px) {
  :root {
    --site-padX: 24px;
    --site-padY: 32px;
  }

  .logo img {
    height: 24px;
  }

  .hero {
    margin-bottom: 48px;
  }

  .catchphrase {
    font-size: 16px;
    line-height: 1.95;
    letter-spacing: 0;
  }

  .block,
  .divider {
    margin-bottom: 40px;
  }

  .block-label {
    font-size: 11px;
  }

  .block-body,
  .link-list {
    font-size: 14px;
  }

  .footer {
    gap: 16px;
    font-size: 11px;
  }
}

/* ------------------------------------------------------------------
   Print
   ------------------------------------------------------------------ */
@media print {
  body {
    background: white;
    color: black;
  }
  .nav,
  .footer a {
    display: none;
  }
}
