/* Goldilocks, K.K. — one dark, watery system; gold comes only from the mark. */
:root {
  --bg: #07111d;
  --deep: #040b14;
  --ink: #e9eef4;
  --ink-2: rgba(233, 238, 244, 0.8);
  --muted: #8d9db1;
  --line: rgba(233, 238, 244, 0.12);
  --gold: #f4b924;

  --serif: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;

  /* type scale: one step ≈ ×1.33, headings fluid */
  --t-xs: 13px;
  --t-sm: 15px;
  --t-base: 17px;
  --t-md: clamp(18px, 1.5vw, 21px);
  --t-lg: clamp(24px, 2.3vw, 30px);
  --t-xl: clamp(34px, 4.4vw, 56px);
  --t-2xl: clamp(44px, 6vw, 86px);

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1160px;
  --sec: clamp(88px, 12vw, 168px);
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--deep); color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--t-base)/1.85 var(--sans); font-feature-settings: "palt"; -webkit-font-smoothing: antialiased; }
::selection { background: var(--gold); color: var(--deep); }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 800; line-height: 1.25; letter-spacing: 0.02em; text-wrap: balance; word-break: auto-phrase; }
p, dd { text-wrap: pretty; word-break: auto-phrase; line-break: strict; }
a { color: inherit; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
img, canvas { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--deep); padding: 8px 14px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.nb { display: inline-block; }

/* header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header.over { position: absolute; top: 0; left: 0; right: 0; z-index: 5; }
.brand img { height: 60px; width: auto; margin: -8px 0; }
.nav { display: flex; gap: clamp(18px, 3vw, 36px); font-size: var(--t-sm); }
.nav a { text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; text-shadow: 0 1px 10px rgba(4, 12, 22, 0.8); transition: border-color .2s; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--gold); }

/* water: the hero, page bands and the closing band share it (assets/water.js) */
.pool, .closing { position: relative; overflow: hidden; }
.pool { height: 100svh; min-height: 600px; max-height: 1000px; background: radial-gradient(90% 80% at 78% 50%, #3a3220 0%, #14263a 38%, #0a1a2b 70%, #061220 100%); }
.pool canvas, .closing canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.pool::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.pool-copy { position: absolute; z-index: 2; left: 0; right: 0; top: 50%; transform: translateY(-46%); translate: 0 calc(var(--p, 0) * -160px); opacity: calc(1 - var(--p, 0) * 1.4); pointer-events: none; }
.pool-name { margin-bottom: 20px; font-size: var(--t-sm); letter-spacing: 0.1em; color: var(--ink-2); }
.pool-title { font-size: var(--t-2xl); line-height: 1.16; text-shadow: 0 2px 28px rgba(4, 12, 22, 0.55); }
.pool-title .ln { display: block; overflow: hidden; padding-bottom: 0.06em; }
.pool-title .ln > span { display: block; animation: rise 1.2s cubic-bezier(.16, .84, .24, 1) .2s both; }
.pool-title .ln + .ln > span { animation-delay: .34s; }
.pool-lead { max-width: 30em; margin-top: clamp(24px, 3vw, 36px); font-size: var(--t-md); line-height: 1.8; color: var(--ink-2); text-shadow: 0 1px 14px rgba(4, 12, 22, 0.7); }
.pool-name, .pool-lead { animation: fadein 1.2s ease .9s both; }
.pool-bar { position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(18px, 4.5vh, 44px); pointer-events: none; }
.pool-spec { font-size: var(--t-xs); letter-spacing: 0.04em; color: var(--muted); opacity: 0; transition: opacity 1.2s 2.4s; }
.pool.is-live .pool-spec { opacity: 1; }
.pool-spec span { margin-left: 1.6em; }
.pool-spec b { font-weight: 500; color: var(--gold); font-variant-numeric: tabular-nums; }
.pool-hint { color: var(--ink-2); }
.pool--band { height: 52svh; min-height: 340px; max-height: 560px; }
.pool--band .pool-copy { top: auto; bottom: clamp(48px, 8vh, 80px); transform: none; translate: none; opacity: 1; }
.pool--band .pool-title { font-size: var(--t-xl); }
.pool--band .pool-lead { animation: none; }
@keyframes rise { from { transform: translateY(108%); } to { transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* section heads */
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px clamp(24px, 5vw, 80px); align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.sec-head h2 { font-size: var(--t-xl); }
.sec-head p { font-size: var(--t-md); color: var(--ink-2); max-width: 26em; justify-self: end; }

/* business */
.biz { padding: var(--sec) 0; }
.ai-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.ai-card { position: relative; padding: clamp(28px, 3.4vw, 44px); border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(160deg, rgba(233, 238, 244, 0.045), rgba(233, 238, 244, 0) 60%); overflow: hidden; transition: border-color .4s; }
.ai-card::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; transition: transform .7s cubic-bezier(.16, .84, .24, 1); }
.ai-card:hover { border-color: rgba(244, 185, 36, 0.4); }
.ai-card:hover::before { transform: scaleX(1); }
.ai-card h3 { font-size: var(--t-lg); margin-bottom: 14px; }
.ai-card p { color: var(--ink-2); }

.product { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; margin-top: clamp(96px, 11vw, 150px); }
.product--pm { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.product--pm .product-visual { order: 2; }
.product-kind { font-size: var(--t-sm); color: var(--gold); letter-spacing: 0.06em; margin-bottom: 10px; }
.product-text h3 { font-size: var(--t-xl); letter-spacing: 0.01em; margin-bottom: 20px; }
.product-text > p { color: var(--ink-2); }
.product-visual { position: relative; }
.product--ldb .product-visual { aspect-ratio: 1 / 1; border-radius: 18px; background: radial-gradient(60% 60% at 55% 45%, #0f2236 0%, #081422 70%); border: 1px solid var(--line); }
#japan { position: absolute; left: 4%; top: 4%; width: 92%; height: 92%; }
.figures { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 clamp(24px, 3vw, 44px); margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); }
.figures dt { font-size: var(--t-xs); color: var(--muted); letter-spacing: 0.06em; }
.figures dd { font-family: var(--serif); font-weight: 800; font-size: var(--t-lg); font-variant-numeric: tabular-nums; }
.figures-note { margin-top: 12px; font-size: var(--t-xs); color: var(--muted); }
.go { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; font-size: var(--t-sm); font-weight: 500; text-decoration: none; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; transition: border-color .3s, background-color .3s, color .3s; }
.go::after { content: ""; width: 7px; height: 7px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }
.go:hover { border-color: var(--gold); background: var(--gold); color: var(--deep); }

/* screenshots in a quiet browser frame */
.shot { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0d1826; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7); transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); transition: transform .8s cubic-bezier(.16, .84, .24, 1); }
.product--pm .shot { transform: perspective(1600px) rotateY(6deg) rotateX(2deg); }
.product:hover .shot { transform: none; }
.shot-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #142233; font-size: 11px; color: var(--muted); }
.shot-bar i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: rgba(233, 238, 244, 0.18); }
.shot-bar span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: 10px; padding: 2px 10px; border-radius: 6px; background: rgba(0, 0, 0, 0.25); }
.shot img { width: 100%; height: auto; }
.shot--small { position: absolute; right: -6%; bottom: -8%; width: 52%; }
.product--pm .shot--small { right: auto; left: -6%; transform: perspective(1600px) rotateY(6deg) rotateX(2deg); }

/* deep zoom mosaic */
.osd { position: relative; aspect-ratio: 3 / 4; width: min(100%, 540px); margin-left: auto; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(60% 60% at 50% 45%, #13263a 0%, #081422 75%); }
.osd-view { position: absolute; inset: 0; opacity: 0; transition: opacity 1s; }
.osd.is-ready .osd-view { opacity: 1; }
.osd-tools { position: absolute; z-index: 2; right: 14px; top: 14px; display: flex; gap: 6px; }
.osd-tools button { min-width: 38px; height: 38px; padding: 0 12px; font: 500 var(--t-sm) var(--sans); color: var(--ink); background: rgba(7, 17, 29, 0.72); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; backdrop-filter: blur(6px); transition: border-color .3s; }
.osd-tools button:hover { border-color: var(--gold); }
.osd-cap { position: absolute; z-index: 2; left: 14px; bottom: 14px; max-width: calc(100% - 28px); padding: 6px 12px; border-radius: 999px; background: rgba(7, 17, 29, 0.72); backdrop-filter: blur(6px); font-size: var(--t-xs); color: var(--ink); pointer-events: none; transition: opacity .6s; }
.osd.is-zoomed .osd-cap { opacity: 0; }

/* closing band */
.closing { padding: clamp(110px, 14vw, 190px) 0; background: radial-gradient(80% 90% at 80% 100%, #12263a 0%, #0a1726 60%, var(--bg) 100%); border-top: 1px solid var(--line); }
.closing-inner { position: relative; z-index: 2; pointer-events: none; }
.closing h2 { font-size: var(--t-xl); }
.closing-lead { margin-top: 18px; font-size: var(--t-md); color: var(--ink-2); }
.mailbox { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: clamp(32px, 4vw, 48px); pointer-events: auto; }
.mailbox-addr { font-size: var(--t-lg); font-weight: 500; letter-spacing: 0.02em; text-decoration: none; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 2px no-repeat; padding-bottom: 4px; transition: background-size .5s cubic-bezier(.16, .84, .24, 1); }
.mailbox-addr:hover { background-size: 100% 2px; }
.mailbox-copy { font: 500 var(--t-sm) var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; cursor: pointer; transition: border-color .3s, color .3s; }
.mailbox-copy:hover { border-color: var(--gold); }
.mailbox-copy.is-done { border-color: var(--gold); color: var(--gold); }

/* inner pages */
.section { padding: var(--sec) 0; }
.section.tight { padding-top: clamp(40px, 6vw, 72px); }
.facts { display: grid; grid-template-columns: 10em minmax(0, 1fr); max-width: 880px; }
.facts dt, .facts dd { padding: 22px 0; border-top: 1px solid var(--line); }
.facts dt { font-size: var(--t-sm); color: var(--muted); }
.facts dd small { display: block; font-size: var(--t-sm); color: var(--muted); }
.note { margin-top: 20px; font-size: var(--t-sm); color: var(--muted); max-width: 34em; }

/* footer */
.site-footer { padding: 44px 0 60px; border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; }
.site-footer address { font-style: normal; }
.site-footer strong { color: var(--ink); font-weight: 700; }

/* tablets and smaller: the small screenshots crowd the live pictures */
@media (max-width: 1000px) {
  .shot--small { display: none; }
}

/* phones */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { gap: 16px; font-size: 14px; }
  .site-header .wrap { flex-wrap: wrap; row-gap: 6px; }
  .pool-copy { top: auto; bottom: 92px; transform: none; }
  .pool-spec { font-size: 11px; line-height: 1.6; }
  .pool-spec span { margin-left: 1em; }
  .pool-hint { display: none; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head p { justify-self: start; }
  .ai-cards, .product, .product--pm { grid-template-columns: 1fr; }
  .product--pm .product-visual { order: 0; }
  .shot, .product--pm .shot { transform: none; }
  .product-text { margin-top: 24px; }
  .figures { gap: 0 20px; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { padding: 20px 0 0; }
  .facts dd { padding: 4px 0 20px; border-top: 0; }
  .mailbox-addr { font-size: min(6vw, 26px); }
}

@media (prefers-reduced-motion: reduce) {
  .pool-title .ln > span, .pool-name, .pool-lead { animation: none; }
  .shot, .ai-card::before, .go, .mailbox-addr { transition: none; }
}
