/*
 * 株式会社HINANO コーポレートサイト 本体CSS
 * 前半：元HTML「HINANO コーポレートサイト.dc.html」の <helmet><style> を忠実に移植。
 * 後半：Servicesタブ・Privacyモーダル・モバイルドロワー・レスポンシブを追加（由来をコメントで明記）。
 */

/* ============================================================
 * 1. 元 <style> の移植（keyframes / hover / reveal 基盤）
 * ============================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; } /* sticky nav の高さ分だけアンカーをずらす */
body { margin: 0; }
::selection { background: oklch(0.82 0.17 58); color: oklch(0.16 0.02 250); }

@keyframes hinanoGlow {
  0%   { transform: translate(-8%, -6%) scale(1); opacity: .55; }
  50%  { transform: translate(10%, 8%) scale(1.15); opacity: .8; }
  100% { transform: translate(-8%, -6%) scale(1); opacity: .55; }
}
@keyframes hinanoGlow2 {
  0%   { transform: translate(6%, 4%) scale(1.1); opacity: .5; }
  50%  { transform: translate(-10%, -8%) scale(1); opacity: .75; }
  100% { transform: translate(6%, 4%) scale(1.1); opacity: .5; }
}
@keyframes hinanoScan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(2200%); }
}
input::placeholder, textarea::placeholder { color: oklch(0.6 0.01 60); }

@keyframes hinanoRise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes hinanoFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes hinanoFloat { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(1.5deg); } }
@keyframes hinanoSpinGlow { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes hinanoMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes hinanoShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes hinanoPulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.9); opacity: 0; } }
@keyframes hinanoDash { to { stroke-dashoffset: 0; } }
@keyframes hinanoGrid { from { transform: translateY(0); } to { transform: translateY(58px); } }
@keyframes hinanoDrift { 0%,100% { transform: translateX(-2%); } 50% { transform: translateX(2%); } }
@keyframes hinanoHueSweep { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
.hinano-gradtext { background: linear-gradient(100deg, oklch(0.86 0.16 58), oklch(0.78 0.2 40), oklch(0.88 0.14 70), oklch(0.86 0.16 58)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: hinanoHueSweep 6s linear infinite; }

.hinano-ticker-track { display: inline-flex; gap: 0; white-space: nowrap; animation: hinanoMarquee 34s linear infinite; }
#assets img, #message img { transition: transform .7s cubic-bezier(.2,.7,.2,1); }
[data-lift]:hover img { transform: scale(1.06); }
[data-hline] { transform-origin: left center; transform: scaleX(0); transition: transform 1s cubic-bezier(.2,.7,.2,1); }
[data-hline].hinano-inview { transform: scaleX(1); }
[data-magnet] { transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .28s ease; }
.hinano-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 60; background: linear-gradient(90deg, oklch(0.82 0.17 58), oklch(0.7 0.19 40)); box-shadow: 0 0 12px oklch(0.82 0.17 58 / 0.8); transition: width .1s linear; }
.hinano-tabword { position: relative; overflow: hidden; }
@keyframes hinanoAurora { 0% { transform: translate(-15%,-10%) rotate(0deg) scale(1.2); } 33% { transform: translate(12%,8%) rotate(120deg) scale(1.35); } 66% { transform: translate(-8%,12%) rotate(240deg) scale(1.15); } 100% { transform: translate(-15%,-10%) rotate(360deg) scale(1.2); } }
@keyframes hinanoLineUp { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes hinanoSweep { 0% { transform: translateX(-120%) skewX(-18deg); } 100% { transform: translateX(320%) skewX(-18deg); } }
.hinano-line-mask { display: block; overflow: hidden; }
.hinano-line-mask > span { display: inline-block; animation: hinanoLineUp .95s cubic-bezier(.16,.9,.28,1) both; }
.hinano-line-mask:nth-child(1) > span { animation-delay: .12s; }
.hinano-line-mask:nth-child(2) > span { animation-delay: .30s; }
[data-tilt] { transform-style: preserve-3d; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease; will-change: transform; }
[data-tilt] > * { transform: translateZ(0); }
.hinano-shine { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
[data-tilt]:hover .hinano-shine { opacity: 1; }
.hinano-shine::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, oklch(1 0 0 / 0.16), transparent); animation: hinanoSweep 1.1s cubic-bezier(.2,.7,.2,1); }
[data-clip] { clip-path: inset(0 100% 0 0); transition: clip-path 1.05s cubic-bezier(.16,.9,.28,1); }
[data-clip].hinano-inview { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) { [data-clip] { clip-path: none !important; } .hinano-line-mask > span { animation: none !important; } }

.hinano-navlink { position: relative; transition: color .25s ease; }
.hinano-navlink::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: oklch(0.82 0.17 58); transition: right .3s cubic-bezier(.2,.7,.2,1); }
.hinano-navlink:hover { color: oklch(0.97 0.01 60) !important; }
.hinano-navlink:hover::after { right: 0; }

/* CTA・送信ボタンは hover で浮き上がる（マウス追従は廃止したので hover の状態変化で統一）。
   ヒーローの2ボタンは [data-magnet]、CF7 送信ボタンは input[type=submit] = .wpcf7-submit。 */
a[data-magnet], button[type="submit"], .hinano-cf7 .wpcf7-submit, a[href^="http"] { transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s ease, letter-spacing .28s ease; }
a[data-magnet]:hover, button[type="submit"]:hover, .hinano-cf7 .wpcf7-submit:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -12px oklch(0.72 0.17 58 / 0.75); }

[data-lift] { transition: transform .38s cubic-bezier(.2,.7,.2,1), box-shadow .38s ease, border-color .38s ease; will-change: transform; }
[data-lift]:hover { transform: translateY(-7px); box-shadow: 0 26px 50px -30px oklch(0.2 0.06 250 / 0.85); border-color: oklch(0.6 0.1 58 / 0.7); }

@keyframes hinanoHeroIn { from { transform: translateY(20px); } to { transform: translateY(0); } }
[data-hero-wrap] > * { animation: hinanoHeroIn .9s cubic-bezier(.2,.7,.2,1) both; }
[data-hero-wrap] > *:nth-child(1) { animation-delay: .05s; }
[data-hero-wrap] > *:nth-child(2) { animation-delay: .18s; }
[data-hero-wrap] > *:nth-child(3) { animation-delay: .32s; }
[data-hero-wrap] > *:nth-child(4) { animation-delay: .46s; }
[data-hero-wrap] > *:nth-child(5) { animation-delay: .60s; }
@media (prefers-reduced-motion: reduce) { [data-hero-wrap] > *, [data-reveal] { opacity: 1 !important; animation: none !important; } }

/* ============================================================
 * 2. Servicesタブ（元 renderVals().tabStyle をCSSクラス化）
 * ============================================================ */
.hinano-tab { display: inline-flex; align-items: center; gap: 8px; font-family: 'Zen Kaku Gothic New', sans-serif; font-weight: 500; font-size: 14px; padding: 11px 20px; border-radius: 999px; cursor: pointer; transition: all .2s ease; border: 1px solid oklch(0.88 0.01 60); background: #fff; color: oklch(0.4 0.012 60); }
.hinano-tab__n { font-family: 'Space Grotesk', monospace; font-size: 11px; opacity: 0.7; }
.hinano-tab:hover { border-color: oklch(0.72 0.15 58 / 0.6); }
.hinano-tab.is-active { border: 1px solid oklch(0.72 0.15 58); background: oklch(0.17 0.022 250); color: oklch(0.96 0.01 60); }

/* Servicesパネル（元 #svc-panel を1カテゴリ1枚に。.is-active のみ表示） */
.hinano-svc-panel { display: none; }
.hinano-svc-panel.is-active { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(24px,4vw,56px); align-items: start; background: #fff; border: 1px solid oklch(0.9 0.01 60); border-radius: 24px; padding: clamp(28px,4vw,52px); box-shadow: 0 30px 60px -40px oklch(0.4 0.05 250 / 0.4); }

/* ============================================================
 * 3. Privacyモーダル（元 <sc-if privacyOpen> を常時出力 + .is-open トグル）
 * ============================================================ */
.hinano-privacy.is-open { display: flex !important; }
.hinano-privacy__dialog { animation: hinanoRise .5s cubic-bezier(.2,.7,.2,1) both; }
body.hinano-no-scroll { overflow: hidden; }

/* ============================================================
 * 4. モバイルドロワー（a2b 流に追加。元はドロワー無し）
 * ============================================================ */
.hinano-menubtn { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; align-items: center; justify-content: center; background: transparent; border: none; cursor: pointer; padding: 0; }
.hinano-menubtn span { width: 24px; height: 2px; background: oklch(0.92 0.01 60); display: block; border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.hinano-menubtn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hinano-menubtn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hinano-menubtn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hinano-drawer { position: fixed; inset: 0; z-index: 90; background: oklch(0.12 0.02 250 / 0.6); backdrop-filter: blur(8px); display: none; }
.hinano-drawer.is-open { display: block; }
.hinano-drawer__panel { position: absolute; top: 0; right: 0; height: 100%; width: min(82vw, 330px); background: oklch(0.15 0.02 250); display: flex; flex-direction: column; gap: 2px; padding: 88px 28px 40px; box-shadow: -20px 0 60px -30px oklch(0 0 0 / 0.8); }
.hinano-drawer__panel a { font-family: 'Zen Kaku Gothic New', sans-serif; font-size: 18px; color: oklch(0.92 0.01 60); text-decoration: none; padding: 15px 2px; border-bottom: 1px solid oklch(0.3 0.02 250); display: flex; align-items: baseline; gap: 10px; }
.hinano-drawer__panel a span { font-family: 'Space Grotesk', monospace; font-size: 11px; letter-spacing: 0.1em; color: oklch(0.7 0.1 58); text-transform: uppercase; }
.hinano-drawer__cta { margin-top: 22px; justify-content: center; background: oklch(0.82 0.17 58); color: oklch(0.16 0.02 250) !important; border-radius: 999px; border-bottom: none !important; font-weight: 700; padding: 15px 0 !important; }

/* ============================================================
 * 5. レスポンシブ
 * ============================================================ */
@media (max-width: 820px) {
  .hinano-desknav { display: none !important; }
  .hinano-menubtn { display: flex; }
}
/* ============================================================
 * 6. Contact Form 7（ダークテーマに合わせて整形）
 *    CF7 の出力マークアップを .hinano-cf7 配下で元フォームの見た目に寄せる。
 * ============================================================ */
.hinano-cf7 .wpcf7-form { margin: 0; }
.hinano-cf7 .hinano-cf7-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; background: oklch(0.2 0.025 250 / 0.55); border: 1px solid oklch(0.4 0.03 250 / 0.5); border-radius: 22px; padding: clamp(24px,4vw,40px); }
.hinano-cf7 label { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.hinano-cf7 .hinano-cf7-full { grid-column: span 2; }
.hinano-cf7 .hinano-cf7-label { font-size: 12px; letter-spacing: 0.06em; color: oklch(0.78 0.01 60); }
.hinano-cf7 .hinano-cf7-label em { color: oklch(0.82 0.16 58); font-style: normal; }
.hinano-cf7 .wpcf7-form-control-wrap { display: block; }
.hinano-cf7 input[type="text"],
.hinano-cf7 input[type="email"],
.hinano-cf7 input[type="tel"],
.hinano-cf7 select,
.hinano-cf7 textarea { width: 100%; font-family: inherit; font-size: 14px; padding: 13px 16px; border-radius: 12px; border: 1px solid oklch(0.42 0.03 250 / 0.7); background: oklch(0.16 0.02 250); color: oklch(0.96 0.008 60); outline: none; }
.hinano-cf7 textarea { resize: vertical; }
.hinano-cf7 input:focus,
.hinano-cf7 select:focus,
.hinano-cf7 textarea:focus { border-color: oklch(0.72 0.15 58); }
.hinano-cf7 .hinano-cf7-submit { grid-column: span 2; display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 6px; }
.hinano-cf7 .wpcf7-submit { width: auto; font-family: 'Zen Kaku Gothic New',sans-serif; font-weight: 700; font-size: 15px; padding: 15px 48px; border: none; border-radius: 999px; background: oklch(0.82 0.17 58); color: oklch(0.16 0.02 250); cursor: pointer; }
.hinano-cf7 .wpcf7-submit:disabled { opacity: 0.6; cursor: default; }
.hinano-cf7 .wpcf7-spinner { background-color: oklch(0.82 0.17 58); margin: 0; }
/* エラーチップ・バリデーション */
.hinano-cf7 .wpcf7-not-valid-tip { color: oklch(0.82 0.17 30); font-size: 12px; margin-top: 4px; }
.hinano-cf7 .wpcf7-not-valid { border-color: oklch(0.7 0.19 30) !important; }
/* 応答メッセージ（送信完了・エラー） */
.hinano-cf7 .wpcf7-response-output { margin: 20px 0 0 !important; padding: 16px 20px !important; border-radius: 14px !important; font-size: 14px; line-height: 1.7; color: oklch(0.96 0.008 60); border: 1px solid oklch(0.82 0.17 58 / 0.6) !important; background: oklch(0.2 0.025 250 / 0.6); }
.hinano-cf7 .wpcf7-mail-sent-ok { border-color: oklch(0.82 0.17 58 / 0.7) !important; }
.hinano-cf7 .wpcf7-validation-errors,
.hinano-cf7 .wpcf7-mail-sent-ng,
.hinano-cf7 .wpcf7-aborted { border-color: oklch(0.7 0.19 30 / 0.7) !important; }

@media (max-width: 820px) {
  /* お問い合わせフォームを1カラム化（大型スマホ〜小型タブレットで各入力欄が全幅になる）。
     grid-column: span 2 を持つ要素（-full と -submit の両方）を span 1 に戻さないと、
     1カラム化しても暗黙の2列目が生成され通常セルが潰れるため、両方を明示的に戻す。 */
  .hinano-cf7 .hinano-cf7-grid { grid-template-columns: 1fr; }
  .hinano-cf7 .hinano-cf7-full,
  .hinano-cf7 .hinano-cf7-submit { grid-column: span 1; }
}

@media (max-width: 640px) {
  /* 会社概要：スマホでは項目名を上・内容を下に縦積み。
     左カラムが minmax(120px,190px) 固定で、狭い画面だと左が広く右の値が潰れるため
     （インライン style を上書きするので !important を付ける）。 */
  .hinano-company-row { grid-template-columns: 1fr !important; gap: 4px !important; }
}

/* ============================================================
 * 7. 法務ページ（page-mennohosomichi-privacy.php ＝ アプリ「麺の細道」プライバシーポリシー）
 *    本文マークアップには class を付けず、ここの子孫セレクタだけで体裁を当てる。
 *    本文HTMLを申請内容と一字一句同一に保つため（テンプレート側コメント参照）。
 *    トップLPに副作用が出ないよう .hinano-legal 配下限定の新規名前空間にしている。
 * ============================================================ */
.hinano-legal { padding: clamp(48px,7vw,88px) clamp(20px,5vw,64px) clamp(64px,8vw,104px); background: oklch(0.985 0.006 60); }
.hinano-legal__body { max-width: 820px; margin: 0 auto; }

.hinano-legal h1 {
  font-family: 'Zen Kaku Gothic New', sans-serif; font-weight: 900;
  font-size: clamp(26px,4vw,38px); line-height: 1.35; letter-spacing: 0.01em;
  color: oklch(0.2 0.02 250); margin: 0 0 28px; padding-bottom: 18px;
  border-bottom: 2px solid oklch(0.82 0.17 58);
}
.hinano-legal h2 {
  font-family: 'Zen Kaku Gothic New', sans-serif; font-weight: 700;
  font-size: clamp(17px,2.2vw,20px); line-height: 1.55;
  color: oklch(0.22 0.02 60); margin: 44px 0 12px; padding-left: 14px;
  border-left: 3px solid oklch(0.82 0.17 58);
}
.hinano-legal p {
  font-size: 15px; line-height: 1.95; color: oklch(0.35 0.012 60); margin: 0 0 16px;
}
.hinano-legal ul { margin: 0 0 16px; padding-left: 1.4em; }
.hinano-legal li {
  font-size: 15px; line-height: 1.95; color: oklch(0.35 0.012 60); margin-bottom: 4px;
}
.hinano-legal li::marker { color: oklch(0.72 0.15 58); }
.hinano-legal strong { font-weight: 700; color: oklch(0.24 0.015 60); }
.hinano-legal a { color: oklch(0.5 0.15 45); text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.hinano-legal a:hover { color: oklch(0.62 0.17 50); }

/* 冒頭のアプリ名・提供者・制定日ブロック（h1 直後の p）をカード状にして本文と区別する */
.hinano-legal h1 + p {
  background: #fff; border: 1px solid oklch(0.9 0.01 60); border-radius: 14px;
  padding: 18px 22px; margin-bottom: 28px; font-size: 14px; line-height: 1.9;
}
