/* ============================================
   technan.net  トップページ
   色や大きさは、ここの「設定」だけ変えればOK
   ============================================ */

/* マルミーニャ：fonts フォルダにファイルを入れると自動で使われる */
@font-face {
  font-family: "MaruMinya";
  src: url("fonts/x12y12pxMaruMinya.woff2") format("woff2");
  font-display: swap;
}

/* でんきチップ：ウインドウの名前用（SIL OFL 1.1 / fonts/OFL.txt） */
@font-face {
  font-family: "DenkiChip";
  src: url("fonts/x8y12pxDenkiChip.woff2") format("woff2");
  font-display: swap;
}

/* ---------- 設定 ---------- */
:root {
  --bg:        #6a6e6c;  /* ページの背景 */
  --win:       #f4f4f4;  /* ウインドウの中身 */
  --titlebar:  #80899f;  /* ウインドウの帯と枠線（少し青みのグレー） */
  --title-light:#c4c4c4; /* 帯の色を明るくしたもの（矢印のマウスオーバーなど） */
  --title-text:#f4f6fa;  /* 帯の文字 */
  --flash:     #eeeeee;  /* ウインドウが開く時の光の色 */
  /* 開く動きの種類：
     ease-in-out    … コマの間をなめらかにつなぐ
     steps(1, end)  … コマ送り（GIFと同じカクカクした動き） */
  --flash-ease: ease-in-out;
  --line:      var(--titlebar);  /* 枠線（帯と同じ色） */
  --header-line: #2b2e33; /* 上部メニューの下の線 */
  --shadow:    #3b3f47;  /* ウインドウの影 */
  --outer-line: #ffffff; /* ウインドウの外側の細い線 */
  --links-bg:  #3b3f47;  /* LINKSウインドウの中の背景 */
  --text:      #2e2e2e;  /* 文字 */
  --sub:       #707070;  /* 薄い文字（日付など） */
  --accent:    #4a4a4a;  /* マウスを乗せた時など */

  --pixel: "MaruMinya", sans-serif;      /* ドット書体 */
  --title-font: "DenkiChip", "MaruMinya", sans-serif;  /* ウインドウの名前 */  /* ウインドウの名前 */
  --mono:  "M PLUS 1 Code", "Consolas", monospace;       /* 等幅書体 */

  --bar-h: 38px;   /* ウインドウの帯の高さ */
  --border: 4px;   /* ウインドウの枠線の太さ（マルミーニャ24px表示の2ドット分） */
  --gap: 24px;     /* ウインドウ同士のすき間 */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* 太字は使わない（ドットが潰れるため） */
h1, h2, h3, h4, h5, h6, b, strong, th { font-weight: normal; }

html { background: var(--bg); }
body {
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* うっすら方眼の背景（デスクトップっぽさ） */
  background-image:
    linear-gradient(rgba(255,255,255,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 24px 24px;
  /* 背景は画面に固定し、スクロールに合わせてゆっくり動かす（script.js） */
  background-attachment: fixed;
}
a { color: inherit; }

/* ---------- ヘッダー ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 36px;
  background: var(--win);
  border-bottom: var(--border) solid var(--header-line);
}
.logo img {
  display: block;
  height: 40px;              /* 元画像100px → 40px（ドット1つ＝8px） */
  image-rendering: pixelated;
}
.menu { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.menu a {
  font-family: var(--pixel);
  font-size: 24px;
  text-decoration: none;
  letter-spacing: .04em;
  padding: 0 2px;
}
.menu a:hover { background: var(--accent); color: var(--win); }
/* まだページがないメニュー（グレーアウト） */
.menu .disabled {
  font-family: var(--pixel);
  font-size: 24px;
  letter-spacing: .04em;
  padding: 0 2px;
  color: #b8b8b8;
  cursor: default;
}

/* ---------- 全体の配置 ---------- */
.desktop {
  flex: 1;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 36px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 3fr);
  gap: var(--gap) 36px;
  align-items: start;
}
.side { display: flex; flex-direction: column; gap: var(--gap); }

/* ---------- ウインドウ共通 ---------- */
.window {
  position: relative;
  background: var(--win);
  border: var(--border) solid var(--line);
  /* 外側の細い白線（2px）＋右下の影 */
  box-shadow: 0 0 0 2px var(--outer-line), 6px 6px 0 var(--shadow);
  /* ---- 開くアニメーション（全体 .53秒：縦に広がる部分は約.25秒） ----
     縦棒 → 縮んで小さな正方形 → 横に伸びる
     → 縦に広がりながら、光の色が帯・枠線の色に変わり、中身も現れる */
  --delay: calc(var(--order) * .15s + .1s);
  animation: win-shape .53s backwards;
  animation-timing-function: var(--flash-ease);
  animation-delay: var(--delay);
}
/* 光（ウインドウの上にかぶせて、だんだん透明になる） */
.window::after {
  content: "";
  position: absolute;
  inset: calc(var(--border) * -1);
  pointer-events: none;
  z-index: 10;
  animation: win-flash .53s backwards;
  animation-timing-function: var(--flash-ease);
  animation-delay: var(--delay);
}
@keyframes win-shape {
  0%   { clip-path: polygon(calc(50% - 2px) 30%, calc(50% + 2px) 30%, calc(50% + 2px) 70%, calc(50% - 2px) 70%); }
  22.6% { clip-path: polygon(calc(50% - 2px) calc(50% - 2px), calc(50% + 2px) calc(50% - 2px), calc(50% + 2px) calc(50% + 2px), calc(50% - 2px) calc(50% + 2px)); }
  52.8% { clip-path: polygon(-2px calc(50% - 2px), calc(100% + 6px) calc(50% - 2px), calc(100% + 6px) calc(50% + 2px), -2px calc(50% + 2px)); }
  100% { clip-path: polygon(-2px -2px, calc(100% + 6px) -2px, calc(100% + 6px) calc(100% + 6px), -2px calc(100% + 6px)); }
}
@keyframes win-flash {
  0%, 52.8% { background-color: var(--flash); }
  100%    { background-color: transparent; }
}

.titlebar {
  height: var(--bar-h);
  font-family: var(--title-font);
  font-size: 24px;   /* 12ドットの書体なので、24px＝2倍 */
  line-height: 1;
  padding: 0 10px;
  display: flex;
  align-items: center;
  color: var(--title-text);
  background: var(--titlebar);
}
/* 帯の右側の飾りボタン（Macのボタンを左右反転したイメージ）
   右端の四角が緑、そこから左へ 黄緑・マゼンタ を影で描いている */
.titlebar::after {
  content: "";
  flex: none;
  width: 12px; height: 12px;
  margin-left: auto;
  margin-right: 4px;
  background: #36f897;
  box-shadow: -18px 0 0 #cff439, -36px 0 0 #de39f4;
  opacity: .7;   /* 少し控えめに */
}

/* ---------- PICK UP ---------- */
.pickup {
  position: relative;
  aspect-ratio: 1232 / 706;   /* Steamのメインカプセルと同じ比率 */
  overflow: hidden;
  background: #cfcfcf;
}
.slides { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  display: block;
  opacity: 0;
  transition: opacity .4s;
  text-decoration: none;
  pointer-events: none;
}
.slide.active { opacity: 1; pointer-events: auto; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide .placeholder {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-family: var(--pixel);
  font-size: 24px;
  color: var(--sub);
  background:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(0,0,0,.04) 12px 24px),
    #dedede;
}
.slide .caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 72px 12px;
  background: rgba(46,46,46,.82);
  color: #f4f4f4;
  font-size: 15px;
}
.slide.has-image .caption { transform: translateY(100%); transition: transform .2s; }
.slide.has-image:hover .caption { transform: none; }
.slide .caption b { font-family: var(--pixel); font-size: 24px; font-weight: normal; display: block; line-height: 1.2; }

.arrow {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 72px;
  font-family: var(--pixel);
  font-size: 48px; line-height: 1;
  color: #ffffff;   /* 矢印の色 */
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2;
}
.arrow:hover { color: var(--title-light); }
.prev { left: 16px; }
.next { right: 16px; }

.dots {
  position: absolute; top: 12px; right: 16px;
  display: flex; gap: 8px; z-index: 2;
}
.dots button {
  width: 12px; height: 12px;
  border: none;
  background: var(--win);
  box-shadow: 0 0 0 2px rgba(0,0,0,.15);
  cursor: pointer;
}
.dots button.active { background: var(--titlebar); }

/* ---------- PROFILE ---------- */
.profile { display: flex; gap: 16px; padding: 16px; align-items: center; }
.icon {
  flex: none;
  width: 96px; height: 96px;
  background: #dedede;
  overflow: hidden;
}
.icon img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.icon.empty::before {
  content: "icon";
  display: grid; place-items: center; height: 100%;
  font-family: var(--pixel); color: var(--sub);
}
.profile .name { font-family: var(--pixel); font-size: 24px; line-height: 1.2; }
.profile .role { font-size: 14px; white-space: nowrap; }
.profile .note { color: var(--sub); font-size: 13px; }

/* ---------- NEWS ---------- */
.news-list {
  list-style: none;
  max-height: 264px;
  overflow-y: auto;
  padding: 6px 0;
}
.news-list li { border-bottom: 2px dashed #c4c4c4; }
.news-list li:last-child { border-bottom: none; }
.news-item {
  display: flex; gap: 14px;
  padding: 7px 16px;
  text-decoration: none;
}
.news-item time { color: var(--sub); flex: none; font-variant-numeric: tabular-nums; }
.news-item .text { flex: 1; }
a.news-item .text::after { content: " ↗"; color: var(--sub); }
a.news-item:hover { background: var(--accent); color: var(--win); }
a.news-item:hover time, a.news-item:hover .text::after { color: #cfcfcf; }
.news-empty { padding: 10px 16px; color: var(--sub); }

/* ---------- LINKS ---------- */
.win-body.links {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 4px; padding: 14px 12px;
  background: var(--links-bg);   /* 暗い背景にして、白いロゴをそのまま置く */
}
.links a {
  display: grid; place-items: center;
  width: 64px; height: 64px;
  text-decoration: none;
  color: var(--title-text);
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  opacity: .85;
}
/* アイコンは32×32ドットで描いて、2倍（64px）で表示 */
.links a img { width: 64px; height: 64px; image-rendering: pixelated; display: block; }
.links a:hover { opacity: 1; transform: translateY(-2px); }

/* ---------- フッター ---------- */
.site-footer {
  text-align: center;
  padding: 12px;
  color: #e8eaee;
  font-size: 13px;
}


/* ==================================================
   下層ページ共通
   ================================================== */
.menu a.current { background: var(--titlebar); color: var(--title-text); }

.page {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.en { color: var(--sub); font-size: 13px; }

/* ---------- CONTACT ---------- */
.contact { padding: 28px 32px 32px; }
.contact-intro p + p { margin-top: 4px; }
.contact-intro .en { margin-top: 10px; }
.mail { }
.mail:hover { background: var(--titlebar); color: var(--title-text); }

.contact-form { margin-top: 28px; }
.reply-note { font-size: 13px; color: var(--sub); margin-bottom: 12px; }

.field { display: block; margin-bottom: 24px; max-width: 640px; }
.field span {
  display: block;
  font-family: var(--pixel);
  font-size: 24px;
  line-height: 1.2;
}
.field input,
.field textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: var(--border) solid var(--line);
  padding: 8px 4px;
  resize: vertical;
  border-radius: 0;
}
.field-message { max-width: none; }
.field input:focus,
.field textarea:focus {
  outline: none;
  background: #e8e8e8;
  border-bottom-color: var(--titlebar);
}
.trap { position: absolute; left: -9999px; }

.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.send {
  font-family: var(--pixel);
  font-size: 24px;
  line-height: 1;
  padding: 10px 28px 12px;
  color: var(--title-text);
  background: var(--titlebar);
  box-shadow: 4px 4px 0 var(--shadow);
  border: var(--border) solid var(--line);
  cursor: pointer;
}
.send:hover { filter: brightness(1.08); }
.send:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }
.send:disabled { opacity: .6; cursor: wait; }
.form-error { color: #8a2f2f; font-size: 14px; }

.form-done { margin-top: 28px; padding: 24px; background: #e8e8e8; }
.done-title { font-family: var(--pixel); font-size: 24px; line-height: 1.3; margin-bottom: 6px; }
.form-done .demo { margin-top: 8px; color: var(--sub); font-size: 13px; }

/* ---------- ガイドラインへのリンク ---------- */
.guide-link { display: block; text-decoration: none; }
.guide-link .win-body { padding: 18px 24px; }
.guide-title { font-family: var(--pixel); font-size: 24px; line-height: 1.3; }
.guide-title span { float: right; }
.guide-link:hover .win-body { background: #e8e8e8; }


/* ---------- ABOUT ---------- */
.about-head + .about-sec { margin-top: 32px; }
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: 24px 48px;
  padding: 32px 36px 40px;
}
.about-main { grid-column: 1; grid-row: 1; }
.about-icon {
  grid-column: 2; grid-row: 1;
  align-self: start;
  position: sticky; top: 24px;
  width: 288px; height: 288px;
  background: #444;
  overflow: hidden;
}
.about-icon img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.about-icon.empty::before {
  content: "icon";
  display: grid; place-items: center; height: 100%;
  font-family: var(--pixel); font-size: 24px; color: #999;
}

.about-name { font-family: var(--pixel); font-size: 48px; line-height: 1.15; }
.about-name span { color: var(--sub); }
.about-role { font-family: var(--pixel); font-size: 24px; line-height: 1.4; margin-top: 6px; }
.about-role.sub { margin-top: 2px; color: var(--sub); font-family: var(--mono); font-size: 14px; }
.about-intro p + p { margin-top: 16px; }

.about-sec { margin-top: 40px; }
.about-sec h2 {
  font-family: var(--pixel);
  font-size: 24px;
  font-weight: normal;
  line-height: 1.2;
  padding-bottom: 6px;
  margin-bottom: 14px;
  border-bottom: var(--border) solid var(--line);
}
.about-sec p + p { margin-top: 8px; }

.history { list-style: none; }
.history li { display: flex; gap: 20px; padding: 6px 0; border-bottom: 2px dashed #d0d0d0; }
.history li:last-child { border-bottom: none; }
.history time { flex: none; width: 6em; color: var(--sub); font-variant-numeric: tabular-nums; }
.history a::after { content: " ↗"; color: var(--sub); }
.history a:hover { background: var(--titlebar); color: var(--title-text); }

.tools {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  border-top: 2px dashed #d0d0d0;
}
.tools dt, .tools dd { padding: 7px 0; border-bottom: 2px dashed #d0d0d0; }
.tools dt { color: var(--sub); padding-right: 32px; }

.to-contact {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--pixel);
  font-size: 24px;
  line-height: 1;
  padding: 10px 24px 12px;
  text-decoration: none;
  color: var(--title-text);
  background: var(--titlebar);
  border: var(--border) solid var(--line);
  box-shadow: 4px 4px 0 var(--shadow);
}
.to-contact:hover { filter: brightness(1.08); }

.site-footer .credit { margin-left: 1.5em; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: #fff; }

/* ---------- 画面が狭いとき（仮のスマホ対応） ---------- */
@media (max-width: 960px) {
  .site-header { flex-direction: column; align-items: flex-start; padding: 16px 20px; }
  .menu { gap: 4px 18px; }
  .desktop { grid-template-columns: 1fr; padding: 20px; }
  .page { padding: 20px; }
  .contact { padding: 20px; }
  .about { grid-template-columns: 1fr; padding: 20px; }
  .about-icon { grid-column: 1; grid-row: 1; position: static; width: 160px; height: 160px; }
  .about-main { grid-row: 2; }
  .about-name { font-size: 36px; }
}

/* 動きを減らす設定の人にはアニメーションなし */
@media (prefers-reduced-motion: reduce) {
  .window { animation: none; }
  .window::after { display: none; }
}
