/* トップ（/）：糸の束が、リボン状のコバルトの絹に編み上がる（試作 /design/1 から本番へ、2026-12-03） */
/* トップ（/）の土台。トークンは他のページ（linktier-v1-core.css）と同じ値。 */
:root {
  --bg: #FAFBFD;
  --bg-white: #FFFFFF;
  --ink: #1B2942;
  --ink-2: #3A4A63;
  --mut: #55657C;
  --line: #DCE3EC;
  --accent: #0258BA;
  --accent-soft: #EEF3FB;
  --navy-deep: #0B1426;
  --font-ja: "Noto Sans JP", system-ui, sans-serif;
  --font-en: "Poppins", "Noto Sans JP", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font-ja); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }

html { -webkit-text-size-adjust: 100%; }
body { background: #fff; overflow-x: hidden; }

.hd { position: fixed; z-index: 10; top: 0; left: 0; right: 0; height: 84px; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.hd a { pointer-events: auto; text-decoration: none; color: var(--navy-deep); }
.logo { font: 600 32px/1 var(--font-en); letter-spacing: -.01em; }
.contact { font-weight: 700; font-size: 16px; letter-spacing: .03em; padding: 10px 2px; position: relative; }
.contact::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: 4px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.contact:hover::after, .contact:focus-visible::after { transform: scaleX(1); }
.hd-r { display: flex; align-items: center; gap: 22px; }
.lang { font: 600 14px/1 var(--font-en); letter-spacing: .04em; padding: 10px 2px; opacity: .7; }
.lang:hover, .lang:focus-visible { opacity: 1; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* スクロールすると、糸がさらにきつく寄る（高さを少し余分に取る） */
.track { height: 165dvh; }
.stage { position: sticky; top: 0; height: 100dvh; overflow: hidden; margin: 0; background: #fff; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.static-art { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }

.tex {
  position: absolute; left: 0; top: 0; color: #15244A; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--font-ja); font-weight: 900; line-height: 1.2; letter-spacing: -.02em; white-space: nowrap; text-align: center;
  background-color: #2A68D3;
  background-image:
    repeating-linear-gradient(135deg, rgba(255,255,255,.075) 0 calc(var(--k, 1) * 1.5px), rgba(0,20,80,.07) calc(var(--k, 1) * 1.5px) calc(var(--k, 1) * 3px)),
    linear-gradient(100deg, #1B54BF 0%, #3A7BE0 55%, #2A68D3 100%);
}
.tex > span { display: block; }
.tex:not(.tall) > span { display: inline; }
.tex:not(.tall) { display: flex; flex-direction: row; }

.lab { position: absolute; z-index: 3; font: 500 clamp(15px, 1.55vw, 23px)/1 var(--font-ja); letter-spacing: .01em; color: var(--navy-deep); pointer-events: none; }
.lab-a { left: 3.3%; top: 41%; padding: 10px 16px; border-radius: 999px; background: #fff; border: 1px solid #DCE3EC; }
.lab-b { left: 80.5%; top: 58.5%; color: #12214A; }
.lede { position: absolute; z-index: 3; left: 40px; bottom: 5.8dvh; margin: 0; font-weight: 500; font-size: clamp(14px, 1.45vw, 21px); letter-spacing: .02em; color: var(--navy-deep); line-height: 1.7; }

/* 実テキストの見出し：WebGL が動いているときは見えないが、読み上げ・選択・検索には残る */
.rib { margin: 0; font-weight: 900; color: #15244A; letter-spacing: -.02em; line-height: 1.2; }
.rib span { display: inline; }
.is-gl .fb { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* WebGL が使えないとき：CSS と SVG だけの静止版 */
.no-gl #gl { display: none; }
.no-gl .static-art { display: block; }
.no-gl .fb { position: absolute; z-index: 2; left: 53.5%; top: 41%; }
.no-gl .rib { white-space: nowrap; font-size: clamp(38px, 6.9vw, 100px); text-shadow: 0 1px 0 rgba(255,255,255,.18); }

/* 見出しの塊：PC では中身をこれまでどおり個別に置き、スマホ用の部品は出さない */
.kick, .hero-cta { display: none; }
.tex.blank > span { visibility: hidden; }

@media (max-width: 760px) {
  .hd { height: 64px; padding: 0 20px; }
  /* スマホ：見出しを普通の文字で上に置き、一文定義とボタンを続ける。糸と布は下の絵 */
  .copy { position: absolute; z-index: 3; left: 20px; right: 20px; top: calc(64px + 4dvh); display: flex; flex-direction: column; }
  .kick { display: block; margin: 0 0 6px; font-weight: 700; font-size: clamp(19px, 5.6vw, 24px); line-height: 1.4; color: var(--navy-deep); }
  .copy .fb, .is-gl .copy .fb, .no-gl .copy .fb { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }
  .copy .rib, .no-gl .copy .rib { font-size: clamp(40px, 12.5vw, 56px); line-height: 1.18; text-shadow: none; }
  .copy .lede { position: static; margin-top: 18px; font-size: 15px; }
  .hero-cta { display: flex; align-items: center; gap: 22px; margin-top: 22px; }
  .btn-hero { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none; box-shadow: 0 12px 24px -12px rgba(2, 88, 186, .6); }
  .hero-sub { font-weight: 700; font-size: 14px; color: var(--navy-deep); text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
  .logo { font-size: 26px; }
  .contact { font-size: 14px; }
  .hd-r { gap: 16px; }
  .lang { font-size: 13px; }
  .lab { font-size: 14px; }
  .lab-a { left: 4%; top: 61%; padding: 6px 11px; font-size: 13px; }
  .lab-b { left: auto; right: 20px; top: auto; bottom: 3dvh; font-size: 13px; }
  .rib span { display: block; }
}

/* 一文定義：文節ごとに折り返す（Safari は auto-phrase がないので、文節を span で包む） */
.lede .ph { display: inline-block; }
