/* y.kobayashi 入口ページ
   ポートフォリオ（portfolio-site/style.css）と同じ世界観: 濃紺にコバルトと紫の光、黄色のドット、Zen Kaku Gothic New。
   色・光・ボタンの値はポートフォリオからそのまま持ってきている。変えるときは両方そろえる */

:root {
  --cobalt: #1F4FE0;
  --cobalt-bright: #4F7BFF;
  --violet: #6D4BFF;
  --signal: #F5C400;
  --font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  --latin: "Inter Tight", "Zen Kaku Gothic New", sans-serif;
  --gutter: clamp(20px, 6vw, 96px);
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* ダーク（既定） */
  --bg: #0A1020;
  --bg-elev: rgba(255, 255, 255, 0.04);
  --ink: #EAF0FF;
  --muted: #8E9BB5;
  --card-bg: #182440;
  --card-text: #DCE4F5;
  --line: rgba(234, 240, 255, 0.12);
  --line-strong: rgba(234, 240, 255, 0.28);
  --glow-1: rgba(31, 79, 224, 0.55);
  --glow-2: rgba(109, 75, 255, 0.45);
  --kv-glow: rgba(46, 140, 180, .30);
  --headline-glow: 0 0 40px rgba(120, 160, 255, 0.35);
  --card-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  --slot-bg: rgba(255, 255, 255, 0.035);
  --slot-shadow: 0 22px 54px rgba(0, 0, 0, .38);
  --badge-bg: rgba(255, 255, 255, .06);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #EEF1F4;
    --bg-elev: rgba(16, 35, 58, 0.04);
    --ink: #10233A;
    --muted: #5B6B7C;
    --card-bg: #FFFFFF;
    --card-text: #3B4A5E;
    --line: rgba(16, 35, 58, 0.12);
    --line-strong: rgba(16, 35, 58, 0.3);
    --glow-1: rgba(31, 79, 224, 0.18);
    --glow-2: rgba(109, 75, 255, 0.14);
    --kv-glow: rgba(46, 140, 180, .14);
    --headline-glow: none;
    --card-shadow: 0 30px 70px rgba(16, 35, 58, 0.22);
    --slot-bg: rgba(255, 255, 255, 0.6);
    --slot-shadow: 0 18px 44px rgba(16, 35, 58, .10);
    --badge-bg: rgba(255, 255, 255, .7);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #EEF1F4;
  --bg-elev: rgba(16, 35, 58, 0.04);
  --ink: #10233A;
  --muted: #5B6B7C;
  --card-bg: #FFFFFF;
  --card-text: #3B4A5E;
  --line: rgba(16, 35, 58, 0.12);
  --line-strong: rgba(16, 35, 58, 0.3);
  --glow-1: rgba(31, 79, 224, 0.18);
  --glow-2: rgba(109, 75, 255, 0.14);
  --kv-glow: rgba(46, 140, 180, .14);
  --headline-glow: none;
  --card-shadow: 0 30px 70px rgba(16, 35, 58, 0.22);
  --slot-bg: rgba(255, 255, 255, 0.6);
  --slot-shadow: 0 18px 44px rgba(16, 35, 58, .10);
  --badge-bg: rgba(255, 255, 255, .7);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
a { color: inherit; }
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--cobalt-bright); outline-offset: 3px; border-radius: 6px; }
main { flex: 1; display: flex; flex-direction: column; position: relative; z-index: 2; }

/* ---------- 背景の光と粒子（ポートフォリオと同じ） ---------- */
.glow { position: fixed; z-index: 0; pointer-events: none; border-radius: 50%; filter: blur(80px); }
.glow-1 { width: 70vw; height: 70vw; right: -25vw; bottom: -30vw; background: radial-gradient(closest-side, var(--glow-1), transparent 70%); animation: drift-1 18s ease-in-out infinite alternate; }
.glow-2 { width: 55vw; height: 55vw; left: -20vw; top: 15vh; background: radial-gradient(closest-side, var(--glow-2), transparent 70%); animation: drift-2 23s ease-in-out infinite alternate; }
.glow-3 { width: 40vw; height: 40vw; left: 35vw; top: -20vw; background: radial-gradient(closest-side, var(--glow-1), transparent 70%); opacity: .6; animation: drift-3 29s ease-in-out infinite alternate; }
@keyframes drift-1 {
  0%   { transform: translate(0, 0) scale(1); opacity: .85; }
  50%  { transform: translate(-14vw, -10vw) scale(1.25); opacity: 1; }
  100% { transform: translate(8vw, 10vw) scale(.85); opacity: .6; }
}
@keyframes drift-2 {
  0%   { transform: translate(0, 0) scale(1); opacity: .75; }
  50%  { transform: translate(14vw, 14vh) scale(1.3); opacity: 1; }
  100% { transform: translate(-8vw, -16vh) scale(.8); opacity: .55; }
}
@keyframes drift-3 {
  0%   { transform: translate(0, 0) scale(.9); opacity: .35; }
  50%  { transform: translate(-10vw, 12vh) scale(1.2); opacity: .7; }
  100% { transform: translate(12vw, 4vh) scale(1); opacity: .45; }
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px var(--gutter);
}
.brand { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.brand .logo { height: 34px; width: auto; display: block; transition: transform .5s var(--ease); }
.brand:hover .logo { transform: rotate(-3deg) scale(1.04); }
.site-nav { display: flex; align-items: center; gap: 22px; }
.nav-lock { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; text-decoration: none; opacity: .85; transition: opacity .2s; }
.nav-lock:hover { opacity: 1; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--bg-elev); color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
  transition: transform .4s var(--ease), background-color .3s;
}
.theme-toggle:hover { transform: rotate(18deg); }
.theme-toggle svg { grid-area: 1 / 1; transition: transform .5s var(--ease), opacity .3s; }
.theme-toggle .icon-sun { opacity: 1; transform: rotate(0); }
.theme-toggle .icon-moon { opacity: 0; transform: rotate(-90deg) scale(.6); }
:root[data-theme="light"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg) scale(.6); }
:root[data-theme="light"] .theme-toggle .icon-moon { opacity: 1; transform: rotate(0); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { opacity: 0; transform: rotate(90deg) scale(.6); }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { opacity: 1; transform: rotate(0); }
}

/* ---------- ヒーロー: 左に言葉、右に棚 ---------- */
.hero {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: stretch;
  padding-left: var(--gutter);
  min-height: 560px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; left: -10%; top: -10%; width: 70%; height: 90%;
  background: radial-gradient(closest-side, var(--kv-glow), transparent 75%);
  pointer-events: none; z-index: 0;
}
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 56px 24px 72px 0; }

/* 「制作中」のしるし（ポートフォリオの Profile バッジと同じすりガラスのピル） */
.status {
  display: inline-flex; align-items: center; gap: 9px;
  margin-bottom: 30px; padding: 6px 14px 6px 12px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--badge-bg);
  -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  font-size: 13px; font-weight: 700; line-height: 1.6;
}
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--signal); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(3.2); opacity: 0; } }

.headline {
  font-size: clamp(30px, 3.4vw, 56px);
  font-weight: 900; line-height: 1.25; letter-spacing: -0.02em;
  text-shadow: var(--headline-glow);
}
.headline .line { display: block; overflow: hidden; padding: .08em 0; margin: -.08em 0; }
/* 現れる動きが終わったら覆いを外す（文字の光が四角く切れて見えるのを防ぐ） */
.in .headline .line { overflow: visible; }
.headline .line-inner { display: block; white-space: nowrap; animation: rise .9s var(--ease) both; }
.headline .line:nth-child(2) .line-inner { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(110%); } to { transform: translateY(0); } }

.lead { margin-top: 24px; max-width: 31em; word-break: auto-phrase; text-wrap: pretty; font-size: clamp(15px, 1.15vw, 17px); line-height: 1.95; opacity: .85; animation: fade .9s .35s var(--ease) both; }
.nw { white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; animation: fade .9s .45s var(--ease) both; }
.status { animation: fade .9s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } }
.btn {
  display: inline-flex; align-items: center; padding: 14px 26px; border-radius: 999px;
  font-weight: 700; font-size: 15px; line-height: 1.4; text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.btn-primary { background: #0B1222; color: #fff; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 0 0 1px rgba(79, 160, 200, .25), 0 10px 36px rgba(46, 140, 180, .45); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(79, 160, 200, .4), 0 14px 44px rgba(46, 140, 180, .6); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--ink); }

/* 棚: これからサービスが入る空きの枠を、斜めに並べる（ポートフォリオの作品の壁と同じ角度） */
.shelf {
  position: relative; min-height: 520px; perspective: 1800px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 90%, transparent 100%), linear-gradient(to right, transparent 0, #000 8%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 90%, transparent 100%), linear-gradient(to right, transparent 0, #000 8%);
  mask-composite: intersect;
}
.shelf-plane {
  position: absolute; inset: -8% -8% -8% 4%;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-content: center;
  transform: rotateY(-16deg) rotateX(5deg) rotateZ(-2deg); transform-origin: left center;
  transition: transform 1.2s var(--ease);
}
.shelf:hover .shelf-plane { transform: rotateY(-12deg) rotateX(4deg) rotateZ(-1.5deg); }
.shelf-col { display: flex; flex-direction: column; gap: 22px; animation: float 14s ease-in-out infinite alternate; }
.shelf-col.offset { margin-top: -64px; animation-duration: 17s; animation-direction: alternate-reverse; }
.shelf-col:last-child { margin-top: 40px; animation-duration: 20s; }
@keyframes float { from { transform: translateY(-10px); } to { transform: translateY(14px); } }
.slot { display: block; border-radius: 14px; border: 1px solid var(--line); background: var(--slot-bg); box-shadow: var(--slot-shadow); }
.r-wide { aspect-ratio: 4 / 3; }
.r-tall { aspect-ratio: 3 / 4; }
.r-square { aspect-ratio: 1 / 1; }
.slot.lit {
  position: relative; display: grid; place-content: center; justify-items: center; gap: 10px;
  border-color: rgba(79, 123, 255, .55);
  background: radial-gradient(90% 80% at 100% 100%, rgba(79, 123, 255, .45), transparent 62%), var(--card-bg);
  box-shadow: 0 0 0 1px rgba(79, 123, 255, .25), 0 24px 70px rgba(31, 79, 224, .45);
}
/* できあがったサービスの枠。サムネイル（16:10）をそのまま見せる。押すとそのサービスをひらく */
.slot.made-slot { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-color: var(--line-strong); background: #0A1020; transition: transform .5s var(--ease), border-color .3s, box-shadow .5s var(--ease); }
.slot.made-slot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.slot.made-slot:hover { transform: translateY(-4px) scale(1.03); border-color: rgba(79, 123, 255, .7); box-shadow: 0 0 0 1px rgba(79, 123, 255, .3), 0 24px 70px rgba(31, 79, 224, .45); }
.lit-dot { position: relative; width: 14px; height: 14px; border-radius: 50%; background: var(--signal); }
.lit-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--signal); animation: pulse 2.4s ease-out infinite; }
.lit-label { font-weight: 900; font-size: clamp(14px, 1.3vw, 20px); letter-spacing: .04em; color: var(--ink); }

/* ---------- つくったもの（サービスができたら使う。ポートフォリオの作品カードと同じ質感） ---------- */
.section { position: relative; padding: 72px var(--gutter) 96px; }
.section-title { font-size: clamp(30px, 4vw, 52px); font-weight: 900; line-height: 1.2; letter-spacing: -0.015em; margin-bottom: 36px; }
.made { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 28px; }
/* 並んだカードの高さをそろえる（説明の行数がちがっても、下端がそろう） */
.made > li { display: flex; }
.made-card { width: 100%; }
.made-card {
  display: grid; gap: 6px; align-content: start; padding: 0 0 28px; overflow: hidden;
  border-radius: 28px; border: 1px solid var(--line);
  background: radial-gradient(90% 70% at 100% 100%, rgba(79, 123, 255, .22), transparent 60%), var(--card-bg);
  box-shadow: var(--card-shadow); text-decoration: none;
  transition: transform .5s var(--ease), border-color .3s;
}
.made-card:hover { transform: translateY(-6px); border-color: var(--line-strong); }
/* サムネイル。画像は 16:10 で作ってある。カードに触れると少しだけ寄る（ポートフォリオの作品カードと同じ動き） */
.made-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; margin-bottom: 18px; background: #0A1020; border-bottom: 1px solid var(--line); }
.made-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.made-card:hover .made-thumb img { transform: scale(1.04); }
.made-card > :not(.made-thumb) { margin-left: 28px; margin-right: 28px; }
.made-date { font-family: var(--latin); font-size: 13px; color: var(--card-text); opacity: .75; }
.made-name { font-size: clamp(22px, 2vw, 28px); font-weight: 900; line-height: 1.4; }
.made-desc { color: var(--card-text); font-size: 15px; line-height: 1.9; }
.made-desc { word-break: auto-phrase; text-wrap: pretty; }
.made-go { align-self: end; justify-self: start; display: inline-flex; align-items: center; gap: 7px; margin-top: 20px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 14px; font-weight: 700; }
.made-card:hover .made-go svg { transform: translate(2px, -2px); }
.made-go svg { transition: transform .35s var(--ease); }

/* ---------- フッター ---------- */
.site-footer { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 24px var(--gutter) 32px; font-size: 13px; color: var(--muted); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- 404 ---------- */
.nf { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 56px var(--gutter) 96px; }
.nf .headline .line-inner { white-space: normal; }

/* ---------- スマホ・タブレット ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 0 var(--gutter); min-height: 0; }
  .hero-copy { padding: 36px 0 8px; }
  .headline { font-size: clamp(22px, 6.4vw, 44px); }
  .shelf { min-height: 0; height: 340px; margin: 12px calc(var(--gutter) * -1) 0; }
  .shelf-plane { inset: -22% -6% -22% -6%; gap: 14px; transform: rotateX(8deg) rotateZ(-6deg); transform-origin: center; }
  .shelf:hover .shelf-plane { transform: rotateX(8deg) rotateZ(-6deg); }
  .shelf-col { gap: 14px; }
  .slot { border-radius: 10px; }
  .nav-lock { font-size: 13px; }
  .site-nav { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .glow-1, .glow-2, .glow-3, .shelf-col, .pulse::after, .lit-dot::after,
  .headline .line-inner, .lead, .actions, .status { animation: none; }
  * { transition: none !important; }
}
