/* =========================================================
   ハヤラボ ホームページ — スタイルシート
   デザイン原本: _design/ハヤラボ v2.dc.html（Claude Design）
   色・余白の調整はこのファイルだけを触れば済むようにしています。
   ========================================================= */

:root {
  /* --- 色 --- */
  --sky:        #7cdbe0;   /* 空・ファーストビュー */
  --sky-light:  #8fe3e8;
  --ink:        #23282d;   /* 基本の黒（枠線・文字） */
  --ink-deep:   #101315;   /* さらに濃い黒（影・二重枠） */
  --ink-soft:   #4a4636;   /* 本文グレー */
  --yellow:     #ffcc33;   /* アクセント */
  --cream:      #f7f1e1;   /* 生成りの背景 */
  --grass:      #7cc253;   /* 草地の背景 */
  --sand:       #e6d3a3;   /* 砂地の背景 */
  --gold:       #8a6400;   /* 小見出しラベル */

  /* --- 文字 --- */
  --font-pixel: 'DotGothic16', monospace;
  --font-body:  'Zen Kaku Gothic New', sans-serif;

  /* --- 箱の質感（ドット絵風の硬い影） --- */
  --border:     3px solid var(--ink);
  --shadow-sm:  4px 4px 0 rgba(16, 19, 21, .35);
  --shadow-card:6px 6px 0 var(--ink);
  --shadow-lg:  8px 8px 0 var(--ink);
}

/* ---------- 基本 ---------- */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sky);
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--ink); }
::selection { background: var(--yellow); color: var(--ink); }

img { max-width: 100%; }
.pixel { image-rendering: pixelated; }

/* hidden属性を付けた要素は必ず消す。
   これが無いと、display:flex などを指定した要素（お問い合わせフォーム）は
   hidden を付けても消えず、送信完了後もフォームが残ってしまう。 */
[hidden] { display: none !important; }

.page { overflow-x: hidden; position: relative; }

/* 線路を描くSVG（main.js が中身を生成する） */
#track {
  position: absolute; top: 0; left: 0;
  pointer-events: none; z-index: 5; overflow: visible; display: none;
}

/* ---------- アニメーション ---------- */
@keyframes tilePop  { 0%{transform:scale(0) translateY(30px);opacity:0} 70%{transform:scale(1.08) translateY(-3px);opacity:1} 100%{transform:scale(1) translateY(0);opacity:1} }
@keyframes floatY   { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-14px)} }
@keyframes bobY     { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
@keyframes drift    { 0%{transform:translateX(0)} 100%{transform:translateX(110vw)} }
@keyframes blink    { 0%,60%{opacity:1} 61%,100%{opacity:0} }
@keyframes marquee  { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
@keyframes spinBlock{ 0%,100%{transform:rotate(-6deg) translateY(0)} 50%{transform:rotate(6deg) translateY(-18px)} }
@keyframes smokeRise{ 0%{opacity:.95;transform:translate(0,0) scale(1)} 100%{opacity:0;transform:translate(-16px,-42px) scale(1.9)} }
@keyframes trainBob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-2px)} }

/* ---------- ヘッダー（HUD） ---------- */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; pointer-events: none;
}

.hud__panel {
  background: var(--ink); color: #fff;
  padding: 8px 12px;
  border: 3px solid var(--ink-deep);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-pixel); font-size: 13px;
}

.hud__logo {
  pointer-events: auto;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
}
.hud__logo:hover { color: #fff; }

.hud__chip { width: 12px; height: 12px; background: var(--yellow); display: inline-block; }

.hud__logo-text {
  font-family: var(--font-pixel); font-size: 18px;
  letter-spacing: .08em; white-space: nowrap;
}

.hud__meter { display: flex; gap: 8px; align-items: center; }
.hud__meter-label { color: #9aa4ad; }
.hud__meter-value { min-width: 44px; display: inline-block; }
.hud__meter img { width: 14px; height: 14px; }

.hud__nav {
  pointer-events: auto; margin-left: auto;
  display: none; gap: 6px;
}
.hud__nav a { color: #fff; padding: 0 6px; white-space: nowrap; }
.hud__nav a:hover { color: var(--yellow); }
.hud__nav a.is-cta { color: var(--yellow); }
.hud__nav a.is-cta:hover { color: #fff; }

@media (min-width: 861px) { .hud__nav { display: flex; } }

/* ---------- 01 ファーストビュー ---------- */
.hero {
  position: relative; min-height: 100vh;
  background: linear-gradient(var(--sky-light), var(--sky) 70%);
  display: flex; flex-direction: column; justify-content: flex-end;
}

.hero__cloud { position: absolute; left: -180px; opacity: .95; animation: drift 55s linear infinite; }
.hero__cloud--1 { top: 12%; width: 160px; }
.hero__cloud--2 { top: 30%; width: 110px; opacity: .8; animation-duration: 75s; animation-delay: -30s; }
.hero__cloud--3 { top:  6%; width:  90px; opacity: .7; animation-duration: 90s; animation-delay: -60s; }

.hero__block { position: absolute; border: 3px solid var(--ink-deep); animation: spinBlock 7s ease-in-out infinite; }
.hero__block--1 { top: 16%; right: 12%; width: 26px; height: 26px; background: var(--yellow); }
.hero__block--2 { top: 38%; left:  8%; width: 18px; height: 18px; background: #fff; animation-duration: 9s; animation-delay: -2s; }
.hero__block--3 { top: 52%; right: 24%; width: 14px; height: 14px; background: var(--yellow); opacity: .85; animation-duration: 8s; animation-delay: -4s; }

/* 地面より上の余白いっぱいに広がり、その中央にテキストを置く。
   （固定ヘッダーに隠れないよう、上の余白は下より多めにとっている） */
.hero__inner {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding: clamp(88px, 14vh, 200px) 24px 40px;
  text-align: center; box-sizing: border-box;
}

.hero__badge {
  display: inline-flex; align-items: center; align-self: center; gap: 8px;
  background: var(--ink); color: var(--yellow);
  font-family: var(--font-pixel); font-size: 14px; letter-spacing: .2em;
  padding: 6px 14px; border: 3px solid var(--ink-deep);
  box-shadow: 4px 4px 0 rgba(16, 19, 21, .3); white-space: nowrap;
}

.hero__title {
  font-family: var(--font-pixel);
  font-size: clamp(34px, 5.8vw, 74px); line-height: 1.3;
  margin: 28px 0 18px; color: var(--ink);
  text-shadow: 4px 4px 0 rgba(255, 255, 255, .55);
}
.hero__title span { white-space: nowrap; }

.hero__lead {
  font-size: clamp(15px, 1.6vw, 19px); font-weight: 500;
  color: #1d4a4e; margin: 0 0 34px; line-height: 2;
}

/* 中央のテキスト塊とは切り離し、地面のすぐ上に置く */
.hero__scroll {
  position: absolute; bottom: 100%; left: 0; right: 0;
  margin-bottom: 30px; text-align: center;
  font-family: var(--font-pixel); font-size: 14px; color: var(--ink);
  letter-spacing: .3em; animation: blink 1.4s steps(1) infinite;
}

.hero__ground { position: relative; z-index: 1; }
.hero__tree { position: absolute; bottom: 100%; }
.hero__tree--1 { left: 6%;  width: 72px; }
.hero__tree--2 { left: 13%; width: 52px; }
.hero__tree--3 { right: 9%; width: 64px; }

.hero__person {
  position: absolute; bottom: 99%; right: 22%; width: 110px;
  animation: bobY 3s ease-in-out infinite;
}

/* 画面が狭いときは、中央の「▼ SCROLL」と重ならないよう右端に寄せる。
   人物の立ち位置になる右端の木は、重なるので隠す。 */
@media (max-width: 600px) {
  .hero__person { right: 7%; width: 78px; }
  .hero__tree--3 { display: none; }
}

.hero__tiles { display: grid; grid-template-columns: repeat(14, 1fr); }
.hero__tile { height: 44px; box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .08); }

/* ---------- 流れる帯 ---------- */
.marquee {
  background: var(--ink);
  border-top: 4px solid var(--ink-deep);
  border-bottom: 4px solid var(--ink-deep);
  overflow: hidden; padding: 10px 0; position: relative; z-index: 6;
}
.marquee__track {
  display: flex; width: max-content;
  animation: marquee 26s linear infinite;
  font-family: var(--font-pixel); font-size: 16px;
  color: var(--yellow); letter-spacing: .25em;
}
.marquee__track span { padding: 0 30px; white-space: nowrap; }

/* ---------- セクション共通 ---------- */
.section { position: relative; padding: 0 24px 110px; }

/* 上辺のギザギザ（土の断面） */
.section__edge {
  height: 24px; position: absolute; left: 0; right: 0; top: -24px;
  background-repeat: repeat-x; image-rendering: pixelated;
}

.section--cream  { background: var(--cream); }
.section--grass  { background: var(--grass); }
.section--sand   { background: var(--sand); }
.section--dark   { background: var(--ink); }
.section--yellow { background: var(--yellow); }

.section--cream  .section__edge { background-image: url('assets/edge-cream.png'); }
.section--grass  .section__edge { background-image: url('assets/edge-grass.png'); }
.section--sand   .section__edge { background-image: url('assets/edge-sand.png'); }
.section--dark   .section__edge { background-image: url('assets/edge-dark.png'); }
.section--yellow .section__edge { background-image: url('assets/edge-yellow.png'); }

.section__inner { max-width: 980px; margin: 0 auto; padding-top: 90px; }
.section__inner--wide   { max-width: 1080px; }
.section__inner--narrow { max-width: 820px; text-align: center; padding-top: 100px; }
.section__inner--form   { max-width: 680px; padding-top: 100px; }

/* セクション見出しの帯（■ 04 SERVICES ---- 200m） */
.section__head { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; }
.section__head--wide { margin-bottom: 48px; }
.section__marker { width: 14px; height: 14px; background: var(--yellow); border: 3px solid var(--ink); flex-shrink: 0; }
.section__label { font-family: var(--font-pixel); font-size: 15px; letter-spacing: .2em; color: var(--ink); }
.section__rule  { flex: 1; border-top: 3px dashed #d8ccae; }
.section__dist  { font-family: var(--font-pixel); font-size: 13px; color: #a0946f; }

.section--grass  .section__rule { border-color: rgba(35, 40, 45, .3); }
.section--grass  .section__dist { color: #3e6b25; }
.section--sand   .section__rule { border-color: rgba(35, 40, 45, .25); }
.section--sand   .section__dist { color: #8d7b4d; }
.section--yellow .section__rule { border-color: rgba(35, 40, 45, .3); }
.section--yellow .section__dist { color: var(--gold); }
.section--yellow .section__marker { background: var(--ink); border: none; }
.section--dark   .section__marker { border-color: var(--ink-deep); }
.section--dark   .section__label { color: var(--yellow); }
.section--dark   .section__rule { border-color: #3d444b; }
.section--dark   .section__dist { color: #79828b; }

.section__title {
  font-family: var(--font-pixel);
  font-size: clamp(26px, 3.6vw, 42px); line-height: 1.5; margin: 0 0 20px;
}
.section__title--tight { margin-bottom: 16px; }
.section__title--loose { margin-bottom: 52px; }

.section__lead {
  font-size: 16px; line-height: 2.1; max-width: 640px;
  margin: 0 0 52px; color: var(--ink-soft);
}
.section__note { font-size: 15px; line-height: 2; color: #7a7157; margin: 0 0 48px; }

/* ---------- カード共通 ---------- */
.card {
  background: #fff;
  border: var(--border);
  box-shadow: var(--shadow-card);
  padding: 26px;
}

.card__label {
  font-family: var(--font-pixel); font-size: 13px;
  color: var(--gold); letter-spacing: .2em; margin-bottom: 10px;
}
.card__title { font-size: 17px; font-weight: 700; line-height: 1.8; }
.card__text  { font-size: 15px; line-height: 2; margin: 0; color: var(--ink-soft); }

.tag {
  background: var(--cream); border: 2px solid var(--ink);
  padding: 6px 12px; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.tag--sm { padding: 4px 10px; font-size: 12px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list--sm { gap: 6px; }

/* ---------- グリッド ---------- */
.grid { display: grid; gap: 20px; }
.grid--3   { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--2   { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: stretch; }
.grid--svc { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.grid--works { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* ---------- 03 ABOUT の運営者カード ---------- */
.about-card { padding: 28px; }
.about-card--profile { display: flex; gap: 20px; align-items: center; }
.about-card__avatar { width: 96px; flex-shrink: 0; animation: bobY 3.4s ease-in-out infinite; }
.about-card__name { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.about-card__role { font-size: 14px; line-height: 1.9; color: var(--ink-soft); }
.about-card .card__label { margin-bottom: 12px; }

/* ---------- 04 SERVICES ---------- */
.service {
  box-shadow: var(--shadow-lg);
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .15s, box-shadow .15s;
}
.service:hover { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--ink); }
.service__top { display: flex; align-items: center; justify-content: space-between; }
.service__num {
  font-family: var(--font-pixel); font-size: 30px;
  color: var(--yellow); text-shadow: 2px 2px 0 var(--ink);
}
.service__chip { width: 20px; height: 20px; border: 3px solid var(--ink); }
.service__title { font-size: 19px; font-weight: 700; line-height: 1.6; }
.service__body { font-size: 14.5px; line-height: 2; margin: 0; color: var(--ink-soft); flex: 1; }

/* ---------- 05 WORKS ---------- */
.work { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.work__tag {
  align-self: flex-start; border: 2px solid var(--ink);
  padding: 4px 10px; font-size: 12px; font-weight: 700;
  font-family: var(--font-pixel); letter-spacing: .1em;
}
.work__title { font-size: 16.5px; font-weight: 700; line-height: 1.7; }
.work__body { font-size: 14px; line-height: 1.95; margin: 0; color: var(--ink-soft); }

/* ---------- 06 PHILOSOPHY ---------- */
.philosophy__title {
  font-family: var(--font-pixel);
  font-size: clamp(28px, 4vw, 48px); line-height: 1.6;
  margin: 0 0 44px; color: #fff;
  text-shadow: 3px 3px 0 rgba(255, 204, 51, .35);
}
.philosophy__body { font-size: 16px; line-height: 2.4; color: #c8cdd2; }
.philosophy__body p { margin: 0 0 28px; }
.philosophy__body p:last-child { margin: 0; }
.philosophy__blocks { margin-top: 52px; display: flex; justify-content: center; gap: 14px; }
.philosophy__blocks span {
  width: 16px; height: 16px; border: 3px solid var(--ink-deep);
  animation: bobY 2.6s ease-in-out infinite;
}

/* ---------- 07 STEPS ---------- */
.steps { display: flex; flex-direction: column; gap: 16px; }
.step {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 22px 26px;
}
.step__num {
  font-family: var(--font-pixel); font-size: 26px;
  color: var(--yellow); text-shadow: 2px 2px 0 var(--ink);
  flex-shrink: 0; width: 52px;
}
.step__title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.step__body { font-size: 14.5px; line-height: 1.95; margin: 0; color: var(--ink-soft); }

/* ---------- 08 CONTACT ---------- */
.contact__person {
  position: absolute; left: 6%; bottom: 40px; width: 120px;
  animation: bobY 3.2s ease-in-out infinite; opacity: .9;
}
@media (max-width: 900px) { .contact__person { display: none; } }

.contact__lead { font-size: 16px; line-height: 2.1; margin: 0 0 44px; color: #4a3d10; }

.form {
  background: #fff; border: var(--border); box-shadow: var(--shadow-lg);
  padding: 36px; display: flex; flex-direction: column; gap: 20px;
}
.form__field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 700; }
.form__field input,
.form__field textarea {
  border: var(--border); padding: 12px 14px; font-size: 15px;
  font-family: inherit; background: var(--cream); outline-color: var(--yellow);
  box-sizing: border-box; width: 100%;
}
.form__field textarea { resize: vertical; }

/* 迷惑メール対策：人間には見えない囮の入力欄 */
.form__honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__submit {
  font-family: var(--font-pixel); font-size: 18px; letter-spacing: .2em;
  background: var(--ink); color: var(--yellow);
  border: 3px solid var(--ink-deep); padding: 16px; cursor: pointer;
  box-shadow: 4px 4px 0 rgba(16, 19, 21, .3);
  transition: transform .1s, box-shadow .1s, background .1s;
}
.form__submit:hover { background: var(--ink-deep); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(16, 19, 21, .3); }
.form__submit:active { transform: translate(0, 0); box-shadow: 2px 2px 0 rgba(16, 19, 21, .3); }
.form__submit[disabled] { opacity: .6; cursor: progress; }

.form__note { font-size: 12px; color: #7a7157; margin: 0; text-align: center; }
.form__error {
  margin: 0; padding: 12px 14px; font-size: 14px; line-height: 1.8;
  background: #ffe3e3; border: 2px solid #c0392b; color: #8c2b20;
}

.form-result {
  background: #fff; border: var(--border); box-shadow: var(--shadow-lg);
  padding: 48px; text-align: center;
}
.form-result__title { font-family: var(--font-pixel); font-size: 26px; margin-bottom: 14px; }
.form-result p { font-size: 15px; line-height: 2; margin: 0; color: var(--ink-soft); }

/* ---------- フッター ---------- */
.footer { position: relative; background: var(--ink); padding: 0 24px 40px; }
.footer__edge { background-image: url('assets/edge-dark.png'); }
.footer__inner {
  max-width: 980px; margin: 0 auto; padding-top: 56px;
  display: flex; flex-wrap: wrap; gap: 24px;
  align-items: center; justify-content: space-between;
}
.footer__logo { display: flex; align-items: center; gap: 10px; }
.footer__logo-text { font-family: var(--font-pixel); font-size: 20px; color: #fff; letter-spacing: .08em; }
.footer__nav { display: flex; gap: 18px; font-family: var(--font-pixel); font-size: 13px; }
.footer__nav a { color: #9aa4ad; }
.footer__nav a:hover { color: var(--yellow); }
.footer__copy { font-family: var(--font-pixel); font-size: 12px; color: #79828b; }

/* =========================================================
   下層ページ（プライバシーポリシー・運営者情報）
   トップページと同じ生成りの背景・書体。線路と汽車はなし。
   ========================================================= */

/* 固定ヘッダーの下に敷く空の帯。ここに生成りセクションの断面がのる */
.subhero {
  height: 150px;
  background: linear-gradient(var(--sky-light), var(--sky));
}

.section__inner--legal { max-width: 780px; padding-top: 72px; }

.section__inner--legal .section__title {
  font-size: clamp(24px, 3.2vw, 36px);
  margin-bottom: 18px;
}

.section__inner--legal .section__lead { margin-bottom: 12px; }

.legal { margin-top: 40px; }

.legal__heading {
  font-family: var(--font-pixel);
  font-size: 19px; line-height: 1.7;
  margin: 44px 0 14px;
  padding-left: 14px;
  border-left: 6px solid var(--yellow);
}
.legal__heading:first-child { margin-top: 0; }

.legal__text {
  font-size: 15px; line-height: 2.1;
  margin: 0 0 16px; color: var(--ink-soft);
}

.legal__list {
  margin: 0 0 16px; padding-left: 1.3em;
  font-size: 15px; line-height: 2.1; color: var(--ink-soft);
}
.legal__list li { margin-bottom: 4px; }
.legal__list li::marker { color: var(--gold); }

/* 事業者情報などの2列の表。カードと同じ硬い枠で揃える */
.legal__table {
  width: 100%; border-collapse: collapse;
  background: #fff; border: var(--border); box-shadow: var(--shadow-card);
  margin: 0 0 24px; font-size: 15px;
}
.legal__table th,
.legal__table td {
  border-top: 2px solid #e4dcc6;
  padding: 14px 18px; text-align: left; line-height: 1.9;
  vertical-align: top;
}
.legal__table tr:first-child th,
.legal__table tr:first-child td { border-top: none; }
.legal__table th {
  width: 32%; white-space: nowrap;
  background: var(--cream); font-weight: 700;
}
.legal__table td { color: var(--ink-soft); }

@media (max-width: 560px) {
  .legal__table th, .legal__table td { display: block; width: auto; }
  .legal__table td { border-top: none; padding-top: 0; }
}

/* 404ページの大きな数字 */
.notfound-code {
  font-family: var(--font-pixel);
  font-size: clamp(64px, 14vw, 130px); line-height: 1;
  color: var(--yellow); text-shadow: 5px 5px 0 var(--ink);
  margin-bottom: 24px;
}

.legal__back { margin: 56px 0 0; }
.legal__back a {
  display: inline-block;
  font-family: var(--font-pixel); font-size: 15px; letter-spacing: .1em;
  background: var(--ink); color: var(--yellow);
  border: 3px solid var(--ink-deep); padding: 12px 22px;
  box-shadow: 4px 4px 0 rgba(16, 19, 21, .3);
  transition: transform .1s, box-shadow .1s;
}
.legal__back a:hover {
  color: var(--yellow);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(16, 19, 21, .3);
}

/* ---------- スクロール表示アニメーション ---------- */
[data-reveal] { will-change: opacity, transform; }

/* 動きを減らす設定の端末では、装飾アニメーションを止める */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
