/* Loupe — the series top. One idea: the maker's tools sit on an edit timeline, in the order you use them
   (collect references → your edit → fix the notes). Same ink / pink / cyan and type as the product pages,
   so /loupe/ and /komame/ read as siblings of this page. Motion lives in one place: the playhead crosses
   the timeline once on load. */
:root {
  --ink: #140e11;
  --ink-2: #221a1e;
  --ink-3: #2f252a;
  --pink: #f2305c;
  --cyan: #3ad8e6;
  --white: #fffafc;
  --mute: #b9aab1;
  --display: "Dela Gothic One", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  --body: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  --tc: "Barlow Condensed", "Zen Kaku Gothic New", sans-serif;
  --wrap: min(1160px, 100% - 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}
html[lang="en"] {
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --tc: "Barlow Condensed", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--pink) var(--ink); }
body { margin: 0; background: var(--ink); color: var(--white); font: 400 17px/1.85 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
html[lang="en"] body { font-size: 18px; line-height: 1.6; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--pink); color: var(--white); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.wrap { width: var(--wrap); margin-inline: auto; }
.tc { font-family: var(--tc); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { font-weight: 700; letter-spacing: -.02em; }
p { margin: 0; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--ink); border-bottom: 1px solid var(--ink-3); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 21px/1 var(--body); }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.top nav { margin-left: auto; display: flex; gap: 22px; font-size: 14px; font-weight: 700; }
.top nav a { text-decoration: none; color: var(--mute); }
.top nav a:hover { color: var(--white); }

/* hero: headline over an edit timeline */
.hero { padding: 72px 0 40px; }
.hero h1 { font-size: clamp(40px, 7.4vw, 96px); line-height: 1.12; }
html[lang="en"] .hero h1 { line-height: 1.02; }
.hero .lede { margin-top: 22px; max-width: 34em; color: var(--mute); font-size: 18px; }

.timeline { margin-top: 56px; position: relative; --label: 64px; }
.ruler { position: relative; height: 34px; margin-left: var(--label); border-bottom: 1px solid var(--ink-3);
  background: repeating-linear-gradient(90deg, #4a3d43 0 1px, transparent 1px 2.5%) bottom / 100% 8px no-repeat,
              repeating-linear-gradient(90deg, #6a5a62 0 1px, transparent 1px 12.5%) bottom / 100% 16px no-repeat; }
.ruler span { position: absolute; top: 0; font-size: 13px; color: var(--mute); transform: translateX(4px); }
.track { display: grid; grid-template-columns: var(--label) 1fr; align-items: stretch; border-bottom: 1px solid var(--ink-3); }
.track > .name { font-size: 13px; color: var(--mute); display: flex; align-items: center; gap: 8px; padding-right: 10px; border-right: 1px solid var(--ink-3); }
.lane { position: relative; height: 92px; }
.clip { position: absolute; top: 10px; bottom: 10px; border-radius: 6px; display: flex; align-items: center; gap: 12px; padding: 0 12px; text-decoration: none; overflow: hidden; }
.clip img { height: 100%; width: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; flex: none; }
.clip b { font: 700 18px/1.1 var(--body); display: block; }
.clip small { font-size: 13px; display: block; opacity: .85; line-height: 1.3; }
.clip.loupe { left: 0; width: 34%; background: var(--pink); color: var(--white); padding-left: 8px; }
.clip.edit { left: 22%; width: 60%; background: repeating-linear-gradient(135deg, var(--ink-2) 0 10px, var(--ink-3) 10px 20px); color: var(--mute); border: 1px dashed #5a4b52; }
.clip.komame { left: 64%; width: 36%; background: var(--cyan); color: var(--ink); padding-left: 8px; }
.clip.loupe:hover, .clip.komame:hover { filter: brightness(1.08); }
.clip .ring { position: absolute; inset: 0; pointer-events: none; }
.playhead { position: absolute; top: 0; bottom: 0; left: var(--label); width: 2px; background: var(--white); pointer-events: none;
  animation: play 2.6s var(--ease) .4s both; }
.playhead::before { content: ""; position: absolute; top: 0; left: -7px; border: 8px solid transparent; border-top: 10px solid var(--white); }
@keyframes play { from { left: var(--label); } to { left: calc(var(--label) + (100% - var(--label)) * .985); } }
.timeline-note { margin-top: 14px; margin-left: var(--label); font-size: 14px; color: var(--mute); }

/* product sections */
.product { padding: 104px 0; border-top: 1px solid var(--ink-3); }
.product .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.product.flip .media { order: -1; }
.product .icon { width: 56px; height: 56px; border-radius: 13px; }
.product.is-loupe h2 { color: var(--pink); }
.product.is-komame h2 { color: var(--cyan); }
.product h2 { font: 700 20px/1 var(--body); letter-spacing: .02em; margin-top: 18px; display: flex; align-items: center; gap: 12px; }
.product .tagline { font-family: var(--display); font-size: clamp(30px, 4.2vw, 50px); line-height: 1.22; margin-top: 12px; text-wrap: balance; word-break: auto-phrase; }
html[lang="en"] .product .tagline { font-weight: 700; letter-spacing: -.02em; line-height: 1.08; }
.product .what { margin-top: 18px; color: var(--mute); max-width: 32em; }
.product .facts { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 15px; }
.product .facts li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 10px; vertical-align: 2px; opacity: .7; }
.product.is-loupe .facts { color: #ff9bb2; }
.product.is-komame .facts { color: #9eeef5; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; }
.btn-pink { background: var(--pink); color: var(--white); }
.btn-cyan { background: var(--cyan); color: var(--ink); }
.btn-line { border: 2px solid #5a4b52; color: var(--white); }
.btn:hover { filter: brightness(1.1); }

/* Loupe: a lens with the looping cut inside */
.lensbox { position: relative; aspect-ratio: 1; max-width: 460px; margin-inline: auto; }
.lensbox .lens { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; border: 10px solid var(--pink); background: #000; }
.lensbox .lens video, .lensbox .lens img { width: 100%; height: 100%; object-fit: cover; }
.lensbox .handle { position: absolute; width: 34%; height: 9%; right: -12%; bottom: 6%; background: var(--pink); border-radius: 999px; rotate: 45deg; }
.lensbox .tag { position: absolute; left: -4%; bottom: 8%; background: var(--white); color: var(--ink); border-radius: 8px; padding: 8px 12px; font-size: 14px; line-height: 1.4; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.lensbox .tag b { display: block; }

/* Komame: a frame with a grease-pencil circle and a note */
.framebox { position: relative; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--ink-3); }
.framebox img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.framebox svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.framebox .note { position: absolute; right: 4%; top: 6%; max-width: 46%; background: var(--white); color: var(--ink); border-radius: 8px; padding: 10px 12px; font-size: 14px; line-height: 1.45; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.framebox .note .tc { color: var(--pink); font-weight: 600; font-size: 15px; display: block; }
.framebox .bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--ink-2); font-size: 13px; color: var(--mute); }
.framebox .bar i { flex: 1; height: 4px; border-radius: 2px; background: var(--ink-3); position: relative; }
.framebox .bar i::after { content: ""; position: absolute; left: 41%; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--pink); }

/* how we make them */
.ways { padding: 104px 0; background: var(--white); color: var(--ink); }
.ways h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.25; max-width: 18em; }
.ways .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 48px; }
.ways h3 { font-size: 22px; line-height: 1.35; }
.ways p { margin-top: 10px; color: #5c4d54; font-size: 16px; }

/* maker */
.maker { padding: 104px 0; }
.maker .wrap { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; }
.maker .who { position: sticky; top: 90px; }
.maker .who .name { font: 700 28px/1.3 var(--body); }
.maker .who .role { color: var(--mute); margin-top: 6px; font-size: 15px; }
.maker .story { display: grid; gap: 18px; max-width: 36em; }
.maker .story p:first-child { font-size: 22px; line-height: 1.7; }
.maker .credit { font-size: 13px; color: var(--mute); }

/* footer */
.foot { border-top: 1px solid var(--ink-3); padding: 34px 0 48px; font-size: 14px; color: var(--mute); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.foot .links { display: flex; flex-wrap: wrap; gap: 18px; margin-left: auto; }
.foot p { width: 100%; font-size: 12px; }

@media (max-width: 860px) {
  .top nav a:not(.lang) { display: none; }
  .hero { padding-top: 48px; }
  .timeline { --label: 48px; }
  .track > .name { font-size: 12px; }
  .ruler span:nth-child(even) { display: none; }
  .lane { height: 64px; }
  .clip img, .clip small { display: none; }
  .clip { padding: 0 10px; }
  .clip b { font-size: 15px; }
  .clip.loupe { width: 46%; }
  .clip.edit { left: 18%; width: 64%; }
  .clip.komame { left: 54%; width: 46%; }
  .product { padding: 72px 0; }
  .product .wrap, .maker .wrap { grid-template-columns: 1fr; gap: 36px; }
  .product.flip .media { order: 0; }
  .lensbox { max-width: 300px; }
  .ways { padding: 72px 0; }
  .ways .cols { grid-template-columns: 1fr; gap: 28px; }
  .maker { padding: 72px 0; }
  .maker .who { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .playhead { animation: none; left: calc(var(--label) + (100% - var(--label)) * .985); }
}
