/* ============================================================
   pan-ther.com
   トップ（index.html）：1ページ・4画面。各画面（.screen）をビューポートの
   高さに揃え、html の scroll-snap で1画面ずつ止める。
   プライバシーポリシー（privacy.html）：通常の縦長ページ（.policy）。
   ============================================================ */

:root {
  --color-bg: #ff901a;
  --color-text: #111;
  --color-muted: #3a2a1a;
  --color-navy: #183a63;
  --color-blue: #2b70b9;
  --color-pale-blue: #eaf2fb;
  --color-white: #fff;
  --font-base: Avenir, "Helvetica Neue", Arial, YuGothicM, YuGothic, Meiryo, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --edge-center: 28px;
}

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

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

/* 1画面ずつ止めるのは4画面構成のトップだけ（privacy.html は通常スクロール） */
html:has(.screen) {
  scroll-snap-type: y mandatory;
}

/* メニューを開いている間は背面をスクロールさせない */
html.is-menu-open {
  overflow: hidden;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  transition: opacity 0.3s;
}

a:hover {
  opacity: 0.6;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* ---------- 画面 ---------- */

.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100svh; /* スマホのアドレスバー伸縮で高さがずれないように */
  padding: 112px 44px calc(112px + var(--safe-bottom));
  scroll-snap-align: start;
  text-align: center;
  /* 日本語は単語の途中で折り返さず、HTML の <wbr> の位置で折り返す */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.screen-body {
  width: 100%;
  max-width: 600px;
}

.screen-title {
  margin: 0 0 48px;
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.screen p {
  margin: 0 0 16px;
}

/* 番地など、途中で折り返したくない語句 */
.nowrap {
  white-space: nowrap;
}

/* ---------- Home ---------- */

.logo {
  margin: 0;
  line-height: 0;
}

.logo img {
  width: min(240px, 60vw);
  height: auto;
}

/* ---------- 会社概要 ---------- */

.company {
  margin: 0;
}

.company-row + .company-row {
  margin-top: 20px;
}

.company dt {
  font-size: 12px;
  color: var(--color-muted);
  letter-spacing: 0.08em;
}

.company dd {
  margin: 0;
}

/* ---------- 事業内容 ---------- */

.business {
  margin: 0;
  padding: 0;
  list-style: none;
}

.business li + li {
  margin-top: 14px;
}

/* ---------- お問い合わせ ---------- */

.contact-mail {
  margin-top: 24px;
  font-size: 18px;
  letter-spacing: 0.04em;
}

.contact-mail a {
  color: var(--color-blue);
}

/* ---------- 画面下部：Scroll down / Back to home ---------- */

.scroll-next,
.back-to-home {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.scroll-next:hover,
.back-to-home:hover {
  opacity: 1;
}

/* マウスオーバーで文字間が少し広がる */
.scroll-next-label,
.back-to-home-label {
  display: inline-block;
  letter-spacing: 0.1em;
  transition: letter-spacing 0.3s ease;
  color: var(--color-muted);
}

.scroll-next:hover .scroll-next-label,
.back-to-home:hover .back-to-home-label {
  letter-spacing: 0.24em;
}

.scroll-next {
  bottom: calc(20px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-next svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--color-text);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: bounce 1.8s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(10px); }
}

/* 文字の高さを Scroll down と揃える（Scroll down の下に矢印32px分がある） */
.back-to-home {
  bottom: calc(52px + var(--safe-bottom));
  padding: 0 4px;
}

.back-to-home-label {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* ---------- 右端のドット型インジケーター ---------- */

.dots {
  position: fixed;
  top: 50%;
  right: calc(var(--edge-center) - 20px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-50%);
}

/* 見た目は8pxの丸、クリック範囲は24px四方 */
.dots-item {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
}

.dots-item::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--color-text);
  border-radius: 50%;
  transition: background-color 0.3s, transform 0.3s;
}

.dots-item[aria-current="true"]::before {
  background-color: var(--color-text);
  transform: scale(1.1);
}

.dots-item:hover {
  opacity: 1;
}

.dots-item:hover::before {
  background-color: var(--color-text);
}

/* ---------- 左上のハンバーガーメニュー ---------- */

/* 見た目は22pxの二本線、クリック範囲は40px四方 */
.menu-toggle {
  position: fixed;
  top: calc(var(--edge-center) - 20px);
  left: calc(var(--edge-center) - 20px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-text);
  cursor: pointer;
}

.menu-toggle-line {
  display: block;
  width: 22px;
  height: 1.5px;
  background-color: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 開いている間は×にする（2本の線を中央に寄せて交差させる。移動量＝(gap + 線の太さ) ÷ 2） */
.menu-toggle[aria-expanded="true"] {
  color: var(--color-navy);
}

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

.menu-toggle[aria-expanded="true"] .menu-toggle-line:nth-child(2) {
  transform: translateY(-4.75px) rotate(-45deg);
}

/* ハンバーガーの位置から円が広がって画面全体を覆う */
.menu {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column; /* 上寄せの本文と、末尾のフッター（Privacy policy・コピーライト）を縦に並べる */
  justify-content: flex-start;
  align-items: center;
  padding: 72px 24px calc(24px + var(--safe-bottom));
  overflow-y: auto;
  background-color: var(--color-pale-blue);
  color: var(--color-navy);
  clip-path: circle(0 at var(--edge-center) var(--edge-center));
  visibility: hidden;
  transition: clip-path 0.6s ease, visibility 0s linear 0.6s;
}

.menu.is-open {
  clip-path: circle(150vmax at var(--edge-center) var(--edge-center));
  visibility: visible;
  transition: clip-path 0.6s ease, visibility 0s;
}

/* 本文が短くてもフッターがメニューの下端に来るよう、本文側を伸ばす */
.menu-inner {
  flex: 1 0 auto;
  width: 100%;
  max-width: 640px;
}

.menu-body p {
  margin: 0 0 1em;
}

.menu-body p:last-child {
  margin-bottom: 0;
}

.menu-footer {
  margin-top: 48px;
  font-size: 12px;
  text-align: center;
}

.menu-footer p {
  margin: 4px 0 0;
}

.menu-title {
  margin: 0 0 32px;
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-align: center;
}

/* ---------- プライバシーポリシー（privacy.html） ---------- */

.policy {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
  background-color: var(--color-white);
  font-size: 15px;
}

.policy h1 {
  margin: 0 0 32px;
  font-size: 24px;
  text-align: center;
}

.policy h2 {
  margin: 40px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-text);
  font-size: 17px;
}

.policy h3 {
  margin: 24px 0 8px;
  font-size: 15px;
}

.policy p {
  margin: 0 0 12px;
}

.policy ol,
.policy ul {
  margin: 0 0 12px;
  padding-left: 1.6em;
}

.policy li + li {
  margin-top: 4px;
}

.policy-table-scroll {
  overflow-x: auto;
}

.policy table {
  width: 100%;
  margin: 0 0 12px;
  border-collapse: collapse;
  font-size: 13px;
}

.policy th,
.policy td {
  padding: 10px 12px;
  border: 1px solid #ccc;
  text-align: left;
  vertical-align: top;
}

.policy th {
  background-color: #f6f6f6;
  white-space: nowrap;
}

.policy-table-wide {
  min-width: 600px;
}

.policy-date {
  margin-top: 32px;
  text-align: right;
}

.policy-footer {
  margin: 32px 0;
  font-size: 12px;
  text-align: center;
}

.policy-footer p {
  margin: 8px 0 0;
}

@media (min-width: 768px) {
  :root {
    --edge-center: 40px;
  }

  .policy {
    padding: 56px 64px;
  }
}

/* ---------- 動きを減らす設定の環境 ---------- */

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

  .scroll-next svg {
    animation: none;
  }

  .menu,
  .menu.is-open,
  .menu-toggle-line,
  .scroll-next-label,
  .back-to-home-label {
    transition: none;
  }
}
