/*
Theme Name: JAPAN KN STORE Modern LP
Author: NATSUKO KOUNO
Description: JAPAN KN STORE向けのシンプルでモダンな1ページ型WordPressテーマ。事業概要、理念、サービス、運営者情報、プライバシーポリシーを掲載します。
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: japan-kn-store-modern-lp
*/

/* ------------------------------------------------------------
   基本設定：紺と白を軸に、朱をわずかに差す
------------------------------------------------------------ */
:root {
  --paper: #f6f5f1;
  --surface: #ffffff;
  --ink: #1a1f2b;
  --muted: #5d6474;
  --line: #e2e0d9;
  --navy: #1b2d52;
  --navy-soft: #2b4579;
  --navy-deep: #121d36;
  --shu: #c8402f;
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font-jp: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  --font-mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --font-en: "Jost", "Helvetica Neue", Arial, sans-serif;
  --header-h: 84px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; transition: color .3s var(--ease); }
a:hover { color: var(--navy-soft); }
img { max-width: 100%; height: auto; }
::selection { background: var(--navy); color: #fff; }
section[id] { scroll-margin-top: 72px; }
a[href^="tel:"] { font-family: var(--font-en); letter-spacing: .06em; }
h1 {
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1.4;
  letter-spacing: .06em;
  margin: 0 0 24px;
  font-feature-settings: "palt";
}

.container { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }

/* ------------------------------------------------------------
   ヘッダー
------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s, box-shadow .4s;
  animation: fadeDown .9s var(--ease) backwards;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(18, 29, 54, .06); }
.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  transition: min-height .45s var(--ease);
}
.is-scrolled .header-inner { min-height: 64px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: .18em;
  color: var(--navy);
  position: relative;
  z-index: 60;
}
.brand::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--shu); }
.brand:hover { color: var(--navy); }
.nav { display: flex; gap: 36px; font-size: .9rem; letter-spacing: .1em; }
.nav a { position: relative; padding: 6px 0; color: var(--ink); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav a:hover { color: var(--navy); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; }

/* ------------------------------------------------------------
   ファーストビュー
------------------------------------------------------------ */
.hero { position: relative; overflow: hidden; padding: 104px 0 150px; background: var(--paper); }
.hero-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(27, 45, 82, .07) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  animation: linesDraw 1.8s var(--ease) .2s backwards;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 72px; align-items: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-en);
  font-weight: 500;
  font-size: .78rem;
  line-height: 1.4;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--navy);
}
.eyebrow::before { content: ""; flex: none; width: 36px; height: 1px; background: var(--shu); transform-origin: left; }
.hero .eyebrow { animation: fadeUp .9s var(--ease) .1s both; }

.hero-title {
  font-size: clamp(2.5rem, 5.4vw, 4.6rem);
  line-height: 1.38;
  letter-spacing: .08em;
  margin: 28px 0 32px;
  color: var(--ink);
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero-title .line > span { display: inline-block; animation: lineUp 1.2s var(--ease) both; }
.hero-title .line:nth-child(1) > span { animation-delay: .3s; }
.hero-title .line:nth-child(2) > span { animation-delay: .46s; }
.hero p { font-size: 1.02rem; color: var(--muted); max-width: 34em; margin: 0; animation: fadeUp 1s var(--ease) .75s both; }
.hero .btns { animation: fadeUp 1s var(--ease) .9s both; }

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  padding: 40px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  box-shadow: 0 40px 70px -40px rgba(18, 29, 54, .55);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  animation: clipUp 1.4s var(--ease) .4s backwards;
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(circle at 66% 58%, #000, transparent 72%);
  mask-image: radial-gradient(circle at 66% 58%, #000, transparent 72%);
}
.ripple {
  position: absolute;
  left: 66%;
  top: 58%;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .38);
  opacity: 0;
  pointer-events: none;
  animation: ripple 9s linear infinite;
}
.ripple--2 { animation-delay: 3s; }
.ripple--3 { animation-delay: 6s; }
.sun {
  position: absolute;
  left: 66%;
  top: 58%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--shu);
  box-shadow: 0 0 0 10px rgba(200, 64, 47, .16);
  animation: pulse 4.5s ease-in-out infinite;
}
.hero-card > small, .hero-card > strong { position: relative; z-index: 1; }
.hero-card__label { font-family: var(--font-en); font-size: .78rem; letter-spacing: .24em; color: rgba(255, 255, 255, .78); }
.hero-card strong {
  font-family: var(--font-en);
  font-weight: 300;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.4;
  letter-spacing: .04em;
  max-width: 12em;
}
.hero-card > .hero-card__vertical {
  position: absolute;
  top: 40px;
  right: 34px;
  writing-mode: vertical-rl;
  font-size: .82rem;
  letter-spacing: .32em;
  color: rgba(255, 255, 255, .78);
}

.scroll-hint {
  position: absolute;
  left: max(24px, calc((100% - 1160px) / 2));
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--font-en);
  font-size: .68rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--navy);
  animation: fadeUp 1s var(--ease) 1.2s both;
}
.scroll-hint span { writing-mode: vertical-rl; }
.scroll-hint::after {
  content: "";
  width: 1px;
  height: 64px;
  background-color: rgba(27, 45, 82, .16);
  background-image: linear-gradient(var(--navy), var(--navy));
  background-repeat: no-repeat;
  background-size: 1px 0;
  animation: scrollLine 2.4s var(--ease) infinite;
}

/* ------------------------------------------------------------
   ボタン
------------------------------------------------------------ */
.btns { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 44px; }
.btn {
  position: relative;
  z-index: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  min-width: 220px;
  padding: 0 28px;
  border-radius: 2px;
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .1em;
  transition: color .45s var(--ease), border-color .45s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .55s var(--ease);
}
.btn::after { content: ""; flex: none; width: 18px; height: 1px; background: currentColor; transition: width .45s var(--ease); }
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn:hover::after { width: 32px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary::before { background: var(--navy-soft); }
.btn-primary:hover { color: #fff; }
.btn-secondary { background: transparent; border: 1px solid var(--navy); color: var(--navy); }
.btn-secondary::before { background: var(--navy); }
.btn-secondary:hover { color: #fff; }

/* ------------------------------------------------------------
   セクション共通
------------------------------------------------------------ */
.section { position: relative; padding: 128px 0; }
.section--paper { background: var(--paper); }
.section-title { max-width: 760px; margin-bottom: 60px; }
.section-title h2 {
  font-family: var(--font-mincho);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.45;
  letter-spacing: .08em;
  margin: 20px 0 22px;
  font-feature-settings: "palt";
}
.section-title p { color: var(--muted); margin: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 42px 34px 40px;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: -1px;
  height: 2px;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -26px rgba(18, 29, 54, .3); }
.card:hover::after { transform: scaleX(1); }
.card h3 { margin: 0 0 14px; font-size: 1.14rem; line-height: 1.6; letter-spacing: .06em; }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }

.num,
#services .card::before {
  display: block;
  font-family: var(--font-en);
  font-weight: 300;
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: .04em;
  color: var(--navy);
  margin-bottom: 28px;
}
#services .grid-3 { counter-reset: svc; }
#services .card::before { counter-increment: svc; content: counter(svc, decimal-leading-zero); }

/* 理念：紺の帯 */
.band { background: var(--navy-deep); color: #fff; overflow: hidden; }
.band::before {
  content: "PHILOSOPHY";
  position: absolute;
  top: 64px;
  right: -.04em;
  font-family: var(--font-en);
  font-weight: 300;
  font-size: clamp(4.5rem, 13vw, 11rem);
  line-height: 1;
  letter-spacing: .06em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, .1);
  pointer-events: none;
  animation: drift 30s ease-in-out infinite alternate;
}
.band .container { position: relative; z-index: 1; }
.band .eyebrow { color: #fff; }
.band .section-title p { color: rgba(255, 255, 255, .72); }
.band .grid-3 { gap: 48px; }
.band .card { background: transparent; border: 0; border-top: 1px solid rgba(255, 255, 255, .22); border-radius: 0; padding: 34px 0 0; }
.band .card::after { top: -1px; bottom: auto; left: 0; right: 0; height: 1px; background: var(--shu); }
.band .card:hover { transform: none; box-shadow: none; }
.band .card h3 { font-family: var(--font-mincho); font-size: 1.3rem; color: #fff; }
.band .card p { color: rgba(255, 255, 255, .72); }

/* 運営者情報：会社概要の表の形 */
.profile { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.profile-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 44px 40px; }
.profile dl { margin: 0; display: grid; grid-template-columns: 9.5em 1fr; border-top: 1px solid var(--line); }
.profile dt, .profile dd { margin: 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
.profile dt { padding-right: 16px; font-size: .86rem; font-weight: 700; letter-spacing: .08em; color: var(--navy); }
.profile dd { font-size: .95rem; overflow-wrap: anywhere; }
.profile dd a { color: var(--navy-soft); }
.profile-box h3 {
  position: relative;
  margin: 0 0 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mincho);
  font-size: 1.35rem;
  letter-spacing: .08em;
}
.profile-box h3::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 48px; height: 1px; background: var(--shu); }
.profile-box p { color: var(--muted); margin: 0 0 1.2em; }
.profile-box p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------
   スクロールで表示（JavaScriptが動くときだけ隠す）
------------------------------------------------------------ */
.js .reveal {
  opacity: 0;
  translate: 0 32px;
  transition: opacity 1s var(--ease), translate 1s var(--ease);
  transition-delay: calc(var(--i, 0) * 140ms);
}
.js .reveal.is-visible { opacity: 1; translate: 0 0; }
.js .card.reveal {
  transition-property: opacity, translate, transform, box-shadow;
  transition-duration: 1s, 1s, .5s, .5s;
  transition-delay: calc(var(--i, 0) * 140ms), calc(var(--i, 0) * 140ms), 0s, 0s;
}
.js .reveal .eyebrow::before { transform: scaleX(0); transition: transform 1.1s var(--ease) .3s; }
.js .reveal.is-visible .eyebrow::before { transform: scaleX(1); }

/* ------------------------------------------------------------
   プライバシーポリシー
------------------------------------------------------------ */
.privacy-page { background: var(--paper); padding: 96px 0 128px; }
.privacy-wrap { max-width: 920px; }
.privacy-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(32px, 6vw, 72px);
  animation: fadeUp 1s var(--ease) .15s both;
}
.privacy-card h1 { margin: 20px 0 32px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.privacy-card h2 {
  margin: 52px 0 14px;
  padding-left: 16px;
  border-left: 3px solid var(--navy);
  font-size: 1.12rem;
  line-height: 1.6;
  letter-spacing: .06em;
}
.privacy-card p, .privacy-card li { color: var(--muted); font-size: .96rem; }
.privacy-card ul { padding-left: 1.4em; }
.privacy-card li::marker { color: var(--navy); }
.privacy-card a { color: var(--navy-soft); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.contact-box { margin-top: 22px; border-top: 1px solid var(--line); }
.contact-box dl { margin: 0; display: grid; grid-template-columns: 11em 1fr; }
.contact-box dt, .contact-box dd { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-box dt { font-size: .88rem; font-weight: 700; color: var(--navy); }
.contact-box dd { overflow-wrap: anywhere; }
.policy-date { margin-top: 52px; font-size: .88rem; text-align: right; }

/* ------------------------------------------------------------
   フッター
------------------------------------------------------------ */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, .66); padding: 52px 0; font-size: .86rem; letter-spacing: .06em; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { position: relative; color: #fff; }
.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.footer-links a:hover { color: #fff; }
.footer-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ------------------------------------------------------------
   アニメーション
------------------------------------------------------------ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes lineUp { from { transform: translateY(108%); } to { transform: translateY(0); } }
@keyframes clipUp { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes linesDraw { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes ripple {
  0% { transform: scale(.06); opacity: 0; }
  12% { opacity: .9; }
  100% { transform: scale(1.5); opacity: 0; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 10px rgba(200, 64, 47, .16); }
  50% { box-shadow: 0 0 0 18px rgba(200, 64, 47, .06); }
}
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-6%); } }
@keyframes scrollLine {
  0% { background-size: 1px 0; background-position: 0 0; }
  50% { background-size: 1px 100%; background-position: 0 0; }
  50.1% { background-size: 1px 100%; background-position: 0 100%; }
  100% { background-size: 1px 0; background-position: 0 100%; }
}

/* ------------------------------------------------------------
   スマホ・タブレット
------------------------------------------------------------ */
@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .container { width: calc(100% - 40px); }

  /* 全画面メニューのため、ヘッダーのぼかし効果は外す */
  .site-header { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .menu-toggle {
    position: relative;
    z-index: 60;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    width: 44px;
    height: 44px;
    padding: 0 10px;
    background: transparent;
    border: 0;
    cursor: pointer;
  }
  .menu-toggle span { display: block; height: 1px; background: var(--navy); transition: transform .45s var(--ease); }
  .menu-open .menu-toggle span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .menu-open .menu-toggle span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .nav {
    position: fixed;
    inset: 0;
    z-index: 55;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 0 32px;
    background: #fff;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .45s var(--ease), visibility .45s;
  }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .nav a { align-self: flex-start; padding: 14px 0; opacity: 0; translate: 0 14px; transition: opacity .5s var(--ease), translate .5s var(--ease); }
  .menu-open .nav a { opacity: 1; translate: 0 0; }
  .menu-open .nav a:nth-child(2) { transition-delay: .06s; }
  .menu-open .nav a:nth-child(3) { transition-delay: .12s; }
  .menu-open .nav a:nth-child(4) { transition-delay: .18s; }

  .hero { padding: 56px 0 80px; }
  .hero-grid, .profile { grid-template-columns: 1fr; gap: 44px; }
  .hero .eyebrow { gap: 10px; font-size: .7rem; letter-spacing: .14em; }
  .hero .eyebrow::before { width: 24px; }
  .hero-card { min-height: 400px; padding: 32px; }
  .hero-card > .hero-card__vertical { top: 32px; right: 26px; font-size: .76rem; letter-spacing: .2em; }
  .scroll-hint { display: none; }
  .btn { flex: 1 1 auto; min-width: 0; }

  .section { padding: 88px 0; }
  .section-title { margin-bottom: 44px; }
  .grid-3, .band .grid-3 { grid-template-columns: 1fr; gap: 20px; }
  .band .grid-3 { gap: 40px; }
  .band::before { top: 36px; }
  .profile-box { padding: 32px 24px; }
  .profile dl { grid-template-columns: 1fr; }
  .profile dt { padding: 16px 0 0; border-bottom: 0; }
  .profile dd { padding: 4px 0 16px; }
  .contact-box dl { grid-template-columns: 1fr; }
  .contact-box dt { padding-bottom: 0; border-bottom: 0; }
  .contact-box dd { padding-top: 4px; }
  .policy-date { text-align: left; }
}

/* 動きを減らす設定の利用者には、アニメーションを止めて最初から表示する */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; translate: none; }
  .ripple { opacity: .35; transform: scale(.5); }
  .ripple--2 { transform: scale(.85); }
  .ripple--3 { transform: scale(1.2); }
}
